
Security News
CISA’s 2025 SBOM Guidance Adds Hashes, Licenses, Tool Metadata, and Context
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
This is a pure-Ruby library for the gearman distributed job system.
More testing, some code cleanup.
Right now, this library has both client and worker support for Ruby apps.
A very simple client that submits a "sleep" job and waits for 100 seconds for results:
require 'rubygems'
require 'gearman'
servers = ['localhost:4730', 'localhost:4731']
client = Gearman::Client.new(servers)
taskset = Gearman::TaskSet.new(client)
task = Gearman::Task.new('sleep', 20)
task.on_complete {|d| puts d }
taskset.add_task(task)
taskset.wait(100)
A worker that will process jobs in the 'sleep' queue:
require 'rubygems'
require 'logger'
require 'gearman'
servers = ['localhost:4730']
w = Gearman::Worker.new(servers)
logger = Logger.new(STDOUT)
# Add a handler for a "sleep" function that takes a single argument, the
# number of seconds to sleep before reporting success.
w.add_ability("sleep") do |data,job|
seconds = 10
logger.info "Sleeping for #{seconds} seconds"
(1..seconds.to_i).each do |i|
sleep 1
# Report our progress to the job server every second.
job.report_status(i, seconds)
end
# Report success.
true
end
loop { w.work }
Released under the MIT license, originally developed by XING AG. See the LICENSE file for further details.
FAQs
Unknown package
We found that gearman-ruby 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
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.