Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
Lamarcke committed Oct 21, 2024
1 parent 763ab73 commit f0d567a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
1 change: 0 additions & 1 deletion crontab
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#
# 0 0 * * 0,4 cron_start.sh > /proc/1/fd/1 2>&1
0 0 * * 0,4 /usr/local/bin/python3 /app/main.py > /proc/1/fd/1 2>&1
#
6 changes: 1 addition & 5 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ services:

igdb:
hostname: sync-igdb
# image: lamarcke/game-node-sync-igdb:latest
build:
context: .
env_file:
- .env
image: lamarcke/game-node-sync-igdb:latest

depends_on:
- redis
Expand Down
5 changes: 3 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import logging

from igdb.config import get_pika
from igdb.sync import IGDBSyncService
from time import sleep

import json
import logging

# 5 minutes
LOOP_ERROR_WAIT_TIME = 300
Expand All @@ -28,9 +29,9 @@ def run():
while True:
try:
run()

except KeyboardInterrupt:
exit(0)
except Exception as e:
print(e)
logging.error(e, exc_info=e, stack_info=True)
sleep(LOOP_ERROR_WAIT_TIME)

0 comments on commit f0d567a

Please sign in to comment.