File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,16 +47,25 @@ pub async fn queue_meta_maintainer() -> anyhow::Result<()> {
4747 let activity = Activity :: get ( format ! ( "Queue Manager Meta Maintainer" ) ) ?;
4848 let mut shutdown = ShutdownSubcription :: get ( ) ;
4949 shutdown. shutting_down ( ) . await ;
50+ tracing:: trace!( "queue_meta_maintainer: system is shutting down" ) ;
5051 loop {
52+ tracing:: trace!( "queue_meta_maintainer: get all scheduled queue names" ) ;
5153 let names = QueueManager :: all_queue_names ( ) ;
54+ tracing:: trace!(
55+ "queue_meta_maintainer: got {} scheduled queue names" ,
56+ names. len( )
57+ ) ;
58+
5259 if names. is_empty ( ) && ReadyQueueManager :: number_of_queues ( ) == 0 {
5360 tracing:: debug!( "All queues are reaped" ) ;
5461 drop ( activity) ;
5562 return Ok ( ( ) ) ;
5663 }
5764
5865 for name in names {
66+ tracing:: trace!( "queue_meta_maintainer: examine {name}" ) ;
5967 if let Some ( queue) = QueueManager :: get_opt ( & name) {
68+ tracing:: trace!( "queue_meta_maintainer: draining {name}" ) ;
6069 for msg in queue. drain_timeq ( ) {
6170 Queue :: save_if_needed_and_log ( & msg, None ) . await ;
6271 }
@@ -75,6 +84,7 @@ pub async fn queue_meta_maintainer() -> anyhow::Result<()> {
7584 }
7685 }
7786
87+ tracing:: trace!( "queue_meta_maintainer: sleep for a second" ) ;
7888 tokio:: time:: sleep ( ONE_SECOND ) . await ;
7989 }
8090}
You can’t perform that action at this time.
0 commit comments