소스 검색

fix: task None bug

Zhang Li 2 년 전
부모
커밋
37595717c4
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      app/core/airflow/task.py

+ 5 - 1
app/core/airflow/task.py

@@ -112,8 +112,12 @@ class SparksTaskCompiler(TaskCompiler):
                       "executor-memory": "1g",
                       "executor-cores": 1,
                       "num-executors": 1,
-                      "archives": f"{self.task.envs.get('requirement_package_path','/workspace/py37.zip')}#python3env"
+                      "archives": "/workspace/py37.zip'#python3env"
                       }
+        if item:
+            parameters.update({
+                "archives": f"{self.task.envs.get('requirement_package_path', '/workspace/py37.zip')}#python3env"
+            })
         spark_config = {'spark.default.parallelism': 1,
                         "spark.executor.memoryOverhead": "1g",
                         "spark.driver.memoryOverhead": "1g",