mirror of
https://github.com/Steffo99/greed.git
synced 2024-11-24 23:04:18 +00:00
Fix self.loc race condition
This commit is contained in:
parent
62587f0a19
commit
3bcd409056
2 changed files with 2 additions and 0 deletions
|
@ -14,6 +14,7 @@ enabled_languages = ["it", "en", "uk", "ru", "zh_cn", "he"]
|
||||||
# The default language to be set for users whose language cannot be autodetected or whose language is not enabled
|
# The default language to be set for users whose language cannot be autodetected or whose language is not enabled
|
||||||
default_language = "it"
|
default_language = "it"
|
||||||
# The language to fallback to if a string is missing in a specific language
|
# The language to fallback to if a string is missing in a specific language
|
||||||
|
# You should set it to either "it" or "en", other languages may be missing some strings as greed is updated
|
||||||
fallback_language = "en"
|
fallback_language = "en"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ class Worker(threading.Thread):
|
||||||
self.chat: telegram.Chat = chat
|
self.chat: telegram.Chat = chat
|
||||||
self.telegram_user: telegram.User = telegram_user
|
self.telegram_user: telegram.User = telegram_user
|
||||||
self.cfg = cfg
|
self.cfg = cfg
|
||||||
|
self.loc = None
|
||||||
# Open a new database session
|
# Open a new database session
|
||||||
log.debug(f"Opening new database session for {self.name}")
|
log.debug(f"Opening new database session for {self.name}")
|
||||||
self.session = sqlalchemy.orm.sessionmaker(bind=engine)()
|
self.session = sqlalchemy.orm.sessionmaker(bind=engine)()
|
||||||
|
|
Loading…
Reference in a new issue