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

wendelin_relay: support forwarding to multiple wendelin

parent 5ac6e94f
Pipeline #4350 skipped
......@@ -7,7 +7,8 @@ import urllib
import urllib2
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"]:
return
data = urllib.urlencode({'data_chunk': data_chunk})
......@@ -19,4 +20,7 @@ def IngestionPolicy_forward(self, reference, data_chunk):
configuration_dict["username"],
configuration_dict["password"])).replace('\n', '')
request.add_header("Authorization", "Basic %s" % base64string)
try:
urllib2.urlopen(request, timeout=configuration_dict["timeout"])
except:
pass
......@@ -45,7 +45,9 @@
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
<tuple>
<string>W: 25, 4: No exception type(s) specified (bare-except)</string>
</tuple>
</value>
</item>
<item>
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>IngestionPolicy_getWendelinRelayConfigurationDict</string> </value>
<value> <string>IngestionPolicy_getWendelinRelayConfigurationDictList</string> </value>
</item>
</dictionary>
</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