mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 16:06:22 +00:00
Merge branch 'issue-15109-1' of https://0xacab.org/sutty/sutty into production.panel.sutty.nl
This commit is contained in:
commit
a8d119391a
1 changed files with 3 additions and 3 deletions
|
@ -7,12 +7,12 @@ class ApplicationJob < ActiveJob::Base
|
||||||
# Esperar una cantidad random de segundos primos, para que no se
|
# Esperar una cantidad random de segundos primos, para que no se
|
||||||
# superpongan tareas
|
# superpongan tareas
|
||||||
#
|
#
|
||||||
# @return [Array<ActiveSupport::Duration>]
|
# @return [Array<Integer>]
|
||||||
RANDOM_WAIT = [3, 5, 7, 11, 13].seconds
|
RANDOM_WAIT = [3, 5, 7, 11, 13]
|
||||||
|
|
||||||
# @return [ActiveSupport::Duration]
|
# @return [ActiveSupport::Duration]
|
||||||
def self.random_wait
|
def self.random_wait
|
||||||
RANDOM_WAIT.sample
|
RANDOM_WAIT.sample.seconds
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in a new issue