DEV: prevents redefinition of various constants (#8199)

CLEANUP_GRACE_PERIOD
MAX_AWARDED
POLL_MAILBOX_TIMEOUT_ERROR_KEY
This commit is contained in:
Joffrey JAFFEUX 2019-10-17 09:18:07 +02:00 committed by GitHub
parent cb0443792b
commit b6ef473a31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ module Jobs
class GrantNewUserOfTheMonthBadges < ::Jobs::Scheduled
every 1.day
MAX_AWARDED = 2
MAX_AWARDED ||= 2
def execute(args)
badge = Badge.find(Badge::NewUserOfTheMonth)

View File

@ -23,7 +23,7 @@ module Jobs
Email::Processor.process!(popmail.pop)
end
POLL_MAILBOX_TIMEOUT_ERROR_KEY = "poll_mailbox_timeout_error_key".freeze
POLL_MAILBOX_TIMEOUT_ERROR_KEY ||= "poll_mailbox_timeout_error_key".freeze
def poll_pop3
pop3 = Net::POP3.new(SiteSetting.pop3_polling_host, SiteSetting.pop3_polling_port)

View File

@ -5,7 +5,7 @@ module Jobs
class ReindexSearch < ::Jobs::Scheduled
every 2.hours
CLEANUP_GRACE_PERIOD = 1.day.ago
CLEANUP_GRACE_PERIOD ||= 1.day.ago
def execute(args)
rebuild_problem_topics