feat: Added finished condition while unlocking
This commit is contained in:
parent
e8b3f8f710
commit
36033d4145
1 changed files with 4 additions and 0 deletions
|
|
@ -135,6 +135,10 @@ class SubmissionQueue(Document):
|
|||
|
||||
if status in ("queued", "started"):
|
||||
frappe.msgprint(_("Document in queue for execution!"))
|
||||
elif status == "finished":
|
||||
self.queued_doc.unlock()
|
||||
frappe.db.set_value(self.doctype, self.name, {"status": "Finished"}, update_modified=False)
|
||||
frappe.msgprint(_("Document Unlocked"))
|
||||
else:
|
||||
self.queued_doc.unlock()
|
||||
values = {"status": "Failed", "exception": job.exc_info}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue