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

App.fullBaseUrl not working in CakeResque? #94

Closed dilab closed 9 years ago

dilab commented 9 years ago

Test Case

Background

Create a simple test job

class TestJobShell extends AppShell
{
    public function test()
    {
        $path = Router::url('/',true);
        $this->out($path);
    }
}

Step 2

In app/Config/core.php file. Add Configure::write('App.fullBaseUrl', 'http://domain.com');

Step 3

Run cake TestJob test It returns http://domain.com. Which is correctly according to the doc

Assert

Run cake CakeResque.CakeResque enqueue default TestJob 'test' Check the resque-worker-error.log file cake CakeResque.CakeResque tail It outputs http://localhost Which is incorrect.

dilab commented 9 years ago

User error.

I will need to restart the worker for the config to take effect.