Skip to content

refactor: move subqueue context handling from AbstractQueue to Subqueue - #31

Merged
rybakit merged 1 commit into
masterfrom
refactor/move-subqueue-context-to-subqueue
Oct 29, 2026
Merged

rybakit merged 1 commit into
masterfrom
refactor/move-subqueue-context-to-subqueue

Conversation

@rybakit

@rybakit rybakit commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Summary

Move subqueue-specific context handling out of AbstractQueue and into Subqueue, making the base class simpler and the subqueue parameter routing explicit.

Changes

AbstractQueue

  • Removed protected array $context property
  • Removed callWithContext() — methods now delegate directly to call()
  • Removed withContext() — no longer needed without the context property
  • take(), touch(), and truncate() simplified from manual $args array building + conditional context append to plain call() delegation

Subqueue

  • Stores $subqueueName as a plain string instead of setting $context
  • Overrides every inherited method with explicit subqueue parameter passing that matches the Tarantool subqueuettl Lua driver contract:
    • put/release: merge ['subqueue' => $name] into the options array
    • take/touch/ack/peek/bury/kick/delete/truncate: append ['subqueue' => $name] as a trailing argument

Tests

  • Added dedicated integration tests for every Subqueue method

@rybakit
rybakit force-pushed the refactor/move-subqueue-context-to-subqueue branch 5 times, most recently from 9641c74 to 7ee821b Compare October 29, 2026 23:47
Remove the generic context machinery ($context property, callWithContext(),
withContext()) from AbstractQueue and make Subqueue explicitly manage its
own subqueue parameter routing per method.

This makes AbstractQueue simpler and context-free, while Subqueue becomes
self-contained with explicit per-method parameter passing that matches the
Tarantool subqueuettl Lua driver contract:

- put/release: merge subqueue opts into the options array
- take/touch/ack/peek/bury/kick/delete/truncate: append subqueue opts
  as a trailing argument
@rybakit
rybakit force-pushed the refactor/move-subqueue-context-to-subqueue branch from 7ee821b to 8175cf0 Compare October 29, 2026 23:50
@rybakit
rybakit marked this pull request as ready for review October 29, 2026 23:56
@rybakit
rybakit merged commit 99b89a3 into master Oct 29, 2026
17 of 18 checks passed
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.

1 participant