Skip to content

Commit

Permalink
Stopping the server after 10 minutes to avoid unnecessary error alert…
Browse files Browse the repository at this point in the history
…s while this runs on Github actions
  • Loading branch information
manojVivek committed Mar 3, 2024
1 parent e50bc4c commit ce71c05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/discord-bot-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: DiscordBotServer

on:
schedule:
- cron: "*/5 * * * *"
- cron: "*/15 * * * *"
workflow_dispatch:


Expand All @@ -28,4 +28,4 @@ jobs:
run: yarn && yarn bootstrap

- name: Run the script
run: yarn lerna run --stream --scope @socialsnitch/discord-bot-server prod
run: yarn lerna run --stream --scope @socialsnitch/discord-bot-server prod
4 changes: 2 additions & 2 deletions packages/apps/discord-bot-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import {
} from '@socialsnitch/database/src/subscription';

setTimeout(() => {
// stop the process after an hour
// stop the process after 10 minutes
process.exit(0);
}, 60 * 1000);
}, 10 * 60 * 1000);


try {
Expand Down

0 comments on commit ce71c05

Please sign in to comment.