discourse-subscriptions/app/jobs/scheduled/refresh_subscriptions_campa...

14 lines
367 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module ::Jobs
class RefreshSubscriptionsCampaignData < ::Jobs::Scheduled
include ::DiscourseSubscriptions::Stripe
every 30.minutes
def execute(args)
return unless SiteSetting.discourse_subscriptions_campaign_enabled && is_stripe_configured?
DiscourseSubscriptions::Campaign.new.refresh_data
end
end
end