Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion libs/client/src/queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ export type SubmitOptions<Input> = RunOptions<Input> & {
* @see QueuePriority
*/
priority?: QueuePriority;

/**
* A hint for the runner to use when processing the request.
* This will be sent as the `X-Fal-Runner-Hint` header.
*/
hint?: string;
};

type BaseQueueOptions = {
Expand Down Expand Up @@ -235,7 +241,7 @@ export const createQueueClient = ({
endpointId: string,
options: SubmitOptions<Input>,
): Promise<InQueueQueueStatus> {
const { webhookUrl, priority, ...runOptions } = options;
const { webhookUrl, priority, hint, ...runOptions } = options;
const input = options.input
? await storage.transformInput(options.input)
: undefined;
Expand All @@ -248,6 +254,7 @@ export const createQueueClient = ({
}),
headers: {
"x-fal-queue-priority": priority ?? "normal",
...(hint && { "x-fal-runner-hint": hint }),
},
input: input as Input,
config,
Expand Down
Loading