chore: replace bull by bullmq

This commit is contained in:
tdurieux
2022-07-22 13:06:22 +02:00
parent fa8a513d93
commit ac52999841
19 changed files with 481 additions and 367 deletions

View File

@@ -2,9 +2,8 @@ import AnonymizedFile from "../AnonymizedFile";
import { Branch, Tree } from "../types";
import { GitHubRepository } from "./GitHubRepository";
import config from "../../config";
import { OAuthApp } from "@octokit/oauth-app";
import Repository from "../Repository";
import * as stream from "stream";
import { Readable } from "stream";
import UserModel from "../database/users/users.model";
import AnonymousError from "../AnonymousError";
@@ -37,7 +36,7 @@ export default abstract class GitHubBase {
this.branch = { commit: data.commit, name: data.branch };
}
async getFileContent(file: AnonymizedFile): Promise<stream.Readable> {
async getFileContent(file: AnonymizedFile): Promise<Readable> {
throw new AnonymousError("method_not_implemented", {
httpStatus: 501,
object: this,

View File

@@ -7,7 +7,7 @@ import GitHubBase from "./GitHubBase";
import AnonymizedFile from "../AnonymizedFile";
import { SourceBase } from "../types";
import got from "got";
import * as stream from "stream";
import { Readable } from "stream";
import { OctokitResponse } from "@octokit/types";
import AnonymousError from "../AnonymousError";
@@ -113,7 +113,7 @@ export default class GitHubDownload extends GitHubBase implements SourceBase {
await this.repository.updateStatus("ready");
}
async getFileContent(file: AnonymizedFile): Promise<stream.Readable> {
async getFileContent(file: AnonymizedFile): Promise<Readable> {
await this.download();
// update the file list
await this.repository.files({ force: true });

View File

@@ -1,4 +1,3 @@
import * as path from "path";
import AnonymizedFile from "../AnonymizedFile";
import Repository from "../Repository";
import storage from "../storage";