Skip to content

Commit acf7eeb

Browse files
authored
Merge pull request #74 from moda20/Feature/adding-notifications-based-on-job-events
2 parents 8ec0275 + 1a0524d commit acf7eeb

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

src/repositories/notificationServices.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -456,13 +456,18 @@ export const cloneNotificationService = async (
456456
image: newImagePath,
457457
},
458458
tx,
459-
).then((newService) => {
460-
return InitializeServiceConfig(
461-
safeName,
462-
existingService.entryPoint,
463-
Number(userId),
464-
).then(() => newService);
465-
});
459+
)
460+
.then((newService) => {
461+
return InitializeServiceConfig(
462+
safeName,
463+
existingService.entryPoint,
464+
Number(userId),
465+
).then(() => newService);
466+
})
467+
.catch((err) => {
468+
// TODO: delete the image newImagePath created
469+
throw err;
470+
});
466471
});
467472
};
468473

@@ -513,6 +518,7 @@ export const addOrUpdateJobEventHandler = async ({
513518
}
514519
}
515520

521+
// TODO Check for solutions to concurrent param updates
516522
return updateJobConfig(String(job.id), {
517523
param: JSON.stringify(jobParams),
518524
} as jobUpdateConfig)

0 commit comments

Comments
 (0)