Commit 60f581c0 authored by Klaus Wölfel's avatar Klaus Wölfel

wendelin_relay: support forwarding to multiple wendelin

parent 5ac6e94f
...@@ -7,7 +7,8 @@ import urllib ...@@ -7,7 +7,8 @@ import urllib
import urllib2 import urllib2
def IngestionPolicy_forward(self, reference, data_chunk): def IngestionPolicy_forward(self, reference, data_chunk):
configuration_dict = self.IngestionPolicy_getWendelinRelayConfigurationDict() for configuration_dict in \
self.IngestionPolicy_getWendelinRelayConfigurationDictList():
if not configuration_dict["wendelin_url"]: if not configuration_dict["wendelin_url"]:
return return
data = urllib.urlencode({'data_chunk': data_chunk}) data = urllib.urlencode({'data_chunk': data_chunk})
...@@ -19,4 +20,7 @@ def IngestionPolicy_forward(self, reference, data_chunk): ...@@ -19,4 +20,7 @@ def IngestionPolicy_forward(self, reference, data_chunk):
configuration_dict["username"], configuration_dict["username"],
configuration_dict["password"])).replace('\n', '') configuration_dict["password"])).replace('\n', '')
request.add_header("Authorization", "Basic %s" % base64string) request.add_header("Authorization", "Basic %s" % base64string)
try:
urllib2.urlopen(request, timeout=configuration_dict["timeout"]) urllib2.urlopen(request, timeout=configuration_dict["timeout"])
except:
pass
...@@ -45,7 +45,9 @@ ...@@ -45,7 +45,9 @@
<item> <item>
<key> <string>text_content_warning_message</string> </key> <key> <string>text_content_warning_message</string> </key>
<value> <value>
<tuple/> <tuple>
<string>W: 25, 4: No exception type(s) specified (bare-except)</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>IngestionPolicy_getWendelinRelayConfigurationDict</string> </value> <value> <string>IngestionPolicy_getWendelinRelayConfigurationDictList</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment