Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
18 lines
711 B
Plaintext
18 lines
711 B
Plaintext
import { countRunnableOrActiveJobsForQueue } from './countRunnableOrActiveJobsForQueue.js';
|
|
export const defaultBeforeSchedule = async ({ queueable, req })=>{
|
|
// All tasks in that queue that are either currently processing or can be run
|
|
const runnableOrActiveJobsForQueue = await countRunnableOrActiveJobsForQueue({
|
|
onlyScheduled: true,
|
|
queue: queueable.scheduleConfig.queue,
|
|
req,
|
|
taskSlug: queueable.taskConfig?.slug,
|
|
workflowSlug: queueable.workflowConfig?.slug
|
|
});
|
|
return {
|
|
input: {},
|
|
shouldSchedule: runnableOrActiveJobsForQueue === 0,
|
|
waitUntil: queueable.waitUntil
|
|
};
|
|
};
|
|
|
|
//# sourceMappingURL=defaultBeforeSchedule.js.map |