GearmanBundle icon indicating copy to clipboard operation
GearmanBundle copied to clipboard

JobStatus::isFinished() never returns true

Open codecowboy opened this issue 10 years ago • 2 comments

This code never evaluates to true as getCompletionPercent() will not usually return 1 unless you happen to request jobstatus at the exact moment it hits 1.

    public function isFinished()
    {
        return $this->isKnown() && !$this->isRunning() && $this->getCompletionPercent() == 1;
    }

codecowboy avatar Mar 20 '14 11:03 codecowboy

What do you propose?

mmoreram avatar Mar 20 '14 12:03 mmoreram

ping @codecowboy

mmoreram avatar Apr 02 '14 22:04 mmoreram