Skip to content
Permalink
Browse files

Report UNBUILT and LOOKUP FAILED statuses.

  • Loading branch information...
anjackson committed Jun 22, 2018
1 parent a28907f commit 0164d0783c9625341b7551802a4e485ce0d9ed8e
Showing with 18 additions and 9 deletions.
  1. +0 −1 docker-compose.yml
  2. +11 −8 hapy/dash/collector.py
  3. +7 −0 hapy/dash/crawl-jobs-test.json
@@ -20,7 +20,6 @@ services:
- "KAFKA_TOCRAWL_TOPIC=uris-to-crawl"
- "WRENDER_ENDPOINT=http://wrender:8010/render"
- "CDXSERVER_ENDPOINT=http://cdxserver:8080/fc"
hostname: tasks.heritrix-worker

# Hapy Dashboard
hapy:
@@ -108,6 +108,8 @@ def run_api_requests(self):
# Merge the results in:
for job in services:
job['state'] = results[job['id']]
if not job['url']:
job['state']['status'] = "LOOKUP FAILED"

return services

@@ -287,14 +289,15 @@ def get_h3_status(args):
if not state['status']:
state['status'] = info['job'].get("statusDescription", None)
state['status'] = state['status'].upper()
# Also look to store useful numbers as actual numbers:
dict_values_to_floats(info['job'], 'loadReport')
dict_values_to_floats(info['job'], 'heapReport')
dict_values_to_floats(info['job'], 'rateReport')
dict_values_to_floats(info['job'], 'threadReport', ['steps','processors'])
dict_values_to_floats(info['job'], 'sizeTotalsReport')
dict_values_to_floats(info['job'], 'uriTotalsReport')
dict_values_to_floats(info['job'], 'frontierReport', ['lastReachedState'])
if state['status'] != "UNBUILT":
# Also look to store useful numbers as actual numbers:
dict_values_to_floats(info['job'], 'loadReport')
dict_values_to_floats(info['job'], 'heapReport')
dict_values_to_floats(info['job'], 'rateReport')
dict_values_to_floats(info['job'], 'threadReport', ['steps','processors'])
dict_values_to_floats(info['job'], 'sizeTotalsReport')
dict_values_to_floats(info['job'], 'uriTotalsReport')
dict_values_to_floats(info['job'], 'frontierReport', ['lastReachedState'])
except Exception as e:
state['status'] = "DOWN"
state['error'] = "Exception while checking Heritrix! %s" % e
@@ -5,5 +5,12 @@
"deployment": "frequent",
"function": "ingest",
"url": "https://heritrix-worker:8443/"
},
{
"id": "test-lookup",
"job_name": "frequent",
"deployment": "test-lookup",
"function": "ingest",
"dns_sd_name": "heritrix-worker"
}
]

0 comments on commit 0164d07

Please sign in to comment.
You can’t perform that action at this time.