Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
biopet.biopet
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
biopet.biopet
Commits
16068896
Commit
16068896
authored
10 years ago
by
Peter van 't Hof
Browse files
Options
Downloads
Patches
Plain Diff
Added version cache
parent
9b5aa989
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunctionTrait.scala
+12
-1
12 additions, 1 deletion
...umc/sasc/biopet/core/BiopetCommandLineFunctionTrait.scala
with
12 additions
and
1 deletion
biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/BiopetCommandLineFunctionTrait.scala
+
12
−
1
View file @
16068896
...
...
@@ -92,7 +92,7 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
protected
def
versionCommand
:
String
=
null
protected
val
versionRegex
:
Regex
=
null
protected
val
versionExitcode
=
List
(
0
)
// Can select multiple
def
getVersion
:
String
=
{
private
def
getVersion
Internal
:
String
=
{
if
(
versionCommand
==
null
||
versionRegex
==
null
)
return
"N/A"
val
stdout
=
new
StringBuffer
()
val
stderr
=
new
StringBuffer
()
...
...
@@ -114,6 +114,12 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
return
"N/A"
}
def
getVersion
:
String
=
{
if
(!
BiopetCommandLineFunctionTrait
.
versionCache
.
contains
(
executable
))
BiopetCommandLineFunctionTrait
.
versionCache
+=
executable
->
getVersionInternal
return
BiopetCommandLineFunctionTrait
.
versionCache
(
executable
)
}
def
getThreads
(
default
:
Int
)
:
Int
=
{
val
maxThreads
:
Int
=
config
(
"maxthreads"
,
default
=
8
)
val
threads
:
Int
=
config
(
"threads"
,
default
=
default
)
...
...
@@ -128,3 +134,8 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
else
return
maxThreads
}
}
object
BiopetCommandLineFunctionTrait
{
import
scala.collection.mutable.Map
private
val
versionCache
:
Map
[
String
,
String
]
=
Map
()
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment