File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
src/supervisor/watchers/handlers Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 1313 },
1414 "WORKLOADS_TO_SCAN_QUEUE_WORKER_COUNT" : 10 ,
1515 "METADATA_TO_SEND_QUEUE_WORKER_COUNT" : 10 ,
16+ "QUEUE_LENGTH_LOG_FREQUENCY_MINUTES" : 15 ,
1617 "INTEGRATION_ID" : " " ,
1718 "DEFAULT_KUBERNETES_UPSTREAM_URL" : " https://kubernetes-upstream.snyk.io"
1819}
Original file line number Diff line number Diff line change @@ -54,6 +54,17 @@ metadataToSendQueue.error(function(err, task) {
5454 logger . error ( { err, task} , 'error processing a workload metadata send task' ) ;
5555} ) ;
5656
57+ setInterval ( ( ) => {
58+ try {
59+ const queueDataToReport : { [ key : string ] : any } = { } ;
60+ queueDataToReport . workloadsToScanLength = workloadsToScanQueue . length ( ) ;
61+ queueDataToReport . metadataToSendLength = metadataToSendQueue . length ( ) ;
62+ logger . info ( queueDataToReport , 'queue sizes report' ) ;
63+ } catch ( err ) {
64+ logger . warn ( { err} , 'failed logging queue sizes' ) ;
65+ }
66+ } , config . QUEUE_LENGTH_LOG_FREQUENCY_MINUTES * 60 * 1000 ) . unref ( ) ;
67+
5768function handleReadyPod ( workloadMetadata : IWorkload [ ] ) : void {
5869 const imagesToScan : IWorkload [ ] = [ ] ;
5970 const imageKeys : string [ ] = [ ] ;
You can’t perform that action at this time.
0 commit comments