Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tapasco
tapasco
Commits
9374818a
Commit
9374818a
authored
Jun 03, 2019
by
Lukas Weber
Committed by
Lukas Sommer
Jun 04, 2019
Browse files
Added a Status Message on Fail or Finish of current stage.
parent
279fb16c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/scala/tapasco/activity/composers/VivadoComposer.scala
View file @
9374818a
...
...
@@ -85,8 +85,9 @@ class VivadoComposer()(implicit cfg: Configuration) extends Composer {
stdoutString
=>
logger
.
trace
(
"Vivado: {}"
,
stdoutString
),
stderrString
=>
logger
.
trace
(
"Vivado ERR: {}"
,
stderrString
)
))
lt
.
closeAll
()
pt
.
close
All
(
)
pt
.
close
WithReturnCode
(
r
)
// check retcode
if
(
r
==
InterruptibleProcess
.
TIMEOUT_RETCODE
)
{
...
...
src/main/scala/tapasco/filemgmt/ProgressTrackingFileWatcher.scala
View file @
9374818a
...
...
@@ -77,13 +77,6 @@ class ProgressTrackingFileWatcher(_logger: Option[Logger] = None, pollInterval:
val
progressionString
=
progressionStringsInfo
(
currentState
).
_2
logger
.
info
(
"Started %s (Total Elapsed: %s)"
.
format
(
progressionString
,
timeString
(
start
)))
stageStart
=
System
.
currentTimeMillis
()
//This ensures that this watcher will close all opened files if he reaches the final state.
if
(
currentState
==
progressionStringsInfo
.
length
)
{
closeAll
()
}
}
}
...
...
@@ -98,6 +91,20 @@ class ProgressTrackingFileWatcher(_logger: Option[Logger] = None, pollInterval:
f
"${dur.toHours}%d:${dur.toMinutes % 60}%02d:${dur.toSeconds % 60}%02d"
}
/**
* Closes all Files watched by this Watcher and give a corresponding result message based on the return code.
* @param returnCode return code
*/
def
closeWithReturnCode
(
returnCode
:
Int
)
:
Unit
=
{
if
(
returnCode
==
0
)
{
logger
.
info
(
"Finished %s after %s (Total Elapsed: %s)"
.
format
(
progressionStringsInfo
(
currentState
-
1
).
_2
,
timeString
(
stageStart
),
timeString
(
start
)))
super
.
closeAll
()
}
else
{
logger
.
error
(
"%s failed after %s (Total Elapsed: %s)"
.
format
(
progressionStringsInfo
(
currentState
).
_2
,
timeString
(
stageStart
),
timeString
(
start
)))
super
.
closeAll
()
}
}
addListener
(
listener
)
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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