seomoz / qless-core

Core Lua Scripts for qless
MIT License
85 stars 33 forks source link

Fix incorrect unpacking of job data #82

Open hamishforbes opened 6 years ago

hamishforbes commented 6 years ago

Fix 2 cases where job data fields (state and worker) are passed to unpack even though they are strings.

The first case (state), the variable was unused anyway so I just removed it totally.

dlecocq commented 6 years ago

I believe QlessJob:data always returns a table. Still, the tests pass both ways, and test_events.py's TestEvents.test_failed_retries exercises this code.

hamishforbes commented 6 years ago

Oh I see, sorry that's my bad. I looked at that and though it was indexing the return from data().
Didn't notice that its an argument that filters the return value.

The variable is still unused in the first change (state) but looks like the worker one should be broken. I'll remove that change

edit: I think actually the errors we were seeing were caused by a too-small Redis memory limit causing evictions in the middle of job processing

dlecocq commented 6 years ago

LGTM