archives: raise exception if not configured.
This commit is contained in:
@@ -43,7 +43,7 @@ class PoolArchive < ActiveRecord::Base
|
||||
def self.queue(pool)
|
||||
# queue updates to sqs so that if archives goes down for whatever reason it won't
|
||||
# block pool updates
|
||||
raise "Archive service is not configured" if !enabled?
|
||||
raise NotImplementedError.new("Archive service is not configured.") if !enabled?
|
||||
|
||||
json = {
|
||||
pool_id: pool.id,
|
||||
|
||||
@@ -35,7 +35,7 @@ class PoolVersion < ActiveRecord::Base
|
||||
extend SearchMethods
|
||||
|
||||
def self.export_to_archives(starting_version_id = 0)
|
||||
raise "SQS URL not setup" if Danbooru.config.aws_sqs_archives_url.nil?
|
||||
raise NotImplementedError.new("SQS URL not setup") if Danbooru.config.aws_sqs_archives_url.nil?
|
||||
|
||||
credentials = Aws::Credentials.new(
|
||||
Danbooru.config.aws_access_key_id,
|
||||
|
||||
@@ -60,7 +60,7 @@ class PostArchive < ActiveRecord::Base
|
||||
def queue(post)
|
||||
# queue updates to sqs so that if archives goes down for whatever reason it won't
|
||||
# block post updates
|
||||
raise "Archive service is not configured" if !enabled?
|
||||
raise NotImplementedError.new("Archive service is not configured") if !enabled?
|
||||
|
||||
json = {
|
||||
"post_id" => post.id,
|
||||
|
||||
Reference in New Issue
Block a user