From aa20f6991127ddee546fc0b867298c1342dbcb4d Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 3 May 2023 12:08:20 +0200 Subject: [PATCH] fix(apps): Fix cleaning application data background job Signed-off-by: Thomas Citharel --- lib/service/workers/clean_application_data.ex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/service/workers/clean_application_data.ex b/lib/service/workers/clean_application_data.ex index 16e265ac5..80ff107ce 100644 --- a/lib/service/workers/clean_application_data.ex +++ b/lib/service/workers/clean_application_data.ex @@ -8,14 +8,14 @@ defmodule Mobilizon.Service.Workers.CleanApplicationData do require Logger @impl Oban.Worker - def perform(%Job{args: %{type: :application}}) do + def perform(%Job{args: %{"type" => "application"}}) do Logger.info("Cleaning expired applications data") # TODO: Clear unused applications after a while end @impl Oban.Worker - def perform(%Job{args: %{type: :application_token}}) do + def perform(%Job{args: %{"type" => "application_token"}}) do Logger.info("Cleaning expired application tokens data") Applications.prune_old_tokens() @@ -23,7 +23,7 @@ defmodule Mobilizon.Service.Workers.CleanApplicationData do end @impl Oban.Worker - def perform(%Job{args: %{type: :application_device_activation}}) do + def perform(%Job{args: %{"type" => "application_device_activation"}}) do Logger.info("Cleaning expired application device activation data") Applications.prune_old_application_device_activations()