mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Change webhook_update's task name on DEBUG command for better display
This commit is contained in:
parent
935e17a8e9
commit
347cf92f6f
|
@ -139,6 +139,7 @@ async def main_loop():
|
||||||
# Setup database connection
|
# Setup database connection
|
||||||
await db.setup_connection()
|
await db.setup_connection()
|
||||||
await db.create_pubsub_interface(domains.webhook_update)
|
await db.create_pubsub_interface(domains.webhook_update)
|
||||||
|
|
||||||
logger.debug("Connection type: {}".format(db.connection_pool))
|
logger.debug("Connection type: {}".format(db.connection_pool))
|
||||||
load_extensions()
|
load_extensions()
|
||||||
await populate_wikis()
|
await populate_wikis()
|
||||||
|
|
|
@ -215,7 +215,7 @@ class Domain:
|
||||||
|
|
||||||
@cache
|
@cache
|
||||||
def calculate_sleep_time(self, queue_length: int):
|
def calculate_sleep_time(self, queue_length: int):
|
||||||
return max(125/queue_length, 1)
|
return max(int(125/queue_length), 1)
|
||||||
|
|
||||||
async def run_wiki_check(self):
|
async def run_wiki_check(self):
|
||||||
"""Runs appropriate scheduler depending on existence of IRC"""
|
"""Runs appropriate scheduler depending on existence of IRC"""
|
||||||
|
|
|
@ -68,6 +68,7 @@ class DomainManager:
|
||||||
await self.return_domain(self.get_domain(split_payload[1])).get_wiki(split_payload[1]).update_targets()
|
await self.return_domain(self.get_domain(split_payload[1])).get_wiki(split_payload[1]).update_targets()
|
||||||
logger.info("Successfully force updated information about {}".format(split_payload[1]))
|
logger.info("Successfully force updated information about {}".format(split_payload[1]))
|
||||||
elif split_payload[0] == "DEBUG":
|
elif split_payload[0] == "DEBUG":
|
||||||
|
asyncio.current_task().set_name("webhook_update")
|
||||||
if split_payload[1] == "INFO":
|
if split_payload[1] == "INFO":
|
||||||
logger.info(self.domains)
|
logger.info(self.domains)
|
||||||
for name, domain in self.domains.items():
|
for name, domain in self.domains.items():
|
||||||
|
|
Loading…
Reference in a new issue