Skip to content

Commit

Permalink
PRESIDECMS-2715 Code hygeine changes from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicWatson committed Sep 22, 2023
1 parent 613c2ed commit e089d2c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
12 changes: 6 additions & 6 deletions system/config/Config.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -306,18 +306,18 @@ component {
class = 'coldbox.system.logging.appenders.RollingFileAppender'
, properties = { filePath=settings.logsMapping, filename="coldbox.log", async=true }
},
taskmanagerRequestAppender = {
class = 'preside.system.services.logger.TaskmanagerLogAppender'
taskManagerRequestAppender = {
class = 'preside.system.services.logger.TaskManagerLogAppender'
, properties = { logName="TASKMANAGER" }
},
adhocTaskmanagerAppender = {
class = 'preside.system.services.logger.AdhocTaskmanagerLogAppender'
, properties = { logName="TASKMANAGER" }
adhocTaskManagerAppender = {
class = 'preside.system.services.logger.AdhocTaskManagerLogAppender'
, properties = { logName="ADHOCTASKMANAGER" }
}
},
root = { appenders='defaultLogAppender', levelMin='FATAL', levelMax='WARN' },
categories = {
taskManager = { appenders='taskmanagerRequestAppender', levelMin='FATAL', levelMax='INFO' },
taskManager = { appenders='taskManagerRequestAppender', levelMin='FATAL', levelMax='INFO' },
adhocTaskManager = { appenders='adhocTaskmanagerAppender' , levelMin='FATAL', levelMax='INFO' }
}
};
Expand Down
4 changes: 2 additions & 2 deletions system/handlers/admin/AdHocTaskManager.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ component extends="preside.system.base.AdminHandler" {
} else {
if ( Len( prc.taskProgress.log ) ) {
prc.taskProgress.lineCount = ListLen( prc.taskProgress.log, Chr( 10 ) );
prc.taskProgress.log = logRendererUtil.renderLegacyLogs( prc.taskProgress.log );
prc.taskProgress.log = logRendererUtil.renderLegacyLogs( prc.taskProgress.log );
} else {
prc.taskProgress.log = logRendererUtil.renderLogs( adhocTaskManagerService.getLogLines( prc.taskProgress.id ) );
prc.taskProgress.lineCount = adhocTaskManagerService.getLogLineCount( prc.taskProgress.id );
prc.taskProgress.log = logRendererUtil.renderLogs( adhocTaskManagerService.getLogLines( prc.taskProgress.id ) );
}
prc.taskProgress.timeTaken = renderContent( renderer="TaskTimeTaken", data=prc.taskProgress.timeTaken*1000, context=[ "accurate" ] );
}
Expand Down
4 changes: 2 additions & 2 deletions system/services/taskmanager/LogRendererUtil.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ component {
var outputArray = [];

for( var i=arguments.fetchAfterLines+1; i <= logArray.len(); i++ ){
var line = logArray[ i ];
var logClass = LCase( ReReplace( line, '^\[(.*?)\].*$', '\1' ) );
var line = logArray[ i ];
var logClass = LCase( ReReplace( line, '^\[(.*?)\].*$', '\1' ) );
var dateTimeRegex = "(\[20[0-9]{2}\-[0-9]{2}\-[0-9]{2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}\])";

line = ReReplace( line, dateTimeRegex, '<span class="task-log-datetime">\1</span>' );
Expand Down
1 change: 0 additions & 1 deletion system/services/taskmanager/TaskManagerService.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,6 @@ component displayName="Task Manager Service" {
);
}


public struct function runScheduledTasks() {
var settings = _getSystemConfigurationService().getCategorySettings( "taskmanager" );
var scheduledTasksEnabled = settings.scheduledtasks_enabled ?: false;
Expand Down

0 comments on commit e089d2c

Please sign in to comment.