Skip to content

Commit

Permalink
Try fix
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosal1015 committed Nov 13, 2024
1 parent 10bba18 commit 91d8e51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions builder/download-depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ def resolve_depends(repository, pkgbase, result, key='depends'):
status = Status.objects.get(key=pkgbase)
except:
raise Exception(f'Cannot find {pkgbase} in the database.')

# status.timestamp = status.timestamp.replace(tzinfo=None)

if datetime.now() - status.timestamp > timedelta(days=1):
if datetime.now() - status.timestamp.replace(tzinfo=None) > timedelta(days=1):
pacman_packages.append(f'{config["pacman"]["repository"]}/{pkgname}')
else:
_pkgbase = status.key.split('/')[-1]
Expand Down
4 changes: 1 addition & 3 deletions detector/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,11 @@
status.delete()
continue

# status.timestamp = status.timestamp.replace(tzinfo=None)

if status.status in ['', 'BUILT', 'PUBLISHED']:
status.status = 'STALE'
status.save()
logger.debug(f'{key}: {record.oldver} -> {record.newver}')
elif status.status == 'FAILED' and datetime.now() - status.timestamp > timedelta(days=1):
elif status.status == 'FAILED' and datetime.now() - status.timestamp.replace(tzinfo=None) > timedelta(days=1):
status.status = 'STALE'
status.save()
logger.debug(f'{key}: try to rebuild {record.newver}')
Expand Down

0 comments on commit 91d8e51

Please sign in to comment.