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

Fix send_header_body

parent b3d8397e
No related branches found
No related tags found
1 merge request!24Add the possibility to send a header and a body in Xbus emitter jobs.
Pipeline #52974 passed
Changelog
=========
7.0.1.1.1 (UNRELEASED)
----------------------
When a header and a body are requested to be injected in a Xbus emitter job,
these data must not be inserted in the sent items, but in the job creation
values.
7.0.1.1.0 (2023-03-22)
----------------------
Add the possibility to send a header and a body in Xbus emitter jobs.
......@@ -4,9 +11,8 @@
7.0.1.1.0 (2023-03-22)
----------------------
Add the possibility to send a header and a body in Xbus emitter jobs.
7.0.1.0.0 (2016-12-15)
----------------------
......
......@@ -38,7 +38,7 @@
$ pip install zmq_rpc
""",
"version": "7.0.1.1.0",
"version": "7.0.1.1.1",
"category": "Technical",
"author": "XCG Consulting",
"website": "https://orbeet.io/",
......
......@@ -197,7 +197,8 @@
if delayed:
# Just add to the job queue.
job_values = context.get("job_values", {})
emitter_job_id = self.pool["xbus.emitter.job"].create(
cr,
uid,
......@@ -200,12 +201,15 @@
emitter_job_id = self.pool["xbus.emitter.job"].create(
cr,
uid,
{
"emitter_id": emitter.id,
"event_type": event_type,
"items": json.dumps(items),
},
dict(
{
"emitter_id": emitter.id,
"event_type": event_type,
"items": json.dumps(items),
},
**job_values
),
context=context,
)
......@@ -330,8 +334,11 @@
"body": body,
"chunking": SELECTION_CHUNKING_AUTO,
}
context["job_values"] = job_values
return self.send_items(
cr,
uid,
ids,
event_type,
......@@ -333,9 +340,9 @@
return self.send_items(
cr,
uid,
ids,
event_type,
job_values,
{},
delayed=delayed,
context=context,
)
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