You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/12/06 01:38:06 UTC
[GitHub] [airflow] potiuk commented on pull request #17576: Add pre/post execution hooks
potiuk commented on pull request #17576:
URL: https://github.com/apache/airflow/pull/17576#issuecomment-986363233
Another possibly interesting use case for pre_execute:
https://apache-airflow.slack.com/archives/CCVDRN0F9/p1638740065139100
Basically adding a "session" attribute that would authorize the call with PythonOperators - defined at a DAG level. Pretty useful IMHO:
```
def authorize(self):
CREDENTIALS, _= google.auth.default(scopes=['https://www.googleapis.com/auth/cloud-platform'])
self.session = AuthorizedSession(CREDENTIALS)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org