0
0
Fork 0
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:
Jason Volk 2020-11-07 23:30:45 -08:00
parent 471de2e6b6
commit a4da3a2b83

View file

@ -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
//