fix(schedule): return deployment metadata from runManually and fail early on missing container

This commit is contained in:
Mauricio Siu
2026-08-02 16:15:20 -06:00
parent a058d1f5c7
commit cbb3450b93
3 changed files with 90 additions and 68 deletions
@@ -58,8 +58,12 @@ export const ShowSchedules = ({ id, scheduleType = "application" }: Props) => {
const handleRunManually = async (scheduleId: string) => {
setRunningSchedules((prev) => new Set(prev).add(scheduleId));
try {
await runManually({ scheduleId });
toast.success("Schedule run successfully");
const result = await runManually({ scheduleId });
if (result.status === "error") {
toast.error("Schedule run failed, check the deployment logs");
} else {
toast.success("Schedule run successfully");
}
await refetchSchedules();
} catch {
toast.error("Error running schedule");