mirror of
https://github.com/matrix-construct/construct
synced 2024-12-29 08:54:02 +01:00
ircd:Ⓜ️:init::backfill: add conf item to enable worker.
This commit is contained in:
parent
de730e33b1
commit
c01f19080b
1 changed files with 19 additions and 0 deletions
|
@ -17,6 +17,7 @@ struct ircd::m::init::backfill
|
||||||
static void fini();
|
static void fini();
|
||||||
static void init();
|
static void init();
|
||||||
|
|
||||||
|
static conf::item<bool> enable;
|
||||||
static std::unique_ptr<context> worker_context;
|
static std::unique_ptr<context> worker_context;
|
||||||
static log::log log;
|
static log::log log;
|
||||||
};
|
};
|
||||||
|
@ -38,9 +39,27 @@ ircd::m::init::backfill::log
|
||||||
decltype(ircd::m::init::backfill::worker_context)
|
decltype(ircd::m::init::backfill::worker_context)
|
||||||
ircd::m::init::backfill::worker_context;
|
ircd::m::init::backfill::worker_context;
|
||||||
|
|
||||||
|
decltype(ircd::m::init::backfill::enable)
|
||||||
|
ircd::m::init::backfill::enable
|
||||||
|
{
|
||||||
|
{ "name", "m.init.backfill.enable" },
|
||||||
|
{ "default", true },
|
||||||
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
ircd::m::init::backfill::init()
|
ircd::m::init::backfill::init()
|
||||||
{
|
{
|
||||||
|
if(!enable)
|
||||||
|
{
|
||||||
|
log::warning
|
||||||
|
{
|
||||||
|
log, "Initial synchronization of rooms from remote servers has"
|
||||||
|
" been disabled by the configuration. Not fetching latest events."
|
||||||
|
};
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
assert(!worker_context);
|
assert(!worker_context);
|
||||||
worker_context.reset(new context
|
worker_context.reset(new context
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue