tarantool / queue

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

touch() throws an error on nil interval #57

Closed rybakit closed 7 years ago

rybakit commented 7 years ago

According to the documentation, nil increments should be handled w/o errors when passed to touch(). Currently, it's not the case:

foo = queue.create_tube('foo', 'fifottl')
foo:put('touch_ttr_15', {ttr=15})
foo:take(.1)
foo:touch(0, msgpack.NULL)
foo:touch(0, nil)

...

- error: '/usr/local/share/lua/5.1/queue/abstract.lua:86: attempt to compare ''void
*'' with ''number'''

So, either documentation or implementation should be fixed.