Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
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
Timo Ley
synapse
Commits
3e85e52b
Commit
3e85e52b
authored
10 years ago
by
Mark Haines
Browse files
Options
Downloads
Patches
Plain Diff
Allow ':memory:' as the database path for sqlite3
parent
5fed0426
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
synapse/app/homeserver.py
+7
-1
7 additions, 1 deletion
synapse/app/homeserver.py
synapse/config/database.py
+4
-1
4 additions, 1 deletion
synapse/config/database.py
with
11 additions
and
2 deletions
synapse/app/homeserver.py
+
7
−
1
View file @
3e85e52b
...
@@ -247,7 +247,13 @@ def setup():
...
@@ -247,7 +247,13 @@ def setup():
logger
.
info
(
"
Database prepared in %s.
"
,
db_name
)
logger
.
info
(
"
Database prepared in %s.
"
,
db_name
)
hs
.
get_db_pool
()
db_pool
=
hs
.
get_db_pool
()
if
db_name
==
"
:memory:
"
# Memory databases will need to be setup each time they are opened.
reactor
.
callWhenRunning
(
hs
.
get_db_pool
().
runWithConnection
,
prepare_database
)
if
config
.
manhole
:
if
config
.
manhole
:
f
=
twisted
.
manhole
.
telnet
.
ShellFactory
()
f
=
twisted
.
manhole
.
telnet
.
ShellFactory
()
...
...
This diff is collapsed.
Click to expand it.
synapse/config/database.py
+
4
−
1
View file @
3e85e52b
...
@@ -20,7 +20,10 @@ import os
...
@@ -20,7 +20,10 @@ import os
class
DatabaseConfig
(
Config
):
class
DatabaseConfig
(
Config
):
def
__init__
(
self
,
args
):
def
__init__
(
self
,
args
):
super
(
DatabaseConfig
,
self
).
__init__
(
args
)
super
(
DatabaseConfig
,
self
).
__init__
(
args
)
self
.
database_path
=
self
.
abspath
(
args
.
database_path
)
if
args
.
database_path
==
"
:memory:
"
:
self
.
database_path
=
"
:memory:
"
else
:
self
.
database_path
=
self
.
abspath
(
args
.
database_path
)
@classmethod
@classmethod
def
add_arguments
(
cls
,
parser
):
def
add_arguments
(
cls
,
parser
):
...
...
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