fix: incorrect import of type Psql
This commit is contained in:
parent
7786d66dbb
commit
fa5ccce83f
@ -1,4 +1,4 @@
|
|||||||
import type { Psql } from "@core/db/global.d.ts";
|
import type { Psql } from "@core/db/psql.d.ts";
|
||||||
import { AllDataType, BiliUserType } from "@core/db/schema";
|
import { AllDataType, BiliUserType } from "@core/db/schema";
|
||||||
import { AkariModelVersion } from "ml/const";
|
import { AkariModelVersion } from "ml/const";
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { LatestSnapshotType } from "@core/db/schema";
|
import { LatestSnapshotType } from "@core/db/schema";
|
||||||
import { SnapshotNumber } from "mq/task/getVideoStats.ts";
|
import { SnapshotNumber } from "mq/task/getVideoStats.ts";
|
||||||
import type { Psql } from "@core/db/global.d.ts";
|
import type { Psql } from "@core/db/psql.d.ts";
|
||||||
|
|
||||||
export async function getVideosNearMilestone(sql: Psql) {
|
export async function getVideosNearMilestone(sql: Psql) {
|
||||||
const queryResult = await sql<LatestSnapshotType[]>`
|
const queryResult = await sql<LatestSnapshotType[]>`
|
||||||
|
@ -4,7 +4,7 @@ import { MINUTE } from "@core/const/time.ts";
|
|||||||
import { redis } from "@core/db/redis.ts";
|
import { redis } from "@core/db/redis.ts";
|
||||||
import { Redis } from "ioredis";
|
import { Redis } from "ioredis";
|
||||||
import { parseTimestampFromPsql } from "../utils/formatTimestampToPostgre.ts";
|
import { parseTimestampFromPsql } from "../utils/formatTimestampToPostgre.ts";
|
||||||
import type { Psql } from "@core/db/global.d.ts";
|
import type { Psql } from "@core/db/psql.d.ts";
|
||||||
|
|
||||||
const REDIS_KEY = "cvsa:snapshot_window_counts";
|
const REDIS_KEY = "cvsa:snapshot_window_counts";
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Psql } from "@core/db/global.d.ts";
|
import type { Psql } from "@core/db/psql.d.ts";
|
||||||
import { parseTimestampFromPsql } from "utils/formatTimestampToPostgre.ts";
|
import { parseTimestampFromPsql } from "utils/formatTimestampToPostgre.ts";
|
||||||
|
|
||||||
export async function getNotCollectedSongs(sql: Psql) {
|
export async function getNotCollectedSongs(sql: Psql) {
|
||||||
|
@ -3,7 +3,7 @@ import { aidExistsInSongs, getNotCollectedSongs } from "db/songs.ts";
|
|||||||
import logger from "@core/log/logger.ts";
|
import logger from "@core/log/logger.ts";
|
||||||
import { scheduleSnapshot } from "db/snapshotSchedule.ts";
|
import { scheduleSnapshot } from "db/snapshotSchedule.ts";
|
||||||
import { MINUTE } from "@core/const/time.ts";
|
import { MINUTE } from "@core/const/time.ts";
|
||||||
import type { Psql } from "@core/db/global.d.ts";
|
import type { Psql } from "@core/db/psql.d.ts";
|
||||||
|
|
||||||
export async function collectSongs() {
|
export async function collectSongs() {
|
||||||
const aids = await getNotCollectedSongs(sql);
|
const aids = await getNotCollectedSongs(sql);
|
||||||
|
@ -4,7 +4,7 @@ import logger from "@core/log/logger.ts";
|
|||||||
import { ClassifyVideoQueue } from "mq/index.ts";
|
import { ClassifyVideoQueue } from "mq/index.ts";
|
||||||
import { userExistsInBiliUsers, videoExistsInAllData } from "../../db/bilibili_metadata.ts";
|
import { userExistsInBiliUsers, videoExistsInAllData } from "../../db/bilibili_metadata.ts";
|
||||||
import { HOUR, SECOND } from "@core/const/time.ts";
|
import { HOUR, SECOND } from "@core/const/time.ts";
|
||||||
import type { Psql } from "@core/db/global.d.ts";
|
import type { Psql } from "@core/db/psql.d.ts";
|
||||||
|
|
||||||
export async function insertVideoInfo(sql: Psql, aid: number) {
|
export async function insertVideoInfo(sql: Psql, aid: number) {
|
||||||
const videoExists = await videoExistsInAllData(sql, aid);
|
const videoExists = await videoExistsInAllData(sql, aid);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { getVideoInfo } from "@core/net/getVideoInfo.ts";
|
import { getVideoInfo } from "@core/net/getVideoInfo.ts";
|
||||||
import logger from "@core/log/logger.ts";
|
import logger from "@core/log/logger.ts";
|
||||||
import type { Psql } from "@core/db/global.d.ts";
|
import type { Psql } from "@core/db/psql.d.ts";
|
||||||
|
|
||||||
export interface SnapshotNumber {
|
export interface SnapshotNumber {
|
||||||
time: number;
|
time: number;
|
||||||
|
@ -4,7 +4,7 @@ import { sleep } from "utils/sleep.ts";
|
|||||||
import { SECOND } from "@core/const/time.ts";
|
import { SECOND } from "@core/const/time.ts";
|
||||||
import logger from "@core/log/logger.ts";
|
import logger from "@core/log/logger.ts";
|
||||||
import { LatestVideosQueue } from "mq/index.ts";
|
import { LatestVideosQueue } from "mq/index.ts";
|
||||||
import type { Psql } from "@core/db/global.d.ts";
|
import type { Psql } from "@core/db/psql.d.ts";
|
||||||
|
|
||||||
export async function queueLatestVideos(
|
export async function queueLatestVideos(
|
||||||
sql: Psql,
|
sql: Psql,
|
||||||
|
Loading…
Reference in New Issue
Block a user