mirror of https://gitlab.com/litecord/litecord.git
remove app param from guild_region_check()
This commit is contained in:
parent
e0a849fa6a
commit
ce04ac5c5f
|
|
@ -118,7 +118,7 @@ async def deprecate_region(region):
|
||||||
return "", 204
|
return "", 204
|
||||||
|
|
||||||
|
|
||||||
async def guild_region_check(app_):
|
async def guild_region_check():
|
||||||
"""Check all guilds for voice region inconsistencies.
|
"""Check all guilds for voice region inconsistencies.
|
||||||
|
|
||||||
Since the voice migration caused all guilds.region columns
|
Since the voice migration caused all guilds.region columns
|
||||||
|
|
@ -126,13 +126,13 @@ async def guild_region_check(app_):
|
||||||
than one region setup.
|
than one region setup.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
regions = await app_.storage.all_voice_regions()
|
regions = await app.storage.all_voice_regions()
|
||||||
|
|
||||||
if not regions:
|
if not regions:
|
||||||
log.info("region check: no regions to move guilds to")
|
log.info("region check: no regions to move guilds to")
|
||||||
return
|
return
|
||||||
|
|
||||||
res = await app_.db.execute(
|
res = await app.db.execute(
|
||||||
"""
|
"""
|
||||||
UPDATE guilds
|
UPDATE guilds
|
||||||
SET region = (
|
SET region = (
|
||||||
|
|
|
||||||
2
run.py
2
run.py
|
|
@ -339,7 +339,7 @@ async def post_app_start(app_):
|
||||||
# we'll need to start a billing job
|
# we'll need to start a billing job
|
||||||
app_.sched.spawn(payment_job(app_))
|
app_.sched.spawn(payment_job(app_))
|
||||||
app_.sched.spawn(api_index(app_))
|
app_.sched.spawn(api_index(app_))
|
||||||
app_.sched.spawn(guild_region_check(app_))
|
app_.sched.spawn(guild_region_check())
|
||||||
|
|
||||||
|
|
||||||
def start_websocket(host, port, ws_handler) -> asyncio.Future:
|
def start_websocket(host, port, ws_handler) -> asyncio.Future:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue