Skip to content

Commit 73ed3a0

Browse files
cleverage/flysystem-process-bundle#14 Update demo.sftp_purge* task for input and file_pattern cases
1 parent e753056 commit 73ed3a0

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

config/packages/process/demo.sftp_purge.yaml renamed to config/packages/process/demo.sftp_purge_input.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
clever_age_process:
22
configurations:
3-
demo.sftp_purge:
3+
demo.sftp_purge_input:
44
description: >
55
A sample process to remove files from flysystem storage.
66
filesystem context variable is used to define source filesystem.
77
file_pattern context variable is used to define file_pattern to match.
88
Following help show us how to delete all .csv files from filesystem remote.storage
99
See config/packages/flysystem.yaml to see configured flysystem/storages.
1010
help: >
11-
bin/console cleverage:process:execute demo.sftp_purge -c filesystem:remote.storage -c file_pattern:/.csv$/ -vv
11+
bin/console cleverage:process:execute demo.sftp_purge_input -c filesystem:remote.storage -c file_pattern:/.csv$/ -vv
1212
options:
1313
ui:
1414
source: Bar
@@ -27,10 +27,10 @@ clever_age_process:
2727
service: '@CleverAge\ProcessBundle\Task\PropertyGetterTask'
2828
description: >
2929
Get filepath within flysystem/storage.
30-
outputs: remove
30+
outputs: remove_input
3131
options:
3232
property: 'path'
33-
remove:
33+
remove_input:
3434
service: '@CleverAge\FlysystemProcessBundle\Task\RemoveFileTask'
3535
options:
3636
filesystem: 'remote.storage'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
clever_age_process:
2+
configurations:
3+
demo.sftp_purge_pattern:
4+
description: >
5+
A sample process to remove files from flysystem storage.
6+
filesystem context variable is used to define source filesystem.
7+
file_pattern context variable is used to define file_pattern to match.
8+
Following help show us how to delete all .csv files from filesystem remote.storage
9+
See config/packages/flysystem.yaml to see configured flysystem/storages.
10+
help: >
11+
bin/console cleverage:process:execute demo.sftp_purge_pattern -c filesystem:remote.storage -c file_pattern:/.csv$/ -vv
12+
options:
13+
ui:
14+
source: Bar
15+
target: Foo
16+
tasks:
17+
remove_pattern:
18+
service: '@CleverAge\FlysystemProcessBundle\Task\RemoveFileTask'
19+
options:
20+
filesystem: '{{ filesystem }}'
21+
file_pattern: '{{ file_pattern }}'

0 commit comments

Comments
 (0)