Skip to content

Commit

Permalink
fix dates for after
Browse files Browse the repository at this point in the history
  • Loading branch information
datawhores committed Mar 23, 2024
1 parent afdc89a commit e4a3f2b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ofscraper/api/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def get_after(model_id, username, forced_after=None):
log.debug("Setting date to zero because database is empty")
return 0
missing_items = list(filter(lambda x: x[10] != 1, curr))
missing_items = list(sorted(missing_items, key=lambda x: arrow.get(x[-1])))
missing_items = list(sorted(missing_items, key=lambda x: arrow.get(x[12])))
if len(missing_items) == 0:
log.debug("Using last db date because,all downloads in db marked as downloaded")
return (
Expand Down
2 changes: 1 addition & 1 deletion ofscraper/api/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ def get_after(model_id, username, forced_after=None):
log.debug("Setting date to zero because database is empty")
return 0
missing_items = list(filter(lambda x: x[10] != 1, curr))
missing_items = list(sorted(missing_items, key=lambda x: arrow.get(x[-1])))
missing_items = list(sorted(missing_items, key=lambda x: arrow.get(x[12])))
if len(missing_items) == 0:
log.debug(
"Using last db date because,all downloads in db are marked as downloaded"
Expand Down
2 changes: 1 addition & 1 deletion ofscraper/api/timeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def get_after(model_id, username, forced_after=None):
log.debug("Setting date to zero because database is empty")
return 0
missing_items = list(filter(lambda x: x[10] != 1, curr))
missing_items = list(sorted(missing_items, key=lambda x: arrow.get(x[-1])))
missing_items = list(sorted(missing_items, key=lambda x: arrow.get(x[12])))
if len(missing_items) == 0:
log.debug("Using last db date because,all downloads in db marked as downloaded")
return (
Expand Down

0 comments on commit e4a3f2b

Please sign in to comment.