Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Threaded, easy to use scheduling and background job solution.
Schedules are managed by a watcher thread and enqueued as background jobs when they are due.
Background work is stored in a thread-safe Queue
and worked on by a pool of worker threads.
Add this line to your application's Gemfile:
gem 'threasy'
And then execute:
$ bundle
Or install it yourself as:
$ gem install threasy
Threasy.enqueue
# Use a block
Threasy.enqueue { puts "This will happen in the background" }
# Use an object that responds to `perform` or `call`
Threasy.enqueue MyJob.new(1,2,3)
Jobs are placed in a work queue. Worker threads are spun up to process jobs as the queue grows.
Threasy.schedule
Puts a job onto the schedule. Once the scheduler sees a job is due for processessing, it is enqueued into the work queue to be processed like any other job.
Available options:
:every
: number of seconds between repetition. Can be combined with :at
or :in
.:in
: number of seconds until job is (next) triggered.:at
: Time
job is (next) triggered.:times
: number of times to trigger job before removing it from the schedule.Example:
# Use a block
Threasy.schedule(:in => 5.minutes) { puts "In the background, 5 minutes from now" }
# Use an job object
Threasy.schedule(MyJob.new(1,2,3), every: 5.minutes)
Threasy.schedules
Returns the default instance of Threasy::Schedule
, which manages scheduled jobs.
Threasy.work
Returns the default instance of Threasy::Work
, which manages the work queue and worker threads.
Threasy.config
Returns the default instance of Threasy::Config
, which manages runtime configuration options.
Threasy.config
can also accept a block and will yield the Threasy::Config
instance.
Threasy.config do |c|
c.max_sleep = 5.minutes
c.max_overdue = 1.hour
c.max_workers = 8
end
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that threasy 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.