Skip to content

Commit

Permalink
Fix logs downloading for tasks (#63)
Browse files Browse the repository at this point in the history
(cherry picked from commit 87f2abb)
(cherry picked from commit e44d171)
  • Loading branch information
sjmiller609 authored and kaxil committed Dec 14, 2020
1 parent f38532d commit 85328b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airflow/providers/elasticsearch/log/es_task_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ def _read(
if (
cur_ts.diff(last_log_ts).in_minutes() >= 5
or 'max_offset' in metadata
and offset >= metadata['max_offset']
and int(offset) >= int(metadata['max_offset'])
):
metadata['end_of_log'] = True

if offset != next_offset or 'last_log_timestamp' not in metadata:
if int(offset) != int(next_offset) or 'last_log_timestamp' not in metadata:
metadata['last_log_timestamp'] = str(cur_ts)

# If we hit the end of the log, remove the actual end_of_log message
Expand Down

0 comments on commit 85328b6

Please sign in to comment.