Sha256: 4ae69ecf136a23f65829ee8a269d6729ddb4a988fb932084fbde797802449feb

Contents?: true

Size: 320 Bytes

Versions: 1

Compression:

Stored size: 320 Bytes

Contents

require 'thor'

module GoodJob
  class CLI < Thor
    RAILS_ENVIRONMENT_RB = File.expand_path("config/environment.rb")

    desc :start, "Start jobs"
    def start
      require RAILS_ENVIRONMENT_RB

      GoodJob::Scheduler.new

      Kernel.loop do
        sleep 1
      end
    end

    default_task :start
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
good_job-0.2.1 lib/good_job/cli.rb