wip
This commit is contained in:
@ -1,8 +1,12 @@
|
||||
import { createQueue } from 'kue';
|
||||
import * as debug from 'debug';
|
||||
|
||||
import config from '../config';
|
||||
import db from './processors/db';
|
||||
import http from './processors/http';
|
||||
|
||||
const log = debug('misskey:queue');
|
||||
|
||||
const queue = createQueue({
|
||||
redis: {
|
||||
port: config.redis.port,
|
||||
@ -12,6 +16,8 @@ const queue = createQueue({
|
||||
});
|
||||
|
||||
export function createHttp(data) {
|
||||
log(`HTTP job created: ${JSON.stringify(data)}`);
|
||||
|
||||
return queue
|
||||
.create('http', data)
|
||||
.attempts(16)
|
||||
@ -22,7 +28,7 @@ export function createDb(data) {
|
||||
return queue.create('db', data);
|
||||
}
|
||||
|
||||
export function process() {
|
||||
export default function() {
|
||||
queue.process('db', db);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user