returnHttpResponse('Port not valid (got "{}")'.format(task_interface_port))
# Set fields
logger.info('Setting task "{}" to ip "{}" and port "{}"'.format(task.uuid,task_interface_ip,task_interface_port))
logger.info('Agent API setting task "{}" to ip "{}" and port "{}"'.format(task.uuid,task_interface_ip,task_interface_port))
task.status=TaskStatuses.running
task.interface_ip=task_interface_ip
@@ -349,7 +349,7 @@ print(port)
# Notify the user that the task called back home if using a WMS
iftask.computing.wms:
ifsettings.DJANGO_EMAIL_APIKEY:
logger.info('Sending task ready mail notification to "{}"'.format(task.user.email))
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)
try:
@@ -449,7 +449,7 @@ class FileManagerAPI(PrivateGETAPI, PrivatePOSTAPI):
else:
raiseNotImplementedError('Accessing a storage with ssh+cli without going through its computing resource is not implemented')