Applied rubocop cop 'Style/RedundantBegin'.
This commit is contained in:
parent
4c0fa5111d
commit
bc6a8ca169
1 changed files with 24 additions and 26 deletions
|
@ -82,7 +82,6 @@ class Scheduler < ApplicationModel
|
||||||
end
|
end
|
||||||
|
|
||||||
def self._start_job( job, try_count = 0, try_run_time = Time.zone.now )
|
def self._start_job( job, try_count = 0, try_run_time = Time.zone.now )
|
||||||
begin
|
|
||||||
job.last_run = Time.zone.now
|
job.last_run = Time.zone.now
|
||||||
job.pid = Thread.current.object_id
|
job.pid = Thread.current.object_id
|
||||||
job.save
|
job.save
|
||||||
|
@ -114,7 +113,6 @@ class Scheduler < ApplicationModel
|
||||||
raise "STOP thread for #{job.method} after #{try_count} tries"
|
raise "STOP thread for #{job.method} after #{try_count} tries"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def self.worker
|
def self.worker
|
||||||
wait = 8
|
wait = 8
|
||||||
|
|
Loading…
Reference in a new issue