Remove unnecessary actor existance check
authorChocobozzz <me@florianbigard.com>
Fri, 21 Sep 2018 07:41:05 +0000 (09:41 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 21 Sep 2018 07:51:24 +0000 (09:51 +0200)
We already checked it in the signature checker

.prettierignore [deleted file]
.prettierrc.yml [deleted file]
server/lib/activitypub/process/process-create.ts
server/lib/schedulers/videos-redundancy-scheduler.ts

diff --git a/.prettierignore b/.prettierignore
deleted file mode 100644 (file)
index a6c57f5..0000000
+++ /dev/null
@@ -1 +0,0 @@
-*.json
diff --git a/.prettierrc.yml b/.prettierrc.yml
deleted file mode 100644 (file)
index d837967..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-printWidth: 140
-tabWidth: 2
-useTabs: false
-semi: false
-singleQuote: true
-trailingComma: false
-bracketSpacing: true
-arrowParens: always
index 5197dac73455bef70c8d2cff984775c88404e713..cff8dcfc680ab6e4f1cf6e5d3bc47064a0312e29 100644 (file)
@@ -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()) {
index 96065171298d755fae9a2586673786cdb9ed7909..998d2295aed2e0782521d806fd4c07ee2a065085 100644 (file)
@@ -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