diff --git a/tr_sys/tr_ars/api.py b/tr_sys/tr_ars/api.py index ef329170..c0f0b233 100644 --- a/tr_sys/tr_ars/api.py +++ b/tr_sys/tr_ars/api.py @@ -84,7 +84,6 @@ def submit(req): logger.debug("submit") """Query submission""" logger.debug("entering submit") - submission_time = timezone.now() if req.method != 'POST': return HttpResponse('Only POST is permitted!', status=405) @@ -105,7 +104,7 @@ def submit(req): if(isinstance(wf,list)): if(len(wf)>0): message = Message.create(code=202, status='Running', data=data, - actor=get_workflow_actor(), timestamp=submission_time) + actor=get_workflow_actor()) logger.debug("Sending message to workflow runner")#TO-DO CHANGE # message.save() # send_message(get_workflow_actor().to_dict(),message.to_dict()) @@ -113,7 +112,7 @@ def submit(req): # content_type='application/json', status=201) else: message = Message.create(code=202, status='Running', data=data, - actor=get_default_actor(), timestamp=submission_time) + actor=get_default_actor()) if 'name' in data: message.name = data['name'] @@ -216,6 +215,7 @@ def trace_message(req, key): 'message': str(mesg.id), 'status': dict(Message.STATUS)[mesg.status], 'code':mesg.code, + 'timestamp': str(mesg.timestamp), 'actor': { 'pk': mesg.actor.pk, 'inforesid': mesg.actor.inforesid,