X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futility-types.ts;fp=src%2Futility-types.ts;h=aa4e219853caba926bc74867a2089827f6f69765;hb=95d1a734d57942c892202df7c0fcaf2fb5ab89ab;hp=10d9183ca6f262cd25d475737d0e86613a55d247;hpb=54aa8d5a576b22bfdbebea90021502035a5e1c8c;p=poolifier.git diff --git a/src/utility-types.ts b/src/utility-types.ts index 10d9183c..aa4e2198 100644 --- a/src/utility-types.ts +++ b/src/utility-types.ts @@ -100,6 +100,16 @@ export interface Task { * Task input data that will be passed to the worker. */ readonly data?: Data + /** + * Task priority. Lower values have higher priority. + * + * @defaultValue 0 + */ + readonly priority?: number + /** + * Task worker choice strategy. + */ + readonly strategy?: WorkerChoiceStrategy /** * Array of transferable objects. */ @@ -111,7 +121,7 @@ export interface Task { /** * Task UUID. */ - readonly taskId?: string + readonly taskId?: `${string}-${string}-${string}-${string}-${string}` } /**