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
d46f496c
Commit
d46f496c
authored
Jun 29, 2011
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Output formated timestamp in front of each message.
parent
2dfa0a97
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
slapos/recipe/erp5testnode/testnode.py
slapos/recipe/erp5testnode/testnode.py
+12
-6
No files found.
slapos/recipe/erp5testnode/testnode.py
View file @
d46f496c
...
...
@@ -9,7 +9,7 @@ import socket
import
pprint
import
traceback
from
SlapOSControler
import
SlapOSControler
import
time
class
SubprocessError
(
EnvironmentError
):
def
__init__
(
self
,
status_dict
):
...
...
@@ -22,6 +22,10 @@ class SubprocessError(EnvironmentError):
from
Updater
import
Updater
def
log
(
message
):
# Log to stdout, with a timestamp.
print
time
.
strftime
(
'%Y/%m/%d %H:%M:%S'
),
message
process_group_pid_set
=
set
()
process_pid_file_list
=
[]
process_command_list
=
[]
...
...
@@ -51,8 +55,10 @@ def safeRpcCall(function, *args):
try
:
return
function
(
*
args
)
except
:
traceback
.
print_exc
()
pprint
.
pprint
(
args
)
log
(
'Error in RPC call: %s
\
n
%s'
%
(
traceback
.
format_exc
(),
pprint
.
pformat
(
args
),
))
time
.
sleep
(
retry
)
retry
+=
retry
>>
1
...
...
@@ -175,7 +181,7 @@ branch = %(branch)s
retry_software
=
False
previous_revision
=
revision
print
config
log
(
config
)
portal_url
=
config
[
'test_suite_master_url'
]
test_result_path
=
None
test_result
=
(
test_result_path
,
revision
)
...
...
@@ -191,7 +197,7 @@ branch = %(branch)s
config
[
'test_suite'
],
revision
,
[],
False
,
test_suite_title
,
config
[
'test_node_title'
],
config
[
'project_title'
])
print
"testnode, test_result : %r"
%
(
test_result
,
)
log
(
"testnode, test_result : %r"
%
(
test_result
,
)
)
if
test_result
:
test_result_path
,
test_revision
=
test_result
if
revision
!=
test_revision
:
...
...
@@ -258,5 +264,5 @@ branch = %(branch)s
# Nice way to kill *everything* generated by run process -- process
# groups working only in POSIX compilant systems
# Exceptions are swallowed during cleanup phase
print
"going to kill %r"
%
(
process_group_pid_set
,
)
log
(
"going to kill %r"
%
(
process_group_pid_set
,
)
)
killPreviousRun
(
process_group_pid_set
,
supervisord_pid_file
)
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