@pg-boss/dashboard 1.3.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-CqyjuPDB.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/react-dom-D_m_Zgd3.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/root-qxoeL6W3.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/react-dom-D_m_Zgd3.js","/assets/db-link-BajQ1v8I.js","/assets/createLucideIcon-C-LI4enx.js","/assets/MenuTrigger-BNvpjhsQ.js","/assets/useOpenInteractionType-BQ1arb0B.js"],"css":["/assets/root-B0MB8jZH.css"]},"routes/_index":{"id":"routes/_index","parentId":"root","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/_index-DqpFaaQw.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/stat-card-dyg1wY5p.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/table-Cz7ujmH_.js","/assets/error-card-BH7i86fH.js"],"css":[]},"routes/jobs":{"id":"routes/jobs","parentId":"root","path":"jobs","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/jobs-CAd_qqLH.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/createLucideIcon-C-LI4enx.js","/assets/check-7jwc5sb1.js","/assets/chevron-down-BFFjfYD4.js","/assets/chevron-right-DGk5QFJF.js","/assets/x-AhXI_F1j.js","/assets/MenuTrigger-BNvpjhsQ.js","/assets/useOpenInteractionType-BQ1arb0B.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/table-Cz7ujmH_.js","/assets/error-card-BH7i86fH.js","/assets/pagination-C-ohiBmY.js","/assets/filter-select-Bn_oSiip.js","/assets/react-dom-D_m_Zgd3.js"],"css":[]},"routes/queues._index":{"id":"routes/queues._index","parentId":"root","path":"queues","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/queues._index-8YriSqbQ.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/table-Cz7ujmH_.js","/assets/filter-select-Bn_oSiip.js"],"css":[]},"routes/queues.create":{"id":"routes/queues.create","parentId":"root","path":"queues/create","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/queues.create-DsY0Sc19.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/chevron-down-BFFjfYD4.js","/assets/button-9NpSS9Ow.js","/assets/error-card-BH7i86fH.js","/assets/createLucideIcon-C-LI4enx.js"],"css":[]},"routes/queues.$name":{"id":"routes/queues.$name","parentId":"root","path":"queues/:name","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/queues._name-Cb17IB2u.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/createLucideIcon-C-LI4enx.js","/assets/chevron-down-BFFjfYD4.js","/assets/chevron-right-DGk5QFJF.js","/assets/MenuTrigger-BNvpjhsQ.js","/assets/dialog-D-oczDM2.js","/assets/stat-card-dyg1wY5p.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/table-Cz7ujmH_.js","/assets/error-card-BH7i86fH.js","/assets/pagination-C-ohiBmY.js","/assets/filter-select-Bn_oSiip.js","/assets/react-dom-D_m_Zgd3.js","/assets/useOpenInteractionType-BQ1arb0B.js","/assets/x-AhXI_F1j.js"],"css":[]},"routes/queues.$name.jobs.$jobId":{"id":"routes/queues.$name.jobs.$jobId","parentId":"root","path":"queues/:name/jobs/:jobId","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/queues._name.jobs._jobId-
|
|
1
|
+
window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-CqyjuPDB.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/react-dom-D_m_Zgd3.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/root-qxoeL6W3.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/react-dom-D_m_Zgd3.js","/assets/db-link-BajQ1v8I.js","/assets/createLucideIcon-C-LI4enx.js","/assets/MenuTrigger-BNvpjhsQ.js","/assets/useOpenInteractionType-BQ1arb0B.js"],"css":["/assets/root-B0MB8jZH.css"]},"routes/_index":{"id":"routes/_index","parentId":"root","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/_index-DqpFaaQw.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/stat-card-dyg1wY5p.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/table-Cz7ujmH_.js","/assets/error-card-BH7i86fH.js"],"css":[]},"routes/jobs":{"id":"routes/jobs","parentId":"root","path":"jobs","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/jobs-CAd_qqLH.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/createLucideIcon-C-LI4enx.js","/assets/check-7jwc5sb1.js","/assets/chevron-down-BFFjfYD4.js","/assets/chevron-right-DGk5QFJF.js","/assets/x-AhXI_F1j.js","/assets/MenuTrigger-BNvpjhsQ.js","/assets/useOpenInteractionType-BQ1arb0B.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/table-Cz7ujmH_.js","/assets/error-card-BH7i86fH.js","/assets/pagination-C-ohiBmY.js","/assets/filter-select-Bn_oSiip.js","/assets/react-dom-D_m_Zgd3.js"],"css":[]},"routes/queues._index":{"id":"routes/queues._index","parentId":"root","path":"queues","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/queues._index-8YriSqbQ.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/table-Cz7ujmH_.js","/assets/filter-select-Bn_oSiip.js"],"css":[]},"routes/queues.create":{"id":"routes/queues.create","parentId":"root","path":"queues/create","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/queues.create-DsY0Sc19.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/chevron-down-BFFjfYD4.js","/assets/button-9NpSS9Ow.js","/assets/error-card-BH7i86fH.js","/assets/createLucideIcon-C-LI4enx.js"],"css":[]},"routes/queues.$name":{"id":"routes/queues.$name","parentId":"root","path":"queues/:name","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/queues._name-Cb17IB2u.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/createLucideIcon-C-LI4enx.js","/assets/chevron-down-BFFjfYD4.js","/assets/chevron-right-DGk5QFJF.js","/assets/MenuTrigger-BNvpjhsQ.js","/assets/dialog-D-oczDM2.js","/assets/stat-card-dyg1wY5p.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/table-Cz7ujmH_.js","/assets/error-card-BH7i86fH.js","/assets/pagination-C-ohiBmY.js","/assets/filter-select-Bn_oSiip.js","/assets/react-dom-D_m_Zgd3.js","/assets/useOpenInteractionType-BQ1arb0B.js","/assets/x-AhXI_F1j.js"],"css":[]},"routes/queues.$name.jobs.$jobId":{"id":"routes/queues.$name.jobs.$jobId","parentId":"root","path":"queues/:name/jobs/:jobId","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/queues._name.jobs._jobId-DzHZmfcB.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/createLucideIcon-C-LI4enx.js","/assets/check-7jwc5sb1.js","/assets/dialog-D-oczDM2.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/error-card-BH7i86fH.js","/assets/x-AhXI_F1j.js","/assets/useOpenInteractionType-BQ1arb0B.js","/assets/react-dom-D_m_Zgd3.js"],"css":[]},"routes/schedules":{"id":"routes/schedules","parentId":"root","path":"schedules","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/schedules-iYfIJxOD.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/table-Cz7ujmH_.js","/assets/error-card-BH7i86fH.js","/assets/pagination-C-ohiBmY.js"],"css":[]},"routes/schedules.$name.$key":{"id":"routes/schedules.$name.$key","parentId":"root","path":"schedules/:name/:key","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/schedules._name._key-CJVu73XY.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/dialog-D-oczDM2.js","/assets/button-9NpSS9Ow.js","/assets/error-card-BH7i86fH.js","/assets/x-AhXI_F1j.js","/assets/useOpenInteractionType-BQ1arb0B.js","/assets/createLucideIcon-C-LI4enx.js","/assets/react-dom-D_m_Zgd3.js"],"css":[]},"routes/schedules.new":{"id":"routes/schedules.new","parentId":"root","path":"schedules/new","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/schedules.new-Cq0Mxa7G.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/button-9NpSS9Ow.js","/assets/error-card-BH7i86fH.js"],"css":[]},"routes/send":{"id":"routes/send","parentId":"root","path":"send","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/send-8X9ZisG-.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/button-9NpSS9Ow.js","/assets/error-card-BH7i86fH.js"],"css":[]},"routes/migrations":{"id":"routes/migrations","parentId":"root","path":"migrations","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/migrations-D5l0n4Jn.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/stat-card-dyg1wY5p.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/table-Cz7ujmH_.js","/assets/error-card-BH7i86fH.js","/assets/pagination-C-ohiBmY.js","/assets/filter-select-Bn_oSiip.js"],"css":[]},"routes/warnings":{"id":"routes/warnings","parentId":"root","path":"warnings","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/warnings-C1R_RzIe.js","imports":["/assets/jsx-runtime-RQyiN6Nr.js","/assets/db-link-BajQ1v8I.js","/assets/button-9NpSS9Ow.js","/assets/badge-CMnQO7Lq.js","/assets/table-Cz7ujmH_.js","/assets/error-card-BH7i86fH.js","/assets/pagination-C-ohiBmY.js","/assets/filter-select-Bn_oSiip.js"],"css":[]}},"url":"/assets/manifest-3e8f868c.js","version":"3e8f868c"};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e,rt as t,s as n,t as r,tt as i}from"./jsx-runtime-RQyiN6Nr.js";import{h as a,j as o,m as s,t as c,u as l}from"./db-link-BajQ1v8I.js";import{t as u}from"./createLucideIcon-C-LI4enx.js";import{t as d}from"./check-7jwc5sb1.js";import{a as f,i as p,n as m,o as h,r as g,t as _}from"./dialog-D-oczDM2.js";import{a as v,i as y,n as b,r as x,t as S}from"./button-9NpSS9Ow.js";import{n as C,t as w}from"./badge-CMnQO7Lq.js";import{t as T}from"./error-card-BH7i86fH.js";var E=u(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),D=t(i(),1),O=r();function k({title:e,description:t,confirmLabel:n,confirmVariant:r=`primary`,triggerVariant:i=`ghost`,trigger:a,onConfirm:o,disabled:s}){let[c,l]=(0,D.useState)(!1);return(0,O.jsxs)(f,{open:c,onOpenChange:l,children:[(0,O.jsx)(S,{variant:i,size:`sm`,disabled:s,onClick:()=>l(!0),className:`cursor-pointer`,children:a}),(0,O.jsxs)(_,{hideCloseButton:!0,className:`w-[28rem] max-w-[calc(100vw-2rem)]`,children:[(0,O.jsxs)(p,{children:[(0,O.jsx)(h,{children:e}),(0,O.jsx)(m,{className:`mt-2`,children:t})]}),(0,O.jsxs)(g,{className:`mt-6 flex justify-end gap-3`,children:[(0,O.jsx)(S,{variant:`outline`,size:`sm`,className:`cursor-pointer`,onClick:()=>l(!1),children:`Cancel`}),(0,O.jsx)(S,{variant:r===`danger`?`danger`:`primary`,size:`sm`,className:`cursor-pointer`,onClick:()=>{o(),l(!1)},children:n})]})]})]})}var A=n(function(){return(0,O.jsx)(T,{title:`Failed to load job`,backTo:{href:`/queues`,label:`Back to Queues`}})}),j=e(function({loaderData:e}){let{job:t,queueName:n}=e,r=o(),i=r.state!==`idle`,[u,f]=(0,D.useState)(!1),p=r.data,m=p&&!p.success&&p.affected===0,h=e=>{r.submit({intent:e},{method:`post`})},g=async()=>{await navigator.clipboard.writeText(t.id),f(!0),setTimeout(()=>f(!1),2e3)},_=t.state===`failed`;return(0,O.jsxs)(`div`,{className:`space-y-4`,children:[(0,O.jsx)(C,{title:(0,O.jsxs)(`span`,{className:`inline-flex items-center gap-3`,children:[`Job detail`,(0,O.jsx)(w,{variant:l[t.state],size:`lg`,dot:!0,children:t.state})]}),action:(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[m&&(0,O.jsx)(`span`,{className:`text-xs text-[var(--warning-600)]`,title:p.message,children:`Action failed`}),t.state===`failed`&&(0,O.jsx)(S,{variant:`outline`,size:`sm`,disabled:i,onClick:()=>h(`retry`),children:`Retry`}),t.state===`cancelled`&&(0,O.jsx)(S,{variant:`outline`,size:`sm`,disabled:i,onClick:()=>h(`resume`),children:`Resume`}),(t.state===`created`||t.state===`retry`||t.state===`active`)&&(0,O.jsx)(k,{title:`Cancel Job`,description:`Are you sure you want to cancel job ${t.id.slice(0,8)}...? This will prevent the job from being processed.`,confirmLabel:`Cancel Job`,confirmVariant:`danger`,triggerVariant:`outline`,trigger:`Cancel`,onConfirm:()=>h(`cancel`),disabled:i}),t.state!==`active`&&(0,O.jsx)(k,{title:`Delete Job`,description:`Are you sure you want to delete job ${t.id.slice(0,8)}...? This action cannot be undone.`,confirmLabel:`Delete`,confirmVariant:`danger`,triggerVariant:`danger`,trigger:`Delete`,onConfirm:()=>h(`delete`),disabled:i})]})}),(0,O.jsxs)(b,{children:[(0,O.jsxs)(y,{children:[(0,O.jsx)(v,{children:`Details`}),(0,O.jsxs)(`span`,{className:`text-xs text-[var(--text-tertiary)]`,children:[`in queue`,` `,(0,O.jsx)(c,{to:`/queues/${encodeURIComponent(n)}`,className:`font-mono text-xs text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300`,children:n})]})]}),(0,O.jsxs)(x,{className:`space-y-6`,children:[(0,O.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-[2fr_1fr_1fr] gap-6`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`pgb-eyebrow mb-1`,children:`Job ID`}),(0,O.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,O.jsx)(`code`,{className:`text-sm font-mono break-all text-[var(--text-primary)]`,children:t.id}),(0,O.jsx)(`button`,{onClick:g,className:s(`p-1 rounded-md transition-colors cursor-pointer flex-shrink-0`,`text-[var(--text-tertiary)] hover:text-[var(--text-primary)] hover:bg-[var(--surface-hover)]`),title:u?`Copied!`:`Copy to clipboard`,children:u?(0,O.jsx)(d,{className:`h-4 w-4 text-[var(--success-600)]`}):(0,O.jsx)(E,{className:`h-4 w-4`})})]})]}),(0,O.jsx)(M,{label:`Policy`,value:t.policy||`—`}),(0,O.jsx)(M,{label:`Priority`,value:t.priority,mono:!0})]}),(0,O.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-4`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`pgb-eyebrow mb-1.5`,children:`Data`}),(0,O.jsx)(`pre`,{className:`text-xs px-3.5 py-3 rounded-lg border border-[var(--border-default)] bg-[var(--surface-sunken)] font-mono leading-relaxed text-[var(--text-primary)] overflow-auto max-h-40`,children:t.data?JSON.stringify(t.data,null,2):`null`})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`pgb-eyebrow mb-1.5`,children:`Output`}),(0,O.jsx)(`pre`,{className:s(`text-xs px-3.5 py-3 rounded-lg border font-mono leading-relaxed text-[var(--text-primary)] overflow-auto max-h-40`,_?`border-[var(--error-100)] bg-[var(--error-50)]`:`border-[var(--border-default)] bg-[var(--surface-sunken)]`),children:t.output!==void 0&&t.output!==null?JSON.stringify(t.output,null,2):`—`})]})]}),(0,O.jsx)(`div`,{children:(0,O.jsxs)(`div`,{className:`space-y-6`,children:[(0,O.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-x-6 gap-y-4`,children:(0,O.jsx)(M,{label:`Priority`,value:t.priority})}),(0,O.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-x-6 gap-y-4`,children:[(0,O.jsx)(M,{label:`Retry Count`,value:t.retryCount,mono:!0}),(0,O.jsx)(M,{label:`Retry Limit`,value:t.retryLimit,mono:!0}),(0,O.jsx)(M,{label:`Retry Delay`,value:t.retryDelay?`${t.retryDelay}ms`:`—`,mono:!0}),(0,O.jsx)(M,{label:`Retry Backoff`,value:t.retryBackoff?`Enabled`:`Disabled`})]}),(t.singletonKey||t.groupId||t.groupTier||t.deadLetter)&&(0,O.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-x-6 gap-y-4`,children:[t.singletonKey&&(0,O.jsx)(M,{label:`Singleton Key`,value:t.singletonKey,mono:!0}),t.groupId&&(0,O.jsx)(M,{label:`Group ID`,value:t.groupId,mono:!0}),t.groupTier&&(0,O.jsx)(M,{label:`Group Tier`,value:t.groupTier,mono:!0}),t.deadLetter&&(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`dt`,{className:`pgb-eyebrow`,children:`Dead Letter`}),(0,O.jsx)(`dd`,{className:`mt-1 text-sm text-[var(--text-primary)]`,children:(0,O.jsx)(c,{to:`/queues/${t.deadLetter}`,className:`font-mono text-xs text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300`,children:t.deadLetter})})]})]}),(0,O.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 gap-x-6 gap-y-4`,children:[(0,O.jsx)(M,{label:`Created`,value:a(new Date(t.createdOn)),mono:!0}),(0,O.jsx)(M,{label:`Start After`,value:t.startAfter?a(new Date(t.startAfter)):`—`,mono:!0}),(0,O.jsx)(M,{label:`Started`,value:t.startedOn?a(new Date(t.startedOn)):`—`,mono:!0}),(0,O.jsx)(M,{label:`Completed`,value:t.completedOn?a(new Date(t.completedOn)):`—`,mono:!0}),(0,O.jsx)(M,{label:`Keep Until`,value:t.keepUntil?a(new Date(t.keepUntil)):`—`,mono:!0})]})]})})]})]})]})});function M({label:e,value:t,mono:n=!1}){return(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`dt`,{className:`pgb-eyebrow`,children:e}),(0,O.jsx)(`dd`,{className:s(`mt-1 text-sm text-[var(--text-primary)]`,n&&`pgb-num`),children:t?.toString()||`—`})]})}export{A as ErrorBoundary,j as default};
|
|
1
|
+
import{o as e,rt as t,s as n,t as r,tt as i}from"./jsx-runtime-RQyiN6Nr.js";import{h as a,j as o,m as s,t as c,u as l}from"./db-link-BajQ1v8I.js";import{t as u}from"./createLucideIcon-C-LI4enx.js";import{t as d}from"./check-7jwc5sb1.js";import{a as f,i as p,n as m,o as h,r as g,t as _}from"./dialog-D-oczDM2.js";import{a as v,i as y,n as b,r as x,t as S}from"./button-9NpSS9Ow.js";import{n as C,t as w}from"./badge-CMnQO7Lq.js";import{t as T}from"./error-card-BH7i86fH.js";var E=u(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),D=t(i(),1),O=r();function k({title:e,description:t,confirmLabel:n,confirmVariant:r=`primary`,triggerVariant:i=`ghost`,trigger:a,onConfirm:o,disabled:s}){let[c,l]=(0,D.useState)(!1);return(0,O.jsxs)(f,{open:c,onOpenChange:l,children:[(0,O.jsx)(S,{variant:i,size:`sm`,disabled:s,onClick:()=>l(!0),className:`cursor-pointer`,children:a}),(0,O.jsxs)(_,{hideCloseButton:!0,className:`w-[28rem] max-w-[calc(100vw-2rem)]`,children:[(0,O.jsxs)(p,{children:[(0,O.jsx)(h,{children:e}),(0,O.jsx)(m,{className:`mt-2`,children:t})]}),(0,O.jsxs)(g,{className:`mt-6 flex justify-end gap-3`,children:[(0,O.jsx)(S,{variant:`outline`,size:`sm`,className:`cursor-pointer`,onClick:()=>l(!1),children:`Cancel`}),(0,O.jsx)(S,{variant:r===`danger`?`danger`:`primary`,size:`sm`,className:`cursor-pointer`,onClick:()=>{o(),l(!1)},children:n})]})]})]})}var A=n(function(){return(0,O.jsx)(T,{title:`Failed to load job`,backTo:{href:`/queues`,label:`Back to Queues`}})}),j=e(function({loaderData:e}){let{job:t,queueName:n}=e,r=o(),i=r.state!==`idle`,[u,f]=(0,D.useState)(!1),p=r.data,m=p&&!p.success&&p.affected===0,h=e=>{r.submit({intent:e},{method:`post`})},g=async()=>{await navigator.clipboard.writeText(t.id),f(!0),setTimeout(()=>f(!1),2e3)},_=t.state===`failed`;return(0,O.jsxs)(`div`,{className:`space-y-4`,children:[(0,O.jsx)(C,{title:(0,O.jsxs)(`span`,{className:`inline-flex items-center gap-3`,children:[`Job detail`,(0,O.jsx)(w,{variant:l[t.state],size:`lg`,dot:!0,children:t.state})]}),action:(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[m&&(0,O.jsx)(`span`,{className:`text-xs text-[var(--warning-600)]`,title:p.message,children:`Action failed`}),t.state===`failed`&&(0,O.jsx)(S,{variant:`outline`,size:`sm`,disabled:i,onClick:()=>h(`retry`),children:`Retry`}),t.state===`cancelled`&&(0,O.jsx)(S,{variant:`outline`,size:`sm`,disabled:i,onClick:()=>h(`resume`),children:`Resume`}),(t.state===`created`||t.state===`retry`||t.state===`active`)&&(0,O.jsx)(k,{title:`Cancel Job`,description:`Are you sure you want to cancel job ${t.id.slice(0,8)}...? This will prevent the job from being processed.`,confirmLabel:`Cancel Job`,confirmVariant:`danger`,triggerVariant:`outline`,trigger:`Cancel`,onConfirm:()=>h(`cancel`),disabled:i}),t.state!==`active`&&(0,O.jsx)(k,{title:`Delete Job`,description:`Are you sure you want to delete job ${t.id.slice(0,8)}...? This action cannot be undone.`,confirmLabel:`Delete`,confirmVariant:`danger`,triggerVariant:`danger`,trigger:`Delete`,onConfirm:()=>h(`delete`),disabled:i})]})}),(0,O.jsxs)(b,{children:[(0,O.jsxs)(y,{children:[(0,O.jsx)(v,{children:`Details`}),(0,O.jsxs)(`span`,{className:`text-xs text-[var(--text-tertiary)]`,children:[`in queue`,` `,(0,O.jsx)(c,{to:`/queues/${encodeURIComponent(n)}`,className:`font-mono text-xs text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300`,children:n})]})]}),(0,O.jsxs)(x,{className:`space-y-6`,children:[(0,O.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-[2fr_1fr_1fr] gap-6`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`pgb-eyebrow mb-1`,children:`Job ID`}),(0,O.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,O.jsx)(`code`,{className:`text-sm font-mono break-all text-[var(--text-primary)]`,children:t.id}),(0,O.jsx)(`button`,{onClick:g,className:s(`p-1 rounded-md transition-colors cursor-pointer flex-shrink-0`,`text-[var(--text-tertiary)] hover:text-[var(--text-primary)] hover:bg-[var(--surface-hover)]`),title:u?`Copied!`:`Copy to clipboard`,children:u?(0,O.jsx)(d,{className:`h-4 w-4 text-[var(--success-600)]`}):(0,O.jsx)(E,{className:`h-4 w-4`})})]})]}),(0,O.jsx)(M,{label:`Policy`,value:t.policy||`—`}),(0,O.jsx)(M,{label:`Priority`,value:t.priority,mono:!0})]}),(0,O.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-4`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`pgb-eyebrow mb-1.5`,children:`Data`}),(0,O.jsx)(`pre`,{className:`text-xs px-3.5 py-3 rounded-lg border border-[var(--border-default)] bg-[var(--surface-sunken)] font-mono leading-relaxed text-[var(--text-primary)] overflow-auto max-h-40`,children:t.data?JSON.stringify(t.data,null,2):`null`})]}),(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`pgb-eyebrow mb-1.5`,children:`Output`}),(0,O.jsx)(`pre`,{className:s(`text-xs px-3.5 py-3 rounded-lg border font-mono leading-relaxed text-[var(--text-primary)] overflow-auto max-h-40`,_?`border-[var(--error-100)] bg-[var(--error-50)]`:`border-[var(--border-default)] bg-[var(--surface-sunken)]`),children:t.output!==void 0&&t.output!==null?JSON.stringify(t.output,null,2):`—`})]})]}),(0,O.jsx)(`div`,{children:(0,O.jsxs)(`div`,{className:`space-y-6`,children:[(0,O.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-x-6 gap-y-4`,children:(0,O.jsx)(M,{label:`Priority`,value:t.priority})}),(0,O.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-x-6 gap-y-4`,children:[(0,O.jsx)(M,{label:`Retry Count`,value:t.retryCount,mono:!0}),(0,O.jsx)(M,{label:`Retry Limit`,value:t.retryLimit,mono:!0}),(0,O.jsx)(M,{label:`Retry Delay`,value:t.retryDelay?`${t.retryDelay}ms`:`—`,mono:!0}),(0,O.jsx)(M,{label:`Retry Backoff`,value:t.retryBackoff?`Enabled`:`Disabled`})]}),(t.singletonKey||t.groupId||t.groupTier||t.deadLetter)&&(0,O.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-x-6 gap-y-4`,children:[t.singletonKey&&(0,O.jsx)(M,{label:`Singleton Key`,value:t.singletonKey,mono:!0}),t.groupId&&(0,O.jsx)(M,{label:`Group ID`,value:t.groupId,mono:!0}),t.groupTier&&(0,O.jsx)(M,{label:`Group Tier`,value:t.groupTier,mono:!0}),t.deadLetter&&(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`dt`,{className:`pgb-eyebrow`,children:`Dead Letter`}),(0,O.jsx)(`dd`,{className:`mt-1 text-sm text-[var(--text-primary)]`,children:(0,O.jsx)(c,{to:`/queues/${t.deadLetter}`,className:`font-mono text-xs text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300`,children:t.deadLetter})})]})]}),(t.sourceName||t.sourceId)&&(0,O.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-x-6 gap-y-4`,children:[t.sourceName&&(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`dt`,{className:`pgb-eyebrow`,children:`Source Queue`}),(0,O.jsx)(`dd`,{className:`mt-1 text-sm text-[var(--text-primary)]`,children:(0,O.jsx)(c,{to:`/queues/${t.sourceName}`,className:`font-mono text-xs text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300`,children:t.sourceName})})]}),t.sourceId&&(0,O.jsx)(M,{label:`Source Job ID`,value:t.sourceId,mono:!0}),t.sourceRetryCount!==null&&t.sourceRetryCount!==void 0&&(0,O.jsx)(M,{label:`Source Retry Count`,value:t.sourceRetryCount,mono:!0}),t.sourceCreatedOn&&(0,O.jsx)(M,{label:`Source Created`,value:a(new Date(t.sourceCreatedOn)),mono:!0})]}),(0,O.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 gap-x-6 gap-y-4`,children:[(0,O.jsx)(M,{label:`Created`,value:a(new Date(t.createdOn)),mono:!0}),(0,O.jsx)(M,{label:`Start After`,value:t.startAfter?a(new Date(t.startAfter)):`—`,mono:!0}),(0,O.jsx)(M,{label:`Started`,value:t.startedOn?a(new Date(t.startedOn)):`—`,mono:!0}),(0,O.jsx)(M,{label:`Completed`,value:t.completedOn?a(new Date(t.completedOn)):`—`,mono:!0}),(0,O.jsx)(M,{label:`Keep Until`,value:t.keepUntil?a(new Date(t.keepUntil)):`—`,mono:!0})]})]})})]})]})]})});function M({label:e,value:t,mono:n=!1}){return(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`dt`,{className:`pgb-eyebrow`,children:e}),(0,O.jsx)(`dd`,{className:s(`mt-1 text-sm text-[var(--text-primary)]`,n&&`pgb-num`),children:t?.toString()||`—`})]})}export{A as ErrorBoundary,j as default};
|
package/build/server/index.js
CHANGED
|
@@ -1799,7 +1799,11 @@ function createTableJob(schema, noPartitioning = false) {
|
|
|
1799
1799
|
heartbeat_seconds int,
|
|
1800
1800
|
blocked boolean not null default false,
|
|
1801
1801
|
blocking boolean not null default false,
|
|
1802
|
-
pending_dependencies int not null default 0
|
|
1802
|
+
pending_dependencies int not null default 0,
|
|
1803
|
+
source_name text,
|
|
1804
|
+
source_id uuid,
|
|
1805
|
+
source_created_on timestamp with time zone,
|
|
1806
|
+
source_retry_count int
|
|
1803
1807
|
) ${partitionClause}
|
|
1804
1808
|
`;
|
|
1805
1809
|
}
|
|
@@ -1826,7 +1830,11 @@ var JOB_COLUMNS_ALL = `${JOB_COLUMNS_MIN},
|
|
|
1826
1830
|
blocked,
|
|
1827
1831
|
blocking,
|
|
1828
1832
|
pending_dependencies as "pendingDependencies",
|
|
1829
|
-
output
|
|
1833
|
+
output,
|
|
1834
|
+
source_name as "sourceName",
|
|
1835
|
+
source_id as "sourceId",
|
|
1836
|
+
source_created_on as "sourceCreatedOn",
|
|
1837
|
+
source_retry_count as "sourceRetryCount"
|
|
1830
1838
|
`;
|
|
1831
1839
|
function createTableJobCommon(schema) {
|
|
1832
1840
|
return `
|
|
@@ -2840,16 +2848,21 @@ function failJobsBody(schema, table, where, output, forceTerminal = false) {
|
|
|
2840
2848
|
SELECT * FROM failed_jobs
|
|
2841
2849
|
),
|
|
2842
2850
|
dlq_jobs as (
|
|
2843
|
-
INSERT INTO ${schema}.job (name, data, output, retry_limit, retry_backoff, retry_delay, keep_until, deletion_seconds
|
|
2851
|
+
INSERT INTO ${schema}.job (name, data, output, retry_limit, retry_backoff, retry_delay, keep_until, deletion_seconds,
|
|
2852
|
+
source_name, source_id, source_created_on, source_retry_count)
|
|
2844
2853
|
SELECT
|
|
2845
2854
|
r.dead_letter,
|
|
2846
|
-
data,
|
|
2847
|
-
output,
|
|
2855
|
+
r.data,
|
|
2856
|
+
r.output,
|
|
2848
2857
|
q.retry_limit,
|
|
2849
2858
|
q.retry_backoff,
|
|
2850
2859
|
q.retry_delay,
|
|
2851
2860
|
now() + q.retention_seconds * interval '1s',
|
|
2852
|
-
q.deletion_seconds
|
|
2861
|
+
q.deletion_seconds,
|
|
2862
|
+
r.name,
|
|
2863
|
+
r.id,
|
|
2864
|
+
r.created_on,
|
|
2865
|
+
r.retry_count
|
|
2853
2866
|
FROM results r
|
|
2854
2867
|
JOIN ${schema}.queue q ON q.name = r.dead_letter
|
|
2855
2868
|
WHERE state = '${JOB_STATES.failed}'
|
|
@@ -3008,11 +3021,44 @@ function insertRetryJob(schema, table) {
|
|
|
3008
3021
|
}
|
|
3009
3022
|
function insertDeadLetterJob(schema) {
|
|
3010
3023
|
return `
|
|
3011
|
-
INSERT INTO ${schema}.job (name, data, output, retry_limit, retry_backoff, retry_delay, keep_until, deletion_seconds
|
|
3012
|
-
|
|
3024
|
+
INSERT INTO ${schema}.job (name, data, output, retry_limit, retry_backoff, retry_delay, keep_until, deletion_seconds,
|
|
3025
|
+
source_name, source_id, source_created_on, source_retry_count)
|
|
3026
|
+
SELECT $1, $2, $3, q.retry_limit, q.retry_backoff, q.retry_delay, now() + q.retention_seconds * interval '1s', q.deletion_seconds,
|
|
3027
|
+
$4, $5, $6, $7
|
|
3013
3028
|
FROM ${schema}.queue q WHERE q.name = $1
|
|
3014
3029
|
`;
|
|
3015
3030
|
}
|
|
3031
|
+
function redriveJobs(schema, table) {
|
|
3032
|
+
return `
|
|
3033
|
+
WITH candidates AS (
|
|
3034
|
+
SELECT j.id
|
|
3035
|
+
FROM ${schema}.${table} j
|
|
3036
|
+
JOIN ${schema}.queue q ON q.name = COALESCE($2, j.source_name)
|
|
3037
|
+
WHERE j.name = $1
|
|
3038
|
+
AND j.state < '${JOB_STATES.active}'
|
|
3039
|
+
AND ($3::text IS NULL OR j.source_name = $3)
|
|
3040
|
+
ORDER BY j.created_on
|
|
3041
|
+
LIMIT $4
|
|
3042
|
+
FOR UPDATE OF j SKIP LOCKED
|
|
3043
|
+
),
|
|
3044
|
+
moved AS (
|
|
3045
|
+
DELETE FROM ${schema}.${table}
|
|
3046
|
+
WHERE id IN (SELECT id FROM candidates)
|
|
3047
|
+
RETURNING *
|
|
3048
|
+
),
|
|
3049
|
+
ins AS (
|
|
3050
|
+
INSERT INTO ${schema}.job
|
|
3051
|
+
(name, data, priority, retry_limit, retry_backoff, retry_delay, retry_delay_max,
|
|
3052
|
+
expire_seconds, keep_until, deletion_seconds, policy)
|
|
3053
|
+
SELECT COALESCE($2, m.source_name), m.data, m.priority, q.retry_limit, q.retry_backoff,
|
|
3054
|
+
q.retry_delay, q.retry_delay_max, q.expire_seconds,
|
|
3055
|
+
now() + q.retention_seconds * interval '1s', q.deletion_seconds, q.policy
|
|
3056
|
+
FROM moved m JOIN ${schema}.queue q ON q.name = COALESCE($2, m.source_name)
|
|
3057
|
+
RETURNING 1
|
|
3058
|
+
)
|
|
3059
|
+
SELECT count(*)::int AS moved FROM ins
|
|
3060
|
+
`;
|
|
3061
|
+
}
|
|
3016
3062
|
function deletion(schema, table, queues, noAdvisoryLocks) {
|
|
3017
3063
|
return locked(schema, `
|
|
3018
3064
|
DELETE FROM ${schema}.${table}
|
|
@@ -4518,6 +4564,23 @@ function getAll(schema) {
|
|
|
4518
4564
|
`SELECT ${schema}.job_table_run($cmd$DROP INDEX IF EXISTS ${schema}.job_i9$cmd$)`,
|
|
4519
4565
|
`ALTER TABLE ${schema}.version DROP COLUMN flow_on`
|
|
4520
4566
|
]
|
|
4567
|
+
},
|
|
4568
|
+
{
|
|
4569
|
+
release: "12.23.0",
|
|
4570
|
+
version: 34,
|
|
4571
|
+
previous: 33,
|
|
4572
|
+
install: [
|
|
4573
|
+
`ALTER TABLE ${schema}.job ADD COLUMN IF NOT EXISTS source_name text`,
|
|
4574
|
+
`ALTER TABLE ${schema}.job ADD COLUMN IF NOT EXISTS source_id uuid`,
|
|
4575
|
+
`ALTER TABLE ${schema}.job ADD COLUMN IF NOT EXISTS source_created_on timestamp with time zone`,
|
|
4576
|
+
`ALTER TABLE ${schema}.job ADD COLUMN IF NOT EXISTS source_retry_count int`
|
|
4577
|
+
],
|
|
4578
|
+
uninstall: [
|
|
4579
|
+
`ALTER TABLE ${schema}.job DROP COLUMN source_name`,
|
|
4580
|
+
`ALTER TABLE ${schema}.job DROP COLUMN source_id`,
|
|
4581
|
+
`ALTER TABLE ${schema}.job DROP COLUMN source_created_on`,
|
|
4582
|
+
`ALTER TABLE ${schema}.job DROP COLUMN source_retry_count`
|
|
4583
|
+
]
|
|
4521
4584
|
}
|
|
4522
4585
|
];
|
|
4523
4586
|
}
|
|
@@ -4525,7 +4588,7 @@ function getAll(schema) {
|
|
|
4525
4588
|
//#region ../../src/contractor.ts
|
|
4526
4589
|
var schemaVersion = {
|
|
4527
4590
|
name: "pg-boss",
|
|
4528
|
-
version: "12.
|
|
4591
|
+
version: "12.23.0",
|
|
4529
4592
|
description: "Queueing jobs in Postgres from Node.js like a boss",
|
|
4530
4593
|
type: "module",
|
|
4531
4594
|
main: "./dist/index.js",
|
|
@@ -4581,7 +4644,7 @@ var schemaVersion = {
|
|
|
4581
4644
|
"docs": "npm run docs:dev --prefix docs",
|
|
4582
4645
|
"docs:readme": "node ./scripts/sync-readme.js"
|
|
4583
4646
|
},
|
|
4584
|
-
pgboss: { "schema":
|
|
4647
|
+
pgboss: { "schema": 34 },
|
|
4585
4648
|
repository: {
|
|
4586
4649
|
"type": "git",
|
|
4587
4650
|
"url": "git+https://github.com/timgit/pg-boss.git"
|
|
@@ -6042,7 +6105,11 @@ var Manager = class extends EventEmitter {
|
|
|
6042
6105
|
if (job.dead_letter) await tx.executeSql(dlqSql, [
|
|
6043
6106
|
job.dead_letter,
|
|
6044
6107
|
job.data,
|
|
6045
|
-
jobOutput
|
|
6108
|
+
jobOutput,
|
|
6109
|
+
job.name,
|
|
6110
|
+
job.id,
|
|
6111
|
+
job.created_on,
|
|
6112
|
+
job.retry_count
|
|
6046
6113
|
]);
|
|
6047
6114
|
}
|
|
6048
6115
|
count++;
|
|
@@ -6058,6 +6125,22 @@ var Manager = class extends EventEmitter {
|
|
|
6058
6125
|
const result = await db.executeSql(sql, [name, ids]);
|
|
6059
6126
|
return this.mapCommandResponse(ids, result);
|
|
6060
6127
|
}
|
|
6128
|
+
async redrive(name, options = {}) {
|
|
6129
|
+
assertQueueName(name);
|
|
6130
|
+
const { destination, sourceName, limit = 1e3 } = options;
|
|
6131
|
+
if (destination !== void 0) assertQueueName(destination);
|
|
6132
|
+
if (sourceName !== void 0) assertQueueName(sourceName);
|
|
6133
|
+
assert(Number.isInteger(limit) && limit >= 1, "limit must be an integer >= 1");
|
|
6134
|
+
const db = this.assertDb(options);
|
|
6135
|
+
const { table } = await this.getQueueCache(name);
|
|
6136
|
+
const sql = redriveJobs(this.config.schema, table);
|
|
6137
|
+
return (await db.executeSql(sql, [
|
|
6138
|
+
name,
|
|
6139
|
+
destination ?? null,
|
|
6140
|
+
sourceName ?? null,
|
|
6141
|
+
limit
|
|
6142
|
+
])).rows[0].moved;
|
|
6143
|
+
}
|
|
6061
6144
|
async cancel(name, id, options = {}) {
|
|
6062
6145
|
assertQueueName(name);
|
|
6063
6146
|
const db = this.assertDb(options);
|
|
@@ -6990,6 +7073,9 @@ var PgBoss = class extends EventEmitter {
|
|
|
6990
7073
|
deleteJob(name, id, options) {
|
|
6991
7074
|
return this.#manager.deleteJob(name, id, options);
|
|
6992
7075
|
}
|
|
7076
|
+
redrive(name, options) {
|
|
7077
|
+
return this.#manager.redrive(name, options);
|
|
7078
|
+
}
|
|
6993
7079
|
deleteQueuedJobs(name) {
|
|
6994
7080
|
return this.#manager.deleteQueuedJobs(name);
|
|
6995
7081
|
}
|
|
@@ -10527,6 +10613,37 @@ var queues_$name_jobs_$jobId_default = UNSAFE_withComponentProps(function JobDet
|
|
|
10527
10613
|
})] })
|
|
10528
10614
|
]
|
|
10529
10615
|
}),
|
|
10616
|
+
(job.sourceName || job.sourceId) && /* @__PURE__ */ jsxs("div", {
|
|
10617
|
+
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-x-6 gap-y-4",
|
|
10618
|
+
children: [
|
|
10619
|
+
job.sourceName && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", {
|
|
10620
|
+
className: "pgb-eyebrow",
|
|
10621
|
+
children: "Source Queue"
|
|
10622
|
+
}), /* @__PURE__ */ jsx("dd", {
|
|
10623
|
+
className: "mt-1 text-sm text-[var(--text-primary)]",
|
|
10624
|
+
children: /* @__PURE__ */ jsx(DbLink, {
|
|
10625
|
+
to: `/queues/${job.sourceName}`,
|
|
10626
|
+
className: "font-mono text-xs text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300",
|
|
10627
|
+
children: job.sourceName
|
|
10628
|
+
})
|
|
10629
|
+
})] }),
|
|
10630
|
+
job.sourceId && /* @__PURE__ */ jsx(ConfigItem, {
|
|
10631
|
+
label: "Source Job ID",
|
|
10632
|
+
value: job.sourceId,
|
|
10633
|
+
mono: true
|
|
10634
|
+
}),
|
|
10635
|
+
job.sourceRetryCount !== null && job.sourceRetryCount !== void 0 && /* @__PURE__ */ jsx(ConfigItem, {
|
|
10636
|
+
label: "Source Retry Count",
|
|
10637
|
+
value: job.sourceRetryCount,
|
|
10638
|
+
mono: true
|
|
10639
|
+
}),
|
|
10640
|
+
job.sourceCreatedOn && /* @__PURE__ */ jsx(ConfigItem, {
|
|
10641
|
+
label: "Source Created",
|
|
10642
|
+
value: formatDate(new Date(job.sourceCreatedOn)),
|
|
10643
|
+
mono: true
|
|
10644
|
+
})
|
|
10645
|
+
]
|
|
10646
|
+
}),
|
|
10530
10647
|
/* @__PURE__ */ jsxs("div", {
|
|
10531
10648
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 gap-x-6 gap-y-4",
|
|
10532
10649
|
children: [
|
|
@@ -11996,7 +12113,7 @@ var server_manifest_default = {
|
|
|
11996
12113
|
"hasClientMiddleware": false,
|
|
11997
12114
|
"hasDefaultExport": true,
|
|
11998
12115
|
"hasErrorBoundary": true,
|
|
11999
|
-
"module": "/assets/queues._name.jobs._jobId-
|
|
12116
|
+
"module": "/assets/queues._name.jobs._jobId-DzHZmfcB.js",
|
|
12000
12117
|
"imports": [
|
|
12001
12118
|
"/assets/jsx-runtime-RQyiN6Nr.js",
|
|
12002
12119
|
"/assets/db-link-BajQ1v8I.js",
|
|
@@ -12190,8 +12307,8 @@ var server_manifest_default = {
|
|
|
12190
12307
|
"hydrateFallbackModule": void 0
|
|
12191
12308
|
}
|
|
12192
12309
|
},
|
|
12193
|
-
"url": "/assets/manifest-
|
|
12194
|
-
"version": "
|
|
12310
|
+
"url": "/assets/manifest-3e8f868c.js",
|
|
12311
|
+
"version": "3e8f868c",
|
|
12195
12312
|
"sri": void 0
|
|
12196
12313
|
};
|
|
12197
12314
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pg-boss/dashboard",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Web dashboard for monitoring and managing pg-boss job queues",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pg-boss",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"isbot": "^5.1.44",
|
|
54
54
|
"lucide-react": "^1.21.0",
|
|
55
55
|
"pg": "^8.22.0",
|
|
56
|
-
"pg-boss": "^12.
|
|
56
|
+
"pg-boss": "^12.23.0",
|
|
57
57
|
"react": "^19.2.7",
|
|
58
58
|
"react-dom": "^19.2.7",
|
|
59
59
|
"react-router": "^8.0.1",
|