packit-service icon indicating copy to clipboard operation
packit-service copied to clipboard

Do we still need TaskResults?

Open jpopelka opened this issue 3 years ago • 4 comments

TaskResults was introduced in #15 as HandlerResults because we wanted to somewhere store info about performed Celery tasks and this was the easiest since Celery can store task results (i.e. what a handler method returns) automatically once a backend (database) is configured. It was before we started using PostgreSQL so the backend was the same as the broker, i.e. Redis. After switching to PostgreSQL those results were stored there, but after some time we disabled it because we hadn't actually ever used/checked them.

The initial idea behind #15 was that HandlerResults.success would tell us whether all jobs succeeded and if not an Exception would be raised (sent to Sentry). And HandlerResults.details would contain more info from handlers, to be stored in the backend.

Given that we don't store the task results in the backend anymore, I'm wondering whether we actually use the TaskResults.details anywhere or whether it can be removed. And the same with TaskResults.success.

jpopelka avatar Aug 10 '22 09:08 jpopelka

Could celery monitoring use it?

TomasTomecek avatar Aug 10 '22 12:08 TomasTomecek

I see the TaskResults.details being used in JobHandler.run_job() to log an error message in case of one of the jobs failed, but I guess the jobs can do the error logging themselves?

jpopelka avatar Sep 19 '22 12:09 jpopelka

Still relevant, some changes might have occurred

mfocko avatar Aug 19 '24 09:08 mfocko

When working on #2526 I removed the error logging of success=False tasks to reduce the number of events sent to Sentry. I initially wanted to remove TaskResults entirely, but I found it may be useful for testing purposes still.

lbarcziova avatar Oct 01 '24 10:10 lbarcziova