From 6e567787681b5177e31e0ccef83b52e54635cb9b Mon Sep 17 00:00:00 2001 From: f Date: Sat, 15 Apr 2023 11:16:58 -0300 Subject: [PATCH] fix: renovar el token #13105 `touch` no corre `before_save`, con lo que el token nunca se renovaba --- app/jobs/renew_distributed_press_tokens_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/renew_distributed_press_tokens_job.rb b/app/jobs/renew_distributed_press_tokens_job.rb index 5664d9fa..86086ac7 100644 --- a/app/jobs/renew_distributed_press_tokens_job.rb +++ b/app/jobs/renew_distributed_press_tokens_job.rb @@ -7,7 +7,7 @@ class RenewDistributedPressTokensJob < ApplicationJob # detener la tarea si algo pasa. def perform DistributedPressPublisher.with_about_to_expire_tokens.find_each do |publisher| - publisher.touch + publisher.save rescue DistributedPress::V1::Error => e data = { instance: publisher.instance, expires_at: publisher.client.token.expires_at }