summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/config.exs4
-rw-r--r--config/description.exs15
-rw-r--r--docs/configuration/cheatsheet.md1
-rw-r--r--lib/pleroma/workers/backup_worker.ex3
4 files changed, 12 insertions, 11 deletions
diff --git a/config/config.exs b/config/config.exs
index 044f951f6..3058160ea 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -908,8 +908,8 @@ config :pleroma, Pleroma.User.Backup,
purge_after_days: 30,
limit_days: 7,
dir: nil,
- process_wait_time: 30_000,
- process_chunk_size: 100
+ process_chunk_size: 100,
+ timeout: :timer.minutes(30)
config :pleroma, ConcurrentLimiter, [
{Pleroma.Search, [max_running: 30, max_waiting: 50]}
diff --git a/config/description.exs b/config/description.exs
index b7d86dc63..179eea3f7 100644
--- a/config/description.exs
+++ b/config/description.exs
@@ -3356,19 +3356,18 @@ config :pleroma, :config_description, [
suggestions: [7]
},
%{
- key: :process_wait_time,
- type: :integer,
- label: "Process Wait Time",
- description:
- "The amount of time to wait for backup to report progress, in milliseconds. If no progress is received from the backup job for that much time, terminate it and deem it failed.",
- suggestions: [30_000]
- },
- %{
key: :process_chunk_size,
type: :integer,
label: "Process Chunk Size",
description: "The number of activities to fetch in the backup job for each chunk.",
suggestions: [100]
+ },
+ %{
+ key: :timeout,
+ type: :integer,
+ label: "Timeout",
+ description: "The amount of time to wait for backup to complete in seconds.",
+ suggestions: [1_800]
}
]
},
diff --git a/docs/configuration/cheatsheet.md b/docs/configuration/cheatsheet.md
index 9c5659988..5689d3be5 100644
--- a/docs/configuration/cheatsheet.md
+++ b/docs/configuration/cheatsheet.md
@@ -1171,6 +1171,7 @@ Control favicons for instances.
3. the directory named by the TMP environment variable
4. C:\TMP on Windows or /tmp on Unix-like operating systems
5. as a last resort, the current working directory
+* `:timeout` an integer representing seconds
## Frontend management
diff --git a/lib/pleroma/workers/backup_worker.ex b/lib/pleroma/workers/backup_worker.ex
index 1791c558d..d1b6fcdad 100644
--- a/lib/pleroma/workers/backup_worker.ex
+++ b/lib/pleroma/workers/backup_worker.ex
@@ -6,6 +6,7 @@ defmodule Pleroma.Workers.BackupWorker do
use Oban.Worker, queue: :slow, max_attempts: 1
alias Oban.Job
+ alias Pleroma.Config.Getting, as: Config
alias Pleroma.User.Backup
@impl Oban.Worker
@@ -32,7 +33,7 @@ defmodule Pleroma.Workers.BackupWorker do
end
@impl Oban.Worker
- def timeout(_job), do: :timer.minutes(30)
+ def timeout(_job), do: Config.get([Backup, :timeout], :timer.minutes(30))
defp has_email?(user) do
not is_nil(user.email) and user.email != ""