Skip to content

Commit a089675

Browse files
committed
✨ Return error message, adjust docker compose for new repo
1 parent b966fe2 commit a089675

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docker-compose.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11

22
services:
33
app:
4-
image: ghcr.io/jonastahl/idp-urbs:0.0.4
4+
image: ghcr.io/tum-ens/urbs-weburbs:latest
55
build: .
66
ports:
7-
- "5000:5000"
7+
- "5000:5000"
8+
network_mode: host # only for local config

server.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def run(config):
6060
plot_periods=plot_periods,
6161
report_tuples=[],
6262
report_sites_name={})
63-
except Exception:
63+
except Exception as e:
6464
try:
6565
with open(log_file, 'r') as log_file:
6666
log = log_file.read()
@@ -69,10 +69,9 @@ def run(config):
6969
return {
7070
'data': {},
7171
'status': 'Error',
72-
'log': log
72+
'log': log + "\nError message: " + str(e)
7373
}
7474

75-
7675
costs, cpro, ctra, csto = get_constants(prob)
7776

7877
def default():
@@ -112,7 +111,7 @@ def default():
112111
'results': results
113112
},
114113
'status': result_type,
115-
'log': log
114+
'log': 'Unkown result'
116115
}
117116

118117

0 commit comments

Comments
 (0)