2021-06-02 14:15:03 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module ::Jobs
|
|
|
|
class RefreshSubscriptionsCampaignData < ::Jobs::Scheduled
|
2022-02-04 00:36:40 -05:00
|
|
|
include ::DiscourseSubscriptions::Stripe
|
2021-06-02 14:15:03 -04:00
|
|
|
every 30.minutes
|
|
|
|
|
|
|
|
def execute(args)
|
2022-02-04 00:36:40 -05:00
|
|
|
return unless SiteSetting.discourse_subscriptions_campaign_enabled && is_stripe_configured?
|
2021-06-02 14:15:03 -04:00
|
|
|
DiscourseSubscriptions::Campaign.new.refresh_data
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|