diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-12-27 12:29:41 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-12-27 12:29:41 +0100 |
commit | acef44a7f28df0274b52a77f3a1d4c9f418d3c63 (patch) | |
tree | 2adc3cfaa7cf9b884fc8406b282b76e92306dcc7 | |
parent | c285e32724df7a7f5d1f928447a5afd8c89f0809 (diff) | |
parent | a97e9e9854579a4f0f4455703ea9684c65aa9f3d (diff) |
-rw-r--r-- | app/models/backup_job.rb | 1 | ||||
-rw-r--r-- | lib/tasks/backup.rake | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/app/models/backup_job.rb b/app/models/backup_job.rb index e2f2e6c..b06d0d1 100644 --- a/app/models/backup_job.rb +++ b/app/models/backup_job.rb @@ -10,7 +10,6 @@ class BackupJob < ActiveRecord::Base self.started_at.to_s end - private def set_state_to_queued self.state ||= 'queued' self.started_at = Time.now diff --git a/lib/tasks/backup.rake b/lib/tasks/backup.rake index 0dbadad..c26bc62 100644 --- a/lib/tasks/backup.rake +++ b/lib/tasks/backup.rake @@ -7,13 +7,13 @@ namespace :backup do desc "Do a backup." task :queue_a_new_backup => :environment do backup_job = BackupJob.create - echo "BackupJob ID: #{backup_job.id}" + puts "BackupJob ID: #{backup_job.id}" end desc "Do a backup. Now!" task :force_now => :environment do backup_job = BackupJob.create(:state => 'force now') - echo "BackupJob ID: #{backup_job.id}" + puts "BackupJob ID: #{backup_job.id}" end desc "Restore the system" @@ -83,4 +83,4 @@ namespace :backup do end end -end
\ No newline at end of file +end |