docs: void endOfRunDb()
      {
          DbConn cnx = null;
  
          try
          {
              cnx = Helpers.getNewDbSession();
  
              // Done: put inside history & remove instance from queue.
              History.create(cnx, this.ji, this.resultStatus, endDate);
              jqmlogger.trace("An History was just created for job instance " + this.ji.getId());
              cnx.runUpdate("ji_delete_by_id", this.ji.getId());
              cnx.commit();
          }
          catch (RuntimeException e)
          {
              endBlockDbFailureAnalysis(e);
          }
          finally
          {
              Helpers.closeQuietly(cnx);
          }
      }