liyuyi@c-top.com.cn 4 rokov pred
rodič
commit
4f60c90e05
34 zmenil súbory, kde vykonal 51 pridanie a 329 odobranie
  1. 0 7
      .idea/encodings.xml
  2. 0 6
      .idea/inspectionProfiles/profiles_settings.xml
  3. 0 4
      .idea/misc.xml
  4. 0 8
      .idea/modules.xml
  5. 0 7
      .idea/other.xml
  6. 0 6
      .idea/sqldialects.xml
  7. 0 6
      .idea/vcs.xml
  8. BIN
      __pycache__/advertiser_strategy_operate.cpython-37.pyc
  9. BIN
      __pycache__/ai_callback_handler.cpython-37.pyc
  10. BIN
      __pycache__/ai_strategy_request_func.cpython-37.pyc
  11. BIN
      __pycache__/ai_strategy_request_func.cpython-38.pyc
  12. BIN
      __pycache__/ai_time_task_creative_handler.cpython-37.pyc
  13. 0 0
      logs/advertiser_strategy_operate.log
  14. 0 36
      logs/ai_auto_create.log
  15. 0 119
      logs/ai_callback.log
  16. 0 40
      logs/ai_strategy_request.log
  17. 0 15
      logs/commonfunction.log
  18. 0 47
      manual_request_json.py
  19. 9 3
      time_task/time_task_ai_auto_creative.py
  20. 7 4
      time_task/time_task_ai_check_and_up_to_full_creative.py
  21. 7 5
      time_task/time_task_ai_high_quality_material.py
  22. 4 2
      time_task/time_task_ai_high_quality_material_test.py
  23. 7 4
      time_task/time_task_ai_historical_missing_material.py
  24. 3 2
      time_task/time_task_ai_historical_missing_material_test.py
  25. 7 4
      time_task/time_task_ai_program_creative_high_quality_materials.py
  26. 7 4
      time_task/time_task_ai_program_creative_new_materials.py
  27. BIN
      utils/__pycache__/BaseClass.cpython-37.pyc
  28. BIN
      utils/__pycache__/BaseClass.cpython-38.pyc
  29. BIN
      utils/__pycache__/CommonFunction.cpython-37.pyc
  30. BIN
      utils/__pycache__/ConstantConfig.cpython-37.pyc
  31. BIN
      utils/__pycache__/DataBaseConfig.cpython-37.pyc
  32. BIN
      utils/__pycache__/DataBaseConfig.cpython-38.pyc
  33. BIN
      utils/__pycache__/UrlConfig.cpython-37.pyc
  34. BIN
      utils/__pycache__/UrlConfig.cpython-38.pyc

+ 0 - 7
.idea/encodings.xml

@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="Encoding">
-    <file url="file://$PROJECT_DIR$/ai_callback_add_group_handler.py" charset="GBK" />
-    <file url="file://$PROJECT_DIR$/logs/ai_callback/ai_strategy_request.log.2021-01-14" charset="GBK" />
-  </component>
-</project>

+ 0 - 6
.idea/inspectionProfiles/profiles_settings.xml

@@ -1,6 +0,0 @@
-<component name="InspectionProjectProfileManager">
-  <settings>
-    <option name="USE_PROJECT_PROFILE" value="false" />
-    <version value="1.0" />
-  </settings>
-</component>

+ 0 - 4
.idea/misc.xml

@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (ai_ads)" project-jdk-type="Python SDK" />
-</project>

+ 0 - 8
.idea/modules.xml

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ProjectModuleManager">
-    <modules>
-      <module fileurl="file://$PROJECT_DIR$/.idea/ai_ads.iml" filepath="$PROJECT_DIR$/.idea/ai_ads.iml" />
-    </modules>
-  </component>
-</project>

+ 0 - 7
.idea/other.xml

@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="PySciProjectComponent">
-    <option name="PY_SCI_VIEW" value="true" />
-    <option name="PY_SCI_VIEW_SUGGESTED" value="true" />
-  </component>
-</project>

+ 0 - 6
.idea/sqldialects.xml

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="SqlDialectMappings">
-    <file url="file://$PROJECT_DIR$/utils/DataSearchUtils.py" dialect="GenericSQL" />
-  </component>
-</project>

+ 0 - 6
.idea/vcs.xml

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="VcsDirectoryMappings">
-    <mapping directory="$PROJECT_DIR$" vcs="Git" />
-  </component>
-</project>

BIN
__pycache__/advertiser_strategy_operate.cpython-37.pyc


BIN
__pycache__/ai_callback_handler.cpython-37.pyc


BIN
__pycache__/ai_strategy_request_func.cpython-37.pyc


BIN
__pycache__/ai_strategy_request_func.cpython-38.pyc


BIN
__pycache__/ai_time_task_creative_handler.cpython-37.pyc


+ 0 - 0
logs/advertiser_strategy_operate.log


+ 0 - 36
logs/ai_auto_create.log

@@ -1,36 +0,0 @@
-02/20/2021 10:33:11 AM INFO ai_time_task_creative_server started!
-02/20/2021 10:33:41 AM INFO ***************************************  NEW REQUEST ***************************************
-02/20/2021 10:33:41 AM INFO 账户信息=9792538, 当前进程=15576, 当前进程的主进程=4728,  raw data from request is {'account_id': 9792538}
-02/20/2021 10:35:14 AM INFO ***************************************  NEW REQUEST ***************************************
-02/20/2021 10:35:14 AM INFO 账户信息=9792538, 当前进程=15576, 当前进程的主进程=4728,  raw data from request is {'account_id': 9792538}
-02/20/2021 10:36:11 AM INFO account_id = 9792538, 素材自动上新 ai策略的返回信息:{'code': 0, 'message': {'code': 0, 'message': '异步执行中,等待回调...'}}
-02/20/2021 10:38:28 AM INFO ***************************************  NEW REQUEST ***************************************
-02/20/2021 10:38:28 AM INFO 账户信息=9792538, 当前进程=15576, 当前进程的主进程=4728,  raw data from request is {'account_id': 9792538}
-02/20/2021 10:39:35 AM INFO account_id = 9792538, 高质量素材复建,ai策略的返回信息:{'code': 0, 'message': {'code': 0, 'message': '异步执行中,等待回调...'}}
-02/20/2021 11:09:33 AM INFO ai_time_task_creative_server started!
-02/20/2021 11:09:40 AM INFO ***************************************  NEW REQUEST ***************************************
-02/20/2021 11:09:40 AM INFO 账户信息=9864909, 当前进程=7092, 当前进程的主进程=4728,  raw data from request is {'account_id': 9864909}
-02/20/2021 11:09:49 AM INFO account_id=9864909, app_id=3543632, 高质量素材复建,ai策略的返回信息:{'code': 0, 'message': {'code': 0, 'message': '异步执行中,等待回调...'}}
-02/20/2021 11:09:58 AM INFO account_id=9864909, app_id=3750913, 高质量素材复建,ai策略的返回信息:{'code': 0, 'message': {'code': 0, 'message': '异步执行中,等待回调...'}}
-02/20/2021 11:12:57 AM INFO ***************************************  NEW REQUEST ***************************************
-02/20/2021 11:12:57 AM INFO 账户信息=9864909, 当前进程=7092, 当前进程的主进程=4728,  raw data from request is {'account_id': 9864909}
-02/20/2021 11:18:19 AM INFO account_id=9864909, app_id=3543572, 高质量素材复建,ai策略的返回信息:{'code': 0, 'message': {'code': 0, 'message': '异步执行中,等待回调...'}}
-02/20/2021 11:41:27 AM INFO account_id=9864909, app_id=3750903, 高质量素材复建,ai策略的返回信息:{'code': 0, 'message': {'code': 0, 'message': '异步执行中,等待回调...'}}
-02/20/2021 11:43:47 AM INFO ai_time_task_creative_server started!
-02/20/2021 11:44:03 AM INFO ***************************************  NEW REQUEST ***************************************
-02/20/2021 11:44:03 AM INFO 账户信息=9864909, 当前进程=13008, 当前进程的主进程=4728,  raw data from request is {'account_id': 9864909}
-02/20/2021 11:51:28 AM INFO ai_time_task_creative_server started!
-02/20/2021 11:51:46 AM INFO ***************************************  NEW REQUEST ***************************************
-02/20/2021 11:51:46 AM INFO 账户信息=9864909, 当前进程=10636, 当前进程的主进程=4728,  raw data from request is {'account_id': 9864909}
-02/20/2021 11:53:21 AM INFO account_id=9864909, app_id=3543572, 高质量素材复建,ai策略的返回信息:{'code': 0, 'message': {'code': 0, 'message': '异步执行中,等待回调...'}}
-02/20/2021 11:53:59 AM INFO account_id=9864909, app_id=3750903, 高质量素材复建,ai策略的返回信息:{'code': 0, 'message': {'code': 0, 'message': '异步执行中,等待回调...'}}
-02/20/2021 01:41:07 PM INFO ai_time_task_creative_server started!
-02/20/2021 01:41:12 PM INFO ***************************************  NEW REQUEST ***************************************
-02/20/2021 01:41:12 PM INFO 账户信息=9864909, 当前进程=3244, 当前进程的主进程=4728,  raw data from request is {'account_id': 9864909}
-02/20/2021 01:44:06 PM INFO account_id=9864909, app_id=3543748, 补充遗漏素材,ai策略的返回信息:{'code': 0, 'message': {'code': 0, 'message': '异步执行中,等待回调...'}}
-02/20/2021 01:45:28 PM INFO account_id=9864909, app_id=3543671, 补充遗漏素材,ai策略的返回信息:{'code': 0, 'message': {'code': 0, 'message': '异步执行中,等待回调...'}}
-02/20/2021 01:47:27 PM INFO ai_time_task_creative_server started!
-02/20/2021 01:47:34 PM INFO ***************************************  NEW REQUEST ***************************************
-02/20/2021 01:47:34 PM INFO 账户信息=9864909, 当前进程=4276, 当前进程的主进程=4728,  raw data from request is {'account_id': 9864909}
-02/20/2021 01:47:51 PM INFO account_id=9864909, app_id=3543748, 补充遗漏素材,ai策略的返回信息:{'code': 0, 'message': {'code': 0, 'message': '异步执行中,等待回调...'}}
-02/20/2021 01:48:01 PM INFO account_id=9864909, app_id=3543671, 补充遗漏素材,ai策略的返回信息:{'code': 0, 'message': {'code': 0, 'message': '异步执行中,等待回调...'}}

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 119
logs/ai_callback.log


+ 0 - 40
logs/ai_strategy_request.log

@@ -1,40 +0,0 @@
-02/20/2021 10:35:46 AM INFO 账户信息=9792538, 当前进程=15576, 当前进程的主进程=4728
-02/20/2021 10:35:47 AM INFO the res of create campaign is {'code': 0, 'data': {'campaign_create_time': '2021-02-20 10:35:46', 'account_id': 9792538, 'campaign_id': 35058831}, 'message': 'SUCCESS'}
-02/20/2021 10:35:47 AM INFO 广告计划创建成功,campaign_id = 35058831,  ai_strategy_uuid = 2395683b-67d4-4ecf-9833-2fe589228c22
-02/20/2021 10:35:49 AM INFO 策略uuid = 2395683b-67d4-4ecf-9833-2fe589228c22 的请求返回信息:{'code': 0, 'message': '异步执行中,等待回调...'}
-02/20/2021 10:39:29 AM INFO 账户信息=9792538, 当前进程=15576, 当前进程的主进程=4728
-02/20/2021 10:39:31 AM INFO the res of create campaign is {'code': 0, 'data': {'campaign_create_time': '2021-02-20 10:39:29', 'account_id': 9792538, 'campaign_id': 35059274}, 'message': 'SUCCESS'}
-02/20/2021 10:39:31 AM INFO 广告计划创建成功,campaign_id = 35059274,  ai_strategy_uuid = e3d3145e-0ca2-4505-9cfa-53047ecb19fb
-02/20/2021 10:39:33 AM INFO 策略uuid = e3d3145e-0ca2-4505-9cfa-53047ecb19fb 的请求返回信息:{'code': 0, 'message': '异步执行中,等待回调...'}
-02/20/2021 11:09:45 AM INFO 账户信息=9864909, 当前进程=7092, 当前进程的主进程=4728
-02/20/2021 11:09:47 AM INFO the res of create campaign is {'code': 0, 'data': {'campaign_create_time': '2021-02-20 11:09:45', 'account_id': 9864909, 'campaign_id': 35067058}, 'message': 'SUCCESS'}
-02/20/2021 11:09:47 AM INFO 广告计划创建成功,campaign_id = 35067058,  ai_strategy_uuid = 868bb400-51e7-47b2-8ab7-42d3f7dd3c74
-02/20/2021 11:09:49 AM INFO 策略uuid = 868bb400-51e7-47b2-8ab7-42d3f7dd3c74 的请求返回信息:{'code': 0, 'message': '异步执行中,等待回调...'}
-02/20/2021 11:09:53 AM INFO 账户信息=9864909, 当前进程=7092, 当前进程的主进程=4728
-02/20/2021 11:09:55 AM INFO the res of create campaign is {'code': 0, 'data': {'campaign_create_time': '2021-02-20 11:09:53', 'account_id': 9864909, 'campaign_id': 35067380}, 'message': 'SUCCESS'}
-02/20/2021 11:09:55 AM INFO 广告计划创建成功,campaign_id = 35067380,  ai_strategy_uuid = dfc219ab-e918-4d2c-9f46-4a1b0ed7e8fb
-02/20/2021 11:09:58 AM INFO 策略uuid = dfc219ab-e918-4d2c-9f46-4a1b0ed7e8fb 的请求返回信息:{'code': 0, 'message': '异步执行中,等待回调...'}
-02/20/2021 11:18:09 AM INFO 账户信息=9864909, 当前进程=7092, 当前进程的主进程=4728
-02/20/2021 11:18:10 AM INFO the res of create campaign is {'code': 0, 'data': {'campaign_create_time': '2021-02-20 11:18:09', 'account_id': 9864909, 'campaign_id': 35071428}, 'message': 'SUCCESS'}
-02/20/2021 11:18:10 AM INFO 广告计划创建成功,campaign_id = 35071428,  ai_strategy_uuid = 22a85458-a159-4988-8909-6312d32ef35d
-02/20/2021 11:18:14 AM INFO 策略uuid = 22a85458-a159-4988-8909-6312d32ef35d 的请求返回信息:{'code': 0, 'message': '异步执行中,等待回调...'}
-02/20/2021 11:41:15 AM INFO 账户信息=9864909, 当前进程=7092, 当前进程的主进程=4728
-02/20/2021 11:41:17 AM INFO the res of create campaign is {'code': 0, 'data': {'campaign_create_time': '2021-02-20 11:41:15', 'account_id': 9864909, 'campaign_id': 35080886}, 'message': 'SUCCESS'}
-02/20/2021 11:41:17 AM INFO 广告计划创建成功,campaign_id = 35080886,  ai_strategy_uuid = cd6206d1-4a30-4dd3-8bf3-16f1440071f6
-02/20/2021 11:41:22 AM INFO 策略uuid = cd6206d1-4a30-4dd3-8bf3-16f1440071f6 的请求返回信息:{'code': 0, 'message': '异步执行中,等待回调...'}
-02/20/2021 11:52:58 AM INFO 账户信息=9864909, 当前进程=10636, 当前进程的主进程=4728
-02/20/2021 11:53:09 AM INFO 策略uuid = f9cdc8b2-d26e-420b-895d-8863d9c709e9 的请求返回信息:{'code': 0, 'message': '异步执行中,等待回调...'}
-02/20/2021 11:53:53 AM INFO 账户信息=9864909, 当前进程=10636, 当前进程的主进程=4728
-02/20/2021 11:53:57 AM INFO 策略uuid = a7db5ce6-7f86-4140-8415-a2f018c0b73c 的请求返回信息:{'code': 0, 'message': '异步执行中,等待回调...'}
-02/20/2021 01:43:56 PM INFO 账户信息=9864909, 当前进程=3244, 当前进程的主进程=4728
-02/20/2021 01:43:59 PM INFO the res of create campaign is {'code': 0, 'data': {'campaign_create_time': '2021-02-20 13:43:56', 'account_id': 9864909, 'campaign_id': 35101081}, 'message': 'SUCCESS'}
-02/20/2021 01:43:59 PM INFO 广告计划创建成功,campaign_id = 35101081,  ai_strategy_uuid = 70ca1901-36bd-4188-8993-ad6b5fcde22c
-02/20/2021 01:44:02 PM INFO 策略uuid = 70ca1901-36bd-4188-8993-ad6b5fcde22c 的请求返回信息:{'code': 0, 'message': '异步执行中,等待回调...'}
-02/20/2021 01:45:20 PM INFO 账户信息=9864909, 当前进程=3244, 当前进程的主进程=4728
-02/20/2021 01:45:23 PM INFO the res of create campaign is {'code': 0, 'data': {'campaign_create_time': '2021-02-20 13:45:21', 'account_id': 9864909, 'campaign_id': 35101267}, 'message': 'SUCCESS'}
-02/20/2021 01:45:23 PM INFO 广告计划创建成功,campaign_id = 35101267,  ai_strategy_uuid = 35ddb6f3-33fa-4d64-b008-2ae690df89c0
-02/20/2021 01:45:27 PM INFO 策略uuid = 35ddb6f3-33fa-4d64-b008-2ae690df89c0 的请求返回信息:{'code': 0, 'message': '异步执行中,等待回调...'}
-02/20/2021 01:47:45 PM INFO 账户信息=9864909, 当前进程=4276, 当前进程的主进程=4728
-02/20/2021 01:47:51 PM INFO 策略uuid = 8bad8e08-6395-4629-b89d-d9d6483a42aa 的请求返回信息:{'code': 0, 'message': '异步执行中,等待回调...'}
-02/20/2021 01:47:52 PM INFO 账户信息=9864909, 当前进程=4276, 当前进程的主进程=4728
-02/20/2021 01:48:01 PM INFO 策略uuid = 28305b60-1c7f-4d6f-b936-c0ed2dd09c7b 的请求返回信息:{'code': 0, 'message': '异步执行中,等待回调...'}

+ 0 - 15
logs/commonfunction.log

@@ -1,15 +0,0 @@
-02/20/2021 10:33:11 AM INFO common_function_logger started!
-02/20/2021 10:33:58 AM INFO account_id=9792538, app_version=None, the res of getNewVideoList is 暂未新上素材
-02/20/2021 11:09:33 AM INFO common_function_logger started!
-02/20/2021 11:09:45 AM INFO account_id=9864909, app_version=ksjymnnc15-模拟农场2015, the res of getHistoryTopVideoList is 暂未历史爆量素材
-02/20/2021 11:09:53 AM INFO account_id=9864909, app_version=ksjywzsjk-我做手机壳特好看, the res of getHistoryTopVideoList is 暂未历史爆量素材
-02/20/2021 11:40:49 AM INFO account_id=9864909, app_version=ksjydfnh-豆腐女孩, the res of getHistoryTopVideoList is 暂未历史爆量素材
-02/20/2021 11:43:47 AM INFO common_function_logger started!
-02/20/2021 11:51:28 AM INFO common_function_logger started!
-02/20/2021 11:53:47 AM INFO account_id=9864909, app_version=ksjydfnh-豆腐女孩, the res of getHistoryTopVideoList is 暂未历史爆量素材
-02/20/2021 01:41:07 PM INFO common_function_logger started!
-02/20/2021 01:43:35 PM INFO account_id=9864909, app_version=ksjyxdldl-新斗罗大陆, the res of getCreateZeroVideoList is 暂未关联创意数为0素材
-02/20/2021 01:45:08 PM INFO account_id=9864909, app_version=ksjyqljzs-桥梁建造师2, the res of getCreateZeroVideoList is 暂未关联创意数为0素材
-02/20/2021 01:47:27 PM INFO common_function_logger started!
-02/20/2021 01:47:45 PM INFO account_id=9864909, app_version=ksjyxdldl-新斗罗大陆, the res of getCreateZeroVideoList is 暂未关联创意数为0素材
-02/20/2021 01:47:52 PM INFO account_id=9864909, app_version=ksjyqljzs-桥梁建造师2, the res of getCreateZeroVideoList is 暂未关联创意数为0素材

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 47
manual_request_json.py


+ 9 - 3
time_task/time_task_ai_auto_creative.py

@@ -4,6 +4,7 @@ import datetime
 import json
 import pandas as pd
 from sqlalchemy import create_engine
+import uuid
 
 db_con_str = "mysql+pymysql://%s:%s@%s:%d/%s" % ("data", "hcst@2021", "139.186.27.96", 4000, "jeecg-boot")
 engine = create_engine(db_con_str, connect_args={'charset': 'utf8'})
@@ -17,7 +18,8 @@ def send_request(account_id):
 
 
 # 0、 打印该定时任务被调用的时间
-print("*************************", datetime.datetime.now(),"*************************")
+unique_uuid = str(uuid.uuid4())
+print("***********", "素材自动上新-Start, unique_uuid = ", unique_uuid, datetime.datetime.now(), "**************")
 
 # 1、获取已有的账号
 sql = """
@@ -31,19 +33,23 @@ print(acc_list)
 batch_num = 5
 for i in range(0, len(acc_list), batch_num):
     if i + batch_num < len(acc_list):
-        print(tuple(acc_list[i:i+batch_num]))
+        print(datetime.datetime.now(), tuple(acc_list[i:i+batch_num]))
         with ThreadPoolExecutor(max_workers=batch_num) as pool:
             results = pool.map(send_request, tuple(acc_list[i: i+batch_num]))
             for r in results:
                 print('res = %s' % r)
     else:
         with ThreadPoolExecutor(max_workers=batch_num) as pool:
-            print(acc_list[i: len(acc_list)])
+            print(datetime.datetime.now(), acc_list[i: len(acc_list)])
             results = pool.map(send_request, tuple(acc_list[i: len(acc_list)]))
             for r in results:
                 print('res = %s' % r)
 
 
+# 3、 打印该定时任务结束的时间
+print("***********", "素材自动上新-End, unique_uuid = ", unique_uuid, datetime.datetime.now(), "**************")
+
+
 
 
 

+ 7 - 4
time_task/time_task_ai_check_and_up_to_full_creative.py

@@ -4,6 +4,7 @@ import datetime
 import json
 import pandas as pd
 from sqlalchemy import create_engine
+import uuid
 
 
 db_con_str = "mysql+pymysql://%s:%s@%s:%d/%s" % ("data", "hcst@2021", "139.186.27.96", 4000, "jeecg-boot")
@@ -18,7 +19,8 @@ def send_request(account_id):
 
 
 # 0、 打印该定时任务被调用的时间
-print("*************************", datetime.datetime.now(), "*************************")
+unique_uuid = str(uuid.uuid4())
+print("***********", "补满创意-Start, unique_uuid = ", unique_uuid, datetime.datetime.now(), "**************")
 
 # 1、获取已有的账号
 sql = """
@@ -32,19 +34,20 @@ print(acc_list)
 batch_num = 5
 for i in range(0, len(acc_list), batch_num):
     if i + batch_num < len(acc_list):
-        print(tuple(acc_list[i:i+batch_num]))
+        print(datetime.datetime.now(), tuple(acc_list[i:i+batch_num]))
         with ThreadPoolExecutor(max_workers=batch_num) as pool:
             results = pool.map(send_request, tuple(acc_list[i: i+batch_num]))
             for r in results:
                 print('res = %s' % r)
     else:
         with ThreadPoolExecutor(max_workers=batch_num) as pool:
-            print(acc_list[i: len(acc_list)])
+            print(datetime.datetime.now(), acc_list[i: len(acc_list)])
             results = pool.map(send_request, tuple(acc_list[i: len(acc_list)]))
             for r in results:
                 print('res = %s' % r)
 
-
+# 3、 打印该定时任务结束的时间
+print("***********", "补满创意-End, unique_uuid = ", unique_uuid, datetime.datetime.now(), "**************")
 
 
 

+ 7 - 5
time_task/time_task_ai_high_quality_material.py

@@ -4,7 +4,7 @@ import datetime
 import json
 import pandas as pd
 from sqlalchemy import create_engine
-
+import uuid
 
 db_con_str = "mysql+pymysql://%s:%s@%s:%d/%s" % ("data", "hcst@2021", "139.186.27.96", 4000, "jeecg-boot")
 engine = create_engine(db_con_str, connect_args={'charset': 'utf8'})
@@ -18,7 +18,8 @@ def send_request(account_id):
 
 
 # 0、 打印该定时任务被调用的时间
-print("*************************", datetime.datetime.now(), "*************************")
+unique_uuid = str(uuid.uuid4())
+print("***********", "高质量素材复建-Start, unique_uuid = ", unique_uuid, datetime.datetime.now(), "**************")
 
 # 1、获取已有的账号
 sql = """
@@ -32,19 +33,20 @@ print(acc_list)
 batch_num = 5
 for i in range(0, len(acc_list), batch_num):
     if i + batch_num < len(acc_list):
-        print(tuple(acc_list[i:i + batch_num]))
+        print(datetime.datetime.now(),tuple(acc_list[i:i + batch_num]))
         with ThreadPoolExecutor(max_workers=batch_num) as pool:
             results = pool.map(send_request, tuple(acc_list[i: i+batch_num]))
             for r in results:
                 print('res = %s' % r)
     else:
         with ThreadPoolExecutor(max_workers=batch_num) as pool:
-            print(acc_list[i: len(acc_list)])
+            print(datetime.datetime.now(),acc_list[i: len(acc_list)])
             results = pool.map(send_request, tuple(acc_list[i: len(acc_list)]))
             for r in results:
                 print('res = %s' % r)
 
-
+# 3、 打印该定时任务结束的时间
+print("***********", "高质量素材复建-End, unique_uuid = ", unique_uuid, datetime.datetime.now(), "**************")
 
 
 

+ 4 - 2
time_task/time_task_ai_high_quality_material_test.py

@@ -32,8 +32,10 @@ print(acc_list)
 # 233账号: 9864909 登陆账号: jy20201254@163.com 密码:jysz12345
 # 消消消账号: 6020747 登陆账号: 15715158532 密码:xxx@112233
 # 斗地主账号:8067888  登陆账号: 13699377642 密码:yg@12345
-acc_list = [9792538, 9864909, 6020747, 8067888]
-# acc_list = [9881494,9881495,9881496,9881497,9881498,9881499,  9881500,9881502,9881504,9881505,9881506,9881507]
+# acc_list = [9724424, 9882729]
+# acc_list = [9724424, 9882729]
+# acc_list = [9881436, 8026440]
+acc_list = [8026440]
 print(acc_list)
 
 # 2、 5个账户一组进行发送请求

+ 7 - 4
time_task/time_task_ai_historical_missing_material.py

@@ -4,6 +4,7 @@ import datetime
 import json
 import pandas as pd
 from sqlalchemy import create_engine
+import uuid
 
 
 db_con_str = "mysql+pymysql://%s:%s@%s:%d/%s" % ("data", "hcst@2021", "139.186.27.96", 4000, "jeecg-boot")
@@ -18,7 +19,8 @@ def send_request(account_id):
 
 
 # 0、 打印该定时任务被调用的时间
-print("*************************", datetime.datetime.now(), "*************************")
+unique_uuid = str(uuid.uuid4())
+print("***********", "补充历史遗漏素材-Start, unique_uuid = ", unique_uuid, datetime.datetime.now(), "**************")
 
 
 # 1、获取已有的账号
@@ -33,19 +35,20 @@ print(acc_list)
 batch_num = 5
 for i in range(0, len(acc_list), batch_num):
     if i + batch_num < len(acc_list):
-        print(tuple(acc_list[i:i + batch_num]))
+        print(datetime.datetime.now(), tuple(acc_list[i:i + batch_num]))
         with ThreadPoolExecutor(max_workers=batch_num) as pool:
             results = pool.map(send_request, tuple(acc_list[i: i+batch_num]))
             for r in results:
                 print('res = %s' % r)
     else:
         with ThreadPoolExecutor(max_workers=batch_num) as pool:
-            print(acc_list[i: len(acc_list)])
+            print(datetime.datetime.now(), acc_list[i: len(acc_list)])
             results = pool.map(send_request, tuple(acc_list[i: len(acc_list)]))
             for r in results:
                 print('res = %s' % r)
 
-
+# 3、 打印该定时任务结束的时间
+print("***********", "补充历史遗漏素材-End, unique_uuid = ", unique_uuid, datetime.datetime.now(), "**************")
 
 
 

+ 3 - 2
time_task/time_task_ai_historical_missing_material_test.py

@@ -11,7 +11,8 @@ engine = create_engine(db_con_str, connect_args={'charset': 'utf8'})
 
 
 def send_request(account_id):
-    url = 'http://139.186.27.96:31012/ai_historical_missing_material'
+    url = 'http://192.168.1.193:31012/ai_historical_missing_material'
+    # url = 'http://139.186.27.96:31012/ai_historical_missing_material'
     request_data = json.dumps({"account_id": account_id})
     request = requests.post(url, request_data)
     return json.loads(request.text)
@@ -32,7 +33,7 @@ print(acc_list)
 # 233账号: 9864909 登陆账号: jy20201254@163.com 密码:jysz12345
 # 消消消账号: 6020747 登陆账号: 15715158532 密码:xxx@112233
 # 斗地主账号:8067888  登陆账号: 13699377642 密码:yg@12345
-acc_list = [9792538, 9864909, 6020747, 8067888]
+acc_list = [9881436]
 print(acc_list)
 
 # 2、 5个账户一组进行发送请求

+ 7 - 4
time_task/time_task_ai_program_creative_high_quality_materials.py

@@ -4,6 +4,7 @@ import datetime
 import json
 import pandas as pd
 from sqlalchemy import create_engine
+import uuid
 
 db_con_str = "mysql+pymysql://%s:%s@%s:%d/%s" % ("data", "hcst@2021", "139.186.27.96", 4000, "jeecg-boot")
 engine = create_engine(db_con_str, connect_args={'charset': 'utf8'})
@@ -17,7 +18,8 @@ def send_request(account_id):
 
 
 # 0、 打印该定时任务被调用的时间
-print("*************************", datetime.datetime.now(), "*************************")
+unique_uuid = str(uuid.uuid4())
+print("***********", "程序化高质量-Start, unique_uuid = ", unique_uuid, datetime.datetime.now(), "**************")
 
 # 1、获取已有的账号
 sql = """
@@ -31,19 +33,20 @@ print(acc_list)
 batch_num = 5
 for i in range(0, len(acc_list), batch_num):
     if i + batch_num < len(acc_list):
-        print(tuple(acc_list[i:i+batch_num]))
+        print(datetime.datetime.now(), tuple(acc_list[i:i+batch_num]))
         with ThreadPoolExecutor(max_workers=batch_num) as pool:
             results = pool.map(send_request, tuple(acc_list[i: i+batch_num]))
             for r in results:
                 print('res = %s' % r)
     else:
         with ThreadPoolExecutor(max_workers=batch_num) as pool:
-            print(acc_list[i: len(acc_list)])
+            print(datetime.datetime.now(), acc_list[i: len(acc_list)])
             results = pool.map(send_request, tuple(acc_list[i: len(acc_list)]))
             for r in results:
                 print('res = %s' % r)
 
-
+# 3、 打印该定时任务结束的时间
+print("***********", "程序化高质量-End, unique_uuid = ", unique_uuid, datetime.datetime.now(), "**************")
 
 
 

+ 7 - 4
time_task/time_task_ai_program_creative_new_materials.py

@@ -4,6 +4,7 @@ import datetime
 import json
 import pandas as pd
 from sqlalchemy import create_engine
+import uuid
 
 db_con_str = "mysql+pymysql://%s:%s@%s:%d/%s" % ("data", "hcst@2021", "139.186.27.96", 4000, "jeecg-boot")
 engine = create_engine(db_con_str, connect_args={'charset': 'utf8'})
@@ -17,7 +18,8 @@ def send_request(account_id):
 
 
 # 0、 打印该定时任务被调用的时间
-print("*************************", datetime.datetime.now(), "*************************")
+unique_uuid = str(uuid.uuid4())
+print("***********", "程序化上新-Start, unique_uuid = ", unique_uuid, datetime.datetime.now(), "**************")
 
 # 1、获取已有的账号
 sql = """
@@ -32,19 +34,20 @@ print(acc_list)
 batch_num = 5
 for i in range(0, len(acc_list), batch_num):
     if i + batch_num < len(acc_list):
-        print(tuple(acc_list[i:i+batch_num]))
+        print(datetime.datetime.now(), tuple(acc_list[i:i+batch_num]))
         with ThreadPoolExecutor(max_workers=batch_num) as pool:
             results = pool.map(send_request, tuple(acc_list[i: i+batch_num]))
             for r in results:
                 print('res = %s' % r)
     else:
         with ThreadPoolExecutor(max_workers=batch_num) as pool:
-            print(acc_list[i: len(acc_list)])
+            print(datetime.datetime.now(), acc_list[i: len(acc_list)])
             results = pool.map(send_request, tuple(acc_list[i: len(acc_list)]))
             for r in results:
                 print('res = %s' % r)
 
-
+# 3、 打印该定时任务结束的时间
+print("***********", "程序化上新-End, unique_uuid = ", unique_uuid, datetime.datetime.now(), "**************")
 
 
 

BIN
utils/__pycache__/BaseClass.cpython-37.pyc


BIN
utils/__pycache__/BaseClass.cpython-38.pyc


BIN
utils/__pycache__/CommonFunction.cpython-37.pyc


BIN
utils/__pycache__/ConstantConfig.cpython-37.pyc


BIN
utils/__pycache__/DataBaseConfig.cpython-37.pyc


BIN
utils/__pycache__/DataBaseConfig.cpython-38.pyc


BIN
utils/__pycache__/UrlConfig.cpython-37.pyc


BIN
utils/__pycache__/UrlConfig.cpython-38.pyc