Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #524 from vfreex/fix-cutoff-timestamp-estimate
Browse files Browse the repository at this point in the history
Fix an issue in bug cutoff timestamps estimate
  • Loading branch information
joepvd authored Mar 7, 2023
2 parents 4567104 + ebc8529 commit d297a61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions elliottlib/bzutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -1128,8 +1128,8 @@ async def approximate_cutoff_timestamp(basis_event: int, koji_api: ClientSession
""" Calculate an approximate sweep cutoff timestamp from the given basis event
"""
basis_timestamp = koji_api.getEvent(basis_event)["ts"]
builds: List[Dict] = await asyncio.gather(*[exectools.to_thread(meta.get_latest_build, complete_before_event=basis_event, honor_is=False) for meta in metas])
nvrs = [b["nvr"] for b in builds]
builds: List[Dict] = await asyncio.gather(*[exectools.to_thread(meta.get_latest_build, default=None, complete_before_event=basis_event, honor_is=False) for meta in metas])
nvrs = [b["nvr"] for b in builds if b]
rebase_timestamp_strings = filter(None, [isolate_timestamp_in_release(nvr) for nvr in nvrs]) # the timestamp in the release field of NVR is the approximate rebase time
# convert to UNIX timestamps
rebase_timestamps = [datetime.strptime(ts, "%Y%m%d%H%M%S").replace(tzinfo=timezone.utc).timestamp()
Expand Down

0 comments on commit d297a61

Please sign in to comment.