app/workers/seasonal_offers_worker.rb
# set approved seasonal offers to paused if they left their TimeFrame
# no AsanaTask, no mailing, just pause the offers
set approved seasonal offers to paused if they left their TimeFrame
no AsanaTask, no mailing, just pause the offers
set approved seasonal offers to paused if they left their TimeFrame no AsanaTask no mailing just pause the offers
def process_approved_offers_to_paused today
    Offer.seasonal.where(aasm_state: 'approved')
         .where('ends_at <= ?', today).find_each do |offer|
      offer.update_columns aasm_state: 'paused',
                           starts_at: offer.starts_at + 1.year,
                           ends_at: offer.ends_at + 1.year
      offer.index!
    end
  end
def process_approved_offers_to_paused today Offer . seasonal . where ( aasm_state : 'approved' ) . where ( 'ends_at <= ?' , today ) . find_each do | offer | offer . update_columns aasm_state : 'paused' , starts_at : offer . starts_at + 1 . year , ends_at : offer . ends_at + 1 . year offer . index! end end
set approved seasonal offers to paused if they left their TimeFrame
no AsanaTask, no mailing, just pause the offers
set approved seasonal offers to paused if they left their TimeFrame no AsanaTask no mailing just pause the offers
# set paused instead of expired and advance dates
today
<not_specific>