|
@@ -8,18 +8,29 @@ client = ApolloClient("http://apolloconfig-internal.piaoquantv.com")
|
|
|
aigc_client = AIGCClient(token="8bf14f27fc3a486788f3383452422d72", base_url="https://aigc-api.aiddit.com")
|
|
aigc_client = AIGCClient(token="8bf14f27fc3a486788f3383452422d72", base_url="https://aigc-api.aiddit.com")
|
|
|
|
|
|
|
|
|
|
|
|
|
-def main():
|
|
|
|
|
|
|
+def produce_plan_status_update():
|
|
|
config_str = client.get_value(
|
|
config_str = client.get_value(
|
|
|
app_id="crawler-scheduler",
|
|
app_id="crawler-scheduler",
|
|
|
cluster="default",
|
|
cluster="default",
|
|
|
namespace="application",
|
|
namespace="application",
|
|
|
key="hot.video.keywords.provide.task.config"
|
|
key="hot.video.keywords.provide.task.config"
|
|
|
)
|
|
)
|
|
|
|
|
+ supply_merge_cate2 = ['历史名人', '当代正能量人物', '国家科技力量', '国家力量']
|
|
|
|
|
+ produce_plan_id_set = set()
|
|
|
config_json = json.loads(json_util.remove_comments(config_str))
|
|
config_json = json.loads(json_util.remove_comments(config_str))
|
|
|
for merge_cate2 in config_json['mergeCate2PatternPlanIdMap']:
|
|
for merge_cate2 in config_json['mergeCate2PatternPlanIdMap']:
|
|
|
|
|
+ # if merge_cate2 not in supply_merge_cate2:
|
|
|
|
|
+ # continue
|
|
|
for mode in config_json['mergeCate2PatternPlanIdMap'][merge_cate2]:
|
|
for mode in config_json['mergeCate2PatternPlanIdMap'][merge_cate2]:
|
|
|
for produce_plan_id in config_json['mergeCate2PatternPlanIdMap'][merge_cate2][mode]:
|
|
for produce_plan_id in config_json['mergeCate2PatternPlanIdMap'][merge_cate2][mode]:
|
|
|
- aigc_client.update_produce_plan_status(produce_plan_id, 0)
|
|
|
|
|
|
|
+ produce_plan_id_set.add(produce_plan_id)
|
|
|
|
|
+
|
|
|
|
|
+ # for produce_plan_id in produce_plan_id_set:
|
|
|
|
|
+ # aigc_client.update_produce_plan_status(produce_plan_id, 1)
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+def main():
|
|
|
|
|
+ produce_plan_status_update()
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
if __name__ == '__main__':
|