diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-13 14:27:40 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-13 14:27:40 +0200 |
commit | 90d4bb8125e80c8060416d4d135ddeaf0a622ede (patch) | |
tree | b3b7181329a08ecc930b54fe7b48095c4155393c /server/lib/job-queue/handlers/activitypub-follow.ts | |
parent | 3cd0734fd9b0ff21aaef02317a874e8f1c06e027 (diff) | |
download | PeerTube-90d4bb8125e80c8060416d4d135ddeaf0a622ede.tar.gz PeerTube-90d4bb8125e80c8060416d4d135ddeaf0a622ede.tar.zst PeerTube-90d4bb8125e80c8060416d4d135ddeaf0a622ede.zip |
Refractor retry transaction function
Diffstat (limited to 'server/lib/job-queue/handlers/activitypub-follow.ts')
-rw-r--r-- | server/lib/job-queue/handlers/activitypub-follow.ts | 6 |
1 files changed, 1 insertions, 5 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 | ||