delayed-job

bundler: not executable: script/delayed_job

ε祈祈猫儿з 提交于 2019-12-12 11:26:37
问题 I'm trying to run the following command on my remote server (either via capistrano or ssh): bundle exec RAILS_ENV=production script/delayed_job start But I'm getting this error message: bundler: not executable: script/delayed_job Never saw this before, and google had nothing for me. Any idea what might be the problem? 回答1: Maybe it does not have permissions to run? chmod +x script/delayed_job 来源: https://stackoverflow.com/questions/26958355/bundler-not-executable-script-delayed-job

Paperclip, Delayed Job, S3, Heroku - design for delayed processing of sensitive uploaded files: db or s3?

ぃ、小莉子 提交于 2019-12-12 07:29:05
问题 I need feedback on the design for uploading and delayed processing of a file using heroku, paperclip, delayed job and, if necessary, s3. Parts of it have been discussed in other places but I couldn't find a complete discussion anywhere. Task description: Upload file (using paperclip to s3/db on heroku). File needs to be private as it contains sensitive data. Queue file for processing (delayed job) Job gets run in queue File is retrieved (from s3/db), and processing is completed File is

How should I be using delayed_job?

試著忘記壹切 提交于 2019-12-12 06:32:38
问题 I've read the docs, but I'm unsure how to integrate it into my application. Currently I have a user input a video url, I take that url and make it a link in the view. Then I use the Embedly API to find that link and replace it with an embedded video, thumbnail, and title. However, this process takes a bit too long, so I'm thinking of using delayed_job to speed up this process. How should I go about doing this? I'd like to also save the dynamically generated title returned from the Embedly API

Rails help creating a delayed_job from a rake file

☆樱花仙子☆ 提交于 2019-12-12 06:04:55
问题 How do I create a delayed job from a rake file. How should I move it into a controller and create a delayed_job that runs the task every 15 minutes. Here is an example how my rake file: namespace :reklamer do task :runall => [:iqmedier, :euroads, :mikkelsen] do # This will run after all those tasks have run end task :iqmedier => :environment do require 'Mechanize' agent = WWW::Mechanize.new agent.get("http://www.iqmedier.dk") end task :euroads => :environment do require 'Mechanize' require

RSpec errors when run en masse, but not individually

北城余情 提交于 2019-12-12 01:45:58
问题 Unfortunately I don't have a specific question (or clues), but was hoping someone could point me in the right direction. When I run all of my tests (rspec spec), I am getting two tests that fail specifically related to Delayed Job. When I run this spec file in isolation (rspec ./spec/controllers/xxx_controller_spec.rb) all the tests pass...... Is this a common problem? What should I be looking for? Thanks! 回答1: You are already mentioning it: isolation might be the solution. Usually I would

Gem not initializing when running job from worker?

回眸只為那壹抹淺笑 提交于 2019-12-12 01:06:38
问题 I am using the Mandrill api gem to send scheduled emails with the delayed jobs gem. When the delayed job is executed by the worker the job is crashing at the line which creates the mandrill message with the following error: DailyMailJob failed with NameError: uninitialized constant Mandrill::API If I execute this job from the rails console it runs fine. Why does this job not work when running from the worker? 回答1: I managed to fix the issue by installing the gem into the computer rather than

delayed_job: attribute accessor values are not stored in delayed_jobs table in rails 3 after upgrade from rails 2

主宰稳场 提交于 2019-12-11 23:19:05
问题 How we did this in rails2 was: For a job class we set a bunch of attr_accessor methods for the job object and enqueue the object into delayed_jobs table and those accessor values are stored in the table as well. (we were using delayed_job 2.0.3) But in rails3 even though we follow the same procedure as in rails2, the attr_accessor values are not stored into the table. Can anybody tell me how we persist the accessor values into the table with the new delayed_job gem(3.0.3)? 回答1: Found out that

Delayed Job not picking job from table

前提是你 提交于 2019-12-11 20:42:05
问题 In my current project I am doing some process in background by using Delayed Job gem. It's working fine in local but in production jobs are inserted into Delayed Job table but DJ not picking few jobs from that DJ table. Could any one have idea how Delayed Job will pick up jobs from Delayed Job table. Below is the Delayed job code in my project: Delayed::Job.enqueue(ProposalJob.new(current_user, @proposal, request.host, params[:proposal][:revision_notes], params[:proposal][:close_date]),

Joining separate log to main Rails development log

喜欢而已 提交于 2019-12-11 17:58:18
问题 This is the reverse of the question I have seen several times elsewhere, in which someone wants to see how to create an another, separate Rails log from the main development log. For some reason, my Rails app is logging my DelayedJob gem's activity to a separate log ( delayed_job.log ), but I want it to log to the main development.log file. I am using the Workless gem and NewRelic as well, should this be potentially relevant (although I experimented on this by removing NewRelic, and the issue

Delayed job picking attributes from table differently in different environments

北城余情 提交于 2019-12-11 13:32:52
问题 I am using delayed job to queue a Model method in another Model like this: article_loader.rb date_value_in_string = "2017-06-21 07:17:00" Article.delay(:queue => 'article_load').article_loading([date_value_in_string]) Even though I have passed a String as an argument to the method, inside the method it gets converted to Time object in the production environment. article.rb in production environment def self.article_loading(args) date_value = args[0] p date_value.class # Time end While in