-
-
Notifications
You must be signed in to change notification settings - Fork 460
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
[18.0][MIG] queue_job: Migrate to 18.0 #692
Conversation
The float_time widget shows hours seconds, we only want seconds. The widget had been removed on the form view, but not on the tree view.
Use case: * you have a root channel per scope/app (eg: root.edi) * you have several sub channels (eg: root.edi.ubl.sales, root.edi.gs1.delivery) * you want to configure capacity only for the main channel "root.edi" Before this change, the channel manager falls back on root channel. However, if you have a specific parent channel configured it sounds a good idea to use it.
Contributing since a while... :)
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: queue-15.0/queue-15.0-queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-15-0/queue-15-0-queue_job/
test_queue_job will create channels root.sub and root.sub.sub, so the tests doing the same thing will fail with a unique constraint error.
When displayed in a tab, the widget show the nodes offset, the d3 network is probably confused by the size or visibility of its canvas. Install a listener on tabs to trigger a fit() on the network.
A graph of jobs always share the same graph_uuid, which can be used to group jobs, but is also a faster way to find all the jobs of the graph. Then we can use the dependencies field to build the whole graph from the pre-selection of jobs.
Currently translated at 100.0% (12 of 12 strings) Translation: queue-17.0/queue-17.0-test_queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-17-0/queue-17-0-test_queue_job/zh_CN/
Use the current company to trigger the job (+ add related tests) [14.0][FIX] queu_job: allowed_company_ids => use with_company(...) Fill allowed_company_ids from context with the job's company instead of every allowed companies of the user. Because most of the time, a job is related to only one company. And adding every allowed companies of the user into the context may load some unexpected records (during search for example). Because standards ir.rule use ['|',('company_id','=',False),('company_id', 'in', company_ids)] and this 'company_ids' is filled with every allowed companies from the context.
OCA#348 added support for randomized retry intervals. Configuration of randomized retry intervals is not possible due to the formatting checks not being updated. This should fix it.
- an explicit flush is needed or child jobs won't be updated - no need to forward port, this was fixed already in 16.0+
As the 'queue_job__no_delay' context key is the valid one to use, don't raise warnings during tests, but log it as information level.
191a454
to
d308edc
Compare
@thienvh332 please don't change the behaviour based on test_enabled. Better use |
d308edc
to
0447d9a
Compare
Hi @sbidoul |
0447d9a
to
c062b72
Compare
As commented in unittest, I am not able to control the printing of WARNING. So I will revert to the original handling. If you guys have any suggestions to handle it I will fix it. |
This PR has the |
The problem is we don't see what you tried anymore, so it's difficult to help. |
c062b72
to
bb4b6f6
Compare
Hi @sbidoul , indeed I should have pushed a fixup commit instead of force-pushing
Thanks for your help |
@thienvh332 looks good, thanks! |
/ocabot merge nobump |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 4b8b0fe. Thanks a lot for contributing to OCA. ❤️ |
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.
A few remarks, LG overall
@@ -279,20 +282,23 @@ def test_delayable_group_of_chain(self): | |||
) | |||
|
|||
def test_log_not_delayed(self): | |||
logger_name = "odoo.addons.queue_job" | |||
with self.assertLogs(logger_name, level="WARN") as test: | |||
with self.assertLogs(level=logging.WARNING) as test: |
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.
Any WARNING log would be catched here, we should keep the logger filter.
result = ( | ||
self.env["test.queue.job"] | ||
.with_context(_job_force_sync=True) | ||
.delay_me(1, kwarg=2) | ||
) |
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.
why aren't we keeping this _job_force_sync
context key in the test_auto_delay_force_sync
test method ?
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.
Hi @mmequignon ,
- Simone introduced that standardization in 16.0 ([16.0] queue_job: unify no delay option #521). It should have been dropped as part of 17.0 migration but wasn't.
- So it's dropped in 18.0
Ported PRs
wait_dependencies
state #629Changes
Cleaned TODO tags
Refactor the JobSerialized field on top of odoo.fields.Json