Skip to content

Commit

Permalink
relax time skew check for loginfo
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePrez committed Mar 4, 2021
1 parent bf50784 commit 4486b48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/jesseg/ibmi/opensource/OperationExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ private void printLogInfo() throws SCException {
try {
final long fileTs = new SimpleDateFormat(LOG_FILE_DATE_FORMAT).parse(new File(possibleLogFile).getName().substring(0, LOG_FILE_DATE_FORMAT.length() + 4)).getTime();
final long jobStart = QueryUtils.getJobStartTime(job, m_logger);
if (Math.abs(jobStart - fileTs) < 5000) {
final long tsDelta = Math.abs(jobStart - fileTs);
m_logger.printf_verbose("fileTs = %d, jobStart = %d, delta = %d\n", fileTs, jobStart, tsDelta);
if (tsDelta < 9500) {
m_logger.println(StringUtils.colorizeForTerminal("tail -f " + possibleLogFile, TerminalColor.CYAN));
isAnythingFound = true;
break;
Expand Down

0 comments on commit 4486b48

Please sign in to comment.