From c9d8712db528b1d3c901b1ce318bdbbd35650ed1 Mon Sep 17 00:00:00 2001 From: z0z0r4 Date: Wed, 1 Jan 2025 13:07:04 +0800 Subject: [PATCH] fix: dramatiq --- app/sync/curseforge.py | 16 ++++++++-------- app/sync/modrinth.py | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/sync/curseforge.py b/app/sync/curseforge.py index 1969e41..ede4bc1 100644 --- a/app/sync/curseforge.py +++ b/app/sync/curseforge.py @@ -10,9 +10,9 @@ from app.sync import sync_mongo_engine as mongodb_engine from app.sync import sync_redis_engine as redis_engine -from app.sync import ( - CURSEFORGE_LIMITER, -) +# from app.sync import ( +# CURSEFORGE_LIMITER, +# ) from app.models.database.curseforge import File, Mod, Pagination, Fingerprint from app.models.database.file_cdn import File as FileCDN from app.utils.network import request_sync @@ -47,12 +47,12 @@ def submit_models(models: List[Union[File, Mod, Fingerprint]]): # limit decorator -def limit(func): - def wrapper(*args, **kwargs): - with CURSEFORGE_LIMITER.acquire(): - return func(*args, **kwargs) +# def limit(func): +# def wrapper(*args, **kwargs): +# with CURSEFORGE_LIMITER.acquire(): +# return func(*args, **kwargs) - return wrapper +# return wrapper # @actor( diff --git a/app/sync/modrinth.py b/app/sync/modrinth.py index e653223..cf40bc3 100644 --- a/app/sync/modrinth.py +++ b/app/sync/modrinth.py @@ -27,9 +27,9 @@ from app.sync import sync_mongo_engine as mongodb_engine from app.sync import sync_redis_engine as redis_engine -from app.sync import ( - MODRINTH_LIMITER, -) +# from app.sync import ( +# MODRINTH_LIMITER, +# ) from app.models.database.modrinth import Project, File, Version from app.models.database.file_cdn import File as FileCDN from app.utils.network import request_sync, request @@ -58,11 +58,11 @@ def submit_models(models: List[Union[Project, File, Version]]): # limit decorator -def limit(func): - def wrapper(*args, **kwargs): - with MODRINTH_LIMITER.acquire(): - return func(*args, **kwargs) - return wrapper +# def limit(func): +# def wrapper(*args, **kwargs): +# with MODRINTH_LIMITER.acquire(): +# return func(*args, **kwargs) +# return wrapper # @actor(