airflow-unicore-integration 0.2.0__py3-none-any.whl → 0.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,6 +22,7 @@ from airflow.utils.state import TaskInstanceState
22
22
  from pyunicore import client
23
23
  from pyunicore.credentials import create_credential
24
24
 
25
+ from ..hooks.unicore_hooks import UnicoreHook
25
26
  from ..util.job import JobDescriptionGenerator
26
27
  from ..util.job import NaiveJobDescriptionGenerator
27
28
 
@@ -78,11 +79,18 @@ class UnicoreExecutor(BaseExecutor):
78
79
  overwrite_unicore_credential = executor_config.get( # type: ignore
79
80
  UnicoreExecutor.EXECUTOR_CONFIG_UNICORE_CREDENTIAL_KEY, None
80
81
  ) # task can provide a different credential to use, else default from connection is used
82
+ overwrite_conn_id = executor_config.get( # type: ignore
83
+ UnicoreExecutor.EXECUTOR_CONFIG_UNICORE_CONN_KEY, None
84
+ )
81
85
  token = conf.get("unicore.executor", "AUTH_TOKEN", fallback="")
82
86
  base_url = conf.get(
83
87
  "unicore.executor", "DEFAULT_URL", fallback="http://localhost:8080/DEMO-SITE/rest/core"
84
88
  )
85
89
  credential = create_credential(token=token)
90
+ if overwrite_conn_id is not None:
91
+ hook = UnicoreHook(overwrite_conn_id)
92
+ base_url = hook.get_base_url()
93
+ credential = hook.get_credential()
86
94
  if overwrite_unicore_site is not None:
87
95
  base_url = overwrite_unicore_site
88
96
  if overwrite_unicore_credential is not None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: airflow-unicore-integration
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Running Unicore Jobs from airflow DAGs.
5
5
  Author-email: Christian Böttcher <c.boettcher@fz-juelich.de>
6
6
  License-Expression: BSD-3-Clause
@@ -1,7 +1,7 @@
1
1
  airflow_unicore_integration/__init__.py,sha256=Qy1mlyxe2Y-PPSn0LgIW0sT6BxFuwW4_LGsPBf-Wm4s,549
2
2
  airflow_unicore_integration/executors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  airflow_unicore_integration/executors/run_task_via_supervisor.py,sha256=3ErgPf-Oy3B4Di5yNXhhPkaojIJykvCxMZ9MlKSYPI8,2756
4
- airflow_unicore_integration/executors/unicore_executor.py,sha256=E1nOskWSBmC-ReLRvA8E3bY-G0lpxP403tazlBNhgFQ,5919
4
+ airflow_unicore_integration/executors/unicore_executor.py,sha256=KRkwUVOvVTBTtxlkuL2D9UsSKjavtk8mTRXsMZJT_nI,6289
5
5
  airflow_unicore_integration/hooks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  airflow_unicore_integration/hooks/unicore_hooks.py,sha256=NEJ6sgQCD9AyZO9TA3vOR8RdijqaIX_FqY-Abz74Yys,3148
7
7
  airflow_unicore_integration/operators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -10,9 +10,9 @@ airflow_unicore_integration/operators/unicore_operators.py,sha256=PrcB-riakRUt8D
10
10
  airflow_unicore_integration/policies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  airflow_unicore_integration/util/job.py,sha256=vYyaNzGw2EQWQlDTGO6q4T1gZTHoB9-RIb5KYYd6pAc,10556
12
12
  airflow_unicore_integration/util/launch_script_content.py,sha256=42_aFpaCMmvFmmUxQDGcudkleX1YSK_yYWE8T41NOy0,2915
13
- airflow_unicore_integration-0.2.0.dist-info/licenses/LICENSE,sha256=hZ5ouAedeNr8ClHrQE-RLsgMsARcmv3kSZz7tE2BTJE,1526
14
- airflow_unicore_integration-0.2.0.dist-info/METADATA,sha256=-ifD7f7RX30qQs3OMzsXKeAvo_acGHLigthKu93-rU0,13696
15
- airflow_unicore_integration-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
- airflow_unicore_integration-0.2.0.dist-info/entry_points.txt,sha256=PzEfCLYLSawjiYR-HNBzw8-YGfJxs1nPBULevgBQjoY,147
17
- airflow_unicore_integration-0.2.0.dist-info/top_level.txt,sha256=j45X-uIuOk3oL78iwlpHakMWtUkg__B7zUlJLwmZx6w,28
18
- airflow_unicore_integration-0.2.0.dist-info/RECORD,,
13
+ airflow_unicore_integration-0.2.1.dist-info/licenses/LICENSE,sha256=hZ5ouAedeNr8ClHrQE-RLsgMsARcmv3kSZz7tE2BTJE,1526
14
+ airflow_unicore_integration-0.2.1.dist-info/METADATA,sha256=tCUfwjb256THL9La8bfC5KU9BUPqaqjUoflDcG5eyUk,13696
15
+ airflow_unicore_integration-0.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
+ airflow_unicore_integration-0.2.1.dist-info/entry_points.txt,sha256=PzEfCLYLSawjiYR-HNBzw8-YGfJxs1nPBULevgBQjoY,147
17
+ airflow_unicore_integration-0.2.1.dist-info/top_level.txt,sha256=j45X-uIuOk3oL78iwlpHakMWtUkg__B7zUlJLwmZx6w,28
18
+ airflow_unicore_integration-0.2.1.dist-info/RECORD,,