tarantool / queue

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

implemented lifottl queue type #86

Closed maxim-komar closed 4 years ago

maxim-komar commented 5 years ago

implemented lifottl queue type

LeonidVas commented 4 years ago

Hi. Thank you for the patch. Sorry for the big latency. It's look like copy-paste of the fifottl driver with an overload of the take method (and this is expected). But WET is bad practice. I propose to pick out common code and write fifottl and lifottl as a wrapper around this (something like limfifottl relatively to fifottl).

LeonidVas commented 4 years ago

Useful part of the PR is five lines of code, everything else - "copy-paste" from the fifottl driver. I agree that "copy-paste" methodology was used in the module for creating new drivers from existing ones. But support such code is difficult. I think DRY principle is a good practice and suggest to move common code to a separate file/module. Back to the PR, I created an issue to implement the lifo and lifottl drivers. As for the unreasonably long feedback delays in the PR review: the party's policy has been changed and now part of the team's resource is allocated for this activity and it is expected such delays will gone. So, if you want, you can try to implement the task.