diff --git a/packages/api/src/handlers/queues.ts b/packages/api/src/handlers/queues.ts index ee62f517..5b022d06 100644 --- a/packages/api/src/handlers/queues.ts +++ b/packages/api/src/handlers/queues.ts @@ -20,6 +20,7 @@ export const formatJob = (job: QueueJob, queue: BaseAdapter): AppJob => { id: jobProps.id, timestamp: jobProps.timestamp, processedOn: jobProps.processedOn, + processedBy: jobProps.processedBy, finishedOn: jobProps.finishedOn, progress: jobProps.progress, attempts: jobProps.attemptsMade, diff --git a/packages/api/typings/app.ts b/packages/api/typings/app.ts index 1cd1ca76..7a7244d9 100644 --- a/packages/api/typings/app.ts +++ b/packages/api/typings/app.ts @@ -60,6 +60,7 @@ export interface QueueJobJson { attemptsMade: number; finishedOn?: number | null; processedOn?: number | null; + processedBy?: string | null; delay?: number; timestamp: number; failedReason: string; @@ -93,6 +94,7 @@ export interface AppJob { name: QueueJobJson['name']; timestamp: QueueJobJson['timestamp']; processedOn?: QueueJobJson['processedOn']; + processedBy?: QueueJobJson['processedBy']; finishedOn?: QueueJobJson['finishedOn']; progress: QueueJobJson['progress']; attempts: QueueJobJson['attemptsMade']; diff --git a/packages/ui/src/components/JobCard/Timeline/Timeline.tsx b/packages/ui/src/components/JobCard/Timeline/Timeline.tsx index d8bd43b1..94f98ce5 100644 --- a/packages/ui/src/components/JobCard/Timeline/Timeline.tsx +++ b/packages/ui/src/components/JobCard/Timeline/Timeline.tsx @@ -79,6 +79,11 @@ export const Timeline = function Timeline({ job, status }: { job: AppJob; status {t('JOB.PROCESS_STARTED_AT')} + {!!job.processedBy && ( + + {t('JOB.PROCESSED_BY', { processedBy: job.processedBy })} + + )} )} {!!job.finishedOn && ( diff --git a/packages/ui/src/static/locales/en-US/messages.json b/packages/ui/src/static/locales/en-US/messages.json index cb6e4fd4..07bdff50 100644 --- a/packages/ui/src/static/locales/en-US/messages.json +++ b/packages/ui/src/static/locales/en-US/messages.json @@ -17,6 +17,7 @@ "WILL_RUN_AT": "Will run at", "DELAYED_FOR": "delayed for", "PROCESS_STARTED_AT": "Process started at", + "PROCESSED_BY": "by {{processedBy}}", "FAILED_AT": "Failed at", "FINISHED_AT": "Finished at", "ATTEMPTS": "attempt #{{attempts}}", diff --git a/packages/ui/src/static/locales/pt-BR/messages.json b/packages/ui/src/static/locales/pt-BR/messages.json index cb39baf0..38faebb8 100644 --- a/packages/ui/src/static/locales/pt-BR/messages.json +++ b/packages/ui/src/static/locales/pt-BR/messages.json @@ -19,6 +19,7 @@ "WILL_RUN_AT": "Iniciará em", "DELAYED_FOR": "aguardando por", "PROCESS_STARTED_AT": "Processo iniciado em", + "PROCESSED_BY": "por {{processedBy}}", "FAILED_AT": "Falha em", "FINISHED_AT": "Concluído em", "ATTEMPTS": "tentativas #{{attempts}}",