From a13afd9ab0090a2d2ed672f25e7380a1cefc6329 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 15 Apr 2020 16:18:08 -0300 Subject: [PATCH] tareas en segundo plano --- Gemfile | 1 + Gemfile.lock | 3 +++ app/jobs/application_job.rb | 1 + config/environments/production.rb | 4 ++-- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 5122869..0d9bf3c 100644 --- a/Gemfile +++ b/Gemfile @@ -17,6 +17,7 @@ gem 'jbuilder', '~> 2.5' # gem 'redis', '~> 4.0' # Use ActiveModel has_secure_password gem 'bcrypt', '~> 3.1.7' +gem 'sucker_punch' gem 'validate_url' gem 'webpush' diff --git a/Gemfile.lock b/Gemfile.lock index 2380f2d..363b44f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -195,6 +195,8 @@ GEM net-scp (>= 1.1.2) net-ssh (>= 2.8.0) stackprof (0.2.15) + sucker_punch (2.1.2) + concurrent-ruby (~> 1.0) thor (1.0.1) thread_safe (0.3.6) tzinfo (1.2.6) @@ -237,6 +239,7 @@ DEPENDENCIES spring-watcher-listen (~> 2.0.0) sqlite3 stackprof + sucker_punch validate_url webpush yard diff --git a/app/jobs/application_job.rb b/app/jobs/application_job.rb index d92ffdd..adbe9d9 100644 --- a/app/jobs/application_job.rb +++ b/app/jobs/application_job.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true class ApplicationJob < ActiveJob::Base + include SuckerPunch::Job end diff --git a/config/environments/production.rb b/config/environments/production.rb index 69e5bf4..b83734d 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -61,8 +61,8 @@ Rails.application.configure do # Use a real queuing backend for Active Job (and separate queues per # environment) - # config.active_job.queue_adapter = :resque - # config.active_job.queue_name_prefix = "miniloom-api_#{Rails.env}" + config.active_job.queue_adapter = :sucker_punch + config.active_job.queue_name_prefix = "lumi_#{Rails.env}" # config.action_mailer.perform_caching = false