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 Helpers::Base::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, cli!, #cli_apply!, #initialize, #main, type, #type

Methods inherited from Common::Loaders::CaseBase

#name, name_only_once!

Methods inherited from Common::Loaders::Base

<=>, created_at, #initialize, set_created_at!

Methods included from Common::ClassHelpers

#class_resolver, #descendants, #descendants?, #inheritable_attrs, #inheritable_class_vars, #inherited, #instance_variable_name, #new_class, #resolve_class, #to_constant

Constructor Details

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

Instance Method Details

#batch_tree_track_mode(stage) ⇒ Symbol

Note:
  1. This aims to optimize the time run
  2. Based on update stage, there are differentiated tracking needs

Default tree tacking behaviour

Returns:

  • (Symbol)

    the tracking mode



68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/eco/api/usecases/graphql/samples/location/command/dsl.rb', line 68

def batch_tree_track_mode(stage)
  case stage
  when :unarchive, :archive
    :once
  when :id, :id_name
    :per_request
  when :insert, :move
    :per_batch
  else
    default_tree_tracking_mode
  end
end