1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-18 08:38:11 +09:00
hotomoe/src/queue/index.ts
2019-02-03 18:16:57 +09:00

21 lines
415 B
TypeScript

import http from './processors/http';
import { ILocalUser } from '../models/user';
import Logger from '../misc/logger';
export function createHttpJob(data: any) {
return http({ data }, () => {});
}
export function deliver(user: ILocalUser, content: any, to: any) {
if (content == null) return;
createHttpJob({
type: 'deliver',
user,
content,
to
});
}
export const queueLogger = new Logger('queue');