Skip to content

Commit

Permalink
Filter out old actions runs from dashboard (#32347)
Browse files Browse the repository at this point in the history
  • Loading branch information
damccorm committed Aug 28, 2024
1 parent 815a049 commit a85b0a6
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ def append_workflow_runs(workflow, runs):
number_of_entries_per_page = 100 # The number of results per page (max 100)
params = {"branch": "master", "page": page, "per_page": number_of_entries_per_page}
concurrent_requests = 30 # Number of requests to send simultaneously
start = datetime.now() - timedelta(days=90)
earliest_run_creation_date = start.strftime('%Y-%m-%d')
semaphore = asyncio.Semaphore(concurrent_requests)

print("Start fetching recent workflow runs")
Expand Down Expand Up @@ -338,6 +340,7 @@ def append_workflow_runs(workflow, runs):
"page": page,
"per_page": number_of_entries_per_page,
"exclude_pull_requests": "true",
"created": f'>={earliest_run_creation_date}',
}
workflow_run_tasks.append(fetch(runs_url, semaphore, params, headers))
page += 1
Expand Down

0 comments on commit a85b0a6

Please sign in to comment.