upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index bf3aefb..12a875c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -7,6 +7,7 @@ use tracing::{error, info, warn};
7use tracing_subscriber::{EnvFilter, FmtSubscriber}; 7use tracing_subscriber::{EnvFilter, FmtSubscriber};
8 8
9use ngit_grasp::{ 9use ngit_grasp::{
10 audit_cleanup,
10 config::{Config, DatabaseBackend}, 11 config::{Config, DatabaseBackend},
11 git, http, 12 git, http,
12 metrics::Metrics, 13 metrics::Metrics,
@@ -175,6 +176,14 @@ async fn main() -> Result<()> {
175 }); 176 });
176 info!("Expired event cleanup task started (24h interval, keeps 7 days)"); 177 info!("Expired event cleanup task started (24h interval, keeps 7 days)");
177 178
179 // Spawn audit event cleanup task (30m interval, removes events >2h old)
180 let audit_db = relay_with_db.database.clone();
181 let audit_git_path = PathBuf::from(config.effective_git_data_path());
182 tokio::spawn(async move {
183 audit_cleanup::run_audit_cleanup_loop(audit_db, audit_git_path).await;
184 });
185 info!("Audit event cleanup task started (30m interval, removes events >2h old)");
186
178 // Start purgatory sync loop for background git data fetching 187 // Start purgatory sync loop for background git data fetching
179 // Create naughty list tracker for git remote domains with persistent errors (12h expiration) 188 // Create naughty list tracker for git remote domains with persistent errors (12h expiration)
180 let git_naughty_list = Arc::new(NaughtyListTracker::with_defaults()); 189 let git_naughty_list = Arc::new(NaughtyListTracker::with_defaults());