Rescan tech review reports when a new version of Delphi is ran (#5433)
* Delphi rescan when version changes * Fix inserting duplicate reports when rescanning * upsert report issue details instead of deleting * fix up rescan stuff
This commit is contained in:
@@ -19,6 +19,7 @@ use crate::database::{PgPool, ReadOnlyPgPool};
|
||||
use crate::env::ENV;
|
||||
use crate::queue::billing::{index_billing, index_subscriptions};
|
||||
use crate::queue::moderation::AutomatedModerationQueue;
|
||||
use crate::routes::internal::delphi::rescan::rescan_projects_in_queue;
|
||||
use crate::util::anrok;
|
||||
use crate::util::archon::ArchonClient;
|
||||
use crate::util::ratelimit::{AsyncRateLimiter, GCRAParameters};
|
||||
@@ -102,6 +103,15 @@ pub fn app_setup(
|
||||
|
||||
let scheduler = scheduler::Scheduler::new();
|
||||
|
||||
{
|
||||
let pool_ref = pool.clone();
|
||||
actix_rt::spawn(async move {
|
||||
if let Err(err) = rescan_projects_in_queue(&pool_ref).await {
|
||||
warn!("Delphi rescan failed: {err:#}");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
let limiter = web::Data::new(AsyncRateLimiter::new(
|
||||
redis_pool.clone(),
|
||||
GCRAParameters::new(300, 300),
|
||||
|
||||
Reference in New Issue
Block a user