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
vecs
FIJI Public
Commits
b98517d7
Commit
b98517d7
authored
Aug 29, 2017
by
Christian Fibich
Committed by
Stefan Tauner
May 04, 2018
Browse files
Check if queue has been ended before appending
parent
45aeb020
Changes
2
Hide whitespace changes
Inline
Side-by-side
bin/Log/Dispatch/QueueAppender.pm
View file @
b98517d7
...
...
@@ -63,7 +63,7 @@ sub log_message {
my
$self
=
shift
;
my
%p
=
@_
;
$self
->
{'
queue
'}
->
enqueue
(
\
%p
);
$self
->
{'
queue
'}
->
enqueue
(
\
%p
)
if
(
!
$self
->
{'
queue
'}
->
{'
ENDED
'})
;
}
1
;
...
...
bin/fiji_ee_gui.pl
View file @
b98517d7
...
...
@@ -101,7 +101,7 @@ sub download_worker {
my
$cont
=
1
;
$SIG
{'
STOP
'}
=
sub
{
$cont
=
0
;
};
$queue_to_gui
->
enqueue
({'
state
'
=>
"
starting
"});
$queue_to_gui
->
enqueue
({'
state
'
=>
"
starting
"})
if
(
!
$queue_to_gui
->
{'
ENDED
'})
;
# We need to re-append the log queue to the logger here because
# the GUI does it after this thread is created and hence the
...
...
@@ -126,7 +126,7 @@ sub download_worker {
my
$worker_msg
=
shift
;
# reply to GUI (intermediate)
$queue_to_gui
->
enqueue
({'
state
'
=>
"
ongoing
",
'
rmsg
'
=>
$worker_msg
});
$queue_to_gui
->
enqueue
({'
state
'
=>
"
ongoing
",
'
rmsg
'
=>
$worker_msg
})
if
(
!
$queue_to_gui
->
{'
ENDED
'})
;
return
$cont
;
},
);
...
...
@@ -139,7 +139,7 @@ sub download_worker {
my
$worker_msg
=
shift
;
# reply to GUI (intermediate)
$queue_to_gui
->
enqueue
({'
state
'
=>
"
ongoing
",
'
rmsg
'
=>
$worker_msg
});
$queue_to_gui
->
enqueue
({'
state
'
=>
"
ongoing
",
'
rmsg
'
=>
$worker_msg
})
if
(
!
$queue_to_gui
->
{'
ENDED
'})
;
return
$cont
;
},
);
...
...
@@ -154,7 +154,7 @@ sub download_worker {
}
# reply to GUI (last message of current work package)
$queue_to_gui
->
enqueue
({'
state
'
=>
"
finished
",
'
rmsg
'
=>
$worker_msg
,
'
testref
'
=>
$testref
});
$queue_to_gui
->
enqueue
({'
state
'
=>
"
finished
",
'
rmsg
'
=>
$worker_msg
,
'
testref
'
=>
$testref
})
if
(
!
$queue_to_gui
->
{'
ENDED
'})
;
}
};
if
(
$@
ne
"")
{
...
...
@@ -162,7 +162,7 @@ sub download_worker {
# Return only first line of what eval returns to the GUI.
# Usually this is something like:
# "ERROR: can't load appenderclass 'Log::Dispatch::QueueAppender'"
$queue_to_gui
->
enqueue
({'
state
'
=>
"
dying
",
'
rmsg
'
=>
(
split
/\n/
,
$@
)[
0
]});
$queue_to_gui
->
enqueue
({'
state
'
=>
"
dying
",
'
rmsg
'
=>
(
split
/\n/
,
$@
)[
0
]})
if
(
!
$queue_to_gui
->
{'
ENDED
'})
;
}
}
...
...
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