mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-22 00:44:10 +00:00
Add option to disable discussions
This commit is contained in:
parent
9348c36355
commit
508640cfba
|
@ -12,6 +12,7 @@
|
|||
"pg_db": "rcgcdb",
|
||||
"pg_pass": "secret_password",
|
||||
"pg_port": "5432",
|
||||
"discussions_enabled": false,
|
||||
"irc_servers": {
|
||||
"your custom name for the farm": {
|
||||
"domains": ["wikipedia.org", "otherwikipedia.org"],
|
||||
|
|
|
@ -403,6 +403,8 @@ async def message_sender():
|
|||
|
||||
async def discussion_handler():
|
||||
await asyncio.sleep(3.0) # Make some time before IRC code is executed, happens only once and saves if inside
|
||||
if not settings.get("discussions_enabled", False):
|
||||
raise asyncio.CancelledError
|
||||
try:
|
||||
while True:
|
||||
async with db.pool().acquire() as connection:
|
||||
|
|
Loading…
Reference in a new issue