You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.
Looks like a cool library. As a minor quibble though about your readme example, you have
def perform(to: to, subject: subject, body: body) do
# do work
end
It is generally considered to not be a good idea to pattern match on keyword lists as they're order dependent.
While Toniq.enqueue(SendEmailWorker, to: "info@example.com", subject: "Hello", body: "Hello, there!") would work Toniq.enqueue(SendEmailWorker, subject: "Hello", to: "info@example.com", body: "Hello, there!") would not, and that's generally confusing.
Am I correct in reading that perform takes just one argument?
The text was updated successfully, but these errors were encountered:
Yeah, I've noticed that problem and the readme could certainly be improved. Contributions welcome :)
We could maybe update the examples use use maps?
The enqueue takes a list of arguments, and because of that perform does too. So you can probably pass in just about anything there (as long as it can be serialized, so no Pids, etc).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hey!
Looks like a cool library. As a minor quibble though about your readme example, you have
It is generally considered to not be a good idea to pattern match on keyword lists as they're order dependent.
While
Toniq.enqueue(SendEmailWorker, to: "info@example.com", subject: "Hello", body: "Hello, there!")
would workToniq.enqueue(SendEmailWorker, subject: "Hello", to: "info@example.com", body: "Hello, there!")
would not, and that's generally confusing.Am I correct in reading that perform takes just one argument?
The text was updated successfully, but these errors were encountered: