Skip to content

feat: add a surreal queue driver#127

Merged
ibourgeois merged 2 commits intomainfrom
codex/feat-28-surreal-queue
Mar 26, 2026
Merged

feat: add a surreal queue driver#127
ibourgeois merged 2 commits intomainfrom
codex/feat-28-surreal-queue

Conversation

@ibourgeois
Copy link
Copy Markdown
Contributor

Summary

  • add a first-class queue connector and a Surreal-safe queue implementation
  • document Surreal-backed queue configuration, worker setup, failed-job storage, and current limitations
  • cover enqueue, reserve, complete, retry, and fail behavior against a real local Surreal runtime

Closes #28

Testing

  • vendor/bin/pint --dirty --format agent
  • php artisan test --compact tests/Feature/SurrealQueueDriverTest.php tests/Feature/SurrealSessionDriverTest.php

Copilot AI review requested due to automatic review settings March 26, 2026 14:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a first-class Laravel queue connector backed by SurrealDB, along with configuration/docs and a feature test that exercises the queue lifecycle against a real local Surreal runtime.

Changes:

  • Introduces SurrealQueueConnector and SurrealQueue (a Surreal-safe variant of Laravel’s DatabaseQueue).
  • Adds a surreal queue connection to config/queue.php and makes failed-job DB configurable via QUEUE_FAILED_DATABASE.
  • Documents Surreal-backed queue setup/limitations and adds an end-to-end lifecycle test.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
app/Providers/AppServiceProvider.php Registers the surreal queue connector with Laravel’s QueueManager.
app/Services/Surreal/Queue/SurrealQueueConnector.php Creates SurrealQueue instances from queue connection config.
app/Services/Surreal/Queue/SurrealQueue.php Implements optimistic reservation logic compatible with SurrealDB (no SQL locks/transactions).
config/queue.php Adds surreal queue connection defaults; allows configuring failed-job storage DB via env.
tests/Feature/SurrealQueueDriverTest.php Covers enqueue/reserve/complete/retry/fail behavior against a local Surreal runtime.
README.md Documents configuration, migrations, worker setup, and current limitations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ibourgeois ibourgeois merged commit 829d9d5 into main Mar 26, 2026
1 check passed
@ibourgeois ibourgeois deleted the codex/feat-28-surreal-queue branch March 26, 2026 14:45
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.

feat: add a SurrealDB queue driver

2 participants