Skip to content

Commit

Permalink
Update version fetching interval
Browse files Browse the repository at this point in the history
  • Loading branch information
SeoulSKY committed Dec 30, 2023
1 parent d303732 commit e9c02d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const pipeline = util.promisify(stream.pipeline);

const IS_PRODUCTION = process.env.PRODUCTION !== undefined;
const IS_DOCKER = process.env.DOCKER !== undefined;
const AI_SERVER_HOST = "http://localhost:8000/api";
const AI_SERVER_HOST = IS_PRODUCTION ? "http://ai-server:8080/api" : "http://localhost:8000/api";
const HOST = "0.0.0.0";
const PORT = 8080;
const RETRY_INTERVAL = duration({second: 5});
Expand Down Expand Up @@ -54,8 +54,8 @@ if (require.main === module) {
if (IS_DOCKER) {
latestTag = (await fetchLatestTag()) ?? process.exit(1);

// run for every minute
cron.schedule("* * * * *", async () => {
// run for every 5 minute
cron.schedule("*/5 * * * *", async () => {
latestTag = await fetchLatestTag();
});

Expand Down

0 comments on commit e9c02d9

Please sign in to comment.