
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
= JobQueue - Let run your jobs in parallel
This package contains jobQueue:
jobQueue can do the following things:
I started a python2 implementation of this, which can be installed via pip (https://pypi.python.org/pypi/jobqueue). When its maature enough, I will use the ruby version numbers for it.
== Installation
=== Gem Installation
Download and install jobQueue with the following.
gem install jobQueue
=== Requirements
JobQueue requires Ruby only, but versions 1.9.x are needed to make use of system threads.
== Usage
=== Parallelize Ruby's blocks, procs, lambdas and things
Create a JobQueue with nThreads worker with:
jq = JobQueue.new(nThreads)
Use its push method to put in something to do
For blocks: jq.push do myObject.method0(...) myObject.method1(...) myObject.method3(...) end
For procs and lambdas:
jp.push(myProc,arg0,arg1,...)
For object methods:
jq.push([myObject,[:method,arg0,arg1,...])
Same code can be used for class methods:
jq.push(myClass,[:myClassMethod,arg0,arg1,...])
To start the workers, call
jq.run
That's it. You might have look at tests, that come with the jobQueue gem.
=== Parallelize system commands
Use a separate class for this and push string to it:
jq = SystemJobs.new(nThreads) jq.push('find ./src -name ".rb"','find ./downloads -name ".rb"')
will start 2 parallel searches for ruby files. This is implemented in the prun.rb script, which comes with the jobQueue gem. To run each line of a shell script on 10 threads, use:
prun.rb -j 10 jobs.sh
The '-j' switch is optional. Default is the maximum number of cores. The script accepts multiple files and processes one after another. Try '-h' for documentation.
== Support, Issues, Bugs, ...
please use personal mail, ruby-lang mailing list or github
== Changelog
== Credits
[Robert Klemme] For the first hints: https://www.ruby-forum.com/topic/68001#86298
== License
jobQueue use the BSD License
:include LICENSE
= Other stuff
Author:: Ralf Mueller stark.dreamdetective@gmail.com Requires:: Ruby 1.9 or later License:: Copyright 2011-2016 by Ralf Mueller Released under BSD-style license. See the LICENSE file included in the distribution.
FAQs
Unknown package
We found that parallelQueue 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.