diff options
author | Chocobozzz <me@florianbigard.com> | 2023-05-11 15:02:53 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-05-11 15:03:47 +0200 |
commit | 823c34c07fc0df81110098ee1032e9d3ed70b662 (patch) | |
tree | 4d15bc0e09766552434ee50ad5f6098bd2f74ac4 /server/lib | |
parent | 81f14b911211be065448e92bcc253f470c5ff2a9 (diff) | |
download | PeerTube-823c34c07fc0df81110098ee1032e9d3ed70b662.tar.gz PeerTube-823c34c07fc0df81110098ee1032e9d3ed70b662.tar.zst PeerTube-823c34c07fc0df81110098ee1032e9d3ed70b662.zip |
Fix reset sequelize instance
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/activitypub/actors/updater.ts | 4 | ||||
-rw-r--r-- | server/lib/activitypub/videos/updater.ts | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/server/lib/activitypub/actors/updater.ts b/server/lib/activitypub/actors/updater.ts index 73bdf1edc..5a92e7a22 100644 --- a/server/lib/activitypub/actors/updater.ts +++ b/server/lib/activitypub/actors/updater.ts | |||
@@ -52,11 +52,11 @@ export class APActorUpdater { | |||
52 | logger.info('Remote account %s updated', this.actorObject.url) | 52 | logger.info('Remote account %s updated', this.actorObject.url) |
53 | } catch (err) { | 53 | } catch (err) { |
54 | if (this.actor !== undefined) { | 54 | if (this.actor !== undefined) { |
55 | resetSequelizeInstance(this.actor) | 55 | await resetSequelizeInstance(this.actor) |
56 | } | 56 | } |
57 | 57 | ||
58 | if (this.accountOrChannel !== undefined) { | 58 | if (this.accountOrChannel !== undefined) { |
59 | resetSequelizeInstance(this.accountOrChannel) | 59 | await resetSequelizeInstance(this.accountOrChannel) |
60 | } | 60 | } |
61 | 61 | ||
62 | // This is just a debug because we will retry the insert | 62 | // This is just a debug because we will retry the insert |
diff --git a/server/lib/activitypub/videos/updater.ts b/server/lib/activitypub/videos/updater.ts index 3677dc3bb..6ddd2301b 100644 --- a/server/lib/activitypub/videos/updater.ts +++ b/server/lib/activitypub/videos/updater.ts | |||
@@ -88,7 +88,7 @@ export class APVideoUpdater extends APVideoAbstractBuilder { | |||
88 | 88 | ||
89 | return videoUpdated | 89 | return videoUpdated |
90 | } catch (err) { | 90 | } catch (err) { |
91 | this.catchUpdateError(err) | 91 | await this.catchUpdateError(err) |
92 | } | 92 | } |
93 | } | 93 | } |
94 | 94 | ||
@@ -154,9 +154,9 @@ export class APVideoUpdater extends APVideoAbstractBuilder { | |||
154 | videoUpdated.VideoLive = null | 154 | videoUpdated.VideoLive = null |
155 | } | 155 | } |
156 | 156 | ||
157 | private catchUpdateError (err: Error) { | 157 | private async catchUpdateError (err: Error) { |
158 | if (this.video !== undefined) { | 158 | if (this.video !== undefined) { |
159 | resetSequelizeInstance(this.video) | 159 | await resetSequelizeInstance(this.video) |
160 | } | 160 | } |
161 | 161 | ||
162 | // This is just a debug because we will retry the insert | 162 | // This is just a debug because we will retry the insert |