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
tapasco
tapasco
Commits
14c8db46
Commit
14c8db46
authored
Jun 06, 2017
by
Jens Korinth
Browse files
Fix whitespace
parent
fb0730d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/scala/tapasco/Tapasco.scala
View file @
14c8db46
...
...
@@ -18,7 +18,6 @@
//
package
de.tu_darmstadt.cs.esa.tapasco
import
base._
import
jobs.executors._
import
filemgmt._
import
task._
import
itapasco.controller._
...
...
@@ -26,7 +25,7 @@ import parser._
import
slurm._
import
java.nio.file.Path
import
scala.concurrent._
import
scala.concurrent.ExecutionContext.Implicits.global
//
import scala.concurrent.ExecutionContext.Implicits.global
object
Tapasco
{
import
org.slf4j.LoggerFactory
...
...
@@ -68,14 +67,19 @@ object Tapasco {
case
Left
(
ex
)
=>
CommandLineParser
(
args
.
tail
mkString
" "
)
case
r
=>
r
}
logger
.
debug
(
"parsed config: {}"
,
c
)
if
(
c
.
isRight
)
{
// get parsed Configuration
implicit
val
cfg
=
c
.
right
.
get
logger
.
trace
(
"configuring FileAssetManager..."
)
FileAssetManager
(
cfg
)
logger
.
trace
(
"SLURM: {}"
,
cfg
.
slurm
)
if
(
cfg
.
slurm
)
Slurm
.
enabled
=
cfg
.
slurm
FileAssetManager
.
start
()
logger
.
trace
(
"parallel: {}"
,
cfg
.
parallel
)
cfg
.
logFile
map
{
logfile
:
Path
=>
setupLogFileAppender
(
logfile
.
toString
)
}
logger
.
info
(
cfg
.
toString
)
logger
.
info
(
"Running with configuration: {}"
,
cfg
.
toString
)
implicit
val
exe
=
ExecutionContext
.
fromExecutor
(
new
java
.
util
.
concurrent
.
ForkJoinPool
(
250
))
def
get
(
f
:
Future
[
Boolean
])
:
Boolean
=
{
Await
.
ready
(
f
,
duration
.
Duration
.
Inf
);
f
.
value
map
(
_
getOrElse
false
)
getOrElse
false
}
if
(
cfg
.
parallel
)
runGui
(
args
)
||
(
cfg
.
jobs
map
{
j
=>
Future
{
jobs
.
executors
.
execute
(
j
)
}
}
map
(
get
_
)
fold
true
)
(
_
&&
_
)
...
...
src/main/scala/tapasco/filemgmt/FileAssetManager.scala
View file @
14c8db46
...
...
@@ -35,7 +35,7 @@ final object FileAssetManager extends Publisher {
/* @{ default directories */
/** Base directory of TPC, set by TAPASCO_HOME environmment variable. **/
lazy
val
TAPASCO_HOME
=
try
{
Paths
.
get
(
sys
.
env
(
"TAPASCO_HOME"
)).
toAbsolutePath
().
normalize
}
catch
{
case
e
:
NoSuchElementException
=>
catch
{
case
e
:
NoSuchElementException
=>
_logger
.
error
(
"FATAL: TAPASCO_HOME environment variable is not set"
)
throw
e
}
/* @} */
...
...
Jens Korinth
@jk
mentioned in commit
a831b501
·
Jul 14, 2017
mentioned in commit
a831b501
mentioned in commit a831b5015df6bd8f8d23ddd334a3b1159392de92
Toggle commit list
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