Skip to content

Commit 71dec86

Browse files
committed
constant var
1 parent 2bbaf69 commit 71dec86

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Billing/Jobs/ReconcileAdditionalStorageJob.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public class ReconcileAdditionalStorageJob(
1818
private const string _storageGbMonthlyPriceId = "storage-gb-monthly";
1919
private const string _storageGbAnnuallyPriceId = "storage-gb-annually";
2020
private const string _personalStorageGbAnnuallyPriceId = "personal-storage-gb-annually";
21+
private const int _storageGbToRemove = 4;
2122

2223
protected override async Task ExecuteJobAsync(IJobExecutionContext context)
2324
{
@@ -161,9 +162,9 @@ protected override async Task ExecuteJobAsync(IJobExecutionContext context)
161162
hasUpdates = true;
162163
var currentQuantity = item.Quantity;
163164

164-
if (currentQuantity > 4)
165+
if (currentQuantity > _storageGbToRemove)
165166
{
166-
var newQuantity = currentQuantity - 4;
167+
var newQuantity = currentQuantity - _storageGbToRemove;
167168
logger.LogInformation(
168169
"Subscription {SubscriptionId}: reducing quantity from {CurrentQuantity} to {NewQuantity} for price {PriceId}",
169170
subscription.Id,

0 commit comments

Comments
 (0)