summaryrefslogtreecommitdiff
path: root/app/models/backup_job.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-05 13:44:10 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-05 13:44:10 +0100
commitc7389cb6f1a305bc7e5cfefd9548c1e1bf7b6018 (patch)
treec6bfe91a42ff9f8471c066ebaa9de7922f1c62bf /app/models/backup_job.rb
parent6e09f570488319f3ce46e8f925550da80fa14faf (diff)
Bugfix
Diffstat (limited to 'app/models/backup_job.rb')
-rw-r--r--app/models/backup_job.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/backup_job.rb b/app/models/backup_job.rb
index d579b79..5149553 100644
--- a/app/models/backup_job.rb
+++ b/app/models/backup_job.rb
@@ -1,12 +1,12 @@
class BackupJob < ActiveRecord::Base
attr_accessible :started_at, :finished_at, :state, :directory, :size_of_the_backup
- after_save :start_the_backup
+ after_create :start_the_backup
private
def start_the_backup
if self.finished_at.nil?
- sh "backup perform --trigger gs5 --config_file #{Rails.root.join('config','backup.rb')}"
+ system "backup perform --trigger gs5 --config_file #{Rails.root.join('config','backup.rb')}"
self.finished_at = Time.now
self.save
end