[ 
https://issues.apache.org/jira/browse/AIRFLOW-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16672166#comment-16672166
 ] 

ASF GitHub Bot commented on AIRFLOW-1540:
-----------------------------------------

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:
[email protected]


> Airflow 1.8.1 - Add proxies to slack operator
> ---------------------------------------------
>
>                 Key: AIRFLOW-1540
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1540
>             Project: Apache Airflow
>          Issue Type: New Feature
>          Components: operators
>            Reporter: user_airflow
>            Assignee: user_airflow
>            Priority: Critical
>
> We are trying to use slack operator from the cloud server that use proxies to 
> connect open internet including slack. Currently the connection to Slack APIs 
> fail everytime with connection timed out. Need to include proxies option in 
> Slack operator to resolve the issue.
> Pull request created: https://github.com/apache/incubator-airflow/pull/2548



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to