Merge branch 'kub-stage' into production
Build and Deploy to Production / build-and-deploy (push) Failing after 12m46s
Build and Deploy to Production / build-and-deploy (push) Failing after 12m46s
This commit is contained in:
@@ -433,6 +433,25 @@ using (var scope = app.Services.CreateScope())
|
||||
cronExpression: "*/5 * * * *",
|
||||
options: new RecurringJobOptions { TimeZone = TimeZoneInfo.Local });
|
||||
app.Logger.LogInformation("✅ Hangfire recurring job 'chatika-account-activation' registered (Cron: */5 * * * * - Every 5 minutes)");
|
||||
|
||||
// Zarinpal Payment Reconciliation: Every 30 minutes
|
||||
// Verifies payments older than 30 min whose return-URL callback was never received
|
||||
var zarinpalReconciliationEnabled = app.Configuration.GetValue<bool>(
|
||||
"BackgroundJobs:ZarinpalReconciliation:Enabled", true);
|
||||
if (zarinpalReconciliationEnabled)
|
||||
{
|
||||
recurringJobManager.AddOrUpdate<CMSMicroservice.Infrastructure.BackgroundJobs.ZarinpalReconciliationJob>(
|
||||
recurringJobId: "zarinpal-reconciliation",
|
||||
methodCall: job => job.ExecuteAsync(CancellationToken.None),
|
||||
cronExpression: "*/30 * * * *",
|
||||
options: new RecurringJobOptions { TimeZone = TimeZoneInfo.Local });
|
||||
app.Logger.LogInformation("✅ Hangfire recurring job 'zarinpal-reconciliation' registered (Cron: */30 * * * * - Every 30 minutes)");
|
||||
}
|
||||
else
|
||||
{
|
||||
recurringJobManager.RemoveIfExists("zarinpal-reconciliation");
|
||||
app.Logger.LogInformation("⚠️ Hangfire recurring job 'zarinpal-reconciliation' is DISABLED in configuration");
|
||||
}
|
||||
}
|
||||
|
||||
app.Run();
|
||||
|
||||
Reference in New Issue
Block a user