
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
A Resque plugin. Requires Resque 1.9.10.
resque-pause adds functionality to pause resque jobs through the web interface.
Using a pause
allows you to stop the job for a slice of time.
The job finish the process it are doing and don't get a new task to do,
until the queue is released.
You can use this functionality to do some maintenance whithout kill workers, for example.
require 'resque-pause'
class UpdateNetworkGraph
extend Resque::Plugins::Pause
@queue = :network_graph
def self.perform(repo_id)
heavy_lifting
end
end
To pause the queue:
ResquePauseHelper.pause(:network_graph)
Then, to unpause the queue:
ResquePauseHelper.unpause(:network_graph)
Single-queue pause is achieved by storing a pause/queue key in Redis.
You can also pause all the queues at once.
To switch on a global pause:
ResquePauseHelper.global_pause()
Then, to remove a global pause:
ResquePauseHelper.global_unpause()
This global pause doesn't interact with any pauses on individual queues. That means, switching the global pause on and off should preserve whatever pauses you might have in place before and even during the global pause period.
An anology would be with light switches and circuit breakers. Positioning light switches is like pausing individual queues. Whatever their position before you flip the breaker (impose a global pause). They'll maintain that position after the global pause.
You have to load ResquePause to enable the Pause tab.
require 'resque-pause/server'
The slice of time the job will wait for queue be unpaused before abort the job could be changed with attribute @pause_check_interval.
By default the time is 10 seconds.
You can define the attribute in your job class in seconds.
class UpdateNetworkGraph
extend Resque::Plugins::Pause
@queue = :network_graph
@pause_check_interval = 30
def self.perform(repo_id)
heavy_lifting
end
end
The above modification will ensure the job will wait for 30 seconds before abort.
To change the exact key that will be put into redis to signal a global pause, use the global_pause_key
config
ResquePauseHelper.global_pause_key = "my_custom_key"
$ gem install resque-pause
FAQs
Unknown package
We found that resque-pause demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.