-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { env } from "../env"; | ||
import { startUpdateService } from "../rpc/update"; | ||
|
||
console.log("-------->>>> Starting update service : >>> ", new Date().toISOString()); | ||
startUpdateService(env); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
# Get delay from first argument or use default of 0 minutes (no delay) | ||
DELAY_IN_MINUTES=${1:-0} | ||
|
||
# Convert minutes to seconds | ||
DELAY_IN_SECONDS=$((DELAY_IN_MINUTES * 60)) | ||
|
||
# Run the update command | ||
yarn update | ||
|
||
# Get current date and time | ||
CURRENT_DATETIME=$(date "+%Y-%m-%d %H:%M:%S") | ||
|
||
# Always wait for the specified delay before exiting | ||
# This will cause Docker to wait before restarting the container | ||
echo "Update completed at ${CURRENT_DATETIME}, waiting the delay of ${DELAY_IN_MINUTES} minutes before quitting" | ||
sleep ${DELAY_IN_SECONDS} | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters