forked from Trustie/forgeplus
fixed 截止提交作品时间过了不提示
This commit is contained in:
parent
56896df081
commit
301ff27375
|
|
@ -24,7 +24,7 @@ class CompetitionNoticeJob < ApplicationJob
|
|||
# "竞赛通知-截止提交作品时间前3天"
|
||||
def submit_work_end
|
||||
Rails.logger.info "__________#{Time.now.to_s}__submit_work_end start______________________"
|
||||
competitions = CompetitionInfo.where("upload_date >=? and upload_date <= ? ", (Time.now + 3.days + 5.minutes).utc.strftime('%Y-%m-%d %H:%M:00'), Time.now.utc.strftime('%Y-%m-%d %H:%M:00'))
|
||||
competitions = CompetitionInfo.where("upload_date >=? and upload_date <= ? ", Time.now.utc.strftime('%Y-%m-%d %H:%M:00'), (Time.now + 3.days + 5.minutes).utc.strftime('%Y-%m-%d %H:%M:00'))
|
||||
competitions.each do |c|
|
||||
next if c.upload_date < Time.now
|
||||
competition_users = CompetitionUser.where(competition_info_id: c.id)
|
||||
|
|
|
|||
Loading…
Reference in New Issue