Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
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
Roque
erp5
Commits
25a70167
Commit
25a70167
authored
May 05, 2020
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_test_result: take care of timeouts when we invalidate test nodes
parent
b01ef532
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TaskDistributorAlarm_optimize.py
...l_skins/erp5_test_result/TaskDistributorAlarm_optimize.py
+10
-1
No files found.
bt5/erp5_test_result/SkinTemplateItem/portal_skins/erp5_test_result/TaskDistributorAlarm_optimize.py
View file @
25a70167
...
@@ -6,16 +6,25 @@ now = DateTime()
...
@@ -6,16 +6,25 @@ now = DateTime()
list_node
=
context
.
portal_catalog
(
list_node
=
context
.
portal_catalog
(
portal_type
=
"Test Node"
,
portal_type
=
"Test Node"
,
)
)
old_date
=
now
-
1.0
/
24
*
11
default_
old_date
=
now
-
1.0
/
24
*
11
for
test_node
in
list_node
:
for
test_node
in
list_node
:
old_date
=
default_old_date
test_node
=
test_node
.
getObject
()
test_node
=
test_node
.
getObject
()
ping_date
=
test_node
.
getPingDate
()
ping_date
=
test_node
.
getPingDate
()
validation_state
=
test_node
.
getValidationState
()
validation_state
=
test_node
.
getValidationState
()
distributor
=
test_node
.
getSpecialiseValue
()
if
distributor
is
not
None
:
timeout_method
=
getattr
(
distributor
,
'getProcessTimeout'
,
None
)
if
timeout_method
is
not
None
:
timeout
=
timeout_method
()
if
timeout
:
old_date
=
now
-
float
(
timeout
)
/
(
24
*
3600
)
if
validation_state
==
'validated'
:
if
validation_state
==
'validated'
:
if
ping_date
is
not
None
:
if
ping_date
is
not
None
:
if
ping_date
<=
old_date
:
if
ping_date
<=
old_date
:
test_node
.
invalidate
()
test_node
.
invalidate
()
elif
validation_state
==
'invalidated'
:
elif
validation_state
==
'invalidated'
:
__traceback_info__
=
test_node
if
test_node
.
getSpecialise
():
if
test_node
.
getSpecialise
():
test_node
.
getSpecialiseValue
().
cleanupInvalidatedTestNode
(
test_node
)
test_node
.
getSpecialiseValue
().
cleanupInvalidatedTestNode
(
test_node
)
...
...
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