mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-24 18:56:22 +00:00
fix: errores de decompresión #15332
This commit is contained in:
parent
97653d98b6
commit
1b9e039fda
3 changed files with 15 additions and 2 deletions
2
Gemfile
2
Gemfile
|
@ -39,7 +39,7 @@ gem 'devise-i18n'
|
||||||
gem 'devise_invitable'
|
gem 'devise_invitable'
|
||||||
gem 'redis-client'
|
gem 'redis-client'
|
||||||
gem 'hiredis-client'
|
gem 'hiredis-client'
|
||||||
gem 'distributed-press-api-client', '~> 0.4.0rc3'
|
gem 'distributed-press-api-client', '~> 0.4.1'
|
||||||
gem 'email_address', git: 'https://github.com/fauno/email_address', branch: 'i18n'
|
gem 'email_address', git: 'https://github.com/fauno/email_address', branch: 'i18n'
|
||||||
gem 'exception_notification'
|
gem 'exception_notification'
|
||||||
gem 'fast_blank'
|
gem 'fast_blank'
|
||||||
|
|
|
@ -166,7 +166,7 @@ GEM
|
||||||
devise_invitable (2.0.9)
|
devise_invitable (2.0.9)
|
||||||
actionmailer (>= 5.0)
|
actionmailer (>= 5.0)
|
||||||
devise (>= 4.6)
|
devise (>= 4.6)
|
||||||
distributed-press-api-client (0.4.0)
|
distributed-press-api-client (0.4.1)
|
||||||
addressable (~> 2.3, >= 2.3.0)
|
addressable (~> 2.3, >= 2.3.0)
|
||||||
climate_control
|
climate_control
|
||||||
dry-schema
|
dry-schema
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# Comprueba que se pueden volver a correr las tareas que dieron error de
|
||||||
|
# decompresión
|
||||||
|
class BrsDecompressorCorruptedSourceError < ActiveRecord::Migration[6.1]
|
||||||
|
def up
|
||||||
|
raise unless HTTParty.get("https://mas.to/api/v2/instance", headers: { "Accept-Encoding": "br;q=1.0,gzip;q=1.0,deflate;q=0.6,identity;q=0.3" }).ok?
|
||||||
|
|
||||||
|
QueJob.where("last_error_message like '%BRS::DecompressorCorruptedSourceError%'").update_all(error_count: 0, run_at: Time.now)
|
||||||
|
end
|
||||||
|
|
||||||
|
def down; end
|
||||||
|
end
|
Loading…
Reference in a new issue