Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce response payload size of /dag_stats and /task_stats #8633

Merged
merged 5 commits into from
Apr 30, 2020
Merged
Changes from 1 commit
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
Next Next commit
Reduce response payload size of /dag_stats and /task_stats
Their response format is like {"example_dag_id": [{"state": "success", "dag_id": "example_dag_id"}, ...], ...}

The dag_id is already used as the "key", but still repeatedly appear in each element,
which makes the response payload size unnecessarily bigger
  • Loading branch information
XD-DENG committed Apr 30, 2020
commit a3730328cde33efb71da9644a593e1b13fc3bb17
2 changes: 0 additions & 2 deletions airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ def dag_stats(self, session=None):
payload[dag_id].append({
'state': state,
'count': count,
'dag_id': dag_id,
'color': State.color(state)
})

Expand Down Expand Up @@ -496,7 +495,6 @@ def task_stats(self, session=None):
payload[dag_id].append({
'state': state,
'count': count,
'dag_id': dag_id,
'color': State.color(state)
})
return wwwutils.json_response(payload)
Expand Down