Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tom Niget
slapos
Commits
119c15d6
Commit
119c15d6
authored
Jul 25, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_bootstrap: Hack to don't wait for the persistent Alarm_installMailServer activity
parent
4c1259c0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
+12
-6
No files found.
slapos/recipe/erp5_bootstrap/template/erp5_bootstrap.in
View file @
119c15d6
...
...
@@ -27,6 +27,12 @@ def getConnection():
else:
raise ValueError("Protocol not implemented")
def testIfExist(page, unexcepted_content="Site Error"):
zope_connection = getConnection()
zope_connection.request('GET', '/%%s/%%s' %%(site_id, page))
result = zope_connection.getresponse()
return not unexcepted_content in result.read()
def waitFor0PendingActivities():
# TODO: tolerate 1 pending activities ? (mail server...)
start_time = time.time()
...
...
@@ -44,11 +50,11 @@ def waitFor0PendingActivities():
print "There is %%d pending activities" %%len(message_list)
time.sleep(5)
def testIfExist(page, unexcepted_content="Site Error"):
zope_connection = getConnection()
zope_connection.request('GET', '/%%s/%%s' %%(site_id, page))
result = zope_connection.getresponse()
return not unexcepted_content in result.read()
#Hack to do not take into account persistent Alarm_installMailServer acitivities
if len(message_list)==0 and testIfExist("/%%s/portal_activities" %%site_id, "Alarm_installMailServer"):
print "1 pending activity for 'Alarm_installMailServer'."
print "ok."
break
# Check if an ERP5 site is already created, as ERP5 does support having
...
...
@@ -102,7 +108,7 @@ if scalability:
and not testIfExist("/%%s/sale_order_module/" %%site_id):
zope_connection = getConnection()
zope_connection.request(
'GET', '/%%s/business_configuration_module/1/build' %%
(business_object_name, site_id)
,
'GET', '/%%s/business_configuration_module/1/build' %%
site_id
,
headers=header_dict
)
print "Build scalability business configuration..."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment