@@ -8,7 +8,7 @@ use autopulse_database::{
88 diesel:: { self , BoolExpressionMethods , ExpressionMethods , QueryDsl , RunQueryDsl } ,
99 models:: { FoundStatus , ProcessStatus , ScanEvent } ,
1010 schema:: scan_events:: {
11- can_process, dsl:: scan_events, found_at , found_status, next_retry_at, process_status,
11+ can_process, created_at , dsl:: scan_events, found_status, next_retry_at, process_status,
1212 } ,
1313} ;
1414use autopulse_utils:: sha256checksum;
@@ -274,7 +274,7 @@ impl PulseRunner {
274274 let delete_not_found = diesel:: delete (
275275 scan_events
276276 . filter ( found_status. eq :: < String > ( FoundStatus :: NotFound . into ( ) ) )
277- . filter ( found_at . lt ( time_before_cleanup) ) ,
277+ . filter ( created_at . lt ( time_before_cleanup) ) ,
278278 ) ;
279279
280280 if let Err ( e) = delete_not_found. execute ( & mut get_conn ( & self . pool ) ?) {
@@ -284,7 +284,7 @@ impl PulseRunner {
284284 let delete_failed = diesel:: delete (
285285 scan_events
286286 . filter ( process_status. eq :: < String > ( ProcessStatus :: Failed . into ( ) ) )
287- . filter ( found_at . lt ( time_before_cleanup) ) ,
287+ . filter ( created_at . lt ( time_before_cleanup) ) ,
288288 ) ;
289289
290290 if let Err ( e) = delete_failed. execute ( & mut get_conn ( & self . pool ) ?) {
0 commit comments