fix: incorrect import of type Psql

This commit is contained in:
alikia2x (寒寒) 2025-05-18 00:36:39 +08:00
parent 7786d66dbb
commit fa5ccce83f
Signed by: alikia2x
GPG Key ID: 56209E0CCD8420C6
8 changed files with 8 additions and 8 deletions

View File

@ -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";

View File

@ -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[]>`

View File

@ -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";

View File

@ -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) {

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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,