diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-08 15:48:17 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-09 09:18:07 +0200 |
commit | bd911b54b555b11df7e9849cf92d358bccfecf6e (patch) | |
tree | 23e94b4acbe6819fedc1cb5e067b700cbdd880c3 /server/controllers/api/video-channel.ts | |
parent | 5a921e7b74910414626bfc9672b857e987e3ebed (diff) | |
download | PeerTube-bd911b54b555b11df7e9849cf92d358bccfecf6e.tar.gz PeerTube-bd911b54b555b11df7e9849cf92d358bccfecf6e.tar.zst PeerTube-bd911b54b555b11df7e9849cf92d358bccfecf6e.zip |
Use bullmq job dependency
Diffstat (limited to 'server/controllers/api/video-channel.ts')
-rw-r--r-- | server/controllers/api/video-channel.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/video-channel.ts b/server/controllers/api/video-channel.ts index 411ec8630..6b33e894d 100644 --- a/server/controllers/api/video-channel.ts +++ b/server/controllers/api/video-channel.ts | |||
@@ -245,7 +245,7 @@ async function addVideoChannel (req: express.Request, res: express.Response) { | |||
245 | }) | 245 | }) |
246 | 246 | ||
247 | const payload = { actorId: videoChannelCreated.actorId } | 247 | const payload = { actorId: videoChannelCreated.actorId } |
248 | await JobQueue.Instance.createJobWithPromise({ type: 'actor-keys', payload }) | 248 | await JobQueue.Instance.createJob({ type: 'actor-keys', payload }) |
249 | 249 | ||
250 | auditLogger.create(getAuditIdFromRes(res), new VideoChannelAuditView(videoChannelCreated.toFormattedJSON())) | 250 | auditLogger.create(getAuditIdFromRes(res), new VideoChannelAuditView(videoChannelCreated.toFormattedJSON())) |
251 | logger.info('Video channel %s created.', videoChannelCreated.Actor.url) | 251 | logger.info('Video channel %s created.', videoChannelCreated.Actor.url) |
@@ -335,7 +335,7 @@ async function getVideoChannel (req: express.Request, res: express.Response) { | |||
335 | const videoChannel = await Hooks.wrapObject(res.locals.videoChannel, 'filter:api.video-channel.get.result', { id }) | 335 | const videoChannel = await Hooks.wrapObject(res.locals.videoChannel, 'filter:api.video-channel.get.result', { id }) |
336 | 336 | ||
337 | if (videoChannel.isOutdated()) { | 337 | if (videoChannel.isOutdated()) { |
338 | JobQueue.Instance.createJob({ type: 'activitypub-refresher', payload: { type: 'actor', url: videoChannel.Actor.url } }) | 338 | JobQueue.Instance.createJobAsync({ type: 'activitypub-refresher', payload: { type: 'actor', url: videoChannel.Actor.url } }) |
339 | } | 339 | } |
340 | 340 | ||
341 | return res.json(videoChannel.toFormattedJSON()) | 341 | return res.json(videoChannel.toFormattedJSON()) |