2
2
3
3
namespace Enqueue \JobQueue ;
4
4
5
+ use Enqueue \Client \CommandSubscriberInterface ;
5
6
use Enqueue \Client \ProducerInterface ;
6
- use Enqueue \Client \TopicSubscriberInterface ;
7
7
use Enqueue \Consumption \Result ;
8
8
use Enqueue \JobQueue \Doctrine \JobStorage ;
9
9
use Enqueue \Util \JSON ;
12
12
use Interop \Queue \PsrProcessor ;
13
13
use Psr \Log \LoggerInterface ;
14
14
15
- class CalculateRootJobStatusProcessor implements PsrProcessor, TopicSubscriberInterface
15
+ class CalculateRootJobStatusProcessor implements PsrProcessor, CommandSubscriberInterface
16
16
{
17
17
/**
18
18
* @var JobStorage
@@ -34,12 +34,6 @@ class CalculateRootJobStatusProcessor implements PsrProcessor, TopicSubscriberIn
34
34
*/
35
35
private $ logger ;
36
36
37
- /**
38
- * @param JobStorage $jobStorage
39
- * @param CalculateRootJobStatusService $calculateRootJobStatusCase
40
- * @param ProducerInterface $producer
41
- * @param LoggerInterface $logger
42
- */
43
37
public function __construct (
44
38
JobStorage $ jobStorage ,
45
39
CalculateRootJobStatusService $ calculateRootJobStatusCase ,
@@ -52,9 +46,6 @@ public function __construct(
52
46
$ this ->logger = $ logger ;
53
47
}
54
48
55
- /**
56
- * {@inheritdoc}
57
- */
58
49
public function process (PsrMessage $ message , PsrContext $ context )
59
50
{
60
51
$ data = JSON ::decode ($ message ->getBody ());
@@ -83,11 +74,8 @@ public function process(PsrMessage $message, PsrContext $context)
83
74
return Result::ACK ;
84
75
}
85
76
86
- /**
87
- * {@inheritdoc}
88
- */
89
- public static function getSubscribedTopics ()
77
+ public static function getSubscribedCommand ()
90
78
{
91
- return [Topics ::CALCULATE_ROOT_JOB_STATUS ] ;
79
+ return Commands ::CALCULATE_ROOT_JOB_STATUS ;
92
80
}
93
81
}
0 commit comments