Uh oh!
There was an error while loading. Please reload this page.
[15.0][FW] queue_job: port queue dependencies from 14.0 - #476
Conversation
54bc766 to
a50f84bComparetest_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.
Jobs waiting that their dependencies are executed cannot be requeued. They have to keep waiting their turn.
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.
* 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
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.
* Fix a js bug when there is no graph. * Use a single read group for multiple jobs
The fact that mocks are used is an implementation detail, and is actually hidden to the end user of the test API.
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)
a50f84b to
10253b4Compare| _logger.debug("%s enqueue depends started", job) | ||
| job.enqueue_waiting() | ||
| _logger.debug("%s enqueue depends done", job) |
There was a problem hiding this comment.
I added this to enqueue dependencies cc @ivantodorovich
OCA-git-bot
commented
Nov 1, 2022
This PR has the |
jeremi
commented
Nov 15, 2022
Any idea on when this will be merged? This is a great improvement! |
lmignon
commented
Nov 15, 2022
/ocabot merge major |
OCA-git-bot
commented
Nov 15, 2022
What a great day to merge this nice PR. Let's do it! |
OCA-git-bot
commented
Nov 15, 2022
@lmignon your merge command was aborted due to failed check(s), which you can inspect on this commit of 15.0-ocabot-merge-pr-476-by-lmignon-bump-major. After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red. |
pedrobaeza
commented
Nov 15, 2022
A new copier update is needed due to OCA/oca-addons-repo-template#170 |
lmignon
commented
Nov 15, 2022
/ocabot merge major |
OCA-git-bot
commented
Nov 15, 2022
This PR looks fantastic, let's merge it! |
OCA-git-bot
commented
Nov 15, 2022
@lmignon The merge process could not be finalized because an exception was raised: <class 'requests.exceptions.ReadTimeout'>: A connection-level exception occurred: HTTPSConnectionPool(host='api.github.com', port=443): Read timed out. (read timeout=4). |
Port of #403 from 14.0 to 15.0.
Can be tested on Runboat.
Open the runboat url with
/queue_job/create_test_job?size=30.