From d5be7591653bc9b17daf8c7b32a0a6fcf8e90156 Mon Sep 17 00:00:00 2001 From: Daniel Martin Date: Sat, 12 Mar 2011 18:24:58 +0000 Subject: [PATCH] We are not going to use @delayed_job@ for background processing because it is not platform-independent. Bj proved to be a nicer alternative. --- Gemfile | 2 -- app/controllers/upload_controller.rb | 1 - script/delayed_job | 5 ----- 3 files changed, 8 deletions(-) delete mode 100755 script/delayed_job diff --git a/Gemfile b/Gemfile index 824dbdd7..1ef27dce 100644 --- a/Gemfile +++ b/Gemfile @@ -4,8 +4,6 @@ gem 'rails', '3.0.5' gem 'builder' gem 'nokogiri' -# gem 'delayed_job' - gem 'RedCloth', '4.2.5', :require => 'redcloth' gem 'thor', '0.14.6' diff --git a/app/controllers/upload_controller.rb b/app/controllers/upload_controller.rb index 09c9f84e..d4555dbd 100644 --- a/app/controllers/upload_controller.rb +++ b/app/controllers/upload_controller.rb @@ -104,7 +104,6 @@ def parse attachment = Attachment.find(params[:file], :conditions => { :node_id => uploadsNode.id }) Log.new(:uid => item_id).write("Enqueueing job to start in the background. Job id is #{item_id}") - #Delayed::Job::enqueue( UploadProcessingJob.new(params[:uploader], attachment.fullpath, item_id) ) Bj.submit "ruby script/rails runner lib/upload_processing_job.rb %s \"%s\" %s" % [ params[:uploader], attachment.fullpath, params[:item_id] ] end diff --git a/script/delayed_job b/script/delayed_job deleted file mode 100755 index edf19598..00000000 --- a/script/delayed_job +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ruby - -require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'environment')) -require 'delayed/command' -Delayed::Command.new(ARGV).daemonize