-
-
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
[17.0][MIG] queue_job + test_queue_job: Migration to 17.0 #593
Commits on Nov 24, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 625be78 - Browse repository at this point
Copy the full SHA 625be78View commit details -
Configuration menu - View commit details
-
Copy full SHA for 35a36f5 - Browse repository at this point
Copy the full SHA 35a36f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for f795f3e - Browse repository at this point
Copy the full SHA f795f3eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f559149 - Browse repository at this point
Copy the full SHA f559149View commit details -
Configuration menu - View commit details
-
Copy full SHA for 44c63b8 - Browse repository at this point
Copy the full SHA 44c63b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for c0666bc - Browse repository at this point
Copy the full SHA c0666bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 68bb768 - Browse repository at this point
Copy the full SHA 68bb768View commit details -
Translated using Weblate (Spanish)
Currently translated at 3.7% (5 of 135 strings) 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/es/
Configuration menu - View commit details
-
Copy full SHA for 77249c3 - Browse repository at this point
Copy the full SHA 77249c3View commit details -
Translated using Weblate (Spanish)
Currently translated at 100.0% (135 of 135 strings) 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/es/
Configuration menu - View commit details
-
Copy full SHA for 384af18 - Browse repository at this point
Copy the full SHA 384af18View commit details -
Translated using Weblate (Chinese (Simplified))
Currently translated at 83.2% (114 of 137 strings) 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/zh_CN/
Configuration menu - View commit details
-
Copy full SHA for 3d1db14 - Browse repository at this point
Copy the full SHA 3d1db14View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5528589 - Browse repository at this point
Copy the full SHA 5528589View commit details -
Configuration menu - View commit details
-
Copy full SHA for 255f4f0 - Browse repository at this point
Copy the full SHA 255f4f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for cbf576c - Browse repository at this point
Copy the full SHA cbf576cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b8f75af - Browse repository at this point
Copy the full SHA b8f75afView commit details -
Configuration menu - View commit details
-
Copy full SHA for ea6e888 - Browse repository at this point
Copy the full SHA ea6e888View commit details -
Configuration menu - View commit details
-
Copy full SHA for 389b2d0 - Browse repository at this point
Copy the full SHA 389b2d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for b8ac146 - Browse repository at this point
Copy the full SHA b8ac146View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb42932 - Browse repository at this point
Copy the full SHA cb42932View commit details -
Configuration menu - View commit details
-
Copy full SHA for 552f843 - Browse repository at this point
Copy the full SHA 552f843View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d5b901 - Browse repository at this point
Copy the full SHA 5d5b901View commit details -
Configuration menu - View commit details
-
Copy full SHA for 28d5d94 - Browse repository at this point
Copy the full SHA 28d5d94View commit details -
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: queue-16.0/queue-16.0-queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-queue_job/
Configuration menu - View commit details
-
Copy full SHA for 34b2ed4 - Browse repository at this point
Copy the full SHA 34b2ed4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 974a9bb - Browse repository at this point
Copy the full SHA 974a9bbView commit details -
Disable storing of context in jobs recordsets by default
It can still be activated by overriding a method.
Configuration menu - View commit details
-
Copy full SHA for 35078f9 - Browse repository at this point
Copy the full SHA 35078f9View commit details -
[FIX] queue_job: Add base_sparse_field dependency to prevent errors i…
…n test if addon not loaded. TT35938
Configuration menu - View commit details
-
Copy full SHA for f4a5690 - Browse repository at this point
Copy the full SHA f4a5690View commit details -
[FIX] queue_job: Update documentation to remove unnecessary addon (ba…
…se_sparse_field) from server_wide_modules. OCA#443 (comment)
Configuration menu - View commit details
-
Copy full SHA for 3fef9e4 - Browse repository at this point
Copy the full SHA 3fef9e4View commit details -
queue_job - activate the base context keys
Co-authored-by: Stéphane Bidoul <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d90e60c - Browse repository at this point
Copy the full SHA d90e60cView commit details -
Configuration menu - View commit details
-
Copy full SHA for abac658 - Browse repository at this point
Copy the full SHA abac658View commit details -
Configuration menu - View commit details
-
Copy full SHA for 07f3017 - Browse repository at this point
Copy the full SHA 07f3017View commit details -
Configuration menu - View commit details
-
Copy full SHA for 333005a - Browse repository at this point
Copy the full SHA 333005aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 948f51f - Browse repository at this point
Copy the full SHA 948f51fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 19deecf - Browse repository at this point
Copy the full SHA 19deecfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ccb3b2 - Browse repository at this point
Copy the full SHA 7ccb3b2View commit details -
Translated using Weblate (German)
Currently translated at 86.3% (114 of 132 strings) Translation: queue-16.0/queue-16.0-queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-queue_job/de/
Configuration menu - View commit details
-
Copy full SHA for 5ba157f - Browse repository at this point
Copy the full SHA 5ba157fView commit details -
[DOC] describe how to write queue.job.function in case of function de…
…fined in abstract model
Configuration menu - View commit details
-
Copy full SHA for 7174e69 - Browse repository at this point
Copy the full SHA 7174e69View commit details -
Change technical fields to read-only
These fields should not be changed by users.
Configuration menu - View commit details
-
Copy full SHA for bbebe99 - Browse repository at this point
Copy the full SHA bbebe99View commit details -
Several fields on queue.job are initialized using computed fields, then never changed again. On creation of a queue.job record, we'll have an initial INSERT + at least one following UPDATE for the computed fields. Replace all the stored computed fields by a raw initialization of the values in `Job.store()` when the job is created, so we have only a single INSERT. Highlights: * as channel is no longer a compute/inverse field, override_channel is useless, I dropped it (actually the same value was stored in both channel and override_channel as the channel field was stored) * one functional diff is that now, when changing a channel on a job.function, the channel is no longer synchronized on existing jobs, it will be applied only on new jobs: actually this is an improvement, because it was impossible to change the channel of a job function in a large queue_job table as it meant writing on all the done/started jobs * searching the queue.job.function is now cached, as each job using the same will run a query on queue_job_function
Configuration menu - View commit details
-
Copy full SHA for feb6759 - Browse repository at this point
Copy the full SHA feb6759View commit details -
Remove initial create notification and follower
Everytime a job is created, a mail.message "Queue Job created" is created. This is useless, as we already have the creation date and user, and nobody will ever want to receive a notification for a created job anyway. Removing the on creation auto-subscription of the user that created the job makes sense as well since we automatically subscribe the queue job managers for failures. Add the owner of the jobs to the followers on failures only as well. It allows to remove a lot of insertions of records (and of deletions when autovacuuming jobs).
Configuration menu - View commit details
-
Copy full SHA for 21b4db7 - Browse repository at this point
Copy the full SHA 21b4db7View commit details -
Configuration menu - View commit details
-
Copy full SHA for cd00723 - Browse repository at this point
Copy the full SHA cd00723View commit details -
Configuration menu - View commit details
-
Copy full SHA for ff655be - Browse repository at this point
Copy the full SHA ff655beView commit details -
Fix missing rollback on retried jobs
When RetryableJobError was raised, any change done by the job was not rollbacked. Using `raise` would throw the exception up to the core and rollback, but we would have a stack trace in the logs for each try. Calling rollback manually (rollback also clears the env) hide the tracebacks, however, when the last try fails, the full traceback is still shown in the logs. Fixes OCA#261
Configuration menu - View commit details
-
Copy full SHA for 091fab9 - Browse repository at this point
Copy the full SHA 091fab9View commit details -
Fix date_done set when state changes back to pending
When Job.date_done has been set, for instance because the job has been performed, if the job is set back to pending (e.g. a RetryableJobError is raised), the date_done is kept.
Configuration menu - View commit details
-
Copy full SHA for cd1c0db - Browse repository at this point
Copy the full SHA cd1c0dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for c130c64 - Browse repository at this point
Copy the full SHA c130c64View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4158ab1 - Browse repository at this point
Copy the full SHA 4158ab1View commit details -
Configuration menu - View commit details
-
Copy full SHA for aaa2df6 - Browse repository at this point
Copy the full SHA aaa2df6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b3c651 - Browse repository at this point
Copy the full SHA 3b3c651View commit details -
Fix display on exec_time on tree view as seconds
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.
Configuration menu - View commit details
-
Copy full SHA for af0b634 - Browse repository at this point
Copy the full SHA af0b634View commit details -
Configuration menu - View commit details
-
Copy full SHA for 95c7ea7 - Browse repository at this point
Copy the full SHA 95c7ea7View commit details -
Configuration menu - View commit details
-
Copy full SHA for e08e3a5 - Browse repository at this point
Copy the full SHA e08e3a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for bb600b8 - Browse repository at this point
Copy the full SHA bb600b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a1bb53 - Browse repository at this point
Copy the full SHA 8a1bb53View commit details -
Configuration menu - View commit details
-
Copy full SHA for 38cd2ed - Browse repository at this point
Copy the full SHA 38cd2edView commit details -
Configuration menu - View commit details
-
Copy full SHA for 491c4cb - Browse repository at this point
Copy the full SHA 491c4cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 60fceb1 - Browse repository at this point
Copy the full SHA 60fceb1View commit details -
queue_job: use parent channel if configured
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.
Configuration menu - View commit details
-
Copy full SHA for 2b45ebc - Browse repository at this point
Copy the full SHA 2b45ebcView commit details -
queue_job: update contributors
Contributing since a while... :)
Configuration menu - View commit details
-
Copy full SHA for 5d39360 - Browse repository at this point
Copy the full SHA 5d39360View commit details -
Configuration menu - View commit details
-
Copy full SHA for 90b4c23 - Browse repository at this point
Copy the full SHA 90b4c23View commit details -
Configuration menu - View commit details
-
Copy full SHA for c2ebe8b - Browse repository at this point
Copy the full SHA c2ebe8bView commit details -
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/
Configuration menu - View commit details
-
Copy full SHA for cc6b2c4 - Browse repository at this point
Copy the full SHA cc6b2c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8fe4005 - Browse repository at this point
Copy the full SHA 8fe4005View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0fccd0e - Browse repository at this point
Copy the full SHA 0fccd0eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ab4df44 - Browse repository at this point
Copy the full SHA ab4df44View commit details -
Configuration menu - View commit details
-
Copy full SHA for bca9bb4 - Browse repository at this point
Copy the full SHA bca9bb4View commit details -
Configuration menu - View commit details
-
Copy full SHA for ab54369 - Browse repository at this point
Copy the full SHA ab54369View commit details -
Configuration menu - View commit details
-
Copy full SHA for 503f688 - Browse repository at this point
Copy the full SHA 503f688View commit details -
Fix tests failing when test_queue_job is installed
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.
Configuration menu - View commit details
-
Copy full SHA for d4cb839 - Browse repository at this point
Copy the full SHA d4cb839View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f3c5bf - Browse repository at this point
Copy the full SHA 9f3c5bfView commit details -
Show the dependency widget in a tab
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.
Configuration menu - View commit details
-
Copy full SHA for 4637be8 - Browse repository at this point
Copy the full SHA 4637be8View commit details -
Configuration menu - View commit details
-
Copy full SHA for b734dca - Browse repository at this point
Copy the full SHA b734dcaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 13809fa - Browse repository at this point
Copy the full SHA 13809faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 44c2c6a - Browse repository at this point
Copy the full SHA 44c2c6aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 89261e7 - Browse repository at this point
Copy the full SHA 89261e7View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for ea95bef - Browse repository at this point
Copy the full SHA ea95befView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e059bb - Browse repository at this point
Copy the full SHA 1e059bbView commit details -
Ignore requeues on dependency jobs waiting on parent jobs
Jobs waiting that their dependencies are executed cannot be requeued. They have to keep waiting their turn.
Configuration menu - View commit details
-
Copy full SHA for 3d75d36 - Browse repository at this point
Copy the full SHA 3d75d36View commit details -
Configuration menu - View commit details
-
Copy full SHA for 547d383 - Browse repository at this point
Copy the full SHA 547d383View commit details -
Configuration menu - View commit details
-
Copy full SHA for 16e81e7 - Browse repository at this point
Copy the full SHA 16e81e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for aa5a7af - Browse repository at this point
Copy the full SHA aa5a7afView commit details -
Add powerful context manager for running tests on jobs
* mock_jobs context manager with assert methods to check enqueued jobs * jobs are not stored in database, yet they can be inspected and performed during the test * the context manager works with graphs enqueued by delayable and with with_delay() * direct execution of jobs works with graphs by executing them synchronously following their topological sort
Configuration menu - View commit details
-
Copy full SHA for 273782a - Browse repository at this point
Copy the full SHA 273782aView commit details -
Set graph_uuid only once in DelayableGraph
The previous implementation was incomplete, as it was setting the graph_uuid when `Job.add_depends()` was called. It had the advantage of being correct when (for e.g. a test) manually created a Job and called `add_depends()`, but it could not work when in some situations involving a group where one of the job has no job depending on it. Also, remove ``Job.add_reverse_depends()`` which is not used.
Configuration menu - View commit details
-
Copy full SHA for dd25688 - Browse repository at this point
Copy the full SHA dd25688View commit details -
Configuration menu - View commit details
-
Copy full SHA for 83719b1 - Browse repository at this point
Copy the full SHA 83719b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for f752d72 - Browse repository at this point
Copy the full SHA f752d72View commit details -
* Fix a js bug when there is no graph. * Use a single read group for multiple jobs
Configuration menu - View commit details
-
Copy full SHA for 6017a8c - Browse repository at this point
Copy the full SHA 6017a8cView commit details -
Configuration menu - View commit details
-
Copy full SHA for d959c0a - Browse repository at this point
Copy the full SHA d959c0aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 683b466 - Browse repository at this point
Copy the full SHA 683b466View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3af044b - Browse repository at this point
Copy the full SHA 3af044bView commit details -
Improve graph widget performance
When showing large graphs, like 300 jobs (not really a real life case maybe), the graph takes a dozen of seconds to render. Disabling the stabilization helps a lot.
Configuration menu - View commit details
-
Copy full SHA for f719995 - Browse repository at this point
Copy the full SHA f719995View commit details -
Configuration menu - View commit details
-
Copy full SHA for e3f01b0 - Browse repository at this point
Copy the full SHA e3f01b0View commit details -
Fix things required by odoo 14.0 or python 3.9
* Renaming the TestXxx models in test_queue_job is because of pytest that complains, confusing them for test classes * logger.warn is deprecated in favor of logger.warning * Add invalidation of cache in SQL update that enqueue dependent jobs * Flush in a test, the same is done currently in the controller * Weird one: we can no longer compare the bound methods of the models, compare their __func__ which is equal.
Configuration menu - View commit details
-
Copy full SHA for a34078f - Browse repository at this point
Copy the full SHA a34078fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 08a0951 - Browse repository at this point
Copy the full SHA 08a0951View commit details -
The assert fails to show the method's details if we store the __func__ in JobCall. Anyway, it was hackish to change the content of "method".
Configuration menu - View commit details
-
Copy full SHA for f57efbd - Browse repository at this point
Copy the full SHA f57efbdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0ec407e - Browse repository at this point
Copy the full SHA 0ec407eView commit details -
Rename mock_jobs() to trap_jobs()
The fact that mocks are used is an implementation detail, and is actually hidden to the end user of the test API.
Configuration menu - View commit details
-
Copy full SHA for 02d1f8f - Browse repository at this point
Copy the full SHA 02d1f8fView commit details -
Rename dependency method done() to on_done()
on_done() is maybe a better choice, it is less ambiguous than then() (clearer on the fact it happens on done()) and done() (less confusion with set_done()). I'll do the renaming soon, unless you have other suggestions. Ref: OCA#154 (comment)
Configuration menu - View commit details
-
Copy full SHA for 60ca441 - Browse repository at this point
Copy the full SHA 60ca441View commit details -
Configuration menu - View commit details
-
Copy full SHA for e257060 - Browse repository at this point
Copy the full SHA e257060View commit details -
Configuration menu - View commit details
-
Copy full SHA for da82ed3 - Browse repository at this point
Copy the full SHA da82ed3View commit details -
Configuration menu - View commit details
-
Copy full SHA for bed371b - Browse repository at this point
Copy the full SHA bed371bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8c114fd - Browse repository at this point
Copy the full SHA 8c114fdView commit details -
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/
Configuration menu - View commit details
-
Copy full SHA for 38ab83c - Browse repository at this point
Copy the full SHA 38ab83cView commit details -
[MIG] queue_job, test_queue_job: Forward port queue from 15.0
This forward port takes all the changes from 15.0 not yet into 16.0 up to OCA@173b6ca This FP contains the new queue dependencies functionality. The dedicated widget used to display the dependecies graph on the job form is also migrated to owl
Configuration menu - View commit details
-
Copy full SHA for bdad9c9 - Browse repository at this point
Copy the full SHA bdad9c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9016a67 - Browse repository at this point
Copy the full SHA 9016a67View commit details -
Configuration menu - View commit details
-
Copy full SHA for 24e33db - Browse repository at this point
Copy the full SHA 24e33dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6cb22e2 - Browse repository at this point
Copy the full SHA 6cb22e2View commit details -
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: queue-16.0/queue-16.0-queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-queue_job/
Configuration menu - View commit details
-
Copy full SHA for c4854fd - Browse repository at this point
Copy the full SHA c4854fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for c276ec5 - Browse repository at this point
Copy the full SHA c276ec5View commit details -
Configuration menu - View commit details
-
Copy full SHA for b9e4627 - Browse repository at this point
Copy the full SHA b9e4627View commit details -
Configuration menu - View commit details
-
Copy full SHA for c860bbb - Browse repository at this point
Copy the full SHA c860bbbView commit details -
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: queue-16.0/queue-16.0-queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-queue_job/
Configuration menu - View commit details
-
Copy full SHA for bf3046a - Browse repository at this point
Copy the full SHA bf3046aView commit details -
[FIX] Patch Request._get_session_and_dbname to get db from URL
In servers with multiple databases db is not captured from URL when processing jobs in /queue_job/runjob With this patch db is set from the db param in URL when calling the runjob endpoint Fixes OCA#503
Configuration menu - View commit details
-
Copy full SHA for ddb8a4d - Browse repository at this point
Copy the full SHA ddb8a4dView commit details -
[FIX] queue_job: Commit was removed, but that could be a problem if y…
…ou generated too much records
Configuration menu - View commit details
-
Copy full SHA for 6cec77b - Browse repository at this point
Copy the full SHA 6cec77bView commit details -
Translated using Weblate (Spanish)
Currently translated at 82.0% (128 of 156 strings) Translation: queue-16.0/queue-16.0-queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-queue_job/es/
Configuration menu - View commit details
-
Copy full SHA for 8712495 - Browse repository at this point
Copy the full SHA 8712495View commit details -
Configuration menu - View commit details
-
Copy full SHA for cd301cb - Browse repository at this point
Copy the full SHA cd301cbView commit details -
Fix cursor already closed error on retryable errors
When a job is postponed because of a retryable error, as the error is not re-raised, we reach the new method self._enqueue_dependent_jobs(env, job) With a closed cursor. Return early in case of postponing, as there is no chance dependent jobs can become pending anyway.
Configuration menu - View commit details
-
Copy full SHA for 4376bb2 - Browse repository at this point
Copy the full SHA 4376bb2View commit details -
[IMP] queue_job: add configuration options for
jobrunner_db_user, jobrunner_db_password
Configuration menu - View commit details
-
Copy full SHA for e901be2 - Browse repository at this point
Copy the full SHA e901be2View commit details -
Configuration menu - View commit details
-
Copy full SHA for d965c03 - Browse repository at this point
Copy the full SHA d965c03View commit details -
Configuration menu - View commit details
-
Copy full SHA for 21f3c5c - Browse repository at this point
Copy the full SHA 21f3c5cView commit details -
queue_job: unify no delay option
Current situation: * multiple keys for no good reason * half baked: not all of them used everywhere * no centralization * poor naming With this change we'll have: * 1 and only one key to disable via ctx: ``queue_job__no_delay`` * 1 and only one key to disable via os env: ``QUEUE_JOB__NO_DELAY`` * backward compatibility with deprecation for old keys
Configuration menu - View commit details
-
Copy full SHA for 6692e96 - Browse repository at this point
Copy the full SHA 6692e96View commit details -
Configuration menu - View commit details
-
Copy full SHA for 258874d - Browse repository at this point
Copy the full SHA 258874dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 67655e1 - Browse repository at this point
Copy the full SHA 67655e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e5a50b - Browse repository at this point
Copy the full SHA 0e5a50bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6b6ccde - Browse repository at this point
Copy the full SHA 6b6ccdeView commit details -
Configuration menu - View commit details
-
Copy full SHA for e6699a9 - Browse repository at this point
Copy the full SHA e6699a9View commit details -
Fix trap_jobs() recordset comparison
The trap_jobs() test helper accepts any model/recordset as long as the job function is the same, which is not enough to verify that the job has been delayed on the expected recordset or model. Tested job functions are "bound methods" so we can compare their `__self__`. Example of assertion that would be valid: partner = self.env["res.partner"].create({"name": "foo"}) with trap_jobs() as trap: partner.with_delay().do_something(42) trap.assert_enqueued_job( self.env["res.partner"].do_something, args=(42,) ) trap.assert_jobs_count(1, only=self.env["res.partner"].do_something) Now, it would fail with an error message like: E AssertionError: Job <res.partner()>.do_something(42) with properties (channel=root.test, description=Do something, eta=15, identity_key=<function identity_exact at 0x7f01bfb54cb0>, max_retries=1, priority=15) was not enqueued. E Actual enqueued jobs: E * <res.partner(64,)>.do_something(42) with properties (priority=15, max_retries=1, eta=15, description=Do something, channel=root.test, identity_key=<function identity_exact at 0x7f01bfb54cb0>)
Configuration menu - View commit details
-
Copy full SHA for d79cfac - Browse repository at this point
Copy the full SHA d79cfacView commit details -
Translated using Weblate (Spanish)
Currently translated at 98.0% (153 of 156 strings) Translation: queue-16.0/queue-16.0-queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-queue_job/es/
Configuration menu - View commit details
-
Copy full SHA for 16f6193 - Browse repository at this point
Copy the full SHA 16f6193View commit details -
Translated using Weblate (Spanish)
Currently translated at 100.0% (156 of 156 strings) Translation: queue-16.0/queue-16.0-queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-queue_job/es/
Configuration menu - View commit details
-
Copy full SHA for f3053ea - Browse repository at this point
Copy the full SHA f3053eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 77cb4e8 - Browse repository at this point
Copy the full SHA 77cb4e8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 230f4b0 - Browse repository at this point
Copy the full SHA 230f4b0View commit details -
[FIX] queue_job: runner - filedescriptor out of range in select
Use the most efficient Selector implementation available on the current platform Odoo supports only SelectSelector but it is a little obsolete python >= 3.4 supports a new high-level library Selectors: - https://docs.python.org/es/3/library/selectors.html It could to auto-choose the following ones: - SelectSelector - PollSelector - EpollSelector - DevpollSelector - KqueueSelector Using the DefaultSelector class the most efficient implementation available on the current platform will be use: - https://docs.python.org/3/library/selectors.html#selectors.DefaultSelector It helps to support better the resources of the system Using SelectSelector you are not able to run workers >=255 If you set `ulimit -n 10240` and run `odoo-bin --workers=255` the following error is raised: Traceback (most recent call last): File "odoo/service/server.py", line 926, in run self.sleep() File "odoo/service/server.py", line 852, in sleep sel.select(self.beat) File "python3.8/lib/python3.8/selectors.py", line 323, in select r, w, _ = self._select(self._readers, self._writers, [], timeout) ValueError: filedescriptor out of range in select() But using PollSelector it is not reproduced even using more workers Most of platform supports PollSelector but using DefaultSelector we can be sure that even too old system are supported too And using this High-level library will allow to use the future new improvements e.g. Epoll has better performance improvements More info about: - https://devarea.com/linux-io-multiplexing-select-vs-poll-vs-epoll - redis/redis-py#486 - odoo/odoo#84684
Configuration menu - View commit details
-
Copy full SHA for 0c7ab9f - Browse repository at this point
Copy the full SHA 0c7ab9fView commit details -
Configuration menu - View commit details
-
Copy full SHA for c0427c1 - Browse repository at this point
Copy the full SHA c0427c1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6741071 - Browse repository at this point
Copy the full SHA 6741071View commit details -
Configuration menu - View commit details
-
Copy full SHA for fad27f2 - Browse repository at this point
Copy the full SHA fad27f2View commit details -
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: queue-16.0/queue-16.0-queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-queue_job/
Configuration menu - View commit details
-
Copy full SHA for 5dce1a5 - Browse repository at this point
Copy the full SHA 5dce1a5View commit details -
Translated using Weblate (Spanish)
Currently translated at 100.0% (156 of 156 strings) Translation: queue-16.0/queue-16.0-queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-queue_job/es/
Configuration menu - View commit details
-
Copy full SHA for acb5985 - Browse repository at this point
Copy the full SHA acb5985View commit details -
Translated using Weblate (Spanish)
Currently translated at 100.0% (156 of 156 strings) Translation: queue-16.0/queue-16.0-queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-queue_job/es/
Configuration menu - View commit details
-
Copy full SHA for da0844e - Browse repository at this point
Copy the full SHA da0844eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 17c1960 - Browse repository at this point
Copy the full SHA 17c1960View commit details -
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: queue-16.0/queue-16.0-queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-queue_job/
Configuration menu - View commit details
-
Copy full SHA for 2e83ab6 - Browse repository at this point
Copy the full SHA 2e83ab6View commit details -
[IMP] queue_job: identity_key enhancements
1. In production, a job which is waiting dependencies or which has started, but not completed, should not be repeated if the identity_key matches. 2. In tests, the mock queue handler is now enhanced to allow better mimicking of the identity_key blocks from production. 3. In tests, the mock queue handler now clears the enqueued jobs after performing them, to better reproduce what a production environment would do.
Configuration menu - View commit details
-
Copy full SHA for e4284bc - Browse repository at this point
Copy the full SHA e4284bcView commit details -
queue_job: job_record_with_same_identity_key ignore STARTED
Good explanation from Guewen: Depending on the use case, we should or should not include. As part of my current work, I use Sidekiq daily. They have a similar feature, but you can set a per-job parameter unique_until with options: start (that would mean up to ENQUEUED here) or success (that would be up to STARTED here). Think about this use case: a job refreshes a cache. Data have changed, we create a pending job. Data change again, no new job because the job is still pending. Job starts. Data change while the job is running. In this very case, we'd like to enqueue a new job otherwise the cache will be outdated. I reckon that both cases are valid, but I fear adding this state in the domain may, silently and in subtle ways, existing behaviors.
Configuration menu - View commit details
-
Copy full SHA for b50a377 - Browse repository at this point
Copy the full SHA b50a377View commit details -
FIX queue_job avoiding AccessDenied when loading the module in an ins…
…tance with list_db = False The scenario is a multi database environment where you can't set db_name as the databases change frequently and you use dbfilter to allow users to access their DB according to domain
Configuration menu - View commit details
-
Copy full SHA for 03414a8 - Browse repository at this point
Copy the full SHA 03414a8View commit details -
queue job avoiding AccessDenied when loading the module in an instanc…
…e with list_db=false
Configuration menu - View commit details
-
Copy full SHA for d0c22ce - Browse repository at this point
Copy the full SHA d0c22ceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 89df542 - Browse repository at this point
Copy the full SHA 89df542View commit details -
Configuration menu - View commit details
-
Copy full SHA for bf2b504 - Browse repository at this point
Copy the full SHA bf2b504View commit details
Commits on Nov 29, 2023
-
Configuration menu - View commit details
-
Copy full SHA for b919821 - Browse repository at this point
Copy the full SHA b919821View commit details
Commits on Dec 4, 2023
-
Separate tests that need special methods in a dedicated test_queue_job module. Rework the registry of the jobs. The 'job' decorator is applied on functions before they are bound to their class, so we don't know the class yet. Now, the decorator marks job methods with 'delayable' and when a model is registered (Base._register_hook), it looks for the marked methods and register them.
Configuration menu - View commit details
-
Copy full SHA for cf0e991 - Browse repository at this point
Copy the full SHA cf0e991View commit details -
Configuration menu - View commit details
-
Copy full SHA for acc72e0 - Browse repository at this point
Copy the full SHA acc72e0View commit details -
Move tests using queue_job.testing_method in test_queue_job
To avoid to pollute 'queue.job.function' with a test job.
Configuration menu - View commit details
-
Copy full SHA for acf5c2f - Browse repository at this point
Copy the full SHA acf5c2fView commit details -
Fix mutability of job arguments
The model name, method name, recordset ids, arguments and keyword arguments must never ever be modified after the creation of a job. This change fix a bug when a job with a mutable argument see the content of the argument being modified during the execution of a job.
Configuration menu - View commit details
-
Copy full SHA for 23bfdb0 - Browse repository at this point
Copy the full SHA 23bfdb0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6518065 - Browse repository at this point
Copy the full SHA 6518065View commit details -
Configuration menu - View commit details
-
Copy full SHA for cfb0242 - Browse repository at this point
Copy the full SHA cfb0242View commit details -
Configuration menu - View commit details
-
Copy full SHA for f480e8b - Browse repository at this point
Copy the full SHA f480e8bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 34037d7 - Browse repository at this point
Copy the full SHA 34037d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for d02bc5d - Browse repository at this point
Copy the full SHA d02bc5dView commit details -
Configuration menu - View commit details
-
Copy full SHA for a5a4371 - Browse repository at this point
Copy the full SHA a5a4371View commit details -
Configuration menu - View commit details
-
Copy full SHA for ac55783 - Browse repository at this point
Copy the full SHA ac55783View commit details -
Fix auto registration of job methods and channels
The automatic registration of job methods and their defaut channel has been a bit chaotic. The initial version for the new Odoo API could crashing as soon as a method was decorated by @Property. There is such a property in the code code, the method '_cache'. The problem of the crash was that, the introspection basically uses a 'getattr' on every attribute of the instance. The '_cache' method could then be called on an empty recordset, which is not supported by '_cache'. A first correction (49d8f37) was to naively skip the '_cache' method from the introspection. In any case, it is wrong to access the property of an instance only to instrospect its members. That's why the correction 4ebb245 changed the inspection from the instance to the class. Properties are no longer accessed, however this correction was not correct for Python 3. When members of the class are introspected, they are neither bound neither unbound methods. they are mere functions. The change here is to lookup for functions. _register_job must now takes the model as input argument, because there is no way to get the name of the model from the function. Closes OCA#64 Follows OCA#50
Configuration menu - View commit details
-
Copy full SHA for cd2a1de - Browse repository at this point
Copy the full SHA cd2a1deView commit details -
Add default related action to open related records
The related action button now opens by default the record on which the job is working. It uses the default views of the job. The exact behavior depends of the number of records in the job: * No record (job called on a model): display a message indicating that there is no available action * One record: open the default view in form * Several records: open the default view in list The related action can still be overridden by the 'related_action' decorator.
Configuration menu - View commit details
-
Copy full SHA for 10535a9 - Browse repository at this point
Copy the full SHA 10535a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for aee6178 - Browse repository at this point
Copy the full SHA aee6178View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9eb6df0 - Browse repository at this point
Copy the full SHA 9eb6df0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 400caa9 - Browse repository at this point
Copy the full SHA 400caa9View commit details -
Configuration menu - View commit details
-
Copy full SHA for e076a02 - Browse repository at this point
Copy the full SHA e076a02View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d34369 - Browse repository at this point
Copy the full SHA 2d34369View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6725e35 - Browse repository at this point
Copy the full SHA 6725e35View commit details -
Configuration menu - View commit details
-
Copy full SHA for fd19ed8 - Browse repository at this point
Copy the full SHA fd19ed8View commit details -
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (12 of 12 strings) Translation: queue-12.0/queue-12.0-test_queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-12-0/queue-12-0-test_queue_job/zh_CN/
Configuration menu - View commit details
-
Copy full SHA for 7462080 - Browse repository at this point
Copy the full SHA 7462080View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a73a04 - Browse repository at this point
Copy the full SHA 6a73a04View commit details -
Configuration menu - View commit details
-
Copy full SHA for 018a097 - Browse repository at this point
Copy the full SHA 018a097View commit details -
Replace sudo(user) by with_user(user)
The former syntax is deprecated
Configuration menu - View commit details
-
Copy full SHA for dc500aa - Browse repository at this point
Copy the full SHA dc500aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for c41b8f7 - Browse repository at this point
Copy the full SHA c41b8f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for a4e7995 - Browse repository at this point
Copy the full SHA a4e7995View commit details -
Use more permissive license AGPL3 → LGPL3
This change has been done and accepted on the component and connector addons: OCA/connector#356 This is a low-level technical module, we may need to use jobs on enterprise features.
Configuration menu - View commit details
-
Copy full SHA for 2772a97 - Browse repository at this point
Copy the full SHA 2772a97View commit details -
Configuration menu - View commit details
-
Copy full SHA for 63ed9e2 - Browse repository at this point
Copy the full SHA 63ed9e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 484919d - Browse repository at this point
Copy the full SHA 484919dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f87ac1 - Browse repository at this point
Copy the full SHA 1f87ac1View commit details -
Store worker's PID when a job is started
Add a field in the "queue_job" model to store the worker pid. No usage for new besides "logging" for debugging (helps to find which process to investigate in case a job is stuck). Later, it may be useful to improve the recovery of job that stay in the wrong state when the job runner restarts. Closes OCA#177
Configuration menu - View commit details
-
Copy full SHA for d4550e0 - Browse repository at this point
Copy the full SHA d4550e0View commit details -
* @job and @related_action are still supported but emit warnings and will be removed at some point (code to remove has a TODO with :job-no-decorator:) * the options previously set by the decorators are now stored on "queue.job.function" records, which can be explicitly created as XML records (and then editable!) * any method can be used with "with_delay()", if no "queue.job.function" exists, default values are used (root channel, default related action, ...)
Configuration menu - View commit details
-
Copy full SHA for 9037f1d - Browse repository at this point
Copy the full SHA 9037f1dView commit details -
Replace job function name by model + method fields
A many2one to select the model + a char for the method name is more convenient and error-proof than having to type the expected format correctly.
Configuration menu - View commit details
-
Copy full SHA for 2a4ca5a - Browse repository at this point
Copy the full SHA 2a4ca5aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 054ea2b - Browse repository at this point
Copy the full SHA 054ea2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 37d1af7 - Browse repository at this point
Copy the full SHA 37d1af7View commit details -
Refactor user_id,model_name,record_ids fields on queue.job
These fields contain the current model and record ids and user id the job works on. Storing them as separate fields does not allow to take benefits on the "JobSerialized" field, which keeps the original user, and later the 'su' flag. We could store the context there as well (or a cleaned one). Use computed fields to keep the model_name, record_ids, user_id fields for backward compatibility. The model_name should stay anyway for the searches on the UI, and the user_id for the same reason + possibility to edit the user.
Configuration menu - View commit details
-
Copy full SHA for b935818 - Browse repository at this point
Copy the full SHA b935818View commit details -
Store 'su' flag in records stored in JobSerialized fields
Which means that the record the job is working on, or any record argument of the job keeps the 'su' flag.
Configuration menu - View commit details
-
Copy full SHA for bc11fbf - Browse repository at this point
Copy the full SHA bc11fbfView commit details -
- set module uninstallable - add new .dot file config for v14
Configuration menu - View commit details
-
Copy full SHA for aaa66fb - Browse repository at this point
Copy the full SHA aaa66fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8299cf7 - Browse repository at this point
Copy the full SHA 8299cf7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c9a85a - Browse repository at this point
Copy the full SHA 2c9a85aView commit details -
Configuration menu - View commit details
-
Copy full SHA for ecfc054 - Browse repository at this point
Copy the full SHA ecfc054View commit details -
Add import shortcut for identity_exact
Now that the `@job` decorater is deleted, `identity_exact` is the only thing we may need to import from "job.py". Being able to import it from "odoo.addons.queue_job" is nicer than from "odoo.addons.queue_job.job".
Configuration menu - View commit details
-
Copy full SHA for 25dff8a - Browse repository at this point
Copy the full SHA 25dff8aView commit details -
Configuration menu - View commit details
-
Copy full SHA for bb49e61 - Browse repository at this point
Copy the full SHA bb49e61View commit details -
Configuration menu - View commit details
-
Copy full SHA for 70d0429 - Browse repository at this point
Copy the full SHA 70d0429View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0791f4b - Browse repository at this point
Copy the full SHA 0791f4bView commit details -
Configuration menu - View commit details
-
Copy full SHA for f73fd59 - Browse repository at this point
Copy the full SHA f73fd59View commit details -
[ADD] Apply suggestions from code review
Co-authored-by: Simone Orsi <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for beb5c45 - Browse repository at this point
Copy the full SHA beb5c45View commit details -
Configuration menu - View commit details
-
Copy full SHA for ef3cef6 - Browse repository at this point
Copy the full SHA ef3cef6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4a45797 - Browse repository at this point
Copy the full SHA 4a45797View commit details -
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: queue-14.0/queue-14.0-test_queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-14-0/queue-14-0-test_queue_job/
Configuration menu - View commit details
-
Copy full SHA for 33b0740 - Browse repository at this point
Copy the full SHA 33b0740View commit details -
Revert "[14.0] [IMP] Store job execution information + wizard to term…
…inate a job + test"
Configuration menu - View commit details
-
Copy full SHA for fa53f27 - Browse repository at this point
Copy the full SHA fa53f27View commit details -
Configuration menu - View commit details
-
Copy full SHA for d17f54f - Browse repository at this point
Copy the full SHA d17f54fView commit details -
Configuration menu - View commit details
-
Copy full SHA for a1c39e9 - Browse repository at this point
Copy the full SHA a1c39e9View commit details -
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: queue-14.0/queue-14.0-test_queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-14-0/queue-14-0-test_queue_job/
Configuration menu - View commit details
-
Copy full SHA for edeb45a - Browse repository at this point
Copy the full SHA edeb45aView commit details -
Add method to patch a method to be automatically delayed
This patch method has to be called in ``_register_hook``. When a method is patched, any call to the method will not directly execute the method's body, but will instead enqueue a job. When a ``context_key`` is set when calling ``_patch_job_auto_delay``, the patched method is automatically delayed only when this key is ``True`` in the caller's context. It is advised to patch the method with a ``context_key``, because making the automatic delay *in any case* can produce nasty and unexpected side effects (e.g. another module calls the method and expects it to be computed before doing something else, expecting a result, ...). A typical use case is when a method in a module we don't control is called synchronously in the middle of another method, and we'd like all the calls to this method become asynchronous. It relies on OCA#274 that deprecates the `@job` decorator.
Configuration menu - View commit details
-
Copy full SHA for 6caa121 - Browse repository at this point
Copy the full SHA 6caa121View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0371a57 - Browse repository at this point
Copy the full SHA 0371a57View commit details -
Configuration menu - View commit details
-
Copy full SHA for 403c0c4 - Browse repository at this point
Copy the full SHA 403c0c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for c0de15d - Browse repository at this point
Copy the full SHA c0de15dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8148771 - Browse repository at this point
Copy the full SHA 8148771View commit details -
Configuration menu - View commit details
-
Copy full SHA for 552e961 - Browse repository at this point
Copy the full SHA 552e961View commit details -
Configuration menu - View commit details
-
Copy full SHA for 444950c - Browse repository at this point
Copy the full SHA 444950cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 88a3b1d - Browse repository at this point
Copy the full SHA 88a3b1dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1755e2d - Browse repository at this point
Copy the full SHA 1755e2dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b165f9 - Browse repository at this point
Copy the full SHA 0b165f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 80b533a - Browse repository at this point
Copy the full SHA 80b533aView commit details -
Configuration menu - View commit details
-
Copy full SHA for b06680a - Browse repository at this point
Copy the full SHA b06680aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 003dbf0 - Browse repository at this point
Copy the full SHA 003dbf0View commit details -
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: queue-16.0/queue-16.0-test_queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-test_queue_job/
Configuration menu - View commit details
-
Copy full SHA for ef53d43 - Browse repository at this point
Copy the full SHA ef53d43View commit details -
Disable storing of context in jobs recordsets by default
It can still be activated by overriding a method.
Configuration menu - View commit details
-
Copy full SHA for 442df9d - Browse repository at this point
Copy the full SHA 442df9dView commit details -
Configuration menu - View commit details
-
Copy full SHA for ffb9920 - Browse repository at this point
Copy the full SHA ffb9920View commit details -
Configuration menu - View commit details
-
Copy full SHA for cbd29b9 - Browse repository at this point
Copy the full SHA cbd29b9View commit details -
Translated using Weblate (German)
Currently translated at 75.0% (9 of 12 strings) Translation: queue-16.0/queue-16.0-test_queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-test_queue_job/de/
Configuration menu - View commit details
-
Copy full SHA for e632e1c - Browse repository at this point
Copy the full SHA e632e1cView commit details -
Remove initial create notification and follower
Everytime a job is created, a mail.message "Queue Job created" is created. This is useless, as we already have the creation date and user, and nobody will ever want to receive a notification for a created job anyway. Removing the on creation auto-subscription of the user that created the job makes sense as well since we automatically subscribe the queue job managers for failures. Add the owner of the jobs to the followers on failures only as well. It allows to remove a lot of insertions of records (and of deletions when autovacuuming jobs).
Configuration menu - View commit details
-
Copy full SHA for 87ad457 - Browse repository at this point
Copy the full SHA 87ad457View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8497a81 - Browse repository at this point
Copy the full SHA 8497a81View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c292d7 - Browse repository at this point
Copy the full SHA 6c292d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for e3aba02 - Browse repository at this point
Copy the full SHA e3aba02View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8032dce - Browse repository at this point
Copy the full SHA 8032dceView commit details -
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: queue-15.0/queue-15.0-test_queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-15-0/queue-15-0-test_queue_job/
Configuration menu - View commit details
-
Copy full SHA for 6cf89cb - Browse repository at this point
Copy the full SHA 6cf89cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9812291 - Browse repository at this point
Copy the full SHA 9812291View commit details -
Configuration menu - View commit details
-
Copy full SHA for 59ec1c0 - Browse repository at this point
Copy the full SHA 59ec1c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ad95b1 - Browse repository at this point
Copy the full SHA 7ad95b1View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 431b1b2 - Browse repository at this point
Copy the full SHA 431b1b2View commit details -
Ignore requeues on dependency jobs waiting on parent jobs
Jobs waiting that their dependencies are executed cannot be requeued. They have to keep waiting their turn.
Configuration menu - View commit details
-
Copy full SHA for 99c03a1 - Browse repository at this point
Copy the full SHA 99c03a1View commit details -
As jobs are created in the setup, but not always delayed, the __del__ warning that the job was not delayed is triggered. Create only the jobs necessary for each test.
Configuration menu - View commit details
-
Copy full SHA for e262e37 - Browse repository at this point
Copy the full SHA e262e37View commit details -
Configuration menu - View commit details
-
Copy full SHA for b974e1c - Browse repository at this point
Copy the full SHA b974e1cView commit details -
Add powerful context manager for running tests on jobs
* mock_jobs context manager with assert methods to check enqueued jobs * jobs are not stored in database, yet they can be inspected and performed during the test * the context manager works with graphs enqueued by delayable and with with_delay() * direct execution of jobs works with graphs by executing them synchronously following their topological sort
Configuration menu - View commit details
-
Copy full SHA for b0bc513 - Browse repository at this point
Copy the full SHA b0bc513View commit details -
Set graph_uuid only once in DelayableGraph
The previous implementation was incomplete, as it was setting the graph_uuid when `Job.add_depends()` was called. It had the advantage of being correct when (for e.g. a test) manually created a Job and called `add_depends()`, but it could not work when in some situations involving a group where one of the job has no job depending on it. Also, remove ``Job.add_reverse_depends()`` which is not used.
Configuration menu - View commit details
-
Copy full SHA for d120e48 - Browse repository at this point
Copy the full SHA d120e48View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4cbc103 - Browse repository at this point
Copy the full SHA 4cbc103View commit details -
Fix things required by odoo 14.0 or python 3.9
* Renaming the TestXxx models in test_queue_job is because of pytest that complains, confusing them for test classes * logger.warn is deprecated in favor of logger.warning * Add invalidation of cache in SQL update that enqueue dependent jobs * Flush in a test, the same is done currently in the controller * Weird one: we can no longer compare the bound methods of the models, compare their __func__ which is equal.
Configuration menu - View commit details
-
Copy full SHA for a4c7318 - Browse repository at this point
Copy the full SHA a4c7318View commit details -
Rename mock_jobs() to trap_jobs()
The fact that mocks are used is an implementation detail, and is actually hidden to the end user of the test API.
Configuration menu - View commit details
-
Copy full SHA for dca7b11 - Browse repository at this point
Copy the full SHA dca7b11View commit details -
Rename dependency method done() to on_done()
on_done() is maybe a better choice, it is less ambiguous than then() (clearer on the fact it happens on done()) and done() (less confusion with set_done()). I'll do the renaming soon, unless you have other suggestions. Ref: OCA#154 (comment)
Configuration menu - View commit details
-
Copy full SHA for eb172a7 - Browse repository at this point
Copy the full SHA eb172a7View commit details -
Configuration menu - View commit details
-
Copy full SHA for ccad49f - Browse repository at this point
Copy the full SHA ccad49fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b4f6f2 - Browse repository at this point
Copy the full SHA 1b4f6f2View commit details -
[MIG] queue_job, test_queue_job: Forward port queue from 15.0
This forward port takes all the changes from 15.0 not yet into 16.0 up to OCA@173b6ca This FP contains the new queue dependencies functionality. The dedicated widget used to display the dependecies graph on the job form is also migrated to owl
Configuration menu - View commit details
-
Copy full SHA for a3b8f83 - Browse repository at this point
Copy the full SHA a3b8f83View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5767a10 - Browse repository at this point
Copy the full SHA 5767a10View commit details -
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: queue-16.0/queue-16.0-test_queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-test_queue_job/
Configuration menu - View commit details
-
Copy full SHA for d513861 - Browse repository at this point
Copy the full SHA d513861View commit details -
queue_job: unify no delay option
Current situation: * multiple keys for no good reason * half baked: not all of them used everywhere * no centralization * poor naming With this change we'll have: * 1 and only one key to disable via ctx: ``queue_job__no_delay`` * 1 and only one key to disable via os env: ``QUEUE_JOB__NO_DELAY`` * backward compatibility with deprecation for old keys
Configuration menu - View commit details
-
Copy full SHA for 3cf3d8c - Browse repository at this point
Copy the full SHA 3cf3d8cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f3ae3a - Browse repository at this point
Copy the full SHA 1f3ae3aView commit details -
Fix trap_jobs() recordset comparison
The trap_jobs() test helper accepts any model/recordset as long as the job function is the same, which is not enough to verify that the job has been delayed on the expected recordset or model. Tested job functions are "bound methods" so we can compare their `__self__`. Example of assertion that would be valid: partner = self.env["res.partner"].create({"name": "foo"}) with trap_jobs() as trap: partner.with_delay().do_something(42) trap.assert_enqueued_job( self.env["res.partner"].do_something, args=(42,) ) trap.assert_jobs_count(1, only=self.env["res.partner"].do_something) Now, it would fail with an error message like: E AssertionError: Job <res.partner()>.do_something(42) with properties (channel=root.test, description=Do something, eta=15, identity_key=<function identity_exact at 0x7f01bfb54cb0>, max_retries=1, priority=15) was not enqueued. E Actual enqueued jobs: E * <res.partner(64,)>.do_something(42) with properties (priority=15, max_retries=1, eta=15, description=Do something, channel=root.test, identity_key=<function identity_exact at 0x7f01bfb54cb0>)
Configuration menu - View commit details
-
Copy full SHA for 30fa6cb - Browse repository at this point
Copy the full SHA 30fa6cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5891173 - Browse repository at this point
Copy the full SHA 5891173View commit details -
Configuration menu - View commit details
-
Copy full SHA for c1357ff - Browse repository at this point
Copy the full SHA c1357ffView commit details -
Translated using Weblate (Spanish)
Currently translated at 100.0% (13 of 13 strings) Translation: queue-16.0/queue-16.0-test_queue_job Translate-URL: https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-test_queue_job/es/
Configuration menu - View commit details
-
Copy full SHA for 6b9c39d - Browse repository at this point
Copy the full SHA 6b9c39dView commit details -
[IMP] queue_job: identity_key enhancements
1. In production, a job which is waiting dependencies or which has started, but not completed, should not be repeated if the identity_key matches. 2. In tests, the mock queue handler is now enhanced to allow better mimicking of the identity_key blocks from production. 3. In tests, the mock queue handler now clears the enqueued jobs after performing them, to better reproduce what a production environment would do.
Configuration menu - View commit details
-
Copy full SHA for 740f39f - Browse repository at this point
Copy the full SHA 740f39fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a9c63d - Browse repository at this point
Copy the full SHA 8a9c63dView commit details -
Configuration menu - View commit details
-
Copy full SHA for aabbceb - Browse repository at this point
Copy the full SHA aabbcebView commit details -
Configuration menu - View commit details
-
Copy full SHA for dc35a81 - Browse repository at this point
Copy the full SHA dc35a81View commit details -
Configuration menu - View commit details
-
Copy full SHA for 686691b - Browse repository at this point
Copy the full SHA 686691bView commit details