Task lock exceptions storing within huey.results.huey?
See original GitHub issueIssue Description
Charles @coleifer, great repo, management and continued development.
I am running 1.6.1
and have recently leveraged the @huey.lock_task(<lock_name>)
; working well and as expected. One finding/question I did have was around the TaskLockedException
. I have noticed that when the TaskLockedException
is thrown, a result (exception and stack) is added to the huey.results.huey
redis hash. My RedisHuey instantiation is RedisHuey(events=False, store_errors=False, store_none=False)
and my function is return None
. What I find is that, in instances of lock unavailability, this huey.results.huey
just continues to populate with TaskLockedException
entries; one per attempt no greater. And while a redis hash can get VERY large these “results” are not something I require. I am interested in knowing if this functionality is by design or if there is something I am missing from an implementation perspective. Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (5 by maintainers)
Proposed change:
So, here’s the relevant code (api.py):
So we’re storing errors as results, but I think the fix would be to move the “store_errors” conditional up to the line reading “if self.result_store”.