Skip to content

Add default key for limits_concurrency#545

Closed
ankane wants to merge 1 commit intorails:mainfrom
ankane:concurrency-default-key
Closed

Add default key for limits_concurrency#545
ankane wants to merge 1 commit intorails:mainfrom
ankane:concurrency-default-key

Conversation

@ankane
Copy link
Copy Markdown

@ankane ankane commented Apr 2, 2025

Hi, this PR adds a default key to limits_concurrency so users don't need to come up with a key name if they only want to limit by job name (regardless of arguments), which I expect is a common case.

class SomeJob < ApplicationJob
  limits_concurrency to: 3
end

Currently, users must use an empty string or another key.

class SomeJob < ApplicationJob
  limits_concurrency key: "", to: 3
end

@ankane
Copy link
Copy Markdown
Author

ankane commented Apr 3, 2025

The test failure seems to be from a flaky test (also in this CI run from February).

@ankane ankane closed this May 7, 2025
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.

1 participant