diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-11 11:40:18 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-11 11:47:44 +0100 |
commit | 7bc29171456ffa91c7ec8dc77e892c7dca359989 (patch) | |
tree | c7682072919bf00f8b082c1c49f24567e181800f /server/lib/jobs/activitypub-http-job-scheduler/activitypub-http-unicast-handler.ts | |
parent | 85cd9bde5a93500f973773f46680c07dd90d5912 (diff) | |
download | PeerTube-7bc29171456ffa91c7ec8dc77e892c7dca359989.tar.gz PeerTube-7bc29171456ffa91c7ec8dc77e892c7dca359989.tar.zst PeerTube-7bc29171456ffa91c7ec8dc77e892c7dca359989.zip |
Add tests to handle down server
Diffstat (limited to 'server/lib/jobs/activitypub-http-job-scheduler/activitypub-http-unicast-handler.ts')
-rw-r--r-- | server/lib/jobs/activitypub-http-job-scheduler/activitypub-http-unicast-handler.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/jobs/activitypub-http-job-scheduler/activitypub-http-unicast-handler.ts b/server/lib/jobs/activitypub-http-job-scheduler/activitypub-http-unicast-handler.ts index e02bd698e..deedf8402 100644 --- a/server/lib/jobs/activitypub-http-job-scheduler/activitypub-http-unicast-handler.ts +++ b/server/lib/jobs/activitypub-http-job-scheduler/activitypub-http-unicast-handler.ts | |||
@@ -19,11 +19,11 @@ async function process (payload: ActivityPubHttpPayload, jobId: number) { | |||
19 | 19 | ||
20 | try { | 20 | try { |
21 | await doRequest(options) | 21 | await doRequest(options) |
22 | await ActorFollowModel.updateActorFollowsScoreAndRemoveBadOnes([ uri ], [], undefined) | 22 | ActorFollowModel.updateActorFollowsScoreAndRemoveBadOnes([ uri ], [], undefined) |
23 | } catch (err) { | 23 | } catch (err) { |
24 | const isRetryingLater = await maybeRetryRequestLater(err, payload, uri) | 24 | const isRetryingLater = await maybeRetryRequestLater(err, payload, uri) |
25 | if (isRetryingLater === false) { | 25 | if (isRetryingLater === false) { |
26 | await ActorFollowModel.updateActorFollowsScoreAndRemoveBadOnes([], [ uri ], undefined) | 26 | ActorFollowModel.updateActorFollowsScoreAndRemoveBadOnes([], [ uri ], undefined) |
27 | } | 27 | } |
28 | 28 | ||
29 | throw err | 29 | throw err |