Added .active? to Import backends default API for e.g. monitoring checks.

This commit is contained in:
Thorsten Eckel 2018-02-17 12:28:38 +01:00
parent 7dc2875a49
commit ef1236b3ab
2 changed files with 18 additions and 0 deletions

View file

@ -3,6 +3,17 @@
module Import
class Base
# Checks if the backend is active.
#
# @example
# Import::ExampleBackend.active?
# #=> true
#
# return [Boolean]
def self.active?
true
end
# Checks if the backend is able to get queued by the Scheduler.
#
# @example

View file

@ -4,6 +4,13 @@ require 'lib/import/import_job_backend_examples'
RSpec.describe Import::Base do
it_behaves_like 'ImportJob backend'
describe '#active?' do
it 'returns true by default' do
expect(described_class.active?).to be true
end
end
describe '#queueable?' do
it 'returns true by default' do