Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,14 @@ public void operate() {
String res = response.body().string();
JSONObject j = JSONObject.parseObject(res);
logResponse(LOG, res);
String scheduleId = j.getJSONObject("schedule").getString("scheduleId");
LOG.info("Schedule fetched: scheduleId=" + scheduleId);
scheduleIds.add(scheduleId);
JSONObject jsonSchedule = j.getJSONObject("schedule");
// A scheduleId for delete actions are not present!
if (jsonSchedule != null) { // prevent for NPE by delete actions
String scheduleId = jsonSchedule.getString("scheduleId");
LOG.info("Schedule fetched: scheduleId=" + scheduleId);
scheduleIds.add(scheduleId);
}

}
} catch (IOException e) {
Throwables.propagate(e);
Expand Down
15 changes: 8 additions & 7 deletions src/main/resources/config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
# java -jar target/azkaban-app-deployer-0.0.1-SNAPSHOT-jar-with-dependencies.jar -t exec -c /Users/yanjun/Workspaces/github/azk-client/src/main/resources/config.properties
# java -jar target/azkaban-app-deployer-0.0.1-SNAPSHOT-jar-with-dependencies.jar -t delete -c /Users/yanjun/Workspaces/github/azk-client/src/main/resources/config.properties

azkaban.server.url = http://172.16.117.62:8099
azkaban.user = azkaban
azkaban.password = azkaban
project.name = test-demo-hourly
project.description = test-demo-hourly
job.zip.file = /Users/yanjun/Azkaban/demo/demo-syj.zip
cron.expr = 0 45 * * * ?
azkaban.server.url = http://127.0.0.1:8081
azkaban.user = admin
azkaban.password = admin
project.name = test-client
project.description = test client from CLI
job.zip.file = /home/dweiss/tmp/job.zip
cron.expr = */5 * * * *
# cron.expr = 0 45 * * * ?