|
@@ -483,12 +483,9 @@ class TitleRewrite(TitleProcess):
|
|
|
query = f"""
|
|
|
select id, title_rewrite_status_update_timestamp
|
|
|
from publish_single_video_source
|
|
|
- where title_rewrite_status = {self.TITLE_REWRITE_LOCK_STATUS};
|
|
|
+ where title_rewrite_status = %s;
|
|
|
"""
|
|
|
- article_list = await self.pool.async_fetch(
|
|
|
- query=query,
|
|
|
- db_name="long_articles",
|
|
|
- )
|
|
|
+ article_list = await self.pool.async_fetch(query=query, params=(self.TITLE_REWRITE_LOCK_STATUS, ))
|
|
|
if article_list:
|
|
|
blocked_id_list = [
|
|
|
i["id"]
|
|
@@ -497,7 +494,7 @@ class TitleRewrite(TitleProcess):
|
|
|
> self.TITLE_REWRITE_LOCK_TIME
|
|
|
]
|
|
|
if blocked_id_list:
|
|
|
- update_query = f"""
|
|
|
+ update_query = """
|
|
|
update publish_single_video_source
|
|
|
set title_rewrite_status = %s
|
|
|
where id in %s and title_rewrite_status = %s;
|