1
0
forked from noxious/server

More typescript improvements

This commit is contained in:
2025-02-07 20:54:55 +01:00
parent f5e7d10fb4
commit 52b8a9b7ad
12 changed files with 35 additions and 14 deletions

View File

@ -28,6 +28,11 @@ export class ConsoleManager {
private async processCommand(commandLine: string): Promise<void> {
const [cmd, ...args] = commandLine.trim().split(' ')
if (!cmd) {
console.log('No command provided')
return
}
if (cmd === 'exit') {
this.prompt.close()
return

View File

@ -61,6 +61,7 @@ class DateManager {
if (timeOnlyPattern.test(timeString)) {
const [hours, minutes] = timeString.split(':').map(Number)
if (!hours || !minutes) return null
const newDate = new Date(this.currentDate)
newDate.setHours(hours, minutes)
return newDate

View File

@ -12,7 +12,7 @@ import Storage from '#application/storage'
import SocketManager from '#managers/socketManager'
class QueueManager {
private connection!: IORedis
private connection!: IORedis.Redis
private queue!: Queue
private worker!: Worker
private io!: SocketServer
@ -21,7 +21,7 @@ class QueueManager {
public async boot() {
this.io = SocketManager.getIO()
this.connection = new IORedis(config.REDIS_URL, {
this.connection = new IORedis.Redis(config.REDIS_URL, {
maxRetriesPerRequest: null
})