Fix Mural payout status syncing (#4853)

* Fix Mural payout status syncing

* Make Mural payout code more resilient

* prepare sqlx

* fix test
This commit is contained in:
aecsocket
2025-12-08 20:34:41 +00:00
committed by GitHub
parent cfd2977c21
commit 9aa06fbc26
22 changed files with 1171 additions and 1151 deletions

View File

@@ -10,7 +10,6 @@ use crate::search::indexing::index_projects;
use crate::util::anrok;
use crate::{database, search};
use clap::ValueEnum;
use muralpay::MuralPay;
use sqlx::Postgres;
use tracing::{error, info, warn};
@@ -39,7 +38,7 @@ impl BackgroundTask {
stripe_client: stripe::Client,
anrok_client: anrok::Client,
email_queue: EmailQueue,
mural_client: MuralPay,
mural_client: muralpay::Client,
) {
use BackgroundTask::*;
match self {
@@ -207,7 +206,10 @@ pub async fn payouts(
info!("Done running payouts");
}
pub async fn sync_payout_statuses(pool: sqlx::Pool<Postgres>, mural: MuralPay) {
pub async fn sync_payout_statuses(
pool: sqlx::Pool<Postgres>,
mural: muralpay::Client,
) {
// Mural sets a max limit of 100 for search payouts endpoint
const LIMIT: u32 = 100;