Commit 2257eab3 authored by Michael Salim's avatar Michael Salim

fixed status_send bug

parent 5469a4e4
......@@ -18,7 +18,7 @@ class BalsamStatusSender(object):
MessageClass = SENDER_MAP[sender_mode]
self.messageInterface = MessageClass(settings)
def send_status(job,message=''):
def send_status(self,job,message=''):
'''send a status message describing a job state'''
p = self.messageInterface
try:
......
......@@ -203,6 +203,7 @@ def finish_job(job):
''' simply change state to Finished and send status to user '''
job.state = JOB_FINISHED.name
job.save(update_fields=['state'],using=db_tools.get_db_connection_id(job.pk))
message= "Success!"
status_sender = BalsamStatusSender.BalsamStatusSender(settings.SENDER_CONFIG)
status_sender.send_status(job,message)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment