willmorrison1 / files-transfer

0 stars 0 forks source link

if lftp has nothing to do, then there will be no files sent, and no storage of "--since" in the lftp log #2

Closed willmorrison1 closed 1 year ago

willmorrison1 commented 1 year ago

If all files have been transferred since the last execution, then lftp will not send anything, and no files will be in the log file. Then there will be no last date in the log. Then --since will need to manually be set

https://github.com/willmorrison1/files-transfer/blob/86be51e7e15d419ae2ff77329380cc0a0f02ce65/lftp_transfer.py#L71

willmorrison1 commented 1 year ago

all good. tested by spamming the script.

  09/08/2023   09:22.07   /cygdrive/c/Lidar/Software/FTP/files-transfer-main  cd /cygdrive/c/Lidar/Software/FTP/files-transfer-main;  python3 lftp_transfer.py conf/Background_transfer.toml log/Background_transfer.log --since 2023-08-09T06:00:00
lftp command: ['/usr/bin/lftp', '-u', 'datagate2,entrench-humongous-linguini-wavy-brigade-salvation', '132.230.103.24', '-e', 'cache flush;set net:timeout 10s;set net:max-retries 2;set net:idle 15s;debug 3; mirror --log=/drives/c/Lidar/Software/FTP/files-transfer-main/log/Background_transfer.log -R -p -L -v /tmp/tmp10dzsdct data/StreamLine/175; bye']
lftp return code: 0
lftp stdout: Transferring file `Background_090823-090017.txt'
New: 1 file, 0 symlinks
11333 bytes transferred
To be removed: 0 directories, 460 files, 0 symlinks

lftp stderr: ---- Connecting to 132.230.103.24 (132.230.103.24) port 21
<--- 220 (vsFTPd 3.0.5)
<--- 230 Login successful.
<--- 250 Directory successfully changed.

Date of Last sent file: 2023-08-09 08:00:17
                                                                                                                             ✓

  09/08/2023   09:22.39   /cygdrive/c/Lidar/Software/FTP/files-transfer-main  cd /cygdrive/c/Lidar/Software/FTP/files-transfer-main;  python3 lftp_transfer.py conf/Background_transfer.toml log/Background_transfer.log
lftp command: ['/usr/bin/lftp', '-u', 'datagate2,entrench-humongous-linguini-wavy-brigade-salvation', '132.230.103.24', '-e', 'cache flush;set net:timeout 10s;set net:max-retries 2;set net:idle 15s;debug 3; mirror --log=/drives/c/Lidar/Software/FTP/files-transfer-main/log/Background_transfer.log -R -p -L -v /tmp/tmp06mp3zhz data/StreamLine/175; bye']
lftp return code: 0
lftp stdout: To be removed: 0 directories, 462 files, 0 symlinks

lftp stderr: ---- Connecting to 132.230.103.24 (132.230.103.24) port 21
<--- 220 (vsFTPd 3.0.5)
<--- 230 Login successful.
<--- 250 Directory successfully changed.

Date of Last sent file: None
                                                                                                                             ✓

  09/08/2023   09:23.20   /cygdrive/c/Lidar/Software/FTP/files-transfer-main  cd /cygdrive/c/Lidar/Software/FTP/files-transfer-main;  python3 lftp_transfer.py conf/Background_transfer.toml log/Background_transfer.log
Looking for files since: 2023-08-09 08:00:17
lftp command: ['/usr/bin/lftp', '-u', 'datagate2,entrench-humongous-linguini-wavy-brigade-salvation', '132.230.103.24', '-e', 'cache flush;set net:timeout 10s;set net:max-retries 2;set net:idle 15s;debug 3; mirror --log=/drives/c/Lidar/Software/FTP/files-transfer-main/log/Background_transfer.log -R -p -L -v /tmp/tmppuicbblw data/StreamLine/175; bye']
lftp return code: 0
lftp stdout: To be removed: 0 directories, 462 files, 0 symlinks

lftp stderr: ---- Connecting to 132.230.103.24 (132.230.103.24) port 21
<--- 220 (vsFTPd 3.0.5)
<--- 230 Login successful.
<--- 250 Directory successfully changed.

Date of Last sent file: None
                                                                                                                             ✓

  09/08/2023   09:25.02   /cygdrive/c/Lidar/Software/FTP/files-transfer-main  cd /cygdrive/c/Lidar/Software/FTP/files-transfer-main;  python3 lftp_transfer.py conf/Background_transfer.toml log/Background_transfer.log
Looking for files since: 2023-08-09 08:00:17
lftp command: ['/usr/bin/lftp', '-u', 'datagate2,entrench-humongous-linguini-wavy-brigade-salvation', '132.230.103.24', '-e', 'cache flush;set net:timeout 10s;set net:max-retries 2;set net:idle 15s;debug 3; mirror --log=/drives/c/Lidar/Software/FTP/files-transfer-main/log/Background_transfer.log -R -p -L -v /tmp/tmpcyrvrtzl data/StreamLine/175; bye']
lftp return code: 0
lftp stdout: To be removed: 0 directories, 462 files, 0 symlinks

lftp stderr: ---- Connecting to 132.230.103.24 (132.230.103.24) port 21
<--- 220 (vsFTPd 3.0.5)
<--- 230 Login successful.
<--- 250 Directory successfully changed.

Date of Last sent file: None
                                                                                                                             ✓

  09/08/2023   09:25.53   /cygdrive/c/Lidar/Software/FTP/files-transfer-main  cd /cygdrive/c/Lidar/Software/FTP/files-transfer-main;  python3 lftp_transfer.py conf/Background_transfer.toml log/Background_transfer.log
Looking for files since: 2023-08-09 08:00:17
lftp command: ['/usr/bin/lftp', '-u', 'datagate2,entrench-humongous-linguini-wavy-brigade-salvation', '132.230.103.24', '-e', 'cache flush;set net:timeout 10s;set net:max-retries 2;set net:idle 15s;debug 3; mirror --log=/drives/c/Lidar/Software/FTP/files-transfer-main/log/Background_transfer.log -R -p -L -v /tmp/tmpv7j2fyxh data/StreamLine/175; bye']
lftp return code: 0
lftp stdout: To be removed: 0 directories, 462 files, 0 symlinks

lftp stderr: ---- Connecting to 132.230.103.24 (132.230.103.24) port 21
<--- 220 (vsFTPd 3.0.5)
<--- 230 Login successful.
<--- 250 Directory successfully changed.

Date of Last sent file: None