mirror of
https://github.com/matrix-construct/construct
synced 2024-06-07 20:48:55 +02:00
ircd:Ⓜ️:init::backfill: Add a startup delay w/ conf item.
This commit is contained in:
parent
37335a68d7
commit
86a7ed52c2
|
@ -15,6 +15,7 @@ namespace ircd::m::init::backfill
|
|||
void worker();
|
||||
|
||||
extern std::unique_ptr<context> worker_context;
|
||||
extern conf::item<seconds> delay;
|
||||
extern conf::item<seconds> gossip_timeout;
|
||||
extern conf::item<bool> gossip_enable;
|
||||
extern conf::item<bool> local_joined_only;
|
||||
|
@ -64,6 +65,13 @@ ircd::m::init::backfill::gossip_timeout
|
|||
{ "default", 5L },
|
||||
};
|
||||
|
||||
decltype(ircd::m::init::backfill::delay)
|
||||
ircd::m::init::backfill::delay
|
||||
{
|
||||
{ "name", "ircd.m.init.backfill.delay" },
|
||||
{ "default", 15L },
|
||||
};
|
||||
|
||||
decltype(ircd::m::init::backfill::worker_context)
|
||||
ircd::m::init::backfill::worker_context;
|
||||
|
||||
|
@ -144,6 +152,9 @@ try
|
|||
if(!estimate)
|
||||
return;
|
||||
|
||||
// Wait a delay before starting.
|
||||
ctx::sleep(seconds(delay));
|
||||
|
||||
log::notice
|
||||
{
|
||||
log, "Starting initial backfill of rooms from other servers...",
|
||||
|
|
Loading…
Reference in a new issue