summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-03-08 20:07:05 +0100
committerschneefux <schneefux+commit@schneefux.xyz>2017-03-08 20:07:05 +0100
commit9cfc1067fdd607de73327d65d44a6bbae90e9469 (patch)
treeb73276d61456a333a3b2185289127b1b80fae5ef
parentd85d3ec7b53d7f5a38fcd950cdf86bb26d7f54ca (diff)
downloadapigrabber-9cfc1067fdd607de73327d65d44a6bbae90e9469.tar.gz
apigrabber-9cfc1067fdd607de73327d65d44a6bbae90e9469.zip
log: be more verbose
-rw-r--r--api.py4
-rw-r--r--crawler.py2
2 files changed, 4 insertions, 2 deletions
diff --git a/api.py b/api.py
index cfbcbb8..f436b57 100644
--- a/api.py
+++ b/api.py
@@ -48,6 +48,8 @@ class Apigrabber(joblib.worker.Worker):
playername = ""
async with self._pool.acquire() as con:
+ logging.debug("%s: running on %s with parameters '%s'",
+ jobid, payload["region"], payload["params"])
try:
async for data in api.matches(region=payload["region"],
params=payload["params"]):
@@ -64,6 +66,8 @@ class Apigrabber(joblib.worker.Worker):
payload=payloads,
priority=priority)
except crawler.ApiError as error:
+ logging.warning("%s: API returned error '%s'",
+ jobid, error.args[0])
raise joblib.worker.JobFailed(error.args[0])
diff --git a/crawler.py b/crawler.py
index 20428b6..2aa6a7e 100644
--- a/crawler.py
+++ b/crawler.py
@@ -72,8 +72,6 @@ class Crawler(object):
params)
if "errors" in res:
- logging.warn("API returned error: '%s'",
- res["errors"])
if res["errors"][0].get("title") == "Not Found" \
and params["page[offset]"] > 0:
# a query returned exactly 50 matches