summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorSteven Fuchs <steven.fuchs@dockyard.com>2020-09-18 11:58:22 +0000
committerlain <lain@soykaf.club>2020-09-18 11:58:22 +0000
commitf2ef9735c52c648a03de4af41f19bb4ec857de03 (patch)
tree0c2b3f2ba7b582a2e8ae4a83dbef42e8132c7b47 /config
parent49584a9928f02b461a0356332440084473ea6b69 (diff)
Federate data through persistent websocket connections
Diffstat (limited to 'config')
-rw-r--r--config/config.exs12
-rw-r--r--config/description.exs13
-rw-r--r--config/test.exs5
3 files changed, 30 insertions, 0 deletions
diff --git a/config/config.exs b/config/config.exs
index c204814d0..104013b41 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -130,6 +130,7 @@ config :pleroma, Pleroma.Web.Endpoint,
dispatch: [
{:_,
[
+ {"/api/fedsocket/v1", Pleroma.Web.FedSockets.IncomingHandler, []},
{"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []},
{"/websocket", Phoenix.Endpoint.CowboyWebSocket,
{Phoenix.Transports.WebSocket,
@@ -148,6 +149,16 @@ config :pleroma, Pleroma.Web.Endpoint,
"SameSite=Lax"
]
+config :pleroma, :fed_sockets,
+ enabled: false,
+ connection_duration: :timer.hours(8),
+ rejection_duration: :timer.minutes(15),
+ fed_socket_fetches: [
+ default: 12_000,
+ interval: 3_000,
+ lazy: false
+ ]
+
# Configures Elixir's Logger
config :logger, :console,
level: :debug,
@@ -532,6 +543,7 @@ config :pleroma, Oban,
token_expiration: 5,
federator_incoming: 50,
federator_outgoing: 50,
+ ingestion_queue: 50,
web_push: 50,
mailer: 10,
transmogrifier: 20,
diff --git a/config/description.exs b/config/description.exs
index 2b30f8148..6f3855918 100644
--- a/config/description.exs
+++ b/config/description.exs
@@ -272,6 +272,19 @@ config :pleroma, :config_description, [
},
%{
group: :pleroma,
+ key: :fed_sockets,
+ type: :group,
+ description: "Websocket based federation",
+ children: [
+ %{
+ key: :enabled,
+ type: :boolean,
+ description: "Enable FedSockets"
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
key: Pleroma.Emails.Mailer,
type: :group,
description: "Mailer-related settings",
diff --git a/config/test.exs b/config/test.exs
index 0ee6f1b7f..93a0e2a61 100644
--- a/config/test.exs
+++ b/config/test.exs
@@ -19,6 +19,11 @@ config :logger, :console,
level: :warn,
format: "\n[$level] $message\n"
+config :pleroma, :fed_sockets,
+ enabled: false,
+ connection_duration: 5,
+ rejection_duration: 5
+
config :pleroma, :auth, oauth_consumer_strategies: []
config :pleroma, Pleroma.Upload,