wa0x6e / Cake-Resque

Resque plugin for CakePHP : for creating background jobs that can be processed offline later
MIT License
159 stars 56 forks source link

Plugin Directory is hardcoded. Should use App::pluginPath($plugin) #97

Open abalonepaul opened 8 years ago

abalonepaul commented 8 years ago

I was having issuses with CakeResqueue not finding Shell in a non-standard Plugin path.

The plugin path is hardcoded on line 45 of Resque_Job_Creator.php. This should use App::pluginPath($plugin). I have plugins that are in another directory and CakeResque can't find them. I had to create a symlink from my Plugin directory to the actual path to figure out what the problem was.

Replace this: $classpath = self::$rootFolder . (empty($plugin) ? '' : 'Plugin' . DS . $plugin . DS) . 'Console' . DS . 'Command' . DS . $model . '.php';

with this:

if (empty($plugin)) { $classpath = self::$rootFolder . 'Console' . DS . 'Command' . DS . $model . '.php'; } else { $classpath = App::pluginPath($plugin) . 'Console' . DS . 'Command' . DS . $model . '.php'; }

abalonepaul commented 8 years ago

Line 45 of the Resque_Job_Creator.php

It's in the issue.

On Mar 2, 2016, at 4:23 AM, avneeshroks notifications@github.com wrote:

hey @abalonepaul,

where to make this changes?

Thanks.

— Reply to this email directly or view it on GitHub.

Paul Marshall Protelligence paulm@protelligence.com http://www.protelligence.com 415-261-8774