Skip to content

Commit 942aae4

Browse files
committed
Implement DELETE _admin/shutdown
1 parent 790b7bd commit 942aae4

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ This driver uses semantic versioning:
2424

2525
- Implemented async jobs management (DE-339)
2626

27+
- Added `db.shutdown` to initiate a clean shutdown of the server
28+
2729
## [8.4.1] - 2023-09-15
2830

2931
### Fixed

src/database.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2008,6 +2008,19 @@ export class Database {
20082008
this._connection.close();
20092009
}
20102010

2011+
/**
2012+
* Attempts to initiate a clean shutdown of the server.
2013+
*/
2014+
shutdown(): Promise<void> {
2015+
return this.request(
2016+
{
2017+
method: "DELETE",
2018+
path: "/_admin/shutdown",
2019+
},
2020+
() => undefined
2021+
);
2022+
}
2023+
20112024
/**
20122025
* Performs a request against every known coordinator and returns when the
20132026
* request has succeeded against every coordinator or the timeout is reached.

0 commit comments

Comments
 (0)