Skip to content

Commit

Permalink
Added start and end time to genie log file for debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
amitsharmaak committed Sep 26, 2016
1 parent 82b2bd8 commit 30e4622
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ public final class JobConstants {
.append("}\n")
.append("\n")
.append("SELF_PID=$$\n\n")
.append("echo \"Start run execution\"\n")
.append("echo Start: `date '+%Y-%m-%d %H:%M:%S'`\n")
.toString();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ public void executeTask(@NotNull final Map<String, Object> context) throws Genie
writer.write(JobConstants.GENIE_DONE_FILE_CONTENT_PREFIX
+ JobConstants.GENIE_DONE_FILE_NAME
+ System.lineSeparator());

// Print the timestamp once its done running.
writer.write("echo End: `date '+%Y-%m-%d %H:%M:%S'`\n");

log.info("Finished Job Task for job {}", jobExecEnv.getJobRequest().getId());
} finally {
final long finish = System.nanoTime();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function handle_kill_request {

SELF_PID=$$

echo "Start run execution"
echo Start: `date '+%Y-%m-%d %H:%M:%S'`

export GENIE_JOB_DIR="TEST_GENIE_JOB_WORKING_DIR_PLACEHOLDER"

Expand Down Expand Up @@ -112,3 +112,4 @@ wait $!

# Write the return code from the command in the done file.
printf '{"exitCode": "%s"}\n' "$?" > ./genie/genie.done
echo End: `date '+%Y-%m-%d %H:%M:%S'`
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function handle_kill_request {

SELF_PID=$$

echo "Start run execution"
echo Start: `date '+%Y-%m-%d %H:%M:%S'`

export GENIE_JOB_DIR="TEST_GENIE_JOB_WORKING_DIR_PLACEHOLDER"

Expand Down Expand Up @@ -112,3 +112,4 @@ wait $!

# Write the return code from the command in the done file.
printf '{"exitCode": "%s"}\n' "$?" > ./genie/genie.done
echo End: `date '+%Y-%m-%d %H:%M:%S'`

0 comments on commit 30e4622

Please sign in to comment.