Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
biopet.biopet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Mirrors
biopet.biopet
Commits
84802235
Commit
84802235
authored
Mar 31, 2017
by
Peter van 't Hof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a executioncontext
parent
90c4e1cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/summary/db/SummaryDb.scala
...cala/nl/lumc/sasc/biopet/utils/summary/db/SummaryDb.scala
+9
-3
No files found.
biopet-utils/src/main/scala/nl/lumc/sasc/biopet/utils/summary/db/SummaryDb.scala
View file @
84802235
...
...
@@ -6,8 +6,8 @@ import slick.driver.H2Driver.api._
import
scala.concurrent.ExecutionContext.Implicits.global
import
scala.concurrent.duration.Duration
import
scala.concurrent.
{
Await
,
Future
}
import
java.io.
{
Closeable
,
File
}
import
scala.concurrent.
{
Await
,
ExecutionContext
,
Future
}
import
java.io.
{
Closeable
,
File
}
import
java.sql.Date
import
nl.lumc.sasc.biopet.utils.summary.db.SummaryDb._
...
...
@@ -710,7 +710,13 @@ object SummaryDb {
config
.
setBusyTimeout
(
"10000"
)
config
.
setSynchronous
(
org
.
sqlite
.
SQLiteConfig
.
SynchronousMode
.
FULL
)
config
.
setReadOnly
(
true
)
val
db
=
Database
.
forURL
(
s
"jdbc:sqlite:${file.getAbsolutePath}"
,
driver
=
"org.sqlite.JDBC"
,
prop
=
config
.
toProperties
)
val
asyncExecutor
=
new
AsyncExecutor
{
override
def
executionContext
:
ExecutionContext
=
global
override
def
close
()
:
Unit
=
{}
}
val
db
=
Database
.
forURL
(
s
"jdbc:sqlite:${file.getAbsolutePath}"
,
driver
=
"org.sqlite.JDBC"
,
prop
=
config
.
toProperties
,
executor
=
asyncExecutor
)
new
SummaryDbReadOnly
(
db
)
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
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