boolean update = ( logTable.getKeyField() != null ) && !status.equals( LogStatus.START ); String schemaTable = databaseMeta.getQuotedSchemaTableCombination(
if ( status.equals( LogStatus.END ) ) { ldb.cleanupLogRecords( performanceLogTable );
if ( status.equals( LogStatus.END ) || status.equals( LogStatus.STOP ) ) { ldb.cleanupLogRecords( transLogTable ); transMeta.getTransLogTable().getActualTableName() ), e ); } finally { if ( intervalInSeconds <= 0 || ( status.equals( LogStatus.END ) || status.equals( LogStatus.STOP ) ) ) { ldb.disconnect();
/** * Writes information to Job Log table. Cleans old records, in case job is finished. */ protected void writeLogTableInformation( JobLogTable jobLogTable, LogStatus status ) throws KettleJobException, KettleDatabaseException { boolean cleanLogRecords = status.equals( LogStatus.END ); String tableName = jobLogTable.getActualTableName(); DatabaseMeta logcon = jobLogTable.getDatabaseMeta(); Database ldb = createDataBase( logcon ); ldb.shareVariablesWith( this ); try { ldb.connect(); ldb.setCommit( logCommitSize ); ldb.writeLogRecord( jobLogTable, status, this, null ); if ( cleanLogRecords ) { ldb.cleanupLogRecords( jobLogTable ); } } catch ( KettleDatabaseException dbe ) { addErrors( 1 ); throw new KettleJobException( "Unable to end processing by writing log record to table " + tableName, dbe ); } finally { if ( !ldb.isAutoCommit() ) { ldb.commitLog( true, jobLogTable ); } ldb.disconnect(); } }
} else if ( status != null && LogStatus.STOP.equals( status ) ) { item.setBackground( GUIResource.getInstance().getColorYellow() );
} else if ( status != null && LogStatus.STOP.equals( status ) ) { item.setBackground( GUIResource.getInstance().getColorYellow() );