You've already forked AstralRinth
forked from didirus/AstralRinth
Slack webhook for payout source threshold alerts (#4353)
* Slack webhook for payout alerts * add PAYOUT_ALERT_SLACK_WEBHOOK to check_env_vars * Fix commit * Fix webhook format * Add new env vars in .env.local * Rename env vars, fire webhook on error * Fix compilation * Clippy * Fix CI * Add env vars to .env.docker-compose
This commit is contained in:
committed by
GitHub
parent
af3b829449
commit
58aac642a9
@@ -1,6 +1,6 @@
|
||||
use crate::database::redis::RedisPool;
|
||||
use crate::queue::payouts::{
|
||||
PayoutsQueue, insert_bank_balances, process_payout,
|
||||
PayoutsQueue, insert_bank_balances_and_webhook, process_payout,
|
||||
};
|
||||
use crate::search::indexing::index_projects;
|
||||
use crate::{database, search};
|
||||
@@ -59,7 +59,7 @@ impl BackgroundTask {
|
||||
pub async fn update_bank_balances(pool: sqlx::Pool<Postgres>) {
|
||||
let payouts_queue = PayoutsQueue::new();
|
||||
|
||||
match insert_bank_balances(&payouts_queue, &pool).await {
|
||||
match insert_bank_balances_and_webhook(&payouts_queue, &pool).await {
|
||||
Ok(_) => info!("Bank balances updated successfully"),
|
||||
Err(error) => error!(%error, "Bank balances update failed"),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user