Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos-mynij-dev
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
Mynij
slapos-mynij-dev
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
Show 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):
...
@@ -286,12 +286,18 @@ class ERP5Updater(object):
def
_hasActivityPresent
(
self
):
def
_hasActivityPresent
(
self
):
activity_dict
=
self
.
getSystemSignatureDict
(
"activity_dict"
)
activity_dict
=
self
.
getSystemSignatureDict
(
"activity_dict"
)
if
activity_dict
[
"total"
]
>
0
:
if
activity_dict
[
"total"
]
>
0
:
self
.
log
(
"DEBUG"
,
"Waiting for activities on ERP5..."
)
return
True
return
True
return
False
def
_hasFailureActivity
(
self
):
def
_hasFailureActivity
(
self
):
activity_dict
=
self
.
getSystemSignatureDict
(
"activity_dict"
)
activity_dict
=
self
.
getSystemSignatureDict
(
"activity_dict"
)
if
activity_dict
[
"failure"
]
>
0
:
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
True
return
False
def
run
(
self
):
def
run
(
self
):
""" Keep running until kill"""
""" Keep running until kill"""
...
@@ -299,12 +305,11 @@ class ERP5Updater(object):
...
@@ -299,12 +305,11 @@ class ERP5Updater(object):
time
.
sleep
(
30
)
time
.
sleep
(
30
)
if
not
self
.
updateERP5Site
():
if
not
self
.
updateERP5Site
():
self
.
loadSystemSignatureDict
()
self
.
loadSystemSignatureDict
()
if
self
.
_hasActivityPresent
():
self
.
log
(
"DEBUG"
,
"Waiting for activities on ERP5..."
)
if
self
.
_hasFailureActivity
():
if
self
.
_hasFailureActivity
():
self
.
log
(
"ERROR"
,
"Update progress found "
+
\
time
.
sleep
(
self
.
sleeping_time
)
"Failure activities and it will not progress until "
+
\
continue
" activites issue be solved"
)
if
self
.
_hasActivityPresent
():
continue
continue
if
self
.
updateBusinessTemplateList
():
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