Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Lavocat
yggdrasil
Commits
01d2e533
Commit
01d2e533
authored
Jul 24, 2017
by
lavocat
Browse files
Log improvement
parent
95d03393
Changes
1
Hide whitespace changes
Inline
Side-by-side
yggdrasil/isengard/isengardc.py
View file @
01d2e533
...
@@ -366,7 +366,7 @@ class Isengard:
...
@@ -366,7 +366,7 @@ class Isengard:
def
_connector_error
(
self
,
txt
):
def
_connector_error
(
self
,
txt
):
self
.
spawned_lock
.
acquire
()
self
.
spawned_lock
.
acquire
()
arguments
=
txt
.
split
(
"connector:"
)[
1
].
split
(
";"
)
arguments
=
txt
.
split
(
"connector:"
)[
1
].
split
(
";"
)
#self.flushprint(arguments)
#self.flushprint(
consts.bold("connector error "+
arguments)
)
if
"Possible precedence issue with control "
not
in
arguments
[
2
]
:
if
"Possible precedence issue with control "
not
in
arguments
[
2
]
:
sp_node
,
index
=
self
.
get_wait_spawned
(
arguments
[
PEER
])
sp_node
,
index
=
self
.
get_wait_spawned
(
arguments
[
PEER
])
if
index
>
-
1
:
if
index
>
-
1
:
...
@@ -410,7 +410,9 @@ class Isengard:
...
@@ -410,7 +410,9 @@ class Isengard:
return
list
(
self
.
error_nodes_s
)
return
list
(
self
.
error_nodes_s
)
def
get_wait_spawned
(
self
,
name
)
:
def
get_wait_spawned
(
self
,
name
)
:
#self.flushprint("get wait spawn {}".format(name))
for
i
in
range
(
0
,
len
(
self
.
wait_spawn
))
:
for
i
in
range
(
0
,
len
(
self
.
wait_spawn
))
:
#self.flushprint("spawn {}".format(name))
if
self
.
wait_spawn
[
i
].
name
==
name
:
if
self
.
wait_spawn
[
i
].
name
==
name
:
return
self
.
wait_spawn
[
i
],
i
return
self
.
wait_spawn
[
i
],
i
return
None
,
-
1
return
None
,
-
1
...
@@ -616,18 +618,20 @@ class Isengard:
...
@@ -616,18 +618,20 @@ class Isengard:
def
spawn_nodes
(
self
,
dest
,
nodes
,
synch
,
taktuk
=
True
):
def
spawn_nodes
(
self
,
dest
,
nodes
,
synch
,
taktuk
=
True
):
self
.
spawned_lock
.
acquire
()
self
.
spawned_lock
.
acquire
()
#self.
log_time
("spawn request received")
#self.
flushprint
("spawn request received")
# parse the asked nodes following those rules :
# parse the asked nodes following those rules :
for
node
in
self
.
helper
.
build_list
(
nodes
)
:
for
node
in
self
.
helper
.
build_list
(
nodes
)
:
# create an object to follow the updates of the node
# create an object to follow the updates of the node
sp_node
=
Spawned
(
node
)
sp_node
=
Spawned
(
node
)
self
.
wait_spawn
.
append
(
sp_node
)
self
.
wait_spawn
.
append
(
sp_node
)
# self.flushprint("add node {}".format(node))
# add the nodes to the wait_start_list, this list will be used to
# add the nodes to the wait_start_list, this list will be used to
# propagate the state information.
# propagate the state information.
self
.
to_wait_start
=
len
(
self
.
wait_spawn
)
self
.
to_wait_start
=
len
(
self
.
wait_spawn
)
#self.flushprint("lock release {}".format(len(self.wait_spawn)))
self
.
spawned_lock
.
release
()
self
.
spawned_lock
.
release
()
self
.
final_spawn_nodes
(
dest
,
nodes
,
synch
,
taktuk
)
self
.
final_spawn_nodes
(
dest
,
nodes
,
synch
,
taktuk
)
#self.
log_time
("spawn request send to taktuk")
#self.
flushprint
("spawn request send to taktuk")
def
final_spawn_nodes
(
self
,
dest
,
nodes
,
synch
,
taktuk
=
True
):
def
final_spawn_nodes
(
self
,
dest
,
nodes
,
synch
,
taktuk
=
True
):
if
taktuk
:
if
taktuk
:
...
...
Write
Preview
Supports
Markdown
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