Skip to content

Commit

Permalink
Reduce frequency of the background job
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Chebotarov committed Nov 7, 2024
1 parent e0ef0bf commit 2e9a310
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions clock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ module Clockwork
end
end

every(5.minutes, 'schedule:api_keys_track_usage') do
Clock::ApiKeys::TrackUsageJob
.set(sentry: {"slug" => 'lago_api_keys_track_usage', "cron" => '*/5 * * * *'})
.perform_later
end

every(1.hour, 'schedule:terminate_ended_subscriptions', at: '*:05') do
Clock::TerminateEndedSubscriptionsJob
.set(sentry: {"slug" => 'lago_terminate_ended_subscriptions', "cron" => '5 */1 * * *'})
Expand All @@ -64,6 +58,13 @@ module Clockwork
.set(sentry: {"slug" => 'lago_bill_customers', "cron" => '10 */1 * * *'})
.perform_later
end

every(1.hour, 'schedule:api_keys_track_usage', at: '*:15') do
Clock::ApiKeys::TrackUsageJob
.set(sentry: {"slug" => 'lago_api_keys_track_usage', "cron" => '15 */1 * * *'})
.perform_later
end

every(1.hour, 'schedule:retry_generating_subscription_invoices', at: '*:30') do
Clock::RetryGeneratingSubscriptionInvoicesJob
.set(sentry: {"slug" => 'lago_retry_invoices', "cron" => '30 */1 * * *'})
Expand Down

0 comments on commit 2e9a310

Please sign in to comment.