Simplify backup update clause

This commit is contained in:
tusooa 2022-12-16 14:13:46 -05:00
parent bdd63d2a3a
commit 46ab97d721
No known key found for this signature in database
GPG Key ID: 7B467EDE43A08224
1 changed files with 2 additions and 5 deletions

View File

@ -160,11 +160,8 @@ defp wait_backup(backup, current_processed) do
{:progress, new_processed} ->
total_processed = current_processed + new_processed
with {:ok, updated_backup} <- set_state(backup, :running, total_processed) do
wait_backup(updated_backup, total_processed)
else
_ -> wait_backup(backup, total_processed)
end
set_state(backup, :running, total_processed)
wait_backup(backup, total_processed)
:completed ->
{:ok, get(backup.id)}