mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
refactor(self-hosting): forward every setting, drop dead config (#3047)
This commit is contained in:
1 parent
39f9beda5a
commit
2b8a743dc5
96 files changed
+1743
-2391
No files matched your search
@@ -2,56 +2,6 @@
|
||||
|
||||
export type WorkerJobPayload = Record<string, unknown>;
|
||||
|
||||
export interface WorkerRuntimeConfig {
|
||||
workerId?: string | undefined;
|
||||
concurrency?: number | undefined;
|
||||
taskTypes?: Array<string> | undefined;
|
||||
}
|
||||
|
||||
export interface WorkerQueueConfig {
|
||||
queueBaseUrl: string;
|
||||
requestTimeoutMs?: number | undefined;
|
||||
}
|
||||
|
||||
export interface WorkerConfig extends WorkerRuntimeConfig, WorkerQueueConfig {}
|
||||
|
||||
export interface TracingInterface {
|
||||
withSpan<T>(
|
||||
options: {
|
||||
name: string;
|
||||
attributes?: Record<string, unknown>;
|
||||
},
|
||||
fn: () => Promise<T>,
|
||||
): Promise<T>;
|
||||
addSpanEvent(name: string, attributes?: Record<string, unknown>): void;
|
||||
setSpanAttributes(attributes: Record<string, unknown>): void;
|
||||
}
|
||||
|
||||
export interface QueueJob {
|
||||
id: string;
|
||||
task_type: string;
|
||||
payload: WorkerJobPayload;
|
||||
priority: number;
|
||||
run_at: string;
|
||||
created_at: string;
|
||||
attempts: number;
|
||||
max_attempts: number;
|
||||
error?: string | null;
|
||||
deduplication_id?: string | null;
|
||||
}
|
||||
|
||||
export interface LeasedQueueJob {
|
||||
receipt: string;
|
||||
visibility_deadline: string;
|
||||
job: QueueJob;
|
||||
}
|
||||
|
||||
export interface EnqueueOptions {
|
||||
runAt?: Date | undefined;
|
||||
maxAttempts?: number | undefined;
|
||||
priority?: number | undefined;
|
||||
}
|
||||
|
||||
export interface WorkerJobOptions {
|
||||
queueName?: string | undefined;
|
||||
runAt?: Date | undefined;
|
||||
|
||||
Reference in new issue
Block a user