FIX: only load S3 stuff when we need it
This commit is contained in:
parent
3cf87b94c9
commit
577f7446b4
|
@ -1,5 +1,3 @@
|
||||||
require "s3_helper"
|
|
||||||
|
|
||||||
class Backup
|
class Backup
|
||||||
include UrlHelper
|
include UrlHelper
|
||||||
include ActiveModel::SerializerSupport
|
include ActiveModel::SerializerSupport
|
||||||
|
@ -47,8 +45,8 @@ class Backup
|
||||||
end
|
end
|
||||||
|
|
||||||
def s3
|
def s3
|
||||||
return @s3_helper if @s3_helper
|
require "s3_helper" unless defined? S3Helper
|
||||||
@s3_helper = S3Helper.new(s3_bucket)
|
@s3_helper ||= S3Helper.new(s3_bucket)
|
||||||
end
|
end
|
||||||
|
|
||||||
def upload_to_s3
|
def upload_to_s3
|
||||||
|
|
Loading…
Reference in New Issue