mirror of
https://github.com/matrix-construct/construct
synced 2025-03-17 06:50:23 +01:00
ircd:Ⓜ️:dbs: Add runlevel QUIT handler for bgcancel(events).
This commit is contained in:
parent
471de2e6b6
commit
a4da3a2b83
1 changed files with 12 additions and 0 deletions
|
@ -153,6 +153,18 @@ noexcept
|
|||
fs::base::db.set(their_dbpath);
|
||||
}
|
||||
|
||||
/// Cancels all background work by the events database. This will make the
|
||||
/// database shutdown more fluid, without waiting for large compactions.
|
||||
static const ircd::run::changed
|
||||
ircd_m_dbs_handle_quit
|
||||
{
|
||||
ircd::run::level::QUIT, []
|
||||
{
|
||||
if(ircd::m::dbs::events)
|
||||
ircd::db::bgcancel(*ircd::m::dbs::events, false); // non-blocking
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// write_opts
|
||||
//
|
||||
|
|
Loading…
Add table
Reference in a new issue