Enforce singleton resident writers
This commit is contained in:
parent
837cda297f
commit
c8f31322b4
3 changed files with 115 additions and 5 deletions
|
|
@ -28,7 +28,8 @@ use epiphany_core::tick_heartbeat_store;
|
|||
use epiphany_core::update_heartbeat_heat_store;
|
||||
use epiphany_core::validate_agent_memory_store;
|
||||
use epiphany_core::{
|
||||
ResidentProviderReadiness, authenticate_epiphany_packaged_release, capture_process_instance,
|
||||
ResidentProviderReadiness, acquire_resident_process_singleton,
|
||||
authenticate_epiphany_packaged_release, capture_process_instance,
|
||||
publish_resident_provider_readiness,
|
||||
};
|
||||
use std::env;
|
||||
|
|
@ -457,6 +458,7 @@ fn main() -> Result<()> {
|
|||
));
|
||||
}
|
||||
let store_path = store_path.ok_or_else(|| anyhow!("serve requires --store"))?;
|
||||
let _singleton = acquire_resident_process_singleton("heartbeat", &store_path)?;
|
||||
let artifact_dir =
|
||||
artifact_dir.ok_or_else(|| anyhow!("serve requires --artifact-dir"))?;
|
||||
let provider_release = if resident_self_store.is_some() {
|
||||
|
|
|
|||
|
|
@ -4,10 +4,11 @@ use epiphany_core::{
|
|||
ChildObservation, CoordinatorLaunch, LaunchedCoordinator, ProcessInstanceIdentity,
|
||||
ProcessInstanceObservation, ResidentProviderReadiness, ResidentReadinessRequest,
|
||||
ResidentSelfOutcome, ResidentSelfPolicy, ResidentSelfPorts, ResidentSelfPressure,
|
||||
ResidentSelfState, acknowledge_resident_self_launch, authenticate_resident_self_policy,
|
||||
bind_runtime_repository_domain, bridge_admitted_persona_feedback_to_heartbeat,
|
||||
cancel_resident_self_turn, capture_process_instance, complete_resident_self_turn,
|
||||
coordinator_run_receipts, derive_resident_cognition_readiness, enqueue_resident_self_pressure,
|
||||
ResidentSelfState, acknowledge_resident_self_launch, acquire_resident_process_singleton,
|
||||
authenticate_resident_self_policy, bind_runtime_repository_domain,
|
||||
bridge_admitted_persona_feedback_to_heartbeat, cancel_resident_self_turn,
|
||||
capture_process_instance, complete_resident_self_turn, coordinator_run_receipts,
|
||||
derive_resident_cognition_readiness, enqueue_resident_self_pressure,
|
||||
import_bifrost_persona_feedback_deliveries, ingest_resident_self_domain_pressure,
|
||||
load_epiphany_cultmesh_swarm_brake, load_resident_self_state, observe_process_instance,
|
||||
prepare_resident_self_launch, publish_resident_provider_readiness, resident_self_child_claim,
|
||||
|
|
@ -60,6 +61,7 @@ fn main() -> Result<()> {
|
|||
println!("{}", serde_json::to_string_pretty(&projection)?);
|
||||
return Ok(());
|
||||
}
|
||||
let _singleton = acquire_resident_process_singleton("resident-self", &args.state_store)?;
|
||||
if let Some(pressure) = args.pressure.as_ref() {
|
||||
enqueue_resident_self_pressure(&args.state_store, pressure)?;
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue