Class: EcoRake::Lib::People::SyncProcess

Inherits:
SyncRely show all
Defined in:
lib/eco-rake/lib/people/sync_process.rb

Overview

Note:

in integration repos this is used to be called run:feed

The top level task that organizes all the people sync

Constant Summary collapse

DATA_FILE_EXTENSIONS =
%w[
  .csv .json .xml .txt .xls .xlsx xlsm .xlsb
].freeze

Constants inherited from SyncRely

EcoRake::Lib::People::SyncRely::FORWARD_RULES

Constants inherited from BaseTask

BaseTask::FORWARD_RULES

Constants inherited from EcoRake

VERSION

Instance Method Summary collapse

Instance Method Details

#task(*_args) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/eco-rake/lib/people/sync_process.rb', line 26

def task(*_args)
  upsert_local_dir(options[:folder])
  archive_local_data_files(options[:folder]) if clean_local_folder_data?

  sh_continue pull_file
  failed_decryption_notify if do_decrypt && !sh_continue(rake_decrypt).zero?

  sh_continue rake_sync_command
  return if options[:simulate]

  sh_continue rake_sftp_archive if remote_archive && pull_driver.to_sym == :sftp
  sh_continue rake_files_purge('cache')
  sh_continue rake_files_purge('requests')
end