Change minutes_retained config to seconds_retained

This commit is contained in:
Ekaterina Vaartis 2018-12-16 22:40:44 +03:00
parent 1d31fd0722
commit 3a31fdaf06
2 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ config :pleroma, Pleroma.Repo, types: Pleroma.PostgresTypes
config :pleroma, Pleroma.Captcha, config :pleroma, Pleroma.Captcha,
enabled: false, enabled: false,
minutes_retained: 5, seconds_retained: 180,
method: Pleroma.Captcha.Kocaptcha method: Pleroma.Captcha.Kocaptcha
config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch" config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"

View File

@ -40,9 +40,9 @@ defmodule Pleroma.Captcha do
else else
new_captcha = method().new() new_captcha = method().new()
minutes_retained = Pleroma.Config.get!([__MODULE__, :minutes_retained]) seconds_retained = Pleroma.Config.get!([__MODULE__, :seconds_retained])
# Wait several minutes and if the captcha is still there, delete it # Wait several minutes and if the captcha is still there, delete it
Process.send_after(self(), {:cleanup, new_captcha.token}, 1000 * 60 * minutes_retained) Process.send_after(self(), {:cleanup, new_captcha.token}, 1000 * seconds_retained)
{:reply, new_captcha, state} {:reply, new_captcha, state}
end end