tarantool / queue

Create task queues, add and take jobs, monitor failed tasks
Other
237 stars 52 forks source link

fix: avoid calling on_task_change with nil #75

Closed aleclarson closed 3 years ago

aleclarson commented 6 years ago

This fixes #74

Correct me if I'm wrong, but when self.space:get(id) returns nil, that means the task has already been deleted or acknowledged, so there's no point in calling on_task_change(nil, 'delete').

LeonidVas commented 3 years ago

I think test cases should be added to show the changed behaviour of a user-provided on_task_change callback.

The behavior will not change. Before the deletion in abstract.lua, it will call the peek and throws an error on failure.

LeonidVas commented 3 years ago

Patches has been pushed to master.