
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
To manage complexe background job processes, this gem simplify the task of creating sequences of Resque jobs by putting them into a tree.
Add this line to your application's Gemfile:
gem 'resque'
gem 'resque_jobs_tree'
And then execute:
$ bundle
Organise each sequences of jobs into a single file
my_tree = ResqueJobsTree::Factory.create :my_complex_process do
root :send_my_email do
perform do |*args|
# your code goes here...
end
childs do |resources|
user = resources.first
[].tap do |jobs|
jobs << [:my_fetch_on_an_outside_slowish_api, user.company, user.group]
user.comments.each do |comment|
jobs << [:my_precomputation_of_data, comment]
end
end
end
node :my_fetch_on_an_outside_slowish_api do
perform do |*args|
# your code goes here...
end
end
node :my_precomputation_of_data do
perform do |*args|
# your code goes here...
end
end
end
end
my_tree.launch User.find(1)
This code is defining the tree, then when it launches the sequence of jobs, it:
Limitations:
[:mail, User.first]
Node options:
{ triggerable: true }
if you need your process to wait for an outsider to start.{ continue_on_fail: true}
if your process can continue even after a fail during a job.git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that resque_jobs_tree 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 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.
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.