Ashley Felber
12/05/2022, 5:39 PMBoggdan Barrientos
12/05/2022, 6:18 PM@task(name="s3-sensor",
description="This task sensing s3 files")
def s3_sensor(s3_bucket,s3_prefix,s3_filename,incremental):
logger_run = get_run_logger()
while True:
bool_s3_object_arrived = check_if_file_arrived_in_s3(your args)
if bool_s3_object_arrived is True:
<http://logger_run.info|logger_run.info>(
f"The file has arrived today"
)
break
if bool_s3_object_arrived is False:
<http://logger_run.info|logger_run.info>(
f"Re-schedule the file is not updated"
)
time.sleep(180)
Ashley Felber
12/05/2022, 11:30 PM