Skip to content

Conversation

devin-ai-integration[bot]
Copy link

Update runByID and Create queueAndRun Functions in PayloadCMS Queue System

This PR implements two changes to the queue system in the PayloadCMS codebase:

1. Updated the runByID Function

Modified the existing runByID function to optionally return the output of a task. Added a new returnTaskOutput parameter that, when set to true, will extract task outputs from job logs and return them along with the job status.

2. Created a New queueAndRun Function

Added a new queueAndRun function that combines the functionality of queue with runById, returning both the job and the result including any task output. This eliminates the need for separate steps to queue a job, run it, and then query it to get the output.

Implementation Details

  • Added generic type parameter to runByID for better type safety of task outputs
  • Implemented logic to extract task outputs from job logs
  • Created a new queueAndRun function with proper type definitions
  • Fixed linting issues to ensure code quality

Link to Devin run

https://app.devin.ai/sessions/2514ca4183d34fea95b8b043c4b72ccb

Requested by

Nathan Clevenger ([email protected])

Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants