Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: AppsDevTeam/background-queue
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: AppsDevTeam/background-queue
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: nice-shutdown
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 15 files changed
  • 1 contributor

Commits on Jun 23, 2026

  1. Implement label-specific DIE queues for targeted consumer restart

    - Add Manager methods getTopPriorityName() and includeTopPriority() to support per-label DIE queues (e.g., 0_worker)
    - Update Consumer and Producer interfaces to accept optional consumerLabel parameter
    - Add -l/--label option to consume and reload-consumers commands
    - Enhance reload-consumers to send DIE per label with -l option (e.g., -l label1,label2) while maintaining backward compatibility (number of DIE messages per label/queue)
    - Update Producer helper signatures to match interface changes
    - Add comprehensive unit and integration tests for label queue naming and reload logic
    - Update README and CLAUDE.md with new functionality and usage guidance
    Viktor Mašíček committed Jun 23, 2026
    Configuration menu
    Copy the full SHA
    e3c478b View commit details
    Browse the repository at this point in the history
  2. Implement nice shutdown for graceful consumer termination

    - Add SHUTDOWN control message and NICE_SHUTDOWN_EXIT_CODE (100) to PhpAmqpLib producer
    - Implement publishShutdown() method on Producer interface for targeted graceful consumer stops
    - Update PhpAmqpLib consumer to recognize SHUTDOWN message and exit with code 100 instead of restarting
    - Add background-queue:shutdown-consumers command with same targeting as reload-consumers (number, queue, -l label)
    - Add comprehensive test suite including end-to-end subprocess test verifying proper exit code
    - Add shutdownConsumerWorker.php fixture for subprocess testing against real RabbitMQ and database
    - Document nice shutdown mechanism in README with supervisor configuration example (exitcodes=100, autorestart=unexpected)
    - Update CLAUDE.md with details on dual control messages (DIE for restart, SHUTDOWN for graceful stop)
    - Update all Producer implementations and test mocks to support publishShutdown method
    
    This allows supervisor-managed consumers to be gracefully stopped before server maintenance or restarts
    without requiring restarts, while maintaining backward compatibility with existing reload-consumers workflow.
    Viktor Mašíček committed Jun 23, 2026
    Configuration menu
    Copy the full SHA
    293a6c7 View commit details
    Browse the repository at this point in the history
Loading