Commit 9649e62d authored by Benjamin Blanc's avatar Benjamin Blanc

erp5_bootstrap: For use of random id generator

parent 8c1bbc5f
...@@ -162,6 +162,22 @@ if scalability: ...@@ -162,6 +162,22 @@ if scalability:
waitFor0PendingActivities() waitFor0PendingActivities()
print "Scalability business configuration building: done." print "Scalability business configuration building: done."
# Force to use random id generator
print "Force to use random id.."
try:
zope_connection = getConnection()
zope_connection.request(
'GET', '/%%s/use_random_id_scalability' %%site_id,
headers=header_dict
)
result = zope_connection.getresponse()
assert(result.read()=="1")
# Wait activities
waitFor0PendingActivities()
print "use_random_id_scalability: done."
except:
print "use_random_id_scalability: 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):
...@@ -197,7 +213,6 @@ if scalability: ...@@ -197,7 +213,6 @@ if scalability:
print "Update roles: fail. (but may be already done before)" print "Update roles: fail. (but may be already done before)"
time.sleep(30) time.sleep(30)
# XXX: Hack to perform load balacing # XXX: Hack to perform load balacing
# TODO: Use an other way to do the load balancing (for example # TODO: Use an other way to do the load balancing (for example
# using zope.conf, and using family-zope group names). # using zope.conf, and using family-zope group names).
...@@ -219,3 +234,5 @@ if scalability: ...@@ -219,3 +234,5 @@ if scalability:
except: except:
print "Load balancing init: fail." print "Load balancing init: fail."
# sleep
time.sleep(30)
\ No newline at end of file
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