Requirement to keep a S3 File Watcher active for period of time
search cancel

Requirement to keep a S3 File Watcher active for period of time

book

Article ID: 392719

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

There is a requirement to keep an S3 File Watcher job running for 2 hours and terminate if it doesn't find any file after 2 hours. Under the current setup of the job, it is failing immediately when file is not present.

/* ----------------- MY_TEST_S3_FILE_WATCHER_JOB ----------------- */

insert_job: MY_TEST_S3_FILE_WATCHER_JOB   job_type: POJO
box_name: MY_TEST_S3_FILE_WATCHER_JOB
machine: localhost
owner: autosys
permission: ge,gx,we,wx
date_conditions: 0
description: "S3 File Watcher"
term_run_time: 1
alarm_if_fail: 1
alarm_if_terminated: 1
method_name: create
j2ee_parameter: s3.Endpoint=https\://s3.##########.amazonaws.com
j2ee_parameter: s3.AccessKey=$$
j2ee_parameter: s3.AccessKeySecret=$$                                                       
j2ee_parameter: s3.Region=us-east-1
j2ee_parameter: s3.BucketName=tst-bkt
j2ee_parameter: s3.FileName="###/#######/#######/SOMEFILE.txt"
j2ee_parameter: s3.SteadyState=20s
j2ee_parameter: s3.FileSize=100
j2ee_parameter: s3.SleepInterval=2
j2ee_parameter: s3.QueryParam="max-keys=100"
j2ee_parameter: s3.UseRegex=false
j2ee_parameter: s3.Strategy=""
j2ee_parameter: s3.LogLevel=16
j2ee_parameter: s3.FailureInterval=3
j2ee_parameter: s3.ReturnFileURI=true
class_name: com.broadcom.pojo.s3.S3AWS

Environment

AutoSys Workload Automation 12.x
Workload Automation Agent 12.x

Resolution

The issue resides with the j2ee_parameter: s3.SteadyState parameter. Change the lower case s to be upper case S

/* ----------------- MY_TEST_S3_FILE_WATCHER_JOB ----------------- */

insert_job: MY_TEST_S3_FILE_WATCHER_JOB   job_type: POJO
box_name: MY_TEST_S3_FILE_WATCHER_JOB
machine: localhost
owner: autosys
permission: ge,gx,we,wx
date_conditions: 0
description: "S3 File Watcher"
term_run_time: 1
alarm_if_fail: 1
alarm_if_terminated: 1
method_name: create
j2ee_parameter: s3.Endpoint=https\://s3.##########.amazonaws.com
j2ee_parameter: s3.AccessKey=$$
j2ee_parameter: s3.AccessKeySecret=$$                                                       
j2ee_parameter: s3.Region=us-east-1
j2ee_parameter: s3.BucketName=tst-bkt
j2ee_parameter: s3.FileName="###/#######/#######/SOMEFILE.txt"
j2ee_parameter: s3.SteadyState=7200S
j2ee_parameter: s3.FileSize=100
j2ee_parameter: s3.SleepInterval=2
j2ee_parameter: s3.QueryParam="max-keys=100"
j2ee_parameter: s3.UseRegex=false
j2ee_parameter: s3.Strategy=""
j2ee_parameter: s3.LogLevel=16
j2ee_parameter: s3.FailureInterval=3
j2ee_parameter: s3.ReturnFileURI=true
class_name: com.broadcom.pojo.s3.S3AWS