fix lint errors
This commit is contained in:
@ -7,7 +7,7 @@ import { MoreThan, Not, IsNull } from 'typeorm';
|
||||
|
||||
const logger = queueLogger.createSubLogger('clean-remote-files');
|
||||
|
||||
export default async function cleanRemoteFiles(job: Bull.Job<{}>, done: any): Promise<void> {
|
||||
export default async function cleanRemoteFiles(job: Bull.Job<Record<string, unknown>>, done: any): Promise<void> {
|
||||
logger.info(`Deleting cached remote files...`);
|
||||
|
||||
let deletedCount = 0;
|
||||
|
@ -3,9 +3,9 @@ import { resyncCharts } from './resync-charts';
|
||||
|
||||
const jobs = {
|
||||
resyncCharts,
|
||||
} as Record<string, Bull.ProcessCallbackFunction<{}> | Bull.ProcessPromiseFunction<{}>>;
|
||||
} as Record<string, Bull.ProcessCallbackFunction<Record<string, unknown>> | Bull.ProcessPromiseFunction<Record<string, unknown>>>;
|
||||
|
||||
export default function(dbQueue: Bull.Queue<{}>) {
|
||||
export default function(dbQueue: Bull.Queue<Record<string, unknown>>) {
|
||||
for (const [k, v] of Object.entries(jobs)) {
|
||||
dbQueue.process(k, v);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import { driveChart, notesChart, usersChart } from '@/services/chart/index';
|
||||
|
||||
const logger = queueLogger.createSubLogger('resync-charts');
|
||||
|
||||
export default async function resyncCharts(job: Bull.Job<{}>, done: any): Promise<void> {
|
||||
export async function resyncCharts(job: Bull.Job<Record<string, unknown>>, done: any): Promise<void> {
|
||||
logger.info(`Resync charts...`);
|
||||
|
||||
// TODO: ユーザーごとのチャートも更新する
|
||||
|
@ -2,7 +2,7 @@ import config from '@/config/index';
|
||||
import { initialize as initializeQueue } from './initialize';
|
||||
import { DeliverJobData, InboxJobData, DbJobData, ObjectStorageJobData } from './types';
|
||||
|
||||
export const systemQueue = initializeQueue<{}>('system');
|
||||
export const systemQueue = initializeQueue<Record<string, unknown>>('system');
|
||||
export const deliverQueue = initializeQueue<DeliverJobData>('deliver', config.deliverJobPerSec || 128);
|
||||
export const inboxQueue = initializeQueue<InboxJobData>('inbox', config.inboxJobPerSec || 16);
|
||||
export const dbQueue = initializeQueue<DbJobData>('db');
|
||||
|
@ -33,7 +33,7 @@ export type DbUserImportJobData = {
|
||||
fileId: DriveFile['id'];
|
||||
};
|
||||
|
||||
export type ObjectStorageJobData = ObjectStorageFileJobData | {};
|
||||
export type ObjectStorageJobData = ObjectStorageFileJobData | Record<string, unknown>;
|
||||
|
||||
export type ObjectStorageFileJobData = {
|
||||
key: string;
|
||||
|
Reference in New Issue
Block a user