chore: update Dockerfile and docker-compose for improved deployment process; add deploy script
This commit is contained in:
@@ -5,11 +5,6 @@ import { enqueueUpload } from './telegramQueue';
|
||||
|
||||
const botTokens = Array.from(new Set([config.botToken, ...config.additionalBotTokens]));
|
||||
|
||||
type FileInfoResult = {
|
||||
result: unknown;
|
||||
botToken: string;
|
||||
};
|
||||
|
||||
const bots = botTokens.map((token) => new Telegraf(token));
|
||||
|
||||
let nextBotIndex = 0;
|
||||
|
||||
@@ -140,7 +140,10 @@ export const enqueuePreparedUpload = (item: BatchUploadItem): Promise<UploadedFi
|
||||
}, BATCH_WINDOW_MS);
|
||||
}
|
||||
|
||||
if (pendingUploads.length >= config.batchMaxItems || getPendingSize() >= config.batchMaxSizeBytes) {
|
||||
if (
|
||||
pendingUploads.length >= config.batchMaxItems ||
|
||||
getPendingSize() >= config.batchMaxSizeBytes
|
||||
) {
|
||||
void flushUploads();
|
||||
}
|
||||
});
|
||||
|
||||
+1
-1
@@ -1,8 +1,8 @@
|
||||
import { once } from 'node:events';
|
||||
import { createReadStream, createWriteStream } from 'node:fs';
|
||||
import { finished } from 'node:stream/promises';
|
||||
import { open, stat } from 'node:fs/promises';
|
||||
import { basename } from 'node:path';
|
||||
import { finished } from 'node:stream/promises';
|
||||
import { nanoid } from 'nanoid';
|
||||
|
||||
export type ZipInputFile = {
|
||||
|
||||
Reference in New Issue
Block a user