Skip to content

Commit

Permalink
fix: setNoticeSchedule
Browse files Browse the repository at this point in the history
  • Loading branch information
ptyoiy committed May 1, 2024
1 parent ed9570e commit 8b8779e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion redis/schedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export const setNoticeSchedule = (row: INotice) => {
await cachingAllNotices();
jobArray.splice(existJobIndex, 1);
});
const existJobIndex = jobArray.findIndex(j => j.name == `${id}`);
console.log({jobArray})
const existJobIndex = jobArray.findIndex(j => j?.name == `${id}`);
if (existJobIndex > -1) {
jobArray[existJobIndex].cancel();
jobArray[existJobIndex] = job;
Expand Down

0 comments on commit 8b8779e

Please sign in to comment.