-
-
Notifications
You must be signed in to change notification settings - Fork 471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[16.0][ADD] queue_job_chunk: add module #737
base: 16.0
Are you sure you want to change the base?
Conversation
…ion according to user, modify tests
@bealdav following your suggestion I moved the PR OCA/sale-channel#20 to this repo. |
f76736b
to
df8afc2
Compare
except RetryableJobError: | ||
raise | ||
except Exception as e: | ||
if DEBUG_MODE: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kevinkhao coming back to your remark on the last PR, what do you mean by :
if "pdb" in config.get("dev_mode"):
?
I've never seen something like this, but I'll be happy to learn with an example!
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@clementmbr
odoo-bin --dev=pdb will evaluate to True
Hello, please pardon me if I'm wrong, but isn't it a bit the same idea of the split method that was merged recently in the queue_job module #658 ? If not, how does it differ? |
From what I understand the main difference with @paradoxxxzero 's split() method is that the chunk allows a more in depth control of the incoming data, with the fields like data_str, state_info and the stack_trace in case of errors, which is vital when importing Sale Orders like in sale_import_base. So it looks like different use cases. |
Yes, I think the goal here is not to use queue job directly because it is a very technical object. We want to use queue job and all the machinery to run stuff automatically and all, but we want to have a separate object which allow to :
Now, @rvalyi has a point... if it is not used to split jobs...why is it named queue_job_chunk? It does not really make sense. I think this should be fully refactored doing the following :
Nice to have but can wait I guess
|
Adds the notion of queue job chunks, essentially a queue job with some metadata.
Useful to store the JSON received by an API request before their treatment in Odoo.
cc @florian-dacosta @kevinkhao @bealdav @sebastienbeau @rvalyi