|
@@ -3,55 +3,7 @@ from typing import Callable, Dict, Optional
|
|
|
|
|
|
|
|
from app.core.config import GlobalConfigSettings
|
|
from app.core.config import GlobalConfigSettings
|
|
|
|
|
|
|
|
-from app.domains.analysis_task import CrawlerDetailDeal
|
|
|
|
|
-from app.domains.analysis_task import AccountPositionReadRateAvg
|
|
|
|
|
-from app.domains.analysis_task import AccountPositionReadAvg
|
|
|
|
|
-from app.domains.analysis_task import AccountPositionOpenRateAvg
|
|
|
|
|
-from app.domains.analysis_task import RateLimitedArticleFilter
|
|
|
|
|
-
|
|
|
|
|
-from app.domains.algorithm_tasks import AccountCategoryAnalysis
|
|
|
|
|
-
|
|
|
|
|
-from app.domains.cold_start_tasks import ArticlePoolColdStart
|
|
|
|
|
-from app.domains.cold_start_tasks import AdPlatformArticlePublishTask
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-from app.domains.crawler_tasks import CrawlerToutiao
|
|
|
|
|
-from app.domains.crawler_tasks import WeixinAccountManager
|
|
|
|
|
-from app.domains.crawler_tasks import CrawlerGzhAccountArticles
|
|
|
|
|
-from app.domains.crawler_tasks import CrawlerGzhSearchArticles
|
|
|
|
|
-
|
|
|
|
|
-from app.domains.data_recycle_tasks import ArticleDetailStat
|
|
|
|
|
-from app.domains.data_recycle_tasks import RecycleDailyPublishArticlesTask
|
|
|
|
|
-from app.domains.data_recycle_tasks import RecycleOutsideAccountArticlesTask
|
|
|
|
|
-from app.domains.data_recycle_tasks import CheckDailyPublishArticlesTask
|
|
|
|
|
-from app.domains.data_recycle_tasks import UpdateRootSourceIdAndUpdateTimeTask
|
|
|
|
|
-from app.domains.data_recycle_tasks import RecycleFwhDailyPublishArticlesTask
|
|
|
|
|
-from app.domains.data_recycle_tasks import RecycleMiniProgramDetailTask
|
|
|
|
|
-from app.domains.data_recycle_tasks import (
|
|
|
|
|
- UpdateOutsideRootSourceIdAndUpdateTimeTask,
|
|
|
|
|
-)
|
|
|
|
|
-
|
|
|
|
|
-from app.domains.llm_tasks.aigc_decode_task import CreateAdPlatformArticlesDecodeTask
|
|
|
|
|
-from app.domains.llm_tasks.aigc_decode_task import CreateInnerArticlesDecodeTask
|
|
|
|
|
-from app.domains.llm_tasks.aigc_decode_task import FetchDecodeResults
|
|
|
|
|
-from app.domains.llm_tasks.aigc_decode_task import ExtractDecodeTaskDetail
|
|
|
|
|
-from app.domains.llm_tasks import TitleRewrite
|
|
|
|
|
-from app.domains.llm_tasks import ArticlePoolCategoryGeneration
|
|
|
|
|
-from app.domains.llm_tasks import CandidateAccountQualityScoreRecognizer
|
|
|
|
|
-from app.domains.llm_tasks import ExtractTitleFeatures
|
|
|
|
|
-
|
|
|
|
|
-from app.domains.monitor_tasks import AutoReplyCardsMonitor
|
|
|
|
|
-from app.domains.monitor_tasks import check_kimi_balance
|
|
|
|
|
-from app.domains.monitor_tasks import GetOffVideos
|
|
|
|
|
-from app.domains.monitor_tasks import CheckVideoAuditStatus
|
|
|
|
|
-from app.domains.monitor_tasks import CooperateAccountsMonitorTask
|
|
|
|
|
-from app.domains.monitor_tasks import InnerGzhArticlesMonitor
|
|
|
|
|
-from app.domains.monitor_tasks import OutsideGzhArticlesMonitor
|
|
|
|
|
-from app.domains.monitor_tasks import OutsideGzhArticlesCollector
|
|
|
|
|
-from app.domains.monitor_tasks import TaskProcessingMonitor
|
|
|
|
|
-from app.domains.monitor_tasks import LimitedAccountAnalysisTask
|
|
|
|
|
-from app.domains.monitor_tasks import AdPlatformAccountsMonitorTask
|
|
|
|
|
-from app.domains.monitor_tasks import RankLogMonitor
|
|
|
|
|
|
|
+from app.jobs.domains import *
|
|
|
|
|
|
|
|
from app.jobs.task_config import TaskStatus
|
|
from app.jobs.task_config import TaskStatus
|
|
|
from app.jobs.task_utils import TaskValidationError
|
|
from app.jobs.task_utils import TaskValidationError
|
|
@@ -110,11 +62,6 @@ class TaskHandler:
|
|
|
await self.log_client.log(contents=log_data)
|
|
await self.log_client.log(contents=log_data)
|
|
|
|
|
|
|
|
# ==================== 监控类任务 ====================
|
|
# ==================== 监控类任务 ====================
|
|
|
- @register("rank_log_monitor")
|
|
|
|
|
- async def _rank_log_monitor_handler(self) -> int:
|
|
|
|
|
- """迁移排序日志"""
|
|
|
|
|
- sub_task = RankLogMonitor(self.db_client, self.log_client)
|
|
|
|
|
- return await sub_task.deal()
|
|
|
|
|
|
|
|
|
|
@register("check_kimi_balance")
|
|
@register("check_kimi_balance")
|
|
|
async def _check_kimi_balance_handler(self) -> int:
|
|
async def _check_kimi_balance_handler(self) -> int:
|
|
@@ -508,5 +455,13 @@ class TaskHandler:
|
|
|
await task.deal()
|
|
await task.deal()
|
|
|
return TaskStatus.SUCCESS
|
|
return TaskStatus.SUCCESS
|
|
|
|
|
|
|
|
|
|
+ # ====================== Recommend Tasks=====================
|
|
|
|
|
+ @register("i2i_recommend_data_sync")
|
|
|
|
|
+ async def _i2i_recommend_data_sync_handler(self) -> int:
|
|
|
|
|
+ task = I2IRecommendDataSyncTask(
|
|
|
|
|
+ pool=self.db_client, log_service=self.log_client
|
|
|
|
|
+ )
|
|
|
|
|
+ await task.deal()
|
|
|
|
|
+ return TaskStatus.SUCCESS
|
|
|
|
|
|
|
|
__all__ = ["TaskHandler"]
|
|
__all__ = ["TaskHandler"]
|