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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
slapos
Commits
b44be8f1
Commit
b44be8f1
authored
Jul 26, 2011
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify check for activities running.
parent
7e80f287
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
slapos/recipe/erp5/erp5.py
slapos/recipe/erp5/erp5.py
+10
-5
No files found.
slapos/recipe/erp5/erp5.py
View file @
b44be8f1
...
...
@@ -286,12 +286,18 @@ class ERP5Updater(object):
def
_hasActivityPresent
(
self
):
activity_dict
=
self
.
getSystemSignatureDict
(
"activity_dict"
)
if
activity_dict
[
"total"
]
>
0
:
self
.
log
(
"DEBUG"
,
"Waiting for activities on ERP5..."
)
return
True
return
False
def
_hasFailureActivity
(
self
):
activity_dict
=
self
.
getSystemSignatureDict
(
"activity_dict"
)
if
activity_dict
[
"failure"
]
>
0
:
self
.
log
(
"ERROR"
,
"Update progress found Failure activities"
+
\
"and it will not be able to progress until"
+
\
" activites issue be solved"
)
return
True
return
False
def
run
(
self
):
""" Keep running until kill"""
...
...
@@ -299,12 +305,11 @@ class ERP5Updater(object):
time
.
sleep
(
30
)
if
not
self
.
updateERP5Site
():
self
.
loadSystemSignatureDict
()
if
self
.
_hasFailureActivity
():
time
.
sleep
(
self
.
sleeping_time
)
continue
if
self
.
_hasActivityPresent
():
self
.
log
(
"DEBUG"
,
"Waiting for activities on ERP5..."
)
if
self
.
_hasFailureActivity
():
self
.
log
(
"ERROR"
,
"Update progress found "
+
\
"Failure activities and it will not progress until "
+
\
" activites issue be solved"
)
continue
if
self
.
updateBusinessTemplateList
():
...
...
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