mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
make reload_handles optional for creating Services
This will be useful for instantiating services in CLI subcommands, which have different requirements around observeability.
This commit is contained in:
parent
b03c2a15b3
commit
86481fd651
4 changed files with 9 additions and 5 deletions
|
|
@ -1134,7 +1134,11 @@ impl Service {
|
|||
backend,
|
||||
filter,
|
||||
} => {
|
||||
let handles = &services().globals.reload_handles;
|
||||
let Some(handles) = &services().globals.reload_handles else {
|
||||
return Ok(RoomMessageEventContent::text_plain(
|
||||
"Reloading filters is disabled",
|
||||
));
|
||||
};
|
||||
let handle = match backend {
|
||||
TracingBackend::Log => &handles.log,
|
||||
TracingBackend::Flame => &handles.flame,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue