mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-12-24 13:57:27 -05:00
Run multiple image download queue in parallel (#1203)
This commit is contained in:
commit
58603c5180
@ -8,7 +8,9 @@ import { comment } from "./utils";
|
||||
await migrate();
|
||||
|
||||
// run image processor task in background
|
||||
processImages();
|
||||
for (let i = 0; i < 10; i++) {
|
||||
processImages();
|
||||
}
|
||||
|
||||
const app = new Elysia()
|
||||
.use(
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
FROM golang:1.25 AS build
|
||||
FROM --platform=$BUILDPLATFORM golang:1.25 AS build
|
||||
WORKDIR /app
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o /keibi
|
||||
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=$TARGETARCH go build -o /keibi
|
||||
|
||||
FROM gcr.io/distroless/base-debian11
|
||||
WORKDIR /app
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FROM oven/bun AS builder
|
||||
FROM --platform=$BUILDPLATFORM oven/bun AS builder
|
||||
WORKDIR /app
|
||||
|
||||
# https://github.com/oven-sh/bun/issues/24538
|
||||
|
||||
@ -28,10 +28,12 @@ export const ImageBackground = ({
|
||||
const { css, theme } = useYoshiki();
|
||||
const { apiUrl, authToken } = useToken();
|
||||
|
||||
const uri = src ? `${apiUrl}${src[quality ?? "high"]}` : null;
|
||||
return (
|
||||
<EImageBackground
|
||||
recyclingKey={uri}
|
||||
source={{
|
||||
uri: src ? `${apiUrl}${src[quality ?? "high"]}` : null,
|
||||
uri,
|
||||
// use cookies on web to allow `img` to make the call instead of js
|
||||
headers:
|
||||
authToken && Platform.OS !== "web"
|
||||
|
||||
@ -37,10 +37,12 @@ export const Image = ({
|
||||
const { css, theme } = useYoshiki();
|
||||
const { apiUrl, authToken } = useToken();
|
||||
|
||||
const uri = src ? `${apiUrl}${src[quality ?? "high"]}` : null;
|
||||
return (
|
||||
<EImage
|
||||
recyclingKey={uri}
|
||||
source={{
|
||||
uri: src ? `${apiUrl}${src[quality ?? "high"]}` : null,
|
||||
uri,
|
||||
// use cookies on web to allow `img` to make the call instead of js
|
||||
headers:
|
||||
authToken && Platform.OS !== "web"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user