summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-03-10 22:12:10 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2017-03-10 22:12:10 +0100
commit21cc298a6f73feffbc07e3bf6e0ab4bdfb02ff5f (patch)
tree15ac0d476386b8b1d1cfd861e4d25853035ee011 /main.py
parent579205be26414d1f802cae75991f47e5c44e500e (diff)
downloaddiscordbot-21cc298a6f73feffbc07e3bf6e0ab4bdfb02ff5f.tar.gz
discordbot-21cc298a6f73feffbc07e3bf6e0ab4bdfb02ff5f.zip
update to latest joblib
Diffstat (limited to 'main.py')
-rw-r--r--main.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/main.py b/main.py
index 10f4617..b107301 100644
--- a/main.py
+++ b/main.py
@@ -149,9 +149,9 @@ Last match: %s %s as %s %s/%s/%s
"filter[playerNames]": name
}
}
- jobid = await queue.request(jobtype="grab",
- payload=payload,
- priority=1)
+ jobid = (await queue.request(jobtype="grab",
+ payload=[payload],
+ priority=[1]))[0]
while True:
# wait for grab job to finish
@@ -159,18 +159,19 @@ Last match: %s %s as %s %s/%s/%s
if status == 'finished':
break
if status == 'failed':
+ logging.warning("'%s': not found", name)
if not in_cache:
await bot.edit_message(
"Could not find you.")
return
- asyncio.sleep(0.1)
+ asyncio.sleep(0.5)
while True:
# wait for processor to update the player
data = await con.fetchrow(query, name, lmcd)
if data is not None:
break
- asyncio.sleep(0.1)
+ asyncio.sleep(0.5)
await bot.edit_message(msgid, msg(data))