Remove debug logs from autosync service

- Remove excessive debug logging from scheduleAutoSync and stopAutoSync
- Keep essential logging for troubleshooting
- Clean up console output for production use
This commit is contained in:
Michel Roegl-Brunner
2025-10-24 22:30:26 +02:00
parent eca0cb57f9
commit 16947cedf5

View File

@@ -231,12 +231,9 @@ export class AutoSyncService {
* Schedule auto-sync cron job * Schedule auto-sync cron job
*/ */
scheduleAutoSync() { scheduleAutoSync() {
console.log('scheduleAutoSync called - stopping any existing job first');
this.stopAutoSync(); // Stop any existing job this.stopAutoSync(); // Stop any existing job
const settings = this.loadSettings(); const settings = this.loadSettings();
console.log('Current settings loaded:', { autoSyncEnabled: settings.autoSyncEnabled });
if (!settings.autoSyncEnabled) { if (!settings.autoSyncEnabled) {
console.log('Auto-sync is disabled, not scheduling cron job'); console.log('Auto-sync is disabled, not scheduling cron job');
this.isRunning = false; // Ensure we're completely stopped this.isRunning = false; // Ensure we're completely stopped
@@ -315,9 +312,7 @@ export class AutoSyncService {
* Stop auto-sync cron job * Stop auto-sync cron job
*/ */
stopAutoSync() { stopAutoSync() {
console.log('stopAutoSync called - cronJob exists:', !!this.cronJob);
if (this.cronJob) { if (this.cronJob) {
console.log('Stopping and destroying cron job...');
this.cronJob.stop(); this.cronJob.stop();
this.cronJob.destroy(); this.cronJob.destroy();
this.cronJob = null; this.cronJob = null;