File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 6
6
from flask_restful .inputs import boolean
7
7
8
8
# sql queries will return an exception if the query did not succeed before `statement_timeout`
9
- DEFAULT_SQLALCHEMY_ENGINE_OPTIONS = {"connect_args" : {"options" : "-c statement_timeout=1000" }} # 1000ms
9
+ DEFAULT_SQLALCHEMY_ENGINE_OPTIONS = {
10
+ "connect_args" : {"options" : "-c statement_timeout=1000" , "application_name" : "Jormungandr" }
11
+ } # 1000ms
10
12
11
13
# path of the configuration file for each instances
12
14
INSTANCES_DIR = os .getenv ('JORMUNGANDR_INSTANCES_DIR' , '/etc/jormungandr.d' )
Original file line number Diff line number Diff line change 2
2
from datetime import timedelta
3
3
from celery import schedules
4
4
import os
5
+ import json
5
6
from flask_restful .inputs import boolean
6
7
7
8
# URL for the brokker, by default it's the local rabbitmq
19
20
'TYR_SQLALCHEMY_DATABASE_URI' , 'postgresql://navitia:navitia@localhost/jormungandr'
20
21
)
21
22
23
+ DEFAULT_SQLALCHEMY_ENGINE_OPTIONS = {"connect_args" : {"application_name" : "Tyr" }}
24
+
25
+ SQLALCHEMY_ENGINE_OPTIONS = (
26
+ json .loads (os .getenv ('TYR_SQLALCHEMY_ENGINE_OPTIONS' , '{}' )) or DEFAULT_SQLALCHEMY_ENGINE_OPTIONS
27
+ )
22
28
23
29
# URI for cities database
24
30
# postgresql://<user>:<password>@<host>:<port>/<dbname>
You can’t perform that action at this time.
0 commit comments