-
Notifications
You must be signed in to change notification settings - Fork 65
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
Change Verk.Queue, Verk.RetrySet, Verk.SortedSet to have clear!/clear, range!/range... #49
Comments
clear!
/clear
, range!
/range
...
Do you mean something simple like def count(queue) do
Redix.command(Verk.Redis, ["LLEN", queue_name(queue)])
end
def count!(queue) do
case count(queue) do
{:ok, resp} ->
resp
{:error, error} ->
raise error
end
end or something a little bit more elaborate like returning/raising |
It could be simple like that. We could even use a macro like this PR: https://github.com/ericmj/mongodb/pull/51/files the |
Can you please take a look and check am I on the right track - https://github.com/krasio/verk/commits/issues/49. |
@krasio, that's exactly what I had in mind. Thank you very much! ❤️ |
non-bang pairs for public methods. Add macro to ease creating bang variants of functions. Closes edgurgel#49.
These modules now offer pair of bang and non-bang variants for their public functions. Add macro to ease creating bang variants of functions. Closes edgurgel#49.
These modules now offer pair of bang and non-bang variants for their public functions. Add macro to ease creating bang variants of functions. Closes #49.
Related: edgurgel/verk#49
These modules should offer "twins" of each function:
Example:
clear!
andclear
whereclear
returns{:ok, something}
or{:error, reason}
andclear!
will returnsomething
or throw an error.This should be done soon as we don't want to break this API after we release 1.0.0
The text was updated successfully, but these errors were encountered: