Update tasks

This commit is contained in:
2022-08-09 17:27:31 +03:00
parent 0d373fff6e
commit 5845a8d13c
2 changed files with 14 additions and 14 deletions

View File

@@ -112,7 +112,7 @@ async def update_fl_authors(ctx: dict, *args, prefix: Optional[str] = None, **kw
) )
if not is_deps_complete: if not is_deps_complete:
raise Retry(defer=60 * not_complete_count) raise Retry(defer=45 * not_complete_count)
postgres, mysql = await get_db_cons() postgres, mysql = await get_db_cons()
@@ -169,7 +169,7 @@ async def update_fl_books(ctx: dict, *args, prefix: Optional[str] = None, **kwar
) )
if not is_deps_complete: if not is_deps_complete:
raise Retry(defer=60 * not_complete_count) raise Retry(defer=45 * not_complete_count)
postgres, mysql = await get_db_cons() postgres, mysql = await get_db_cons()
@@ -246,7 +246,7 @@ async def update_fl_books_authors(
) )
if not is_deps_complete: if not is_deps_complete:
raise Retry(defer=60 * not_complete_count) raise Retry(defer=45 * not_complete_count)
postgres, mysql = await get_db_cons() postgres, mysql = await get_db_cons()
@@ -301,7 +301,7 @@ async def update_fl_translations(
) )
if not is_deps_complete: if not is_deps_complete:
raise Retry(defer=60 * not_complete_count) raise Retry(defer=45 * not_complete_count)
postgres, mysql = await get_db_cons() postgres, mysql = await get_db_cons()
@@ -357,7 +357,7 @@ async def update_fl_sequences(ctx: dict, *args, prefix: Optional[str] = None, **
) )
if not is_deps_complete: if not is_deps_complete:
raise Retry(defer=60 * not_complete_count) raise Retry(defer=45 * not_complete_count)
postgres, mysql = await get_db_cons() postgres, mysql = await get_db_cons()
@@ -414,7 +414,7 @@ async def update_fl_sequences_info(
) )
if not is_deps_complete: if not is_deps_complete:
raise Retry(defer=60 * not_complete_count) raise Retry(defer=45 * not_complete_count)
postgres, mysql = await get_db_cons() postgres, mysql = await get_db_cons()
@@ -474,7 +474,7 @@ async def update_fl_book_annotations(
) )
if not is_deps_complete: if not is_deps_complete:
raise Retry(defer=60 * not_complete_count) raise Retry(defer=45 * not_complete_count)
postgres, mysql = await get_db_cons() postgres, mysql = await get_db_cons()
@@ -538,7 +538,7 @@ async def update_fl_book_annotations_pic(
) )
if not is_deps_complete: if not is_deps_complete:
raise Retry(defer=60 * not_complete_count) raise Retry(defer=45 * not_complete_count)
postgres, mysql = await get_db_cons() postgres, mysql = await get_db_cons()
@@ -578,7 +578,7 @@ async def update_fl_author_annotations(
) )
if not is_deps_complete: if not is_deps_complete:
raise Retry(defer=60 * not_complete_count) raise Retry(defer=45 * not_complete_count)
postgres, mysql = await get_db_cons() postgres, mysql = await get_db_cons()
@@ -674,7 +674,7 @@ async def update_fl_genres(ctx: dict, *args, prefix: Optional[str] = None, **kwa
) )
if not is_deps_complete: if not is_deps_complete:
raise Retry(defer=60 * not_complete_count) raise Retry(defer=45 * not_complete_count)
postgres, mysql = await get_db_cons() postgres, mysql = await get_db_cons()
@@ -730,7 +730,7 @@ async def update_fl_books_genres(
) )
if not is_deps_complete: if not is_deps_complete:
raise Retry(defer=60 * not_complete_count) raise Retry(defer=45 * not_complete_count)
postgres, mysql = await get_db_cons() postgres, mysql = await get_db_cons()
@@ -782,7 +782,7 @@ async def update_fl_webhook(
) )
if not is_deps_complete: if not is_deps_complete:
raise Retry(defer=60 * not_complete_count) raise Retry(defer=45 * not_complete_count)
all_success = True all_success = True

View File

@@ -24,6 +24,6 @@ class WorkerSettings:
on_shutdown = shutdown on_shutdown = shutdown
redis_settings = get_redis_settings() redis_settings = get_redis_settings()
max_jobs = 2 max_jobs = 2
max_tries = 20 max_tries = 30
job_timeout = 5 * 60 job_timeout = 10 * 60
cron_jobs = [cron(run_fl_update, hour={5}, minute=0)] cron_jobs = [cron(run_fl_update, hour={5}, minute=0)]