Skip to content

Commit

Permalink
Merge pull request #223 from snyk/fix/handle-ready-pod
Browse files Browse the repository at this point in the history
fix: handleReadyPod doesn't need to be async
  • Loading branch information
Amir Moualem authored Nov 18, 2019
2 parents ebbaf85 + 9a28ecc commit b76d606
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kube-scanner/watchers/handlers/pod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
function handleReadyPod(workloadWorker: WorkloadWorker, workloadMetadata: IWorkload[]): void {
const imagesToScan: IWorkload[] = [];
const imageKeys: string[] = [];
for (const image of workloadMetadata) {
Expand Down Expand Up @@ -90,7 +90,7 @@ export async function podWatchHandler(pod: V1Pod): Promise<void> {
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');
}
Expand Down

0 comments on commit b76d606

Please sign in to comment.