forked from sh-edraft.de/sh_discord_bot
Fixed some random stuff #70
This commit is contained in:
parent
119f4e9d04
commit
21fcfaaa7f
@ -18,7 +18,7 @@
|
|||||||
"Dependencies": [
|
"Dependencies": [
|
||||||
"cpl-core==2022.10.0.post6",
|
"cpl-core==2022.10.0.post6",
|
||||||
"cpl-translation==2022.10.0.post1",
|
"cpl-translation==2022.10.0.post1",
|
||||||
"cpl-query==2022.10.0.post1",
|
"cpl-query==2022.10.0.post2",
|
||||||
"cpl-discord==2022.10.0.post5"
|
"cpl-discord==2022.10.0.post5"
|
||||||
],
|
],
|
||||||
"DevDependencies": [
|
"DevDependencies": [
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
"Database": {
|
"Database": {
|
||||||
"Path": "logs/",
|
"Path": "logs/",
|
||||||
"Filename": "database.log",
|
"Filename": "database.log",
|
||||||
"ConsoleLogLevel": "DEBUG",
|
"ConsoleLogLevel": "TRACE",
|
||||||
"FileLogLevel": "TRACE"
|
"FileLogLevel": "TRACE"
|
||||||
},
|
},
|
||||||
"Message": {
|
"Message": {
|
||||||
|
@ -77,4 +77,5 @@ class Api(Flask):
|
|||||||
self._logger.info(__name__, f'Starting API {self._apt_settings.host}:{self._apt_settings.port}')
|
self._logger.info(__name__, f'Starting API {self._apt_settings.host}:{self._apt_settings.port}')
|
||||||
self._register_routes()
|
self._register_routes()
|
||||||
from waitress import serve
|
from waitress import serve
|
||||||
serve(self, host=self._apt_settings.host, port=self._apt_settings.port)
|
# https://docs.pylonsproject.org/projects/waitress/en/stable/arguments.html
|
||||||
|
serve(self, host=self._apt_settings.host, port=self._apt_settings.port, threads=10, connection_limit=1000, channel_timeout=10)
|
||||||
|
@ -16,8 +16,6 @@ class DBContext(DatabaseContext):
|
|||||||
try:
|
try:
|
||||||
self._logger.debug(__name__, "Connecting to database")
|
self._logger.debug(__name__, "Connecting to database")
|
||||||
self._db.connect(database_settings)
|
self._db.connect(database_settings)
|
||||||
|
|
||||||
self.save_changes()
|
|
||||||
self._logger.info(__name__, "Connected to database")
|
self._logger.info(__name__, "Connected to database")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self._logger.fatal(__name__, "Connecting to database failed", e)
|
self._logger.fatal(__name__, "Connecting to database failed", e)
|
||||||
|
Loading…
Reference in New Issue
Block a user