rocketeers / rocketeer

Send your projects up in the clouds
http://rocketeer.autopergamene.eu/
MIT License
2.66k stars 217 forks source link

Events doesn't fire for each multiserver connection #569

Open ihortymoshenko opened 9 years ago

ihortymoshenko commented 9 years ago

Hello!

I have a connection that is actually represented by multiple servers.

I've added to the .rocketeer/events.php file the following event handlers:

<?php
use Rocketeer\Facades\Rocketeer;

Rocketeer::listenTo('deploy.before-symlink', function ($task) {
    $task->runForCurrentRelease('do something before symlink');
});

Rocketeer::listenTo('deploy.after', function ($task) {
    $task->runForCurrentRelease('do something after deploy');
});

Rocketeer::after('rollback', function ($task) {
    $task->runForCurrentRelease('do something after rollback');
});

I expect that my events will be fired for each multiserver connection but they are fired only for the first server. What's wrong?

Cheers!

ihortymoshenko commented 9 years ago

Moreover, I've found that these events work if I add them to the .rocketeer/hooks.php file.