1class ClosePetitionsEarlyJob < ApplicationJob |
|
2 queue_as :high_priority |
|
4 class << self |
|
5 def schedule_for(time) |
|
6 set(wait_until: time).perform_later(time.iso8601) |
|
7 end |
|
8 end |
|
|
10 def perform(time) |
11 Petition.close_petitions_early!(time.in_time_zone) |
|
12 end |
|
13end |