All Projects → JustinAiken → active_scheduler

JustinAiken / active_scheduler

Licence: MIT License
Resque Scheduling for ActiveJob

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to active scheduler

taskinator
A simple orchestration library for running complex processes or workflows in Ruby
Stars: ✭ 25 (-65.28%)
Mutual labels:  resque, activejob
activejob-google cloud tasks-http
Active Job adapter for Google Cloud Tasks HTTP targets
Stars: ✭ 16 (-77.78%)
Mutual labels:  activejob
rocketjob
Ruby's missing background and batch processing system
Stars: ✭ 281 (+290.28%)
Mutual labels:  resque
lambdakiq
ActiveJob on SQS & Lambda
Stars: ✭ 131 (+81.94%)
Mutual labels:  activejob
resque-waiting-room
Resque plugin that throttles your jobs
Stars: ✭ 34 (-52.78%)
Mutual labels:  resque
kube queue
Run processing background job on Kubernetes for Ruby
Stars: ✭ 26 (-63.89%)
Mutual labels:  activejob
advanced-sneakers-activejob
Advanced Sneakers adapter for ActiveJob
Stars: ✭ 34 (-52.78%)
Mutual labels:  activejob
activejob-uniqueness
Unique jobs for ActiveJob. Ensure the uniqueness of jobs in the queue.
Stars: ✭ 194 (+169.44%)
Mutual labels:  activejob
KittyEvents
Super simple event system on top of ActiveJob
Stars: ✭ 20 (-72.22%)
Mutual labels:  activejob
jobqueue
Jobqueue manages running and scheduling jobs (think Sidekiq or Resque for Go).
Stars: ✭ 37 (-48.61%)
Mutual labels:  resque
maintenance job
Mechanism to run testable one-off jobs in Rails at deploy time to manipulate data
Stars: ✭ 27 (-62.5%)
Mutual labels:  activejob
resque exporter
An exporter of Prometheus for resque's status.
Stars: ✭ 12 (-83.33%)
Mutual labels:  resque
Rails
Ruby on Rails
Stars: ✭ 49,693 (+68918.06%)
Mutual labels:  activejob
Shoryuken
A super efficient Amazon SQS thread based message processor for Ruby
Stars: ✭ 1,837 (+2451.39%)
Mutual labels:  activejob

Gem VersionBuild Status Coveralls branchCode Climate

active_scheduler

active_scheduler is a gem to take a standard schedule one would use with resque scheduler and wraps it to work with ActiveJob.

Currently only Resque is supported, but pull requests to add other queues (sidekiq, etc) would be welcomed!

Requirements/Support

  • Ruby 2.0+
  • ActiveJob
    • 4.2 is tested and used in production
    • 5.0-6.0 is tested against CI, but I haven't tried it in production.
  • Resque
  • Resque Scheduler

Setup

Installation

Add active_scheduler to your Gemfile.

Usage

In your Resque initializer:

require 'resque/server'
require 'resque/scheduler/server'
require 'active_scheduler'

# ... Set up your Resque ...
...

yaml_schedule    = YAML.load_file("#{Rails.root}/config/resque_schedule.yaml") || {}
wrapped_schedule = ActiveScheduler::ResqueWrapper.wrap yaml_schedule
Resque.schedule  = wrapped_schedule

Example Format

simple_job:
  every: "30s"
  queue: "simple"
  class: "SimpleJob"
  args:
    -
  description: "It's a simple job."

ThisIsTheClass:
  cron: "* * * *"
  queue: 'cronny'
  description: "Will call the ThisIsTheClass class"

Only classes that are descended from ActiveJob::Base will be wrapped

Job Classes With Named Args

If you have a job class that uses named arguments you can specify that. args should be a hash nested in the array and you need to add the named_args key.

simple_job:
  every: "30s"
  queue: "simple"
  class: "SimpleJob"
  args:
    - foo: 1
      bar: 2
  description: "It's a simple job."
  named_args: true

Credits

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].