File tree Expand file tree Collapse file tree 3 files changed +70
-0
lines changed
Expand file tree Collapse file tree 3 files changed +70
-0
lines changed Original file line number Diff line number Diff line change 1+ from pathlib import Path
2+
3+ BASE_DIR = str (Path (__file__ ).parent .parent )
4+
5+ DATABASE_CONFIG = {
6+ 'DATABASE_TYPE' : 'sqlite3' ,
7+ 'DATABASE_NAME' : 'test_db' ,
8+ 'DATABASE_DIRECTORY_PATH' : BASE_DIR
9+ }
Original file line number Diff line number Diff line change 1+ import os
2+ from pathlib import Path
3+
4+ PROJECT_NAME = 'test_project'
5+
6+ # Path that initializes the context
7+ CONTEXT_CONFIGURATION = 'test_project.configuration.context'
8+
9+ # Amount of concurrent workers each state can use
10+ MAX_CONCURRENT_WORKERS = 2
11+
12+ # Change this when not in development, feature or hot-fix branch
13+ DEBUG = int (os .environ .get ('DEBUG' , True ))
14+
15+ BASE_DIR = str (Path (__file__ ).parent .parent )
16+
17+ LOG_FILE_NAME = 'log'
18+
19+ LOG_DIR = '{}/logs' .format (BASE_DIR )
20+
21+ LOG_PATH = "{}/{}.log" .format (LOG_DIR , LOG_FILE_NAME )
22+ #
23+ # if not os.path.isdir(LOG_DIR):
24+ # os.mkdir(LOG_DIR)
25+
26+ if DEBUG :
27+ logging_level = "DEBUG"
28+ else :
29+ logging_level = "INFO"
30+
31+ # Logging configuration
32+ LOGGING = {
33+ 'version' : 1 ,
34+ 'disable_existing_loggers' : False ,
35+ 'formatters' : {
36+ 'standard' : {
37+ 'format' : '%(levelname)s %(asctime)s - [thread: %(threadName)-4s %(name)s] %(message)s' ,
38+ 'datefmt' : '%Y-%m-%d %H:%M:%S'
39+ }
40+ },
41+ 'handlers' : {
42+ 'console' : {
43+ 'class' : 'logging.StreamHandler' ,
44+ 'formatter' : 'standard' ,
45+ },
46+ },
47+ 'loggers' : {
48+ '' : {
49+ 'level' : logging_level ,
50+ 'handlers' : ['console' ],
51+ },
52+ },
53+ }
54+
55+ DATABASE_CONFIG = {
56+
57+ }
Original file line number Diff line number Diff line change 33
44PROJECT_NAME = 'test_project'
55
6+ # Path that initializes the context
67CONTEXT_CONFIGURATION = 'test_project.configuration.context'
78
9+ # Amount of concurrent workers each state can use
10+ MAX_CONCURRENT_WORKERS = 2
11+
812# Change this when not in development, feature or hot-fix branch
913DEBUG = int (os .environ .get ('DEBUG' , True ))
1014
You can’t perform that action at this time.
0 commit comments