Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions providers/edge3/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ config:
type: integer
example: ~
default: "524288"
push_logs:
description: |
Flag to enable or disable pushing of log files from edge worker to the central site.
When enabled, edge workers will upload task log files in chunks to the central Airflow site.
When disabled, logs will only be available locally on the edge worker.
version_added: 1.5.0
type: boolean
example: "True"
default: "True"
worker_umask:
description: |
The default umask to use for edge worker when run in daemon mode
Expand Down
6 changes: 5 additions & 1 deletion providers/edge3/src/airflow/providers/edge3/cli/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,11 @@ def check_running_jobs(self) -> None:
else:
used_concurrency += job.edge_job.concurrency_slots

if job.logfile.exists() and job.logfile.stat().st_size > job.logsize:
if (
conf.getboolean("edge", "push_logs")
and job.logfile.exists()
and job.logfile.stat().st_size > job.logsize
):
with job.logfile.open("rb") as logfile:
push_log_chunk_size = conf.getint("edge", "push_log_chunk_size")
logfile.seek(job.logsize, os.SEEK_SET)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ def get_provider_info():
"example": None,
"default": "524288",
},
"push_logs": {
"description": "Flag to enable or disable pushing of log files from edge worker to the central site.\nWhen enabled, edge workers will upload task log files in chunks to the central Airflow site.\nWhen disabled, logs will only be available locally on the edge worker.\n",
"version_added": "1.5.0",
"type": "boolean",
"example": "True",
"default": "True",
},
"worker_umask": {
"description": "The default umask to use for edge worker when run in daemon mode\n\nThis controls the file-creation mode mask which determines the initial value of file permission bits\nfor newly created files.\n\nThis value is treated as an octal-integer.\n",
"version_added": None,
Expand Down