Class: SidekiqWebWorkers::JobRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/sidekiq-web-workers/job_runner.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(worker_name:, worker_parameters:, perform_in: nil) ⇒ JobRunner

Returns a new instance of JobRunner.



9
10
11
12
13
# File 'lib/sidekiq-web-workers/job_runner.rb', line 9

def initialize(worker_name:, worker_parameters:, perform_in: nil)
  @worker_name = worker_name
  @worker_parameters = worker_parameters
  @perform_in = perform_in
end

Instance Attribute Details

#worker_nameObject (readonly)

Returns the value of attribute worker_name.



3
4
5
# File 'lib/sidekiq-web-workers/job_runner.rb', line 3

def worker_name
  @worker_name
end

Class Method Details

.execute!(*args) ⇒ Object



5
6
7
# File 'lib/sidekiq-web-workers/job_runner.rb', line 5

def self.execute!(*args)
  new(*args).execute!
end

Instance Method Details

#execute!Object



15
16
17
# File 'lib/sidekiq-web-workers/job_runner.rb', line 15

def execute!
  enqueue_worker
end