Skip to content

Commit

Permalink
fix: sync_full
Browse files Browse the repository at this point in the history
  • Loading branch information
z0z0r4 committed Nov 17, 2024
1 parent 3864d0e commit d065590
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion start.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ async def sync_full():
pass

log.info(
f"All data sync finished, total: {total_data}. Next run at: {sync_job.next_run_time.strftime('%Y-%m-%d %H:%M:%S %Z')}"
f"All data sync finished, total: {total_data}. Next run at: {sync_full_job.next_run_time.strftime('%Y-%m-%d %H:%M:%S %Z')}"
)

await notify_result_to_telegram(total_data, sync_mode=SyncMode.FULL)
Expand Down
6 changes: 2 additions & 4 deletions sync/modrinth.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,8 @@ def sync_project_all_version(
# delete not found versions
removed_count = mongodb_engine.remove(
Version,
query.and_(
query.not_in(Version.id, latest_version_id_list),
Version.project_id == project_id,
),
query.not_in(Version.id, latest_version_id_list),
Version.project_id == project_id,
)
log.info(
f"Finished sync project {project_id} versions info, total {len(res)} versions, removed {removed_count} versions"
Expand Down

0 comments on commit d065590

Please sign in to comment.