Tryton - Issues

 

Issue8201

Title Simplify cron and allow to run at fixed time
Priority feature Status resolved
Superseder Nosy List albertca, ced, reviewbot, roundup-bot
Type feature request Components trytond
Assigned To ced Keywords review
Reviews 261141002
View: 261141002

Created on 2019-03-16.19:56:35 by ced, last changed by roundup-bot.

Messages
New changeset 3a88e33703e0 by Cédric Krier in branch 'default':
Search cron by method name
https://hg.tryton.org/tryton-env/rev/3a88e33703e0
New changeset c8d3e4f9b0fb by Cédric Krier in branch 'default':
Search cron by method name
https://hg.tryton.org/modules/account_payment_stripe/rev/c8d3e4f9b0fb
New changeset d5b010d616a1 by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/tryton-env/rev/d5b010d616a1
New changeset 32265209fd9e by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/trytond/rev/32265209fd9e
New changeset 732b47ca94bc by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/user_role/rev/732b47ca94bc
New changeset afd05d0b4101 by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/timesheet/rev/afd05d0b4101
New changeset dbdc6e3a771f by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/stock_forecast/rev/dbdc6e3a771f
New changeset a91ae03831e1 by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/stock/rev/a91ae03831e1
New changeset f0ad1c8d99fd by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/sale_subscription/rev/f0ad1c8d99fd
New changeset 84dede474f2d by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/sale_stock_quantity/rev/84dede474f2d
New changeset 8ec83b9b84a2 by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/sale/rev/8ec83b9b84a2
New changeset 0e5d3a91bf82 by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/purchase_request/rev/0e5d3a91bf82
New changeset 977bf1ef39ec by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/purchase/rev/977bf1ef39ec
New changeset afac38dd7a42 by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/project_invoice/rev/afac38dd7a42
New changeset e31333def2c5 by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/project/rev/e31333def2c5
New changeset c3d332ecd5e2 by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/production/rev/c3d332ecd5e2
New changeset 3bea762cd677 by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/product/rev/3bea762cd677
New changeset 3a8f948fa689 by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/party/rev/3a8f948fa689
New changeset 8b8ab76d10d1 by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/marketing_automation/rev/8b8ab76d10d1
New changeset fc7ec09f92ba by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/customs/rev/fc7ec09f92ba
New changeset 87ff92193cec by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/currency/rev/87ff92193cec
New changeset 46533f1d2b1d by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/company/rev/46533f1d2b1d
New changeset 554e91533a41 by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/commission/rev/554e91533a41
New changeset 6a61ba9e9e82 by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/carrier/rev/6a61ba9e9e82
New changeset 6fd31327b6a7 by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/bank/rev/6fd31327b6a7
New changeset 570cde30131a by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/analytic_account/rev/570cde30131a
New changeset 9ed31f1f5201 by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/account_statement/rev/9ed31f1f5201
New changeset b21c0e9db3ce by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/account_payment_stripe/rev/b21c0e9db3ce
New changeset b0aa5154371e by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/account_payment_clearing/rev/b0aa5154371e
New changeset aa193b4252b3 by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/account_payment/rev/aa193b4252b3
New changeset a3f1797df93e by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/account_fr_chorus/rev/a3f1797df93e
New changeset 4d2279c330b8 by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/account_dunning/rev/4d2279c330b8
New changeset 36c623acc237 by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/account_credit_limit/rev/36c623acc237
New changeset cad21d50ab50 by Cédric Krier in branch 'default':
Simplify cron
https://hg.tryton.org/modules/account/rev/cad21d50ab50
review261141002 updated at https://codereview.tryton.org/261141002/#ps273261003
review261141002 updated at https://codereview.tryton.org/261141002/#ps259291002
review261141002 updated at https://codereview.tryton.org/261141002/#ps287281002
review261141002 updated at https://codereview.tryton.org/261141002/#ps259161002
review261141002 updated at https://codereview.tryton.org/261141002/#ps285061002
msg47704 (view) Author: [hidden] (albertca) (Tryton committer) Date: 2019-03-17.22:20:50
Missatge de Cédric Krier <bugs@tryton.org> del dia ds., 16 de març 2019 a
les 19:56:

>
> New submission from Cédric Krier <cedric.krier@b2ck.com>:
>
> The cron definition is complex. It does not allow to be sure when a task
> will be run. It has unused feature like number calls, repeat etc. It can be
> simplified for issue2286 and issue6117.
> And it is not sure that it is 100% safe (string define model, function and
> arguments).
>
> So I propose to simplify it by:
>
> - remove unused features
>

We're using the "repeat" feature, although only in one case, AFAIK. We use
it to send an e-mail of the changes in the last 24 hours in the records of
a given table. As we know repeat missing is set, we can be sure the summary
e-mail will be sent even if the cron process is stopped just when it had to
be sent.

> - allow to set the minute, hour and day (depending on the frequency)
> - use a selection field to define all possible "jobs"
> - remove arguments (all current job have no arguments)
>

The rest of changes look good to me.

>
> ----------
> assignedto: ced
> component: trytond
> messages: 47678
> nosy: ced
> priority: feature
> status: in-progress
> title: Simplify cron and allow to run at fixed time
> type: feature request
>
> ______________________________________
> Tryton issue tracker <bugs@tryton.org>
> <https://bugs.tryton.org/issue8201>
> ______________________________________
>
msg47678 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-03-16.19:56:34
The cron definition is complex. It does not allow to be sure when a task will be run. It has unused feature like number calls, repeat etc. It can be simplified for issue2286 and issue6117.
And it is not sure that it is 100% safe (string define model, function and arguments).

So I propose to simplify it by:

- remove unused features
- allow to set the minute, hour and day (depending on the frequency)
- use a selection field to define all possible "jobs"
- remove arguments (all current job have no arguments)
History
Date User Action Args
2019-04-12 16:49:00roundup-botsetmessages: + msg48968
2019-04-12 16:48:53roundup-botsetmessages: + msg48967
2019-04-12 16:02:32roundup-botsetmessages: + msg48963
2019-04-12 16:02:27roundup-botsetmessages: + msg48960
2019-04-12 16:02:21roundup-botsetmessages: + msg48957
2019-04-12 16:02:15roundup-botsetmessages: + msg48954
2019-04-12 16:02:10roundup-botsetmessages: + msg48951
2019-04-12 16:02:05roundup-botsetmessages: + msg48948
2019-04-12 16:01:58roundup-botsetmessages: + msg48945
2019-04-12 16:01:55roundup-botsetmessages: + msg48942
2019-04-12 16:01:52roundup-botsetmessages: + msg48939
2019-04-12 16:01:49roundup-botsetmessages: + msg48936
2019-04-12 16:01:43roundup-botsetmessages: + msg48933
2019-04-12 16:01:39roundup-botsetmessages: + msg48930
2019-04-12 16:01:34roundup-botsetmessages: + msg48927
2019-04-12 16:01:27roundup-botsetmessages: + msg48924
2019-04-12 16:01:22roundup-botsetmessages: + msg48921
2019-04-12 16:01:18roundup-botsetmessages: + msg48918
2019-04-12 16:01:13roundup-botsetmessages: + msg48915
2019-04-12 16:01:07roundup-botsetmessages: + msg48912
2019-04-12 16:01:02roundup-botsetmessages: + msg48909
2019-04-12 16:00:56roundup-botsetmessages: + msg48906
2019-04-12 16:00:49roundup-botsetmessages: + msg48903
2019-04-12 16:00:44roundup-botsetmessages: + msg48900
2019-04-12 16:00:38roundup-botsetmessages: + msg48897
2019-04-12 16:00:32roundup-botsetmessages: + msg48894
2019-04-12 16:00:26roundup-botsetmessages: + msg48891
2019-04-12 16:00:19roundup-botsetmessages: + msg48888
2019-04-12 16:00:13roundup-botsetmessages: + msg48885
2019-04-12 16:00:06roundup-botsetmessages: + msg48882
2019-04-12 16:00:00roundup-botsetmessages: + msg48879
2019-04-12 15:59:56roundup-botsetmessages: + msg48876
2019-04-12 15:59:51roundup-botsetmessages: + msg48873
2019-04-12 15:59:46roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg48870
2019-04-12 13:40:20reviewbotsetmessages: + msg48865
2019-04-04 22:47:23reviewbotsetmessages: + msg48413
2019-04-04 20:11:38reviewbotsetmessages: + msg48407
2019-03-20 23:49:12reviewbotsetmessages: + msg47738
2019-03-19 10:45:54reviewbotsetnosy: + reviewbot
messages: + msg47713
2019-03-17 22:20:50albertcasetnosy: + albertca
messages: + msg47704
2019-03-16 20:33:04cedsetstatus: in-progress -> testing
reviews: 261141002
keyword: + review
2019-03-16 19:56:35cedcreate