Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/.env
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ DOCKER_IMAGE_BACKEND=pom_backend
DOCKER_IMAGE_FRONTEND=pom_frontend

# Backend
PRIVATIZE_API=False
PRIVATIZE_API=
TESTING=True
BACKEND_CORS_ORIGINS="http://localhost,http://localhost:5173,https://localhost,https://localhost:5173"
PROJECT_NAME="pathofmodifiers"
Expand All @@ -31,7 +31,7 @@ [email protected]
SMTP_PASSWORD=changethis

# Data retrieval
MANUAL_NEXT_CHANGE_ID=False
MANUAL_NEXT_CHANGE_ID=
NEXT_CHANGE_ID=2464293076-2443587902-2368433646-2624156651-2552811860
POE_PUBLIC_STASHES_AUTH_TOKEN=changethis
CURRENT_SOFTCORE_LEAGUE=Necropolis
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import requests
import time
import logging
Expand Down Expand Up @@ -460,4 +461,5 @@ def dump_stream(self, track_progress: bool = True) -> Iterator[pd.DataFrame]:
current_time = time.perf_counter()
time_since_launch = current_time - self.time_of_launch
if time_since_launch > 3600:
raise ProgramRunTooLongException
print("Program has run for more than an hour, shutting down.")
os._exit(0)
12 changes: 8 additions & 4 deletions src/backend_data_retrieval/data_retrieval/prestart.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#! /usr/bin/env bash
#!/bin/bash

python dataretrieval_pre_start.py

# Create initial data in DB
python modifier_data_deposit/deposit_modifier_data.py

while true; do
python external_data_retrieval/main.py
done


while true
do
python external_data_retrieval/main.py || echo "App crashed... restarting..." >&2
echo "Press Ctrl-C to quit." && sleep 1
done
2 changes: 1 addition & 1 deletion src/docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ services:
command: /start-reload.sh

backend-data-retrieval:
restart: "no"
restart: always
ports:
- "8889:8889"
volumes:
Expand Down
1 change: 1 addition & 0 deletions src/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ services:

backend-data-retrieval:
image: backend_data_retrieval:1.0.0
restart: always
depends_on:
db:
condition: service_healthy
Expand Down