Tryton - Issues

 

Issue7406

Title Transactional queue
Priority feature Status testing
Superseder Allow expression in index_action
View: 7580
Nosy List Timitos, ced, pokoli, resteve, reviewbot
Type feature request Components proteus, trytond
Assigned To ced Keywords review
Reviews 45461002
View: 45461002

Created on 2018-04-30.18:44:11 by ced, last changed by ced.

Messages
review45461002 updated at https://codereview.tryton.org/45461002/#ps240001
review45461002 updated at https://codereview.tryton.org/45461002/#ps220001
review45461002 updated at https://codereview.tryton.org/45461002/#ps200001
msg42159 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-07-13.13:03:18
I do not think we should show the queue. It is a technical thing which may even contain sensitive data.
About the cleaning, I think it is good to have the history, just like we keep all the _history records, the ir.trigger.log or the notification.email.log
If it is about the performance, there is a TODO about creating an index with nulls first. But it can be manually created (as it is our trends to minimize database customization by default).
msg42158 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-07-13.12:46:31
I'm wondering if it will be great to add an Action on the user Interface to see the ir.queue module with the following domains: Pending (dequed is null) / Running (Dequed is not null but finished is null) and All. 

As the queue is an append only model, maybe we should also add a wizard or cron job to clean older entries.
msg42141 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-07-11.17:16:49
I plan to commit this in the next week if I get no new comments.
review45461002 updated at https://codereview.tryton.org/45461002/#ps180001
review45461002 updated at https://codereview.tryton.org/45461002/#ps160001
review45461002 updated at https://codereview.tryton.org/45461002/#ps140001
review45461002 updated at https://codereview.tryton.org/45461002/#ps120001
review45461002 updated at https://codereview.tryton.org/45461002/#ps120001
review45461002 updated at https://codereview.tryton.org/45461002/#ps120001
review45461002 updated at https://codereview.tryton.org/45461002/#ps120001
review45461002 updated at https://codereview.tryton.org/45461002/#ps100001
review49371002 updated at https://codereview.tryton.org/49371002/#ps1
msg41002 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-05-24.13:09:12
proteus needs also to run tasks: review49371002
review45461002 updated at https://codereview.tryton.org/45461002/#ps80001
review45461002 updated at https://codereview.tryton.org/45461002/#ps60001
review45461002 updated at https://codereview.tryton.org/45461002/#ps40001
review45461002 updated at https://codereview.tryton.org/45461002/#ps20001
New review45461002 at https://codereview.tryton.org/45461002/#ps1
msg40489 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-04-30.18:53:29
Here is an WIP of the implementation: review45461002
It is already working. I publish it to get feedback's on the API and some choices.
Principal choices are:

- Usage of advisory lock to pull tasks
- Usage of listen/notify when available
- Launch task at the end of requests if no worker is configured (but reuse as much as possible worker code)
- Use multiprocess as pool of worker
- Model.__queue__ API which is restricted to have record(s) as first argument (instance method or class method)
- Use scheduled and expected timestamp as priority of the queue
- Allow to run worker for a specific queue name


The next step will be to update modules to use it when possible.
msg40488 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-04-30.18:44:10
From https://discuss.tryton.org/t/transactional-queue/461
History
Date User Action Args
2018-07-19 15:51:22cedsetsuperseder: + Allow expression in index_action
2018-07-19 10:00:44reviewbotsetmessages: + msg42209
2018-07-19 00:38:50reviewbotsetmessages: + msg42205
2018-07-19 00:28:23cedsetreviews: 45461002,49371002 -> 45461002
2018-07-13 16:46:06reviewbotsetmessages: + msg42160
2018-07-13 13:03:18cedsetmessages: + msg42159
2018-07-13 12:46:32pokolisetmessages: + msg42158
2018-07-11 17:16:49cedsetmessages: + msg42141
2018-07-10 17:41:18reviewbotsetmessages: + msg42133
2018-06-28 20:49:29Timitossetnosy: + Timitos

Showing 10 items. Show all history (warning: this could be VERY long)