aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-21 09:41:05 +0200
committerChocobozzz <me@florianbigard.com>2018-09-21 09:51:24 +0200
commit1cfa8d6809d941c703e12ef30a5161d1901b1874 (patch)
tree6b8a6f425cdafecdcbddb03c86263edd3c341bb9
parentf2659ae0b0bae6c1b2ee4dcf331a42e440274c02 (diff)
downloadPeerTube-1cfa8d6809d941c703e12ef30a5161d1901b1874.tar.gz
PeerTube-1cfa8d6809d941c703e12ef30a5161d1901b1874.tar.zst
PeerTube-1cfa8d6809d941c703e12ef30a5161d1901b1874.zip
Remove unnecessary actor existance check
We already checked it in the signature checker
-rw-r--r--.prettierignore1
-rw-r--r--.prettierrc.yml8
-rw-r--r--server/lib/activitypub/process/process-create.ts3
-rw-r--r--server/lib/schedulers/videos-redundancy-scheduler.ts2
4 files changed, 2 insertions, 12 deletions
diff --git a/.prettierignore b/.prettierignore
deleted file mode 100644
index a6c57f5fb..000000000
--- a/.prettierignore
+++ /dev/null
@@ -1 +0,0 @@
1*.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 @@
1printWidth: 140
2tabWidth: 2
3useTabs: false
4semi: false
5singleQuote: true
6trailingComma: false
7bracketSpacing: true
8arrowParens: 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)
90 } 90 }
91 const { video } = await getOrCreateVideoAndAccountAndChannel(options) 91 const { video } = await getOrCreateVideoAndAccountAndChannel(options)
92 92
93 const actorExists = await ActorModel.isActorUrlExist(view.actor)
94 if (actorExists === false) throw new Error('Unknown actor ' + view.actor)
95
96 await Redis.Instance.addVideoView(video.id) 93 await Redis.Instance.addVideoView(video.id)
97 94
98 if (video.isOwned()) { 95 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 {
30 this.executing = true 30 this.executing = true
31 31
32 for (const obj of CONFIG.REDUNDANCY.VIDEOS.STRATEGIES) { 32 for (const obj of CONFIG.REDUNDANCY.VIDEOS.STRATEGIES) {
33 if (!isTestInstance()) logger.info('Running redundancy scheduler for strategy %s.', obj.strategy)
34
33 try { 35 try {
34 const videoToDuplicate = await this.findVideoToDuplicate(obj) 36 const videoToDuplicate = await this.findVideoToDuplicate(obj)
35 if (!videoToDuplicate) continue 37 if (!videoToDuplicate) continue