Skip to content

[14.0][MIG] sale_automatic_workflow_job: Migration to 14.0#10

Open
kv1612 wants to merge 13 commits into14.0from
14.0-mig-sale_automatic_workflow_job
Open

[14.0][MIG] sale_automatic_workflow_job: Migration to 14.0#10
kv1612 wants to merge 13 commits into14.0from
14.0-mig-sale_automatic_workflow_job

Conversation

@kv1612
Copy link
Owner

@kv1612 kv1612 commented Jan 13, 2022

No description provided.

Guewen Baconnier and others added 13 commits January 13, 2022 16:33
Use Queue Jobs to process the Sales Automatic Workflow actions.

The default behavior of the automatic workflow module is to use a
scheduled action that searches all the record that need a workflow
action and sequentially process all of them.

It can hit some limits when the number of records is too high.

This module keeps the scheduled action to search the records, but
instead of directly executing the actions (confirm a sales order,
create invoices for a sales order, validate invoices, ...), it
creates one job per operation to do.

It uses an identity key on the jobs so it will not create the same
job for the same record and same operation twice.

~

I needed to extract methods in `sale_automatic_workflow` in order
to be able to execute them as jobs.

A new decorator "job_auto_delay" (to eventually move in queue_job) makes
these methods automatically delayed when called.
@hailangvn hailangvn force-pushed the 14.0-mig-sale_automatic_workflow_job branch from 56f5a6c to f9c92db Compare January 15, 2022 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants