def run
      Thread.current.name = 'rocketjob main'
      RocketJob.server!
      setup_environment
      setup_logger
      rails? ? boot_rails : boot_standalone
      write_pidfile

      # In case Rails did not load the Mongoid Config
      RocketJob::Config.load!(environment, mongo_config, symmetric_encryption_config) if ::Mongoid::Config.clients.empty?

      filter = build_filter

      opts               = {}
      opts[:name]        = name if name
      opts[:max_workers] = workers if workers
      opts[:filter]      = filter if filter

      Supervisor.run(opts)
    end
def run
      Thread.current.name = 'rocketjob main'
      RocketJob.server!
      setup_environment
      setup_logger
      rails? ? boot_rails : boot_standalone
      write_pidfile

      # In case Rails did not load the Mongoid Config
      RocketJob::Config.load!(environment, mongo_config, symmetric_encryption_config) if ::Mongoid::Config.clients.empty?

      filter = build_filter

      opts               = {}
      opts[:name]        = name if name
      opts[:max_workers] = workers if workers
      opts[:filter]      = filter if filter

      Supervisor.run(opts)
    end
Run a RocketJob::Server from the command line