diff --git a/src/kube-scanner/watchers/handlers/pod.ts b/src/kube-scanner/watchers/handlers/pod.ts index 01b77d854..f9aa283e6 100644 --- a/src/kube-scanner/watchers/handlers/pod.ts +++ b/src/kube-scanner/watchers/handlers/pod.ts @@ -43,7 +43,7 @@ workloadsToScanQueue.error(function(err, task) { logger.error({err, task}, 'error processing a workload in the pod handler 1'); }); -async function handleReadyPod(workloadWorker: WorkloadWorker, workloadMetadata: IWorkload[]): Promise { +function handleReadyPod(workloadWorker: WorkloadWorker, workloadMetadata: IWorkload[]): void { const imagesToScan: IWorkload[] = []; const imageKeys: string[] = []; for (const image of workloadMetadata) { @@ -90,7 +90,7 @@ export async function podWatchHandler(pod: V1Pod): Promise { sendWorkloadMetadata(workloadMetadataPayload); const workloadName = workloadMember.name; const workloadWorker = new WorkloadWorker(workloadName); - await handleReadyPod(workloadWorker, workloadMetadata); + handleReadyPod(workloadWorker, workloadMetadata); } catch (error) { logger.error({error, podName}, 'could not build image metadata for pod'); }