Skip to content

Commit

Permalink
Remvoed unused console.logs and uncommented/commented unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
ydahal1 committed Aug 21, 2024
1 parent 3e2d41a commit 0767264
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 24 deletions.
10 changes: 5 additions & 5 deletions Tombolo/server/config/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ const logger = createLogger({
});

// If we're not in production then also log to the files
if (process.env.NODE_ENV !== 'production') {
const settings = {...common, format: getFormat()}; // will write to files same output as to console but no special char for coloring
logger.add(new transports.File({ ...settings, level: 'http', filename: './logs/combined.log' }));
logger.add(new transports.File({ ...settings, level: 'error', filename: './logs/error.log' })); // only logger.error() will be written here
}
// if (process.env.NODE_ENV !== 'production') {
// const settings = {...common, format: getFormat()}; // will write to files same output as to console but no special char for coloring
// logger.add(new transports.File({ ...settings, level: 'http', filename: './logs/combined.log' }));
// logger.add(new transports.File({ ...settings, level: 'error', filename: './logs/error.log' })); // only logger.error() will be written here
// }

module.exports = logger;
30 changes: 15 additions & 15 deletions Tombolo/server/jobSchedular/job-scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,23 +116,23 @@ class JobScheduler {

bootstrap() {
(async () => {
// await this.scheduleActiveCronJobs();
// await this.scheduleJobStatusPolling();
// await this.scheduleClusterTimezoneOffset();
// await this.scheduleFileMonitoring(); // file monitoring with templates - old file monitoring implementation
// await this.scheduleFileMonitoringOnServerStart();
// await this.scheduleSuperFileMonitoringOnServerStart();
// await this.scheduleClusterMonitoringOnServerStart();
// await this.scheduleKeyCheck();
// await this.createClusterUsageHistoryJob();
await this.scheduleActiveCronJobs();
await this.scheduleJobStatusPolling();
await this.scheduleClusterTimezoneOffset();
await this.scheduleFileMonitoring(); // file monitoring with templates - old file monitoring implementation
await this.scheduleFileMonitoringOnServerStart();
await this.scheduleSuperFileMonitoringOnServerStart();
await this.scheduleClusterMonitoringOnServerStart();
await this.scheduleKeyCheck();
await this.createClusterUsageHistoryJob();
await this.scheduleEmailNotificationProcessing();
// await this.scheduleTeamsNotificationProcessing();
// await this.scheduleOrbitMonitoringOnServerStart();
// await this.createOrbitMegaphoneJob();
// await this.startJobMonitoring();
// await this.startIntermediateJobsMonitoring();
await this.scheduleTeamsNotificationProcessing();
await this.scheduleOrbitMonitoringOnServerStart();
await this.createOrbitMegaphoneJob();
await this.startJobMonitoring();
await this.startIntermediateJobsMonitoring();
await this.startJobPunctualityMonitoring();
// await this.checkClusterReachability();
await this.checkClusterReachability();
})();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@ const SentNotification = models.sent_notifications;
// Send email
const emailResponse = await sendEmail({ ...emailPayload });

console.log('------------------------------------------');
console.dir(emailResponse)
console.log('------------------------------------------');

// Assume success - if no error is thrown
successfulDelivery.push(emailPayload);
}
Expand Down

0 comments on commit 0767264

Please sign in to comment.