Skip to content

Commit

Permalink
changed end_log behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Diener committed Apr 7, 2020
1 parent 800f1fa commit 04028b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions bigquerylogger/BQTaskHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def set_context(self, ti):
super(BQTaskHandler, self).set_context(ti)
self._set_parameters(ti)

def _set_parameters(self, ti, try_number):
def _set_parameters(self, ti, try_number=0):
self.parameters['dag_id'] = ti.dag_id
self.parameters['task_id'] = ti.task_id
self.parameters['try_number'] = str(try_number if try_number else ti.try_number)
Expand All @@ -71,8 +71,7 @@ def _bq_read(self, metadata=None):

metadata['end_of_log'] = (
log_count == 0 or
self.parameters['limit'] == 0 or
log_count < self.parameters['limit'])
self.parameters['limit'] == 0)
metadata['offset'] += log_count

if metadata['end_of_log']:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='airflow-bigquerylogger',
version='0.4.3',
version='0.4.5',
description='BigQuery logger handler for Airflow',
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 04028b9

Please sign in to comment.