Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Ost-Scheduler is an extension to Ost that adds support for queueing items in the future.
Ost provides simple, lightweight background job functionality.
Ost-Scheduler makes it easy to enqueue object ids and process them with workers.
Say you want to process video uploads. In your application you will have something like this:
Ost[:videos_to_process].push_at( Time.now + 60 , @video.id )
Then, you will have a worker that will look like this:
require "ost-scheduler"
Ost[:videos_to_process].each_delayed do |id|
# Do something with it!
end
Ost uses a lightweight Redis client called [Redic][redic]. To connect to
a Redis database, you will need to set an instance of Redic
, with a URL
of the form redis://:<passwd>@<host>:<port>/<db>
.
You can customize the connection by calling Ost.redis=
:
require "ost-scheduler"
Ost.redis = Redic.new("redis://127.0.0.1:6379")
Then you only need to refer to a queue for it to pop into existence:
require "ost-scheduler"
Ost.redis = Redic.new("redis://127.0.0.1:6379")
Ost[:event].push_at(@datetime, @feed.id)
Ost defaults to a Redic connection to redis://127.0.0.1:6379
. The example
above could be rewritten as:
require "ost-scheduler"
Ost[:event].push_at(@datetime, @feed.id)
A worker is a Ruby file with this basic code:
require "ost-scheduler"
Ost[:rss_feeds].each_delayed do |id|
# ...
end
Ost[:example].push_at(datetime, item)
: add item
to
the :example
queue in a exactly datetime
.
Ost[:example].each_delayed { |item| ... }
: consume item
from the :example
queue. .
Ost.stop
: halt processing for all queues.
Ost[:example].stop
: halt processing for the example
queue.
$ gem install ost-scheduler
FAQs
Unknown package
We found that ost-scheduler 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.