FileSensor¶
Use the FileSensor
to detect files appearing in your local
filesystem. You need to have connection defined to use it (pass connection id via fs_conn_id
).
Default connection is fs_default
.
t6 = FileSensor(task_id="wait_for_file", filepath="/tmp/temporary_file_for_testing")
Also for this job you can use sensor in the deferrable mode:
t7 = FileSensor(
task_id="wait_for_file_async", filepath="/tmp/temporary_file_for_testing", deferrable=True
)