Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Reduce warn logs

Chocobozzza6a3f00be475
diff --git a/server/core/lib/activitypub/actors/refresh.ts b/server/core/lib/activitypub/actors/refresh.ts
index a3b2d59665..636e57b10d 100644
--- a/server/core/lib/activitypub/actors/refresh.ts
+++ b/server/core/lib/activitypub/actors/refresh.ts
@@ -9,16 +9,16 @@ import { fetchRemoteActor } from './shared/index.js'
import { APActorUpdater } from './updater.js'
import { getUrlFromWebfinger } from './webfinger.js'
-type RefreshResult <T> = Promise<{ actor: T | MActorFull, refreshed: boolean }>
+type RefreshResult<T> = Promise<{ actor: T | MActorFull, refreshed: boolean }>
-type RefreshOptions <T> = {
+type RefreshOptions<T> = {
actor: T
fetchedType: ActorLoadByUrlType
}
const promiseCache = new CachePromiseFactory(doRefresh, (options: RefreshOptions<MActorFull | MActorAccountChannelId>) => options.actor.url)
-function refreshActorIfNeeded <T extends MActorFull | MActorAccountChannelId> (options: RefreshOptions<T>): RefreshResult <T> {
+function refreshActorIfNeeded<T extends MActorFull | MActorAccountChannelId> (options: RefreshOptions<T>): RefreshResult<T> {
const actorArg = options.actor
if (!actorArg.isOutdated()) return Promise.resolve({ actor: actorArg, refreshed: false })
@@ -31,7 +31,7 @@ export {
// ---------------------------------------------------------------------------
-async function doRefresh <T extends MActorFull | MActorAccountChannelId> (options: RefreshOptions<T>): RefreshResult <MActorFull> {
+async function doRefresh<T extends MActorFull | MActorAccountChannelId> (options: RefreshOptions<T>): RefreshResult<MActorFull> {
const { actor: actorArg, fetchedType } = options
// We need more attributes
@@ -77,7 +77,7 @@ async function doRefresh <T extends MActorFull | MActorAccountChannelId> (option
function getActorUrl (actor: MActorFull) {
return getUrlFromWebfinger(actor.preferredUsername + '@' + actor.getHost())
.catch(err => {
- logger.warn('Cannot get actor URL from webfinger, keeping the old one.', { err })
+ logger.info('Cannot get actor URL from webfinger, keeping the old one.', { err })
return actor.url
})
}
diff --git a/server/core/lib/runners/runner.ts b/server/core/lib/runners/runner.ts
index 8152e6f5fa..2486fc8db5 100644
--- a/server/core/lib/runners/runner.ts
+++ b/server/core/lib/runners/runner.ts
@@ -28,9 +28,8 @@ function updateLastRunnerContact (req: express.Request, runner: MRunner) {
return sequelizeTypescript.transaction(async transaction => {
return runner.save({ transaction })
})
- })
- .catch(err => logger.error('Cannot update last runner contact for %s', runner.name, { err, ...lTags(runner.name) }))
- .finally(() => updatingRunner.delete(runner.id))
+ }).catch(err => logger.error('Cannot update last runner contact for %s', runner.name, { err, ...lTags(runner.name) }))
+ .finally(() => updatingRunner.delete(runner.id))
}
function runnerJobCanBeCancelled (runnerJob: MRunnerJob) {