From 1cfa8d6809d941c703e12ef30a5161d1901b1874 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 21 Sep 2018 09:41:05 +0200 Subject: Remove unnecessary actor existance check We already checked it in the signature checker --- .prettierignore | 1 - .prettierrc.yml | 8 -------- server/lib/activitypub/process/process-create.ts | 3 --- server/lib/schedulers/videos-redundancy-scheduler.ts | 2 ++ 4 files changed, 2 insertions(+), 12 deletions(-) delete mode 100644 .prettierignore delete mode 100644 .prettierrc.yml diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index a6c57f5fb..000000000 --- a/.prettierignore +++ /dev/null @@ -1 +0,0 @@ -*.json diff --git a/.prettierrc.yml b/.prettierrc.yml deleted file mode 100644 index d8379671f..000000000 --- a/.prettierrc.yml +++ /dev/null @@ -1,8 +0,0 @@ -printWidth: 140 -tabWidth: 2 -useTabs: false -semi: false -singleQuote: true -trailingComma: false -bracketSpacing: true -arrowParens: always diff --git a/server/lib/activitypub/process/process-create.ts b/server/lib/activitypub/process/process-create.ts index 5197dac73..cff8dcfc6 100644 --- a/server/lib/activitypub/process/process-create.ts +++ b/server/lib/activitypub/process/process-create.ts @@ -90,9 +90,6 @@ async function processCreateView (byActor: ActorModel, activity: ActivityCreate) } const { video } = await getOrCreateVideoAndAccountAndChannel(options) - const actorExists = await ActorModel.isActorUrlExist(view.actor) - if (actorExists === false) throw new Error('Unknown actor ' + view.actor) - await Redis.Instance.addVideoView(video.id) if (video.isOwned()) { diff --git a/server/lib/schedulers/videos-redundancy-scheduler.ts b/server/lib/schedulers/videos-redundancy-scheduler.ts index 960651712..998d2295a 100644 --- a/server/lib/schedulers/videos-redundancy-scheduler.ts +++ b/server/lib/schedulers/videos-redundancy-scheduler.ts @@ -30,6 +30,8 @@ export class VideosRedundancyScheduler extends AbstractScheduler { this.executing = true for (const obj of CONFIG.REDUNDANCY.VIDEOS.STRATEGIES) { + if (!isTestInstance()) logger.info('Running redundancy scheduler for strategy %s.', obj.strategy) + try { const videoToDuplicate = await this.findVideoToDuplicate(obj) if (!videoToDuplicate) continue -- cgit v1.2.3