-- If this had previously been given out to a worker,
-- make sure to remove it from that worker's jobs
if worker then
redis.call('zrem', 'ql:w:' .. worker .. ':jobs', jid)
end
Worker is a blank string (or some other value that is concatenated as a blank string) but is truthy in the conditional. This may not be a real problem, but it was surprising to me and suggests some false assumptions being made that could cause other bugs later down the road, so I thought I'd mention it.
I'm debugging an issue we're having by looking at the qless monitoring output. I noticed this:
This is coming from here:
Worker is a blank string (or some other value that is concatenated as a blank string) but is truthy in the conditional. This may not be a real problem, but it was surprising to me and suggests some false assumptions being made that could cause other bugs later down the road, so I thought I'd mention it.
/cc @dlecocq