From 4c14f1a4ea749a936887bd8f6610f8295e8647f4 Mon Sep 17 00:00:00 2001 From: Foyzul Karim Date: Sun, 8 Oct 2023 21:31:14 +1100 Subject: [PATCH] Commented queue processing. TBD later --- server/src/modules/models/video/controller.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/server/src/modules/models/video/controller.js b/server/src/modules/models/video/controller.js index 5cee21c..3971b04 100644 --- a/server/src/modules/models/video/controller.js +++ b/server/src/modules/models/video/controller.js @@ -12,6 +12,7 @@ const { } = require('./service'); const { validate } = require('./request'); const { VIDEO_QUEUE_EVENTS: QUEUE_EVENTS } = require('../../queues/constants'); +const { VIDEO_STATUS } = require('../../db/constant'); const { addQueueItem } = require('../../queues/queue'); const { getVideoDurationAndResolution, @@ -185,16 +186,17 @@ const setupRoutes = (app) => { videoLink: req.file.location, viewCount: 0, duration: 0, + status: VIDEO_STATUS.PUBLISHED }; logger.info('dbPayload', { dbPayload }); // TODO: save the file info and get the id from the database const result = await insert(dbPayload); logger.info('result', result); - await addQueueItem(QUEUE_EVENTS.VIDEO_UPLOADED, { - id: result.insertedId.toString(), - ...req.body, - ...req.file, - }); + // await addQueueItem(QUEUE_EVENTS.VIDEO_UPLOADED, { + // id: result.insertedId.toString(), + // ...req.body, + // ...req.file, + // }); res.status(200).json({ status: 'success', message: 'Upload success',