guild.mod: make execute prune blockable on prune result

This commit is contained in:
Luna 2022-08-14 15:34:00 -03:00
parent c523c297fc
commit cf63a58a63
1 changed files with 4 additions and 1 deletions

View File

@ -201,5 +201,8 @@ async def begin_guild_prune(guild_id):
days = j["days"]
member_ids = await get_prune(guild_id, days)
app.sched.spawn(prune_members(user_id, guild_id, member_ids))
# TODO move this job to the background scheduler in a way
# that the test can fetch the job and wait on it before
# asserting test result state
await prune_members(user_id, guild_id, member_ids)
return jsonify({"pruned": len(member_ids)})