Skip to content

[job-queue] CalculateRootJobStatusProcessor subscribed to command instead of topic #729

Closed

Description

@you-ser

Problem:
CalculateRootJobStatusProcessor stop wotking after commit php-enqueue/job-queue@1362b4d

Description:
Class Enqueue\JobQueue\CalculateRootJobStatusProcessor now implementing CommandSubscriberInterface and subscribed to command :

Enqueue\JobQueue\Commands::CALCULATE_ROOT_JOB_STATUS

But, class Enqueue\JobQueue\JobProcessor at method sendCalculateRootJobStatusEvent sending an event by producer, not command, so root job status is never updates.

//JobProcessor.php
/**
     * @see https://github.com/php-enqueue/enqueue-dev/pull/222#issuecomment-336102749 See for rationale
     *
     * @param Job $job
     */
    protected function sendCalculateRootJobStatusEvent(Job $job)
    {
        $this->producer->sendEvent(Commands::CALCULATE_ROOT_JOB_STATUS, [
            'jobId' => $job->getId(),
        ]);
    }

Possible solution:
1 - CalculateRootJobStatusProcessor should implement TopicSubscriberInterface again.
2 - JobProcessor should sent command instead of event at method sendCalculateRootJobStatusEvent

Activity

  1. changed the title [-][job-queue] CalculateRootJobStatusProcessor subscribe to command instead of topic[/-] [+][job-queue] CalculateRootJobStatusProcessor subscribed to command instead of topic[/+] on Jan 17, 2019
  2. makasim commented on Jan 17, 2019

    @makasim
    Member

    sendEvent should be replaced with sendCommand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions