Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 21, 2023
1 parent 51a064e commit a09e88c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pubtools/_pulp/tasks/garbage_collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ def clean_all_rpm_content(self):
Criteria.with_unit_type(RpmUnit, unit_fields=["unit_id"]),
Criteria.with_field(
"cdn_published",
Matcher.less_than(
datetime.utcnow() - timedelta(days=arc_threshold)),
Matcher.less_than(datetime.utcnow() - timedelta(days=arc_threshold)),
),
)
deleted_content = []
Expand All @@ -107,8 +106,7 @@ def clean_all_rpm_content(self):
def handle_pages(page):
batch_accumulator = [[unit.unit_id for unit in page.data]]
if page.next:
batch_accumulator.extend(
f_flat_map(page.next, handle_pages).result())
batch_accumulator.extend(f_flat_map(page.next, handle_pages).result())
return f_return(batch_accumulator)

batches = f_flat_map(first_page, handle_pages).result()
Expand Down

0 comments on commit a09e88c

Please sign in to comment.