Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
composerjs
composer-service-core
Commits
e2bdea8d
Commit
e2bdea8d
authored
Feb 19, 2021
by
Jean-Philippe Steinmetz
Browse files
Fixing issue with ConnectionManager that caused existing connections to be recreated
parent
f7c3e339
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/database/ConnectionManager.ts
View file @
e2bdea8d
...
...
@@ -29,9 +29,11 @@ class ConnectionManager {
// It's possible that the connection was already configured during a previous run. In that case we will
// attempt to reconnect instead of creating a new connection.
let
connection
:
typeorm
.
Connection
|
Redis
.
Redis
|
undefined
=
undefined
;
let
connection
:
typeorm
.
Connection
|
Redis
.
Redis
|
undefined
=
this
.
connections
.
get
(
name
)
;
try
{
connection
=
typeorm
.
getConnection
(
name
);
if
(
!
connection
)
{
connection
=
typeorm
.
getConnection
(
name
);
}
}
catch
(
err
)
{
// We don't care if a connection was not found
}
...
...
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