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

Allow unique's period option to take units. #975

Merged
merged 3 commits into from
Oct 21, 2023

Conversation

JonRowe
Copy link
Contributor

@JonRowe JonRowe commented Oct 21, 2023

Other parts of oban (e.g. ratelimiting) can take period in the form {n, unit} and this is missing from the unique :period option, I mentioned this on the Elixir Slack a while back and was encouraged to open an issue about it but I thought I would go one better and create a PR! Totally don't mind if you'd prefer to do this yourself in a different way.

@JonRowe JonRowe force-pushed the unique-period-takes-units branch from d2a97e6 to 27e958f Compare October 21, 2023 11:52
Copy link
Member

@sorentwo sorentwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work! And here I only hoped you'd open an issue 🙂

lib/oban/job.ex Outdated Show resolved Hide resolved
@sorentwo sorentwo merged commit eb605c8 into oban-bg:main Oct 21, 2023
2 checks passed
@JonRowe JonRowe deleted the unique-period-takes-units branch October 21, 2023 21:07
sorentwo pushed a commit that referenced this pull request Oct 26, 2023
Other parts of Oban (e.g. rate-limiting) can take a period in the form `{n, unit}`, which is missing from the unique `:period` option.
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

Successfully merging this pull request may close these issues.

2 participants