Add outbound sync worker runtime

This commit is contained in:
2026-03-16 21:55:03 +01:00
parent 9be3b6ca52
commit 5f4f086d28
17 changed files with 1567 additions and 172 deletions

View File

@@ -10,7 +10,8 @@ config :parrhesia,
private_key: nil
],
sync: [
path: nil
path: nil,
start_workers?: true
],
limits: [
max_frame_bytes: 1_048_576,

View File

@@ -456,7 +456,12 @@ if config_env() == :prod do
private_key: string_env.("PARRHESIA_IDENTITY_PRIVATE_KEY", nil)
],
sync: [
path: string_env.("PARRHESIA_SYNC_PATH", nil)
path: string_env.("PARRHESIA_SYNC_PATH", nil),
start_workers?:
bool_env.(
"PARRHESIA_SYNC_START_WORKERS",
Keyword.get(Application.get_env(:parrhesia, :sync, []), :start_workers?, true)
)
],
moderation_cache_enabled:
bool_env.("PARRHESIA_MODERATION_CACHE_ENABLED", moderation_cache_enabled_default),

View File

@@ -20,7 +20,8 @@ config :parrhesia,
private_key: nil
],
sync: [
path: Path.join(System.tmp_dir!(), "parrhesia_test_sync.json")
path: Path.join(System.tmp_dir!(), "parrhesia_test_sync.json"),
start_workers?: false
],
features: [verify_event_signatures: false]