You've already forked AstralRinth
forked from didirus/AstralRinth
Move charges to DB + fix subscription recurring payments (#971)
* Move charges to DB + fix subscription recurring payments * Finish most + pyro integration * Finish billing * Run prepare * Fix intervals * Fix clippy * Remove unused test
This commit is contained in:
29
src/lib.rs
29
src/lib.rs
@@ -259,15 +259,24 @@ pub fn app_setup(
|
||||
}
|
||||
|
||||
let stripe_client = stripe::Client::new(dotenvy::var("STRIPE_API_KEY").unwrap());
|
||||
// {
|
||||
// let pool_ref = pool.clone();
|
||||
// let redis_ref = redis_pool.clone();
|
||||
// let stripe_client_ref = stripe_client.clone();
|
||||
//
|
||||
// actix_rt::spawn(async move {
|
||||
// routes::internal::billing::task(stripe_client_ref, pool_ref, redis_ref).await;
|
||||
// });
|
||||
// }
|
||||
{
|
||||
let pool_ref = pool.clone();
|
||||
let redis_ref = redis_pool.clone();
|
||||
let stripe_client_ref = stripe_client.clone();
|
||||
|
||||
actix_rt::spawn(async move {
|
||||
routes::internal::billing::task(stripe_client_ref, pool_ref, redis_ref).await;
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
let pool_ref = pool.clone();
|
||||
let redis_ref = redis_pool.clone();
|
||||
|
||||
actix_rt::spawn(async move {
|
||||
routes::internal::billing::subscription_task(pool_ref, redis_ref).await;
|
||||
});
|
||||
}
|
||||
|
||||
let ip_salt = Pepper {
|
||||
pepper: models::ids::Base62Id(models::ids::random_base62(11)).to_string(),
|
||||
@@ -456,5 +465,7 @@ pub fn check_env_vars() -> bool {
|
||||
|
||||
failed |= check_var::<u64>("ADITUDE_API_KEY");
|
||||
|
||||
failed |= check_var::<String>("PYRO_API_KEY");
|
||||
|
||||
failed
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user