diff options
author | Chocobozzz <me@florianbigard.com> | 2020-04-23 09:32:53 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-05-04 16:21:39 +0200 |
commit | 8dc8a34ee8428e7657414115d1c137592efa174d (patch) | |
tree | e9b5ef0d7446d1b7766eac18da5a759edc7a9040 /server/lib/job-queue/job-queue.ts | |
parent | 7fed637506043e4432cbebe041ada0625171cceb (diff) | |
download | PeerTube-8dc8a34ee8428e7657414115d1c137592efa174d.tar.gz PeerTube-8dc8a34ee8428e7657414115d1c137592efa174d.tar.zst PeerTube-8dc8a34ee8428e7657414115d1c137592efa174d.zip |
Avoir some circular dependencies
Diffstat (limited to 'server/lib/job-queue/job-queue.ts')
-rw-r--r-- | server/lib/job-queue/job-queue.ts | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/server/lib/job-queue/job-queue.ts b/server/lib/job-queue/job-queue.ts index 14acace7d..d8d64caaf 100644 --- a/server/lib/job-queue/job-queue.ts +++ b/server/lib/job-queue/job-queue.ts | |||
@@ -1,19 +1,25 @@ | |||
1 | import * as Bull from 'bull' | 1 | import * as Bull from 'bull' |
2 | import { JobState, JobType } from '../../../shared/models' | 2 | import { |
3 | ActivitypubFollowPayload, | ||
4 | ActivitypubHttpBroadcastPayload, | ||
5 | ActivitypubHttpFetcherPayload, ActivitypubHttpUnicastPayload, EmailPayload, | ||
6 | JobState, | ||
7 | JobType, RefreshPayload, VideoFileImportPayload, VideoImportPayload, VideoRedundancyPayload, VideoTranscodingPayload | ||
8 | } from '../../../shared/models' | ||
3 | import { logger } from '../../helpers/logger' | 9 | import { logger } from '../../helpers/logger' |
4 | import { Redis } from '../redis' | 10 | import { Redis } from '../redis' |
5 | import { JOB_ATTEMPTS, JOB_COMPLETED_LIFETIME, JOB_CONCURRENCY, JOB_TTL, REPEAT_JOBS, WEBSERVER } from '../../initializers/constants' | 11 | import { JOB_ATTEMPTS, JOB_COMPLETED_LIFETIME, JOB_CONCURRENCY, JOB_TTL, REPEAT_JOBS, WEBSERVER } from '../../initializers/constants' |
6 | import { ActivitypubHttpBroadcastPayload, processActivityPubHttpBroadcast } from './handlers/activitypub-http-broadcast' | 12 | import { processActivityPubHttpBroadcast } from './handlers/activitypub-http-broadcast' |
7 | import { ActivitypubHttpFetcherPayload, processActivityPubHttpFetcher } from './handlers/activitypub-http-fetcher' | 13 | import { processActivityPubHttpFetcher } from './handlers/activitypub-http-fetcher' |
8 | import { ActivitypubHttpUnicastPayload, processActivityPubHttpUnicast } from './handlers/activitypub-http-unicast' | 14 | import { processActivityPubHttpUnicast } from './handlers/activitypub-http-unicast' |
9 | import { EmailPayload, processEmail } from './handlers/email' | 15 | import { processEmail } from './handlers/email' |
10 | import { processVideoTranscoding, VideoTranscodingPayload } from './handlers/video-transcoding' | 16 | import { processVideoTranscoding} from './handlers/video-transcoding' |
11 | import { ActivitypubFollowPayload, processActivityPubFollow } from './handlers/activitypub-follow' | 17 | import { processActivityPubFollow } from './handlers/activitypub-follow' |
12 | import { processVideoImport, VideoImportPayload } from './handlers/video-import' | 18 | import { processVideoImport} from './handlers/video-import' |
13 | import { processVideosViews } from './handlers/video-views' | 19 | import { processVideosViews } from './handlers/video-views' |
14 | import { refreshAPObject, RefreshPayload } from './handlers/activitypub-refresher' | 20 | import { refreshAPObject} from './handlers/activitypub-refresher' |
15 | import { processVideoFileImport, VideoFileImportPayload } from './handlers/video-file-import' | 21 | import { processVideoFileImport} from './handlers/video-file-import' |
16 | import { processVideoRedundancy, VideoRedundancyPayload } from '@server/lib/job-queue/handlers/video-redundancy' | 22 | import { processVideoRedundancy} from '@server/lib/job-queue/handlers/video-redundancy' |
17 | 23 | ||
18 | type CreateJobArgument = | 24 | type CreateJobArgument = |
19 | { type: 'activitypub-http-broadcast', payload: ActivitypubHttpBroadcastPayload } | | 25 | { type: 'activitypub-http-broadcast', payload: ActivitypubHttpBroadcastPayload } | |