Simplify backup update clause
This commit is contained in:
parent
bdd63d2a3a
commit
46ab97d721
@ -160,11 +160,8 @@ defmodule Pleroma.User.Backup do
|
|||||||
{:progress, new_processed} ->
|
{:progress, new_processed} ->
|
||||||
total_processed = current_processed + new_processed
|
total_processed = current_processed + new_processed
|
||||||
|
|
||||||
with {:ok, updated_backup} <- set_state(backup, :running, total_processed) do
|
set_state(backup, :running, total_processed)
|
||||||
wait_backup(updated_backup, total_processed)
|
wait_backup(backup, total_processed)
|
||||||
else
|
|
||||||
_ -> wait_backup(backup, total_processed)
|
|
||||||
end
|
|
||||||
|
|
||||||
:completed ->
|
:completed ->
|
||||||
{:ok, get(backup.id)}
|
{:ok, get(backup.id)}
|
||||||
|
Loading…
Reference in New Issue
Block a user