From 3da21a7856830b97fdd82738ac0f25350c8fe35f Mon Sep 17 00:00:00 2001
From: Dennis Postma <dennis@directonline.io>
Date: Sat, 28 Dec 2024 20:41:53 +0100
Subject: [PATCH] Redundant code

---
 src/commands/tiles.ts | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/commands/tiles.ts b/src/commands/tiles.ts
index 335c82a..b618d43 100644
--- a/src/commands/tiles.ts
+++ b/src/commands/tiles.ts
@@ -1,11 +1,7 @@
 import fs from 'fs'
-import path from 'path'
-
 import sharp from 'sharp'
-import { Server } from 'socket.io'
 
 import { BaseCommand } from '#application/base/baseCommand'
-import { commandLogger } from '#application/logger'
 import { getPublicPath } from '#application/storage'
 
 export default class TilesCommand extends BaseCommand {
@@ -23,7 +19,7 @@ export default class TilesCommand extends BaseCommand {
       // Check if tile is already 66x34
       const metadata = await sharp(getPublicPath('tiles', tile)).metadata()
       if (metadata.width === 66 && metadata.height === 34) {
-        commandLogger.info(`Tile ${tile} already processed`)
+        this.logger.info(`Tile ${tile} already processed`)
         continue
       }
 
@@ -44,7 +40,7 @@ export default class TilesCommand extends BaseCommand {
         fs.unlinkSync(inputPath)
         fs.renameSync(tempPath, inputPath)
 
-        commandLogger.info(`Processed and replaced: ${tile}`)
+        this.logger.info(`Processed and replaced: ${tile}`)
       } catch (error) {
         console.error(`Error processing ${tile}:`, error)
         // Clean up temp file if it exists
@@ -54,6 +50,6 @@ export default class TilesCommand extends BaseCommand {
       }
     }
 
-    commandLogger.info('Tile processing completed.')
+    this.logger.info('Tile processing completed.')
   }
 }