Class: BulkImports::ExportStatus

Inherits:
Object
  • Object
show all
Includes:
Gitlab::Utils::StrongMemoize
Defined in:
app/models/bulk_imports/export_status.rb

Instance Method Summary collapse

Methods included from Gitlab::Utils::StrongMemoize

#clear_memoization, #strong_memoize, #strong_memoized?

Constructor Details

#initialize(pipeline_tracker, relation) ⇒ ExportStatus

Returns a new instance of ExportStatus.


7
8
9
10
11
12
13
# File 'app/models/bulk_imports/export_status.rb', line 7

def initialize(pipeline_tracker, relation)
  @pipeline_tracker = pipeline_tracker
  @relation = relation
  @entity = @pipeline_tracker.entity
  @configuration = @entity.bulk_import.configuration
  @client = Clients::HTTP.new(url: @configuration.url, token: @configuration.access_token)
end

Instance Method Details

#errorObject


23
24
25
# File 'app/models/bulk_imports/export_status.rb', line 23

def error
  export_status['error']
end

#failed?Boolean

Returns:

  • (Boolean)

19
20
21
# File 'app/models/bulk_imports/export_status.rb', line 19

def failed?
  export_status['status'] == Export::FAILED
end

#started?Boolean

Returns:

  • (Boolean)

15
16
17
# File 'app/models/bulk_imports/export_status.rb', line 15

def started?
  export_status['status'] == Export::STARTED
end