Commit ae7e0e23 authored by Benjamin Blanc's avatar Benjamin Blanc

erp5_bootstrap: hack to for ce load balancing

parent 285d27f3
...@@ -162,6 +162,26 @@ if scalability: ...@@ -162,6 +162,26 @@ if scalability:
waitFor0PendingActivities() waitFor0PendingActivities()
print "Scalability business configuration building: done." print "Scalability business configuration building: done."
# XXX: Hack to perform load balacing
# TODO: Use an other way to do the load balancing (for example
# using zope.conf, and using family-zope group names).
# Apply load balacing
if count == 0:
print "Load balacing.."
try:
zope_connection = getConnection()
zope_connection.request(
'GET', '/%%s/apply_load_balancing_scalability' %%site_id,
headers=header_dict
)
result = zope_connection.getresponse()
assert("Processing Nodes" in result.read())
# Wait activities
waitFor0PendingActivities()
print "Load balancing init: done."
except:
print "Load balancing init: fail."
# Create scalability users # Create scalability users
if testIfExist("/%%s/person_module/scalability_user/getTitle" %%site_id) \ if testIfExist("/%%s/person_module/scalability_user/getTitle" %%site_id) \
and not testIfExist("/%%s/person_module/scalability_user_0/getTitle" %%site_id): and not testIfExist("/%%s/person_module/scalability_user_0/getTitle" %%site_id):
......
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