-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce HireFire::Macro::Resque::Cache
This change adds a caching mechanism to the Resque macro. Since we have to scan the entire delayed set in Redis to acquire the sizes of the requested queues containing jobs scheduled to run now, we can instead process the size of every queue associated with the scanned jobs, whether requested or not, and cache it for a certain amount of time. This approach allows us to avoid scanning the entire delayed set on subsequent requests within the cache duration. Instead, we can access and aggregate the cached data. This will significantly improve throughput for applications that have a large number of scheduled jobs and/or a large number of Resque process types that need to be monitored.
- Loading branch information
Showing
2 changed files
with
75 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters