forked from wangziqi/gongxue-base
feat: recheck content assets
This commit is contained in:
@@ -13,6 +13,27 @@ export interface WorkerConfig {
|
||||
commerceBatchSize: number;
|
||||
commerceMinAgeSeconds: number;
|
||||
commerceRequestTimeoutMs: number;
|
||||
assetBatchSize: number;
|
||||
assetMinAgeSeconds: number;
|
||||
assetRecheckIntervalSeconds: number;
|
||||
assetRequestTimeoutMs: number;
|
||||
storageMaxUploadBytes: number;
|
||||
storageAllowedMimePrefixes: string[];
|
||||
storageAllowedMimeTypes: string[];
|
||||
storageRequireTenantPrefix: boolean;
|
||||
aliyunOssRegion: string;
|
||||
aliyunOssEndpoint: string;
|
||||
aliyunOssAccessKeyId: string;
|
||||
aliyunOssAccessKeySecret: string;
|
||||
aliyunOssStsToken: string;
|
||||
aliyunOssInternal: boolean;
|
||||
tencentCosRegion: string;
|
||||
tencentCosAppId: string;
|
||||
tencentCosSecretId: string;
|
||||
tencentCosSecretKey: string;
|
||||
tencentCosSecurityToken: string;
|
||||
supabaseStorageUrl: string;
|
||||
supabaseStorageServiceKey: string;
|
||||
}
|
||||
|
||||
export const config: WorkerConfig = {
|
||||
@@ -28,4 +49,43 @@ export const config: WorkerConfig = {
|
||||
commerceBatchSize: envNumber('WORKER_COMMERCE_BATCH_SIZE', 20),
|
||||
commerceMinAgeSeconds: envNumber('WORKER_COMMERCE_MIN_AGE_SECONDS', 300),
|
||||
commerceRequestTimeoutMs: envNumber('WORKER_COMMERCE_REQUEST_TIMEOUT_MS', 10_000),
|
||||
assetBatchSize: envNumber('WORKER_ASSET_BATCH_SIZE', 50),
|
||||
assetMinAgeSeconds: envNumber('WORKER_ASSET_MIN_AGE_SECONDS', 300),
|
||||
assetRecheckIntervalSeconds: envNumber('WORKER_ASSET_RECHECK_INTERVAL_SECONDS', 60 * 60 * 24),
|
||||
assetRequestTimeoutMs: envNumber('WORKER_ASSET_REQUEST_TIMEOUT_MS', 10_000),
|
||||
storageMaxUploadBytes: envNumber('STORAGE_MAX_UPLOAD_BYTES', 1024 * 1024 * 500),
|
||||
storageAllowedMimePrefixes: envList('STORAGE_ALLOWED_MIME_PREFIXES', 'image/,video/,audio/'),
|
||||
storageAllowedMimeTypes: envList(
|
||||
'STORAGE_ALLOWED_MIME_TYPES',
|
||||
[
|
||||
'application/pdf',
|
||||
'application/json',
|
||||
'application/zip',
|
||||
'application/x-zip-compressed',
|
||||
'application/msword',
|
||||
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'application/vnd.ms-excel',
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
'application/vnd.ms-powerpoint',
|
||||
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
||||
'application/octet-stream',
|
||||
'text/plain',
|
||||
'text/markdown',
|
||||
'text/csv',
|
||||
].join(','),
|
||||
),
|
||||
storageRequireTenantPrefix: envBoolean('STORAGE_REQUIRE_TENANT_PREFIX', true),
|
||||
aliyunOssRegion: envString('ALIYUN_OSS_REGION', ''),
|
||||
aliyunOssEndpoint: envString('ALIYUN_OSS_ENDPOINT', ''),
|
||||
aliyunOssAccessKeyId: envString('ALIYUN_OSS_ACCESS_KEY_ID', ''),
|
||||
aliyunOssAccessKeySecret: envString('ALIYUN_OSS_ACCESS_KEY_SECRET', ''),
|
||||
aliyunOssStsToken: envString('ALIYUN_OSS_STS_TOKEN', ''),
|
||||
aliyunOssInternal: envBoolean('ALIYUN_OSS_INTERNAL', false),
|
||||
tencentCosRegion: envString('TENCENT_COS_REGION', ''),
|
||||
tencentCosAppId: envString('TENCENT_COS_APP_ID', ''),
|
||||
tencentCosSecretId: envString('TENCENT_COS_SECRET_ID', ''),
|
||||
tencentCosSecretKey: envString('TENCENT_COS_SECRET_KEY', ''),
|
||||
tencentCosSecurityToken: envString('TENCENT_COS_SECURITY_TOKEN', ''),
|
||||
supabaseStorageUrl: envString('SUPABASE_STORAGE_URL', ''),
|
||||
supabaseStorageServiceKey: envString('SUPABASE_STORAGE_SERVICE_KEY', ''),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user