-
Notifications
You must be signed in to change notification settings - Fork 846
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2747 from chaoss/dev
Release
- Loading branch information
Showing
154 changed files
with
2,492 additions
and
1,929 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,48 @@ | ||
# from augur import ROOT_AUGUR_DIRECTORY | ||
import multiprocessing | ||
import logging | ||
import os | ||
from pathlib import Path | ||
from glob import glob | ||
import shutil | ||
|
||
from augur.application.db.session import DatabaseSession | ||
from augur.application.config import AugurConfig | ||
from augur.application.db.lib import get_value, get_section | ||
from augur.application.db import dispose_database_engine | ||
|
||
logger = logging.getLogger(__name__) | ||
with DatabaseSession(logger) as session: | ||
|
||
augur_config = AugurConfig(logger, session) | ||
|
||
|
||
# ROOT_AUGUR_DIRECTORY = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) | ||
|
||
# base_log_dir = ROOT_AUGUR_DIRECTORY + "/logs/" | ||
# ROOT_AUGUR_DIRECTORY = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) | ||
|
||
# base_log_dir = ROOT_AUGUR_DIRECTORY + "/logs/" | ||
|
||
# Path(base_log_dir).mkdir(exist_ok=True) | ||
|
||
# Path(base_log_dir).mkdir(exist_ok=True) | ||
workers = multiprocessing.cpu_count() * 2 + 1 | ||
umask = 0o007 | ||
reload = True | ||
reload_extra_files = glob(str(Path.cwd() / '**/*.j2'), recursive=True) | ||
|
||
workers = multiprocessing.cpu_count() * 2 + 1 | ||
umask = 0o007 | ||
reload = True | ||
reload_extra_files = glob(str(Path.cwd() / '**/*.j2'), recursive=True) | ||
# set the log location for gunicorn | ||
logs_directory = get_value('Logging', 'logs_directory') | ||
accesslog = f"{logs_directory}/gunicorn.log" | ||
errorlog = f"{logs_directory}/gunicorn.log" | ||
|
||
# set the log location for gunicorn | ||
logs_directory = augur_config.get_value('Logging', 'logs_directory') | ||
accesslog = f"{logs_directory}/gunicorn.log" | ||
errorlog = f"{logs_directory}/gunicorn.log" | ||
ssl_bool = get_value('Server', 'ssl') | ||
|
||
if ssl_bool is True: | ||
|
||
workers = int(get_value('Server', 'workers')) | ||
bind = '%s:%s' % (get_value("Server", "host"), get_value("Server", "port")) | ||
timeout = int(get_value('Server', 'timeout')) | ||
certfile = str(get_value('Server', 'ssl_cert_file')) | ||
keyfile = str(get_value('Server', 'ssl_key_file')) | ||
|
||
else: | ||
workers = int(get_value('Server', 'workers')) | ||
bind = '%s:%s' % (get_value("Server", "host"), get_value("Server", "port")) | ||
timeout = int(get_value('Server', 'timeout')) | ||
|
||
ssl_bool = augur_config.get_value('Server', 'ssl') | ||
|
||
if ssl_bool is True: | ||
def worker_exit(server, worker): | ||
print("Stopping gunicorn worker process") | ||
dispose_database_engine() | ||
|
||
workers = int(augur_config.get_value('Server', 'workers')) | ||
bind = '%s:%s' % (augur_config.get_value("Server", "host"), augur_config.get_value("Server", "port")) | ||
timeout = int(augur_config.get_value('Server', 'timeout')) | ||
certfile = str(augur_config.get_value('Server', 'ssl_cert_file')) | ||
keyfile = str(augur_config.get_value('Server', 'ssl_key_file')) | ||
|
||
else: | ||
workers = int(augur_config.get_value('Server', 'workers')) | ||
bind = '%s:%s' % (augur_config.get_value("Server", "host"), augur_config.get_value("Server", "port")) | ||
timeout = int(augur_config.get_value('Server', 'timeout')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.