Skip to content

Commit

Permalink
[AIRFLOW-2860] DruidHook: time check is wrong (#3745)
Browse files Browse the repository at this point in the history
  • Loading branch information
awelsh93 authored and kaxil committed Sep 15, 2018
1 parent e47910f commit 71905ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airflow/hooks/druid_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ def submit_indexing_job(self, json_index_spec):

self.log.info("Job still running for %s seconds...", sec)

sec = sec + 1

if self.max_ingestion_time and sec > self.max_ingestion_time:
# ensure that the job gets killed if the max ingestion time is exceeded
requests.post("{0}/{1}/shutdown".format(url, druid_task_id))
Expand All @@ -91,6 +89,8 @@ def submit_indexing_job(self, json_index_spec):

time.sleep(self.timeout)

sec = sec + self.timeout

status = req_status.json()['status']['status']
if status == 'RUNNING':
running = True
Expand Down

0 comments on commit 71905ca

Please sign in to comment.