aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/import.rb
diff options
context:
space:
mode:
authorMarc Florisson2013-12-20 12:15:41 +0100
committerMarc Florisson2013-12-20 12:15:41 +0100
commitce7d0450c34b2b4d981dc7c70a235e135a20bde7 (patch)
treec982f997f03c4592e76998a6ebd8d841dce52674 /app/models/import.rb
parentb3d20fd06cbfcf1ac01897a209431e668c40955b (diff)
downloadchouette-core-ce7d0450c34b2b4d981dc7c70a235e135a20bde7.tar.bz2
fix, make delayed import explicit
Diffstat (limited to 'app/models/import.rb')
-rw-r--r--app/models/import.rb13
1 files changed, 1 insertions, 12 deletions
diff --git a/app/models/import.rb b/app/models/import.rb
index e0c95f911..629d54a42 100644
--- a/app/models/import.rb
+++ b/app/models/import.rb
@@ -6,7 +6,6 @@ class Import < ActiveRecord::Base
validates_inclusion_of :status, :in => %w{ pending completed failed }
- attr_accessor :background
attr_accessor :resources
attr_accessor :loader
@@ -73,19 +72,9 @@ class Import < ActiveRecord::Base
end
end
- after_create :delayed_import
def delayed_import
save_resources
- if import_in_background?
- delay.import
- else
- # do not call self.inport
- import
- end
- end
-
- def import_in_background?
- return background.nil? || background
+ delay.import
end
@@root = "#{Rails.root}/tmp/imports"