Storage class is now OOP
This commit is contained in:
@ -6,7 +6,7 @@ import { Server as SocketServer } from 'socket.io'
|
||||
|
||||
import config from '#application/config'
|
||||
import Logger, { LoggerType } from '#application/logger'
|
||||
import { getAppPath } from '#application/storage'
|
||||
import Storage from '#application/storage'
|
||||
import { TSocket } from '#application/types'
|
||||
import SocketManager from '#managers/socketManager'
|
||||
|
||||
@ -56,9 +56,9 @@ class QueueManager {
|
||||
const { jobName, params, socketId } = job.data
|
||||
|
||||
try {
|
||||
const jobsDir = getAppPath('jobs')
|
||||
const jobsDir = Storage.getAppPath('jobs')
|
||||
const extension = config.ENV === 'development' ? '.ts' : '.js'
|
||||
const jobPath = getAppPath('jobs', `${jobName}${extension}`)
|
||||
const jobPath = Storage.getAppPath('jobs', `${jobName}${extension}`)
|
||||
|
||||
if (!fs.existsSync(jobPath)) {
|
||||
this.logger.warn(`Job file not found: ${jobPath}`)
|
||||
|
Reference in New Issue
Block a user