novacode-nl / odoo-celery

Odoo & Celery integration
GNU Lesser General Public License v3.0
42 stars 45 forks source link

Add track_visibility='onchange' on field: exc_info #16

Closed bobslee closed 2 years ago

bobslee commented 5 years ago

After a Retry occurs, the task is restarted again and the field exc_info is cleared, which is intended. However we miss the last exc_info (exception info), which could be handy to see during a retry (state=Retrying)

So add option track_visibility='onchange' to field exc_info. This ensures all encountered exceptions are logged into the chatter.

Consequences need to be considered - and test thoroughly.

KirylSudnikovich commented 3 years ago

Hi @bobslee. As I can see, nobody already did it. Can I do it or it's already deprecated?

bobslee commented 3 years ago

Hi @0311snitch, this is a nice to have. If you would like to implement and test, go ahead. I'm glad to see your PR.

A heads up, I expect you know. Since Odoo v14 the field option is tracking=True.

KirylSudnikovich commented 3 years ago

@bobslee, what do you think? What other version should we update with this imp? Do you know which version of your module users use mostly? Should I upgrade v9-13 or only 11-13 for example?

bobslee commented 3 years ago

@0311snitch Did you tested this tracking feature?

First test thoroughly. Then we/you could apply the change to v13 and 12.

With my modules I only backport to (max) 2 lower versions.

KirylSudnikovich commented 3 years ago

@bobslee, yep, I've test it. You can do it yourself, if you want. tracking=True parameter works well on v14

KirylSudnikovich commented 3 years ago

So, can we merge it?

bobslee commented 3 years ago

I shall test somewhere upcoming days. I'm not working now.

bobslee commented 3 years ago

Would like to fire huge amount of tasks.

KirylSudnikovich commented 3 years ago

I understand, and I'm sorry to have disturbed you. I will continue to look at the code and maybe make some more corrections or suggestions

bobslee commented 3 years ago

@0311snitch, I also would like to develop a HTTP endpoint, which runs the task (UUID in post data). This doesn't require the authentication with XML-RPC. By the way, OCA queue_job also exexutes by HTTP if I remember.

This should be configurable whether XML-RPC (current implementation) or HTTP.

If you would like to PR this, let me know. We'll create a new GH issue for this one.

Thanks for your involvement!