task_queue
Monitor and manage queued tasks for remote server operations, including file transfers, service checks, and system monitoring, with status tracking and long-running task alerts.
Instructions
Affiche le statut de toutes les tâches, avec des rappels pour les tâches longues.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.js:462-474 (registration)Registration of the 'task_queue' MCP tool, including schema (empty input) and inline handler that fetches the queue state via queue.getQueue(), formats it with formatJobForDisplay, and returns JSON.server.registerTool( "task_queue", { title: "Voir la file d'attente des tâches", description: "Affiche le statut de toutes les tâches, avec des rappels pour les tâches longues.", inputSchema: z.object({}) }, async () => { const queueState = queue.getQueue(); const displayQueue = Object.values(queueState).map(formatJobForDisplay); return { content: [{ type: "text", text: JSON.stringify(displayQueue, null, 2) }] }; } );
- server.js:469-473 (handler)Handler function for task_queue tool: retrieves current queue state, formats each job, and returns as JSON text content.async () => { const queueState = queue.getQueue(); const displayQueue = Object.values(queueState).map(formatJobForDisplay); return { content: [{ type: "text", text: JSON.stringify(displayQueue, null, 2) }] }; }
- server.js:453-459 (helper)Helper function used by task_queue handler to format jobs for display, adding reminder warnings for overdue running tasks.function formatJobForDisplay(job) { const displayJob = { ...job }; if (job.status === 'running' && job.reminderAt && new Date() > new Date(job.reminderAt)) { displayJob.reminder = "ATTENTION: Le temps de rappel est écoulé. La tâche est peut-être terminée ou bloquée."; } return displayJob; }
- server.js:35-36 (helper)Initialization of the queue module used by task_queue.await queue.init(); console.error("✅ Queue initialisée");