Skip to content
Snippets Groups Projects
Commit b12f46262271 authored by Etienne Ferriere's avatar Etienne Ferriere
Browse files

Revised the automatic process deleting obsolete Xbus emitter jobs, to ensure all

useless jobs are deleted.
parent b5ff7e6cbe55
Branches branch/11.0
No related tags found
1 merge request!21Revised the automatic process deleting obsolete Xbus emitter jobs, to ensure all
Pipeline #44530 passed
......@@ -2,6 +2,12 @@
Changelog
*********
11.0.1.2.1
==========
* Revised the automatic process deleting obsolete Xbus emitter jobs, to ensure
that all useless jobs are deleted.
11.0.1.2.0
==========
......
......@@ -21,7 +21,7 @@
{
"name": "Xbus Emitter",
"license": "AGPL-3",
"version": "11.0.1.2.0",
"version": "11.0.1.2.1",
"category": "",
"author": "XCG Consulting",
"website": "http://odoo.consulting/",
......
......@@ -156,4 +156,6 @@
jobs = self.search(
[
("state", "in", ["sent_error", "sent_success"]),
("write_date", "<=", fields.Datetime.to_string(deadline)),
"|",
("date_sent", "=", False),
......@@ -159,4 +161,14 @@
("date_sent", "=", False),
("date_sent", "<=", fields.Datetime.to_string(deadline)),
]
)
log.info("%s, %s", len(jobs), jobs)
jobs.unlink()
# Remove jobs blocked in running process state.
jobs = self.search(
[
("state", "=", "process_running"),
("write_date", "<=", fields.Datetime.to_string(deadline)),
]
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment