forked from noxious/server
More typescript improvements
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user