Skip to content

Latest commit

 

History

History
36 lines (32 loc) · 806 Bytes

abort_if_exists.md

File metadata and controls

36 lines (32 loc) · 806 Bytes
title description published date tags editor dateCreated
abort_if_exists
true
2022-09-18 05:01:38 UTC
markdown
2022-09-18 05:01:36 UTC

Abort If Exists

Abort the running task if the specified field in an entry matches the regexp. This is useful when moving local files around and a program is currently transferring data to the disk.

abort_if_exists:
  regexp: <regexp>
  field: <field name>

Example

Abort the task if lftp is currently transferring data.

tasks:
  example_task:
    filesystem:
      path:
        - /storage/movies/
        - /storage/tv/
      recursive: yes
      retrieve: files
      regexp: '.*\.(avi|mkv|mp4|lftp-get-status)$'
    abort_if_exists:
      regexp: '.*\.lftp-get-status$'
      field: location