Skip to content

Rails engine for managing recurring jobs [WIP]

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
MIT-LICENSE
Notifications You must be signed in to change notification settings

eldemcan/white_rabbit

Repository files navigation

WhiteRabbit Build Status

Rails engine for managing recurring jobs. You can use this engine in conjunction with Resque, SideKiq etc. Build on rufus gem

overview

Usage

Define you tasks inside of app/schedule/white_rabbit folder and white_rabbit will pick it up. Your tasks has to include call method.

module WhiteRabbit
  class OpenLight
    attr_reader :interval, :job, :params

    def initialize(interval = '', params)
      @interval = interval
      @params = params
    end

    def call(job, _time)
      @job = job
      Rails.logger.info("[HELLO WORLD] #{params}")
      p "Hello world, Job_id: #{job.id}"
    end
  end
end

Installation

  • add to gem file
  • rails white_rabbit:install:migrations
  • yarn build will build front end code if you make any changes
  • add mount WhiteRabbit::Engine => '/white_rabbit' to route.rb

Basically follow rails installation guide install guide

Current work

Github board will include work that is missing and things I like to do. Please take a look at it and contribute if you feel like it.

Contributing

Please don't hesitate to open pr and improve this project.

License

The gem is available as open source under the terms of the MIT License.

About

Rails engine for managing recurring jobs [WIP]

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
MIT-LICENSE

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published