delayed-job

DelayedJob ERROR: there is already one or more instance(s) of the program running

拜拜、爱过 提交于 2021-02-20 14:12:35
问题 Some backstory: My server ran out of disk space last night while delayed_job workers were running off jobs processing images. When I try to stop the workers, I get the response "Terminated". RAILS_ENV=production script/delayed_job stop Terminated Then I run the following to see that the workers were terminated. ps -ef | grep delayed_job servername 4474 4274 0 02:37 pts/1 00:00:00 grep --color=auto delayed_job Now I try to start up new workers. RAILS_ENV=production script/delayed_job -n2 start

DelayedJob ERROR: there is already one or more instance(s) of the program running

核能气质少年 提交于 2021-02-20 14:05:21
问题 Some backstory: My server ran out of disk space last night while delayed_job workers were running off jobs processing images. When I try to stop the workers, I get the response "Terminated". RAILS_ENV=production script/delayed_job stop Terminated Then I run the following to see that the workers were terminated. ps -ef | grep delayed_job servername 4474 4274 0 02:37 pts/1 00:00:00 grep --color=auto delayed_job Now I try to start up new workers. RAILS_ENV=production script/delayed_job -n2 start

How to Specify One Worker on a Queue for Delayed Jobs

对着背影说爱祢 提交于 2021-02-07 19:29:26
问题 How can I specify one worker for a specific queue when using delayed jobs? I know I can run this command: # Use the --pool option to specify a worker pool. You can use this option # multiple times to start different numbers of workers for different queues. # The following command will start 1 worker for the tracking queue, # 2 workers for the mailers and tasks queues, and 2 workers for any jobs: RAILS_ENV=production script/delayed_job --pool=tracking --pool=mailers,tasks:2 --pool=*:2 start

delayed_job update query is running infinitely

ぃ、小莉子 提交于 2021-02-06 15:31:46
问题 I am using delayed_job and delayed_job_active_record for back ground job execution in my rails application. We are using queue based delayed_job. For starting the delayed I am using the following command. RAILS_ENV=staging script/delayed_job -i=1 --queue=queue_name start The problem is below query is firing infinitely. SQL (0.4ms) UPDATE `delayed_jobs` SET `locked_at` = '2013-04-16 09:27:23', `locked_by` = 'delayed_job.=2 host:ip-10-204-210-77 pid:2168' WHERE `delayed_jobs`.`queue` IN ('queue

delayed_job update query is running infinitely

空扰寡人 提交于 2021-02-06 15:30:19
问题 I am using delayed_job and delayed_job_active_record for back ground job execution in my rails application. We are using queue based delayed_job. For starting the delayed I am using the following command. RAILS_ENV=staging script/delayed_job -i=1 --queue=queue_name start The problem is below query is firing infinitely. SQL (0.4ms) UPDATE `delayed_jobs` SET `locked_at` = '2013-04-16 09:27:23', `locked_by` = 'delayed_job.=2 host:ip-10-204-210-77 pid:2168' WHERE `delayed_jobs`.`queue` IN ('queue

delayed_job update query is running infinitely

烂漫一生 提交于 2021-02-06 15:29:25
问题 I am using delayed_job and delayed_job_active_record for back ground job execution in my rails application. We are using queue based delayed_job. For starting the delayed I am using the following command. RAILS_ENV=staging script/delayed_job -i=1 --queue=queue_name start The problem is below query is firing infinitely. SQL (0.4ms) UPDATE `delayed_jobs` SET `locked_at` = '2013-04-16 09:27:23', `locked_by` = 'delayed_job.=2 host:ip-10-204-210-77 pid:2168' WHERE `delayed_jobs`.`queue` IN ('queue

Job failed to load: uninitialized constant with Delayed Job and Rails 3

 ̄綄美尐妖づ 提交于 2021-01-28 04:52:52
问题 I'm trying to utilize Delayed Job in my Rails 3 app, but keep hitting a snag. The jobs keep failing with the error: Job failed to load: uninitialized constant CrawlJob. I found a couple of other SO threads and followed advice there to no avail. Here is the relevant code. Application.rb require File.expand_path('../boot', __FILE__) require 'rails/all' ... module Decurate class Application < Rails::Application ... config.autoload_paths += %W(#{config.root}/lib) config.autoload_paths += Dir["#

Rails Custom Delayed Job - uninitialized constant

梦想与她 提交于 2021-01-28 03:12:36
问题 I've been successfully using delayed_job for a couple of years now but recently I have a need to implement some kind of success/failure callback/hooks. Following the delayed_job guide on github i've set up the following custom job: class XmlImportJob < Struct.new(:file, :supplier_id, :user_id, :directory) def perform Product.xml_import(file, supplier_id, user, directory) end def success(job) ProductMailer.xml_import_complete.deliver end def failure(job) ProductMailer.xml_import_failed.deliver

Ruby on Rails constantly updating a variable

匆匆过客 提交于 2020-03-06 05:53:19
问题 Currently I am building an application that allows users to place bids on products and admins to approve them. The 'transactions' themselves take place outside of the scope of the application. Currently, users see the price of an asset on the transaction/new page and submit a bid by submitting the form. Admins click a button to approve the bid. class TransactionsController < ApplicationController before_action :get_price def new @price = get_price @tansaction = Transaction.new end ### def get

delayed_job fails jobs when running as a daemon. Runs fine when using rake jobs:work

我的梦境 提交于 2020-02-23 10:32:39
问题 I am literally at my wits end with this. I don't understand why it isn't working. I have made a class, which I call and queue using a rake command. When I run the worker using 'rake jobs:work' and call the command 'rake get_updates', it executes fine. However, when I run the worker as a daemon (RAILS_ENV=production bin/delayed_job start) and call the command 'rake get_updates' it produces an error. app/workers/get_updates.rb class GetUpdates def perform beginning = Time.now include SoapHelper