-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to pass args to start_key function #114
Comments
Thank you for the issue! It seems to me that we should to fix the README. I don't see a real case of usage the
and the user should not use other fields or methods: Lines 210 to 213 in c3b86c8
|
We can pass args instead task. It's useful when you want to start iteration from point and you depends on user data(args). function get_lower_bound(args)
return fiber.time() - args.threshold
end
expirationd.start(name, space, is_expired, {
index = 'created_at_index',
start_key = get_lower_bound,
iterator_type = "LT"
args = {
threshold = 30 -- seconds
}
}) And we've already had the flexibility of user callbacks which have task as argument expirationd/expirationd/init.lua Lines 347 to 358 in 977c8cc
That's why I prefer to pass task for having consistent with others callbacks |
expirationd/expirationd.lua
Lines 691 to 698 in c3b86c8
expirationd/expirationd.lua
Lines 382 to 390 in c3b86c8
Should be rewritten to:
Or should we pass task as it says in README?
expirationd/README.md
Lines 94 to 129 in c3b86c8
The text was updated successfully, but these errors were encountered: