Este site funciona melhor com JavaScript.
Página inicial
Explorar
Ajuda
Acessar
abunchtell
/
mastodon
Observar
1
Favorito
0
Fork
0
Código
Issues
0
Atividade
Ver código fonte
Move Salmon processing to background as well as PuSH
master
Eugen Rochko
7 anos atrás
pai
2c58e7e06a
commit
7dea6a23f7
2 arquivos alterados
com
10 adições
e
1 exclusões
Visão dividida
Opções de diferenças
Mostrar estatísticas
Baixar arquivo de patch
Baixar arquivo de diferenças
+1
-1
app/controllers/api/salmon_controller.rb
+9
-0
app/workers/salmon_worker.rb
+ 1
- 1
app/controllers/api/salmon_controller.rb
Ver arquivo
@@ -10,7 +10,7 @@ class Api::SalmonController < ApiController
if body.nil?
head 200
else
ProcessInteractionService.new.call(body, @account
)
SalmonWorker.perform_async(@account.id, body.force_encoding('UTF-8')
)
head 201
end
end
+ 9
- 0
app/workers/salmon_worker.rb
Ver arquivo
@@ -0,0 +1,9 @@
# frozen_string_literal: true
class SalmonWorker
include Sidekiq::Worker
def perform(account_id, body)
ProcessInteractionService.new.call(body, Account.find(account_id))
end
end
Escrever
Pré-visualização
Carregando…
Cancelar
Salvar