mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Add ability to reset our password
This commit is contained in:
parent
80d1057bfc
commit
ecb4e35f4e
32 changed files with 741 additions and 67 deletions
|
@ -5,19 +5,22 @@ import { CONFIG, JOB_ATTEMPTS, JOB_COMPLETED_LIFETIME, JOB_CONCURRENCY } from '.
|
|||
import { ActivitypubHttpBroadcastPayload, processActivityPubHttpBroadcast } from './handlers/activitypub-http-broadcast'
|
||||
import { ActivitypubHttpFetcherPayload, processActivityPubHttpFetcher } from './handlers/activitypub-http-fetcher'
|
||||
import { ActivitypubHttpUnicastPayload, processActivityPubHttpUnicast } from './handlers/activitypub-http-unicast'
|
||||
import { EmailPayload, processEmail } from './handlers/email'
|
||||
import { processVideoFile, VideoFilePayload } from './handlers/video-file'
|
||||
|
||||
type CreateJobArgument =
|
||||
{ type: 'activitypub-http-broadcast', payload: ActivitypubHttpBroadcastPayload } |
|
||||
{ type: 'activitypub-http-unicast', payload: ActivitypubHttpUnicastPayload } |
|
||||
{ type: 'activitypub-http-fetcher', payload: ActivitypubHttpFetcherPayload } |
|
||||
{ type: 'video-file', payload: VideoFilePayload }
|
||||
{ type: 'video-file', payload: VideoFilePayload } |
|
||||
{ type: 'email', payload: EmailPayload }
|
||||
|
||||
const handlers: { [ id in JobType ]: (job: kue.Job) => Promise<any>} = {
|
||||
'activitypub-http-broadcast': processActivityPubHttpBroadcast,
|
||||
'activitypub-http-unicast': processActivityPubHttpUnicast,
|
||||
'activitypub-http-fetcher': processActivityPubHttpFetcher,
|
||||
'video-file': processVideoFile
|
||||
'video-file': processVideoFile,
|
||||
'email': processEmail
|
||||
}
|
||||
|
||||
class JobQueue {
|
||||
|
@ -43,6 +46,8 @@ class JobQueue {
|
|||
}
|
||||
})
|
||||
|
||||
this.jobQueue.setMaxListeners(15)
|
||||
|
||||
this.jobQueue.on('error', err => {
|
||||
logger.error('Error in job queue.', err)
|
||||
process.exit(-1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue