airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] ashb closed pull request #2548: [AIRFLOW-1540] Add proxies to Slack Operator
Date Thu, 01 Nov 2018 20:44:00 GMT
ashb closed pull request #2548: [AIRFLOW-1540] Add proxies to Slack Operator
URL: https://github.com/apache/incubator-airflow/pull/2548
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/airflow/operators/slack_operator.py b/airflow/operators/slack_operator.py
index 2e6d4269fa..dd6947d5fb 100644
--- a/airflow/operators/slack_operator.py
+++ b/airflow/operators/slack_operator.py
@@ -38,11 +38,13 @@ class SlackAPIOperator(BaseOperator):
     def __init__(self,
                  token='unset',
                  method='unset',
+                 proxies=None,
                  api_params=None,
                  *args, **kwargs):
         super(SlackAPIOperator, self).__init__(*args, **kwargs)
         self.token = token
         self.method = method
+        self.proxies = proxies
         self.api_params = api_params
 
     def construct_api_call_params(self):
@@ -63,7 +65,7 @@ def execute(self, **kwargs):
         """
         if not self.api_params:
             self.construct_api_call_params()
-        sc = SlackClient(self.token)
+        sc = SlackClient(self.token, self.proxies)
         rc = sc.api_call(self.method, **self.api_params)
         if not rc['ok']:
             logging.error("Slack API call failed ({})".format(rc['error']))


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message