Class: Eco::API::UseCases::Default::People::Migrate::RemapTags
- Inherits:
-
Common::Loaders::UseCase
- Object
- Common::Loaders::Base
- Common::Loaders::CaseBase
- Common::Loaders::UseCase
- Eco::API::UseCases::Default::People::Migrate::RemapTags
- Defined in:
- lib/eco/api/usecases/default/people/migrate/remap_tags_case.rb,
lib/eco/api/usecases/default/people/migrate/cli/remap_tags_cli.rb
Defined Under Namespace
Classes: Cli
Constant Summary collapse
- REGISTER_TAGS =
%w[ EVENT INJURY RISK CONTRACTOR PERMIT AUDIT JSEA TRAINING INDUCTION MEETING PPE CHEMICAL PLANT ASSET POLICY IDEA REPORTS ].freeze
Instance Attribute Summary
Attributes included from Language::AuxiliarLogger
Instance Method Summary collapse
Methods inherited from Common::Loaders::UseCase
cli, cli!, #cli_apply!, #initialize, type, #type
Methods inherited from Common::Loaders::CaseBase
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
Methods included from Language::AuxiliarLogger
Constructor Details
This class inherits a constructor from Eco::API::Common::Loaders::UseCase
Instance Method Details
#main(*_args) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/eco/api/usecases/default/people/migrate/remap_tags_case.rb', line 16 def main(*_args) people.each do |person| update_job.add(person) (person) update_default_tag!(person) (person) if clear_archived_nodes!(person) if clear_archived_nodes? end end |
#update_job ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/eco/api/usecases/default/people/migrate/remap_tags_case.rb', line 29 def update_job @update_job ||= session.new_job('main', 'update', :update, usecase) do |_job, _job_status| report_archived_cleared report_unknown_cleared end end |