Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.15.0
-
None
Description
The JOB_SUCCEEDED timer event actually calls job failure notification to all listeners.
Unable to find source-code formatter for language: java. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
notifyListeners(this.jobContext, jobListener, TimingEvent.LauncherTimings.JOB_SUCCEEDED, new JobListenerAction() { @Override public void apply(JobListener jobListener, JobContext jobContext) throws Exception { jobListener.onJobFailure(jobContext); } });
Following 2 listeners are registered at this point to be called.
1) JobExecutionEventSubmitterListener
2) JobListenerToJobStateBridge
Luckily, Both does not implement/override `onJobFailure` method so it just logs and come back.
Actually JOB_COMPLETE takes care of both marking it SUCCESSFUL and then COMMITTED. so we either dont need this explicit JOB_SUCCEEDED event notifier or need to have explicit marking the job SUCCESSFUL and remove it from the JOB_COMPLETE event listener handler.
// TODO Remove next line once the JobLauncher starts sending notifications for success
_jobState.switchToSuccessful();
_jobState.switchToCommitted();