spiral / roadrunner-bridge

🌉 RoadRunner bridge to Spiral Framework
https://spiral.dev/docs/packages-roadrunner-bridge
MIT License
13 stars 6 forks source link

Adding the ability to configure serializers for different types of jobs #22

Closed msmakouz closed 2 years ago

msmakouz commented 2 years ago
Q A
Bugfix?
Breaks BC? ✔️
New feature? ✔️

Added the ability to configure serializers for different types of jobs.

Example:

// file app/config/queue.php
<?php

declare(strict_types=1);

return [
    'registry' => [
        'serializers' => [
            \Spiral\Queue\Job\ObjectJob::class => 'json',
            \Spiral\App\Job\TestJob::class => 'serializer'
        ]
    ],
];
codecov[bot] commented 2 years ago

Codecov Report

Merging #22 (b7093f2) into 2.0 (2fce041) will decrease coverage by 4.06%. The diff coverage is 75.71%.

@@             Coverage Diff              @@
##                2.0      #22      +/-   ##
============================================
- Coverage     92.99%   88.93%   -4.07%     
+ Complexity      198      195       -3     
============================================
  Files            39       39              
  Lines           557      506      -51     
============================================
- Hits            518      450      -68     
- Misses           39       56      +17     
Impacted Files Coverage Δ
src/Broadcasting/RoadRunnerGuard.php 96.55% <ø> (-0.33%) :arrow_down:
src/Config/GRPCConfig.php 100.00% <ø> (ø)
src/Config/TcpConfig.php 100.00% <ø> (ø)
src/Console/Command/Cache/ClearCommand.php 83.33% <ø> (ø)
src/Console/Command/GRPC/ListCommand.php 100.00% <ø> (ø)
src/Queue/Consumer.php 10.00% <10.00%> (ø)
src/GRPC/Dispatcher.php 76.47% <40.00%> (-3.53%) :arrow_down:
src/Console/Command/GRPC/GenerateCommand.php 71.42% <50.00%> (-3.58%) :arrow_down:
src/Console/Command/Queue/PauseCommand.php 85.71% <50.00%> (ø)
src/Console/Command/Queue/ResumeCommand.php 85.71% <50.00%> (ø)
... and 27 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2fce041...b7093f2. Read the comment docs.