chrisboulton / php-resque

PHP port of resque (Workers and Queueing)
MIT License
3.43k stars 759 forks source link

Still job not found #362

Open ujwaldhakal opened 6 years ago

ujwaldhakal commented 6 years ago

\Resque::setBackend('redis:6379'); \Resque::enqueue('convert','App\\Job',['foobar' => 'bar']); this is how i setup my job

`namespace App;
use App\Service\Log;
class Job
{
    public function perform()
    {
        // .. Run job
        $a = new Log();
        $a->info('yellow',['done']);
        dd('ad');
    }

}`

My job file

"autoload": { "psr-4": { "App\\": "app" }, "files": [ "app/Job.php",

my composer

Job{convert} | ID: 9fae4414fd91f0d01598298ba87e3211 | App\Job | [{"foobar":"bar"}]) failed: Could not find job class App\Job. Issue i got

danhunsaker commented 6 years ago

How are you starting your worker(s)? And which version of PHP-Resque are you using?

ujwaldhakal commented 6 years ago

VVERBOSE=1 QUEUE=* php vendor/chrisboulton/php-resque/resque.php version 1.2

danhunsaker commented 6 years ago

Upgrade to master, and change vendor/chrisboulton/php-resque/resque.php to vendor/bin/resque, then try again.

ujwaldhakal commented 6 years ago

Thank you worked like a charms. Seems like this package hasnt been updated since 2nd mass extinction.

"require": { "chrisboulton/php-resque": "dev-master", }, final updated composer json.