
Security News
ESLint Adds Support for Parallel Linting, Closing 10-Year-Old Feature Request
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
job_queue
allows you to use lots of message queues with exactly the same interface so you don't need to worry about which queue to pick :)
This should get you started:
require 'rubygems'
require 'job_queue'
Before you can do anything you must specify an adapter to use
JobQueue.adapter = JobQueue::BeanstalkAdapter.new
Jobs can then be simply added to the queue
JobQueue.put("flubble bubble")
In your workers you'll want to subscribe to a queue
JobQueue.subscribe do |job|
puts job
end
This subscribe block takes care of waiting for the next job to arrive and the block is passed exactly what you passed in. If you want to exit the loop just throw :stop.
JobQueue.subscribe do |job|
# Wait - I changed my mind!
throw :stop
end
You might love Ruby right now, but why lock yourself in? Often the kinds of things you use queues for are the kind of things you'll want to optimize. This is a good place to start:
JSON.generate({:some => "hash"})
JSON.parse(job)
Yes. Just a minute...
Take your pick! Right now we have:
http://xph.us/software/beanstalkd/
You need to run all your code within an eventmachine loop to use AMQP.
FAQs
Unknown package
We found that mloughran-job_queue 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
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.
Security News
Rspack launches Rslint, a fast TypeScript-first linter built on typescript-go, joining in on the trend of toolchains creating their own linters.