lierqiang 2 years ago
parent
commit
5749091175
1 changed files with 8 additions and 0 deletions
  1. 8 0
      server/conf_task.py

+ 8 - 0
server/conf_task.py

@@ -322,9 +322,17 @@ def getAllTask():
             return jsonify({'code': '200', 'result': [], 'message': '没有更多任务'})
         task_list = list()
         for task_info in result:
+            source = task_info['source']
+            task_type = task_info['task_type']
+            source_sql = f'select * from crawler_source where source="{source}"'
+            source_info = mysql_con.get_values(source_sql)
+            task_type_sql = f'select * from crawler_task_type where task_type="{task_type}"'
+            type_info = mysql_con.get_values(task_type_sql)
             task_data = dict(
                 task_id=task_info['task_id'],
                 task_name=task_info['task_name'],
+                source_name=source_info['source_desc'],
+                task_type_name=type_info['task_type_desc'],
                 source=task_info['source'],
                 task_type=task_info['task_type'],
                 create_task_user=task_info['create_task_user'],