Skip to content
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

queue name can be anything while group_rate name is an atom #21

Open
benoitc opened this issue Oct 3, 2017 · 1 comment
Open

queue name can be anything while group_rate name is an atom #21

benoitc opened this issue Oct 3, 2017 · 1 comment

Comments

@benoitc
Copy link
Contributor

benoitc commented Oct 3, 2017

I was trying to setup 2 queue sharing the same group_name but failed with a case_clause error while trying to use a tuple as a group_rate name. Creating the group name with a tuple is OK, but then passing this name when setting a queue fails with a case_clause error. AFaik the group name should match an atom there:

https://github.com/uwiger/jobs/blob/master/src/jobs_server.erl#L488

I'm not sure what should be fixed there. Either fixing the code above by not matching a specific type for the name. Or fixing jobs:add_group_rate/2 and raise a badarg error if the name is anything but atom.

Thoughts?

@uwiger
Copy link
Owner

uwiger commented Oct 4, 2017

I see no reason to restrict group names to atom. (Judging by the code, perhaps I did once, but in such cases as these, a good memory is unpardonable, as they say).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants