2014-10-10 14:04:07 -04:00
|
|
|
require "backup_restore/backup_restore"
|
2014-03-12 13:26:51 -04:00
|
|
|
|
|
|
|
module Jobs
|
|
|
|
class CreateBackup < Jobs::Scheduled
|
2014-03-14 13:02:21 -04:00
|
|
|
daily at: 3.hours
|
2014-03-12 13:26:51 -04:00
|
|
|
sidekiq_options retry: false
|
|
|
|
|
|
|
|
def execute(args)
|
|
|
|
return unless SiteSetting.backup_daily?
|
2014-08-20 12:48:56 -04:00
|
|
|
BackupRestore.backup!(Discourse.system_user.id, publish_to_message_bus: false)
|
2014-03-12 13:26:51 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|