Patch handleShutdown feature (#4361)
* Add handleShutdown Test of MongoStorageAdapter. * Add `handleShutdown` function in PostgresStorageAdapter, with it's test. * Replace the _pgp to _client * Use `adapter._client.$pool.ending` to ckeck is ending * Add `handleShutdown()` in ParseServer.spec.js * Trigger * Set Server to Default
This commit is contained in:
committed by
Florent Vilmart
parent
de73f3723c
commit
8bf6abfee3
@@ -574,6 +574,13 @@ export class PostgresStorageAdapter {
|
||||
this._pgp = pgp;
|
||||
}
|
||||
|
||||
handleShutdown() {
|
||||
if (!this._client) {
|
||||
return
|
||||
}
|
||||
this._client.$pool.end();
|
||||
}
|
||||
|
||||
_ensureSchemaCollectionExists(conn) {
|
||||
conn = conn || this._client;
|
||||
return conn.none('CREATE TABLE IF NOT EXISTS "_SCHEMA" ( "className" varChar(120), "schema" jsonb, "isParseClass" bool, PRIMARY KEY ("className") )')
|
||||
|
||||
Reference in New Issue
Block a user