The AGPL asks a modified version to carry prominent notices saying it was modified, and giving a date. Publishing the source is the conveyance that asks for it, so it wants doing before the repository is public rather than at the release. Every upstream file the fork changed now says so in its header, beneath the notice it came with: 164 files, found by diffing against the upstream snapshot branch rather than by guessing, so the list is what actually differs. Files the fork wrote itself already carry their own copyright and need nothing. Upstream's notices are untouched, which its licence requires and which was already true. The README says the same thing in prose, since the obligation is on the work as a whole and not only its Rust files. Builds unchanged: the server and the test binary both compile.
73 lines
2.0 KiB
Rust
73 lines
2.0 KiB
Rust
/*
|
|
* SPDX-FileCopyrightText: 2020 Stalwart Labs LLC <[email protected]>
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-SEL
|
|
*
|
|
* Modified by Coffey Labs in 2026 for INBUXA.
|
|
*/
|
|
|
|
// inbuxa: composite stores (sharded members, read replicas) nest store
|
|
// futures deeply enough to pass rustc's default query depth
|
|
#![recursion_limit = "512"]
|
|
|
|
#![warn(clippy::large_futures)]
|
|
|
|
use broadcast::publisher::spawn_broadcast_publisher;
|
|
use common::{
|
|
BuildServer, Inner,
|
|
manager::boot::{BootManager, IpcReceivers},
|
|
};
|
|
use state_manager::manager::spawn_push_router;
|
|
use std::sync::Arc;
|
|
|
|
use crate::task_manager::{manager::spawn_task_manager, scheduler::spawn_task_scheduler};
|
|
|
|
pub mod broadcast;
|
|
pub mod state_manager;
|
|
pub mod task_manager;
|
|
|
|
pub trait StartServices: Sync + Send {
|
|
fn start_services(&mut self) -> impl Future<Output = ()> + Send;
|
|
}
|
|
|
|
pub trait SpawnServices {
|
|
fn spawn_services(&mut self, inner: Arc<Inner>);
|
|
}
|
|
|
|
impl StartServices for BootManager {
|
|
async fn start_services(&mut self) {
|
|
let server = self.inner.build_server();
|
|
// Unpack webadmin
|
|
self.inner
|
|
.data
|
|
.applications
|
|
.unpack_all(&server, false)
|
|
.await;
|
|
|
|
if !server.registry().is_recovery_mode() {
|
|
self.ipc_rxs.spawn_services(self.inner.clone());
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SpawnServices for IpcReceivers {
|
|
fn spawn_services(&mut self, inner: Arc<Inner>) {
|
|
if !inner.shared_core.load().storage.registry.is_recovery_mode() {
|
|
// Spawn push manager
|
|
spawn_push_router(inner.clone(), self.push_rx.take().unwrap());
|
|
|
|
// Spawn broadcast publisher
|
|
if let Some(event_rx) = self.broadcast_rx.take() {
|
|
// Spawn broadcast publisher
|
|
spawn_broadcast_publisher(inner.clone(), event_rx);
|
|
}
|
|
|
|
// Spawn task manager
|
|
spawn_task_manager(inner.clone());
|
|
|
|
// Spawn task scheduler
|
|
spawn_task_scheduler(inner);
|
|
}
|
|
}
|
|
}
|