Class: Eco::API::UseCases::GraphQL::Samples::Location

Inherits:
Base show all
Includes:
DSL
Defined in:
lib/eco/api/usecases/graphql/samples/location.rb,
lib/eco/api/usecases/graphql/samples/location/command/dsl.rb,
lib/eco/api/usecases/graphql/samples/location/command/results.rb,
lib/eco/api/usecases/graphql/samples/location/command/service.rb,
lib/eco/api/usecases/graphql/samples/location/command/track_changed_ids.rb,
lib/eco/api/usecases/graphql/samples/location/command/service/tree_update.rb

Direct Known Subclasses

Default::Locations::TagtreeExtract, Command

Defined Under Namespace

Modules: DSL, Service Classes: Command

Constant Summary

Constants included from Helpers::Location::Base::TreeTracking

Helpers::Location::Base::TreeTracking::TAGTREE_BACKUP

Instance Attribute Summary

Attributes included from Lib::ErrorHandling

#exception, #exiting

Attributes included from Language::AuxiliarLogger

#logger

Attributes included from Helpers::Location::Base::TreeTracking

#current_tree, #previous_tree

Instance Method Summary collapse

Methods included from Helpers::Location::Base

#live_tree, #session_live_tree, #tagtree_id, #target_structure_id, #target_structure_id_const

Methods included from Language::AuxiliarLogger

#log

Methods included from Helpers::Location::Base::TreeTracking

#backup_tree, #track_current_tree, #track_current_tree?

Methods inherited from Base

#main, #process

Methods included from Language::Methods::CallDetector

#called_via?

Methods inherited from Common::Loaders::UseCase

#cli_apply!, #initialize, #main

Methods included from Common::Loaders::UseCase::CliIdentify

#cli, #cli!

Methods included from Common::Loaders::UseCase::TargetModel

#target_model

Methods included from Common::Loaders::UseCase::Type

#type

Methods inherited from Common::Loaders::CaseBase

#name, name_only_once!, original_name

Methods inherited from Common::Loaders::Base

<=>, created_at, #initialize, set_created_at!

Methods included from Language::Klass::InheritableClassVars

#inheritable_attrs, #inheritable_class_vars, #inherited

Methods included from Language::Klass::Naming

#instance_variable_name, #to_constant

Methods included from Language::Klass::Hierarchy

#descendants, #descendants?

Methods included from Language::Klass::Builder

#new_class

Methods included from Language::Klass::Uid

#uid

Methods included from Language::Klass::Resolver

#class_resolver, #resolve_class

Methods included from Language::Klass::Const

#if_const, #redef_without_warning

Constructor Details

This class inherits a constructor from Eco::API::Common::Loaders::UseCase

Instance Method Details

#results_tracking_block(stage:) ⇒ Object



106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/eco/api/usecases/graphql/samples/location/command/dsl.rb', line 106

def results_tracking_block(stage:)
  proc do |sliced_input, response, page, pages, done, total|
    # yields the result of each batch

    input_response = input_unit_response_class.new(
      sliced_input,
      response
    )

    results.add_response(
      stage,
      input_response
    )

    # early detection of errors
    self.error ||= page_errors?(
      input_response,
      page,
      pages,
      done,
      total,
      stage: stage
    )
  end
end