Remove lock, fix billing job

This commit is contained in:
Jai A 2025-04-03 16:14:27 -07:00
parent d0d0dcf09f
commit 69b70d70a8
No known key found for this signature in database
GPG Key ID: 9A9F9B7250E9883C
2 changed files with 1 additions and 3 deletions

View File

@ -218,7 +218,7 @@ impl ChargeItem {
(status = 'open' AND due < NOW()) OR (status = 'open' AND due < NOW()) OR
(status = 'failed' AND last_attempt < NOW() - INTERVAL '2 days') (status = 'failed' AND last_attempt < NOW() - INTERVAL '2 days')
) )
FOR UPDATE SKIP LOCKED -- FOR UPDATE SKIP LOCKED
"#, "#,
charge_type charge_type
) )

View File

@ -2302,8 +2302,6 @@ pub async fn index_billing(
) )
.await?; .await?;
let mut transaction = pool.begin().await?;
for mut charge in charges_to_do { for mut charge in charges_to_do {
let product_price = if let Some(price) = let product_price = if let Some(price) =
prices.iter().find(|x| x.id == charge.price_id) prices.iter().find(|x| x.id == charge.price_id)