# Notify the user that the task called back home if using a WMS
iftask.computing.wms:
logger.info('Agent API sending task ready mail notification to "{}"'.format(task.user.email))
mail_subject='Your Task "{}" is now starting up'.format(task.container.name)
mail_text='Hello,\n\nyour Task "{}" on {} is now starting up. Check logs or connect here: https://{}/tasks/?uuid={}\n\nThe Rosetta notifications bot.'.format(task.container.name,task.computing,settings.ROSETTA_HOST,task.uuid)
mail_subject='Your task "{}" is now starting up'.format(task.container.name)
mail_text='Hello,\n\nyour task "{}" on the computing resource "{}" is now starting up. Connect or check logs here: https://{}/tasks/?uuid={}\n\nThe Rosetta platform.'.format(task.container.name,task.computing.name,settings.ROSETTA_HOST,task.uuid)
send_email(to=user.email,subject='Rosetta login link',text='Hello,\n\nhere is your login link: https://{}/login/?token={}\n\nOnce logged in, you can go to "My Account" and change password (or just keep using the login link feature).\n\nThe Rosetta Team.'.format(settings.ROSETTA_HOST,token))
send_email(to=user.email,subject='Rosetta login link',text='Hello,\n\nhere is your login link: https://{}/login/?token={}\n\nOnce logged in, you can go to "My Account" and change password (or just keep using the login link feature).\n\nThe Rosetta platform.'.format(settings.ROSETTA_HOST,token))
exceptExceptionase:
logger.error(format_exception(e))
raiseErrorMessage('Something went wrong. Please retry later.')