diff options
Diffstat (limited to 'server/lib/job-queue')
-rw-r--r-- | server/lib/job-queue/handlers/activitypub-follow.ts | 6 | ||||
-rw-r--r-- | server/lib/job-queue/handlers/video-file.ts | 12 |
2 files changed, 3 insertions, 15 deletions
diff --git a/server/lib/job-queue/handlers/activitypub-follow.ts b/server/lib/job-queue/handlers/activitypub-follow.ts index 6764a4037..286e343f2 100644 --- a/server/lib/job-queue/handlers/activitypub-follow.ts +++ b/server/lib/job-queue/handlers/activitypub-follow.ts | |||
@@ -26,12 +26,8 @@ async function processActivityPubFollow (job: kue.Job) { | |||
26 | const targetActor = await getOrCreateActorAndServerAndModel(actorUrl) | 26 | const targetActor = await getOrCreateActorAndServerAndModel(actorUrl) |
27 | 27 | ||
28 | const fromActor = await getServerActor() | 28 | const fromActor = await getServerActor() |
29 | const options = { | ||
30 | arguments: [ fromActor, targetActor ], | ||
31 | errorMessage: 'Cannot follow with many retries.' | ||
32 | } | ||
33 | 29 | ||
34 | return retryTransactionWrapper(follow, options) | 30 | return retryTransactionWrapper(follow, fromActor, targetActor) |
35 | } | 31 | } |
36 | // --------------------------------------------------------------------------- | 32 | // --------------------------------------------------------------------------- |
37 | 33 | ||
diff --git a/server/lib/job-queue/handlers/video-file.ts b/server/lib/job-queue/handlers/video-file.ts index f5ad076a6..a5c6bf300 100644 --- a/server/lib/job-queue/handlers/video-file.ts +++ b/server/lib/job-queue/handlers/video-file.ts | |||
@@ -52,19 +52,11 @@ async function processVideoFile (job: kue.Job) { | |||
52 | if (payload.resolution) { | 52 | if (payload.resolution) { |
53 | await video.transcodeOriginalVideofile(payload.resolution, payload.isPortraitMode) | 53 | await video.transcodeOriginalVideofile(payload.resolution, payload.isPortraitMode) |
54 | 54 | ||
55 | const options = { | 55 | await retryTransactionWrapper(onVideoFileTranscoderOrImportSuccess, video) |
56 | arguments: [ video ], | ||
57 | errorMessage: 'Cannot execute onVideoFileTranscoderOrImportSuccess with many retries.' | ||
58 | } | ||
59 | await retryTransactionWrapper(onVideoFileTranscoderOrImportSuccess, options) | ||
60 | } else { | 56 | } else { |
61 | await video.optimizeOriginalVideofile() | 57 | await video.optimizeOriginalVideofile() |
62 | 58 | ||
63 | const options = { | 59 | await retryTransactionWrapper(onVideoFileOptimizerSuccess, video, payload.isNewVideo) |
64 | arguments: [ video, payload.isNewVideo ], | ||
65 | errorMessage: 'Cannot execute onVideoFileOptimizerSuccess with many retries.' | ||
66 | } | ||
67 | await retryTransactionWrapper(onVideoFileOptimizerSuccess, options) | ||
68 | } | 60 | } |
69 | 61 | ||
70 | return video | 62 | return video |