Skip to content

Commit 1c12d9b

Browse files
committed
chore: increase job frequency to every 6 hours
1 parent 9b6357e commit 1c12d9b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/processor/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ export function getRepoProcessor(probot: Probot) {
5252

5353
log.info(`✅ Repo job processed successfully`);
5454
} catch (error) {
55-
const message = error instanceof Error ? error.message : "Unknown error";
56-
log.error(error, `❌ Repo job failed: ${message}`);
55+
log.error(error, "❌ Repo job failed");
5756
}
5857
};
5958
}

src/utils/helpers.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { appConfig } from "@/src/configs/app-config.ts";
22

33
export const getRandomCronSchedule = () => {
4-
// Every 8 hours at a random minute
4+
// Every 6 hours at a random minute
55
const randomMinute = Math.floor(Math.random() * 60);
6-
const randomHour1 = Math.floor(Math.random() * 8);
7-
const randomHour2 = randomHour1 + 8;
8-
const randomHour3 = randomHour2 + 8;
9-
return `${randomMinute} ${randomHour1},${randomHour2},${randomHour3} * * *`;
6+
const randomHour1 = Math.floor(Math.random() * 6);
7+
const randomHour2 = randomHour1 + 6;
8+
const randomHour3 = randomHour2 + 6;
9+
const randomHour4 = randomHour3 + 6;
10+
return `${randomMinute} ${randomHour1},${randomHour2},${randomHour3},${randomHour4} * * *`;
1011
};
1112

1213
export const timeout = (ms: number): Promise<void> =>

0 commit comments

Comments
 (0)