Skip to content

Tasks ttl and ttr wrong behavior #146

Open
@HejVkt

Description

@HejVkt

When we put a task with ttl and ttr set, it behaves incorrectly.

Example:
queue = require 'queue'
queue.create_tube('test_ttr', 'fifottl')
queue.tube.test_ttr:put('foobar', {ttr=100, ttl=5})
queue.tube.test_ttr:take(0)

----- Wait six seconds
queue.tube.test_ttr:ack(0)
- error: Task was not taken in the session

I think this behavior is due to the fact that the task was removed from the queue after ttl = 5 seconds.
But in my opinion, when the task was taken, it should has a new ttl in the queue = remaining time + ttr

Something like that 3+100 and it should ack() correctly without error within 103 seconds

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions