Skip to content

Commit

Permalink
fix: remove source files in agena3000 sftp (#8596)
Browse files Browse the repository at this point in the history
Co-authored-by: off <off@openfoodfacts.org>
  • Loading branch information
stephanegigandet and off authored Jun 27, 2023
1 parent c78a796 commit 0492d87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/agena3000/run_agena3000_import.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Mirror data from Agena3000's server
# access needs to be configured in ~/.netrc
lftp -c "set cmd:default-protocol sftp; open sftp-a3dm.agena3000.com:2222; mirror / /home/sftp/agena3000/"
lftp -c "set cmd:default-protocol sftp; open sftp-a3dm.agena3000.com:2222; mirror --Remove-source-files /PROD/Fiches/ /home/sftp/agena3000/PROD/Fiches/"

cd /srv/off-pro/scripts

Expand All @@ -28,4 +28,4 @@ export PERL5LIB="/srv/off-pro/lib:${PERL5LIB}"
/srv/off-pro/scripts/import_csv_file.pl --user_id agena3000 --org_id agena3000 --source_id agena3000 --source_name Agena3000 --source_url https://agena3000.com/ --manufacturer 1 --comment "Import from Agena3000" --define lc=fr --images_download_dir /srv2/off-pro/agena3000-images-tmp --csv_file /srv2/off-pro/agena3000-data-tmp/agena3000-data.tsv

# Send confirmation messages to Agena3000
lftp -c "set cmd:default-protocol sftp; open sftp-a3dm.agena3000.com:2222; mirror -R /srv2/off-pro/agena3000-data-tmp/Ack/ /PROD/Ack/"
lftp -c "set cmd:default-protocol sftp; open sftp-a3dm.agena3000.com:2222; mirror -R --Remove-source-files /srv2/off-pro/agena3000-data-tmp/Ack/ /PROD/Ack/"

0 comments on commit 0492d87

Please sign in to comment.