mooseh's avatar

Weird bug in my code! Artisan Call

So i have created an artisan that will reload our icecast server without interruption of the streams it was working fine but I made some changes to make it more efficient it relies on the queue and schedules icecast to reload in 10 seconds.

if someone send another change to our config in that 10 seconds it then holds of from the queue that command for another 10 seconds.

the weirdest bug i have ever come across and i'm wondering if anyone knows why this is?

basically a sleep command it breaking it

With this code icecast falls over for a few seconds.

    sleep(1);

        //quiet reload icecast
        $result = Artisan::call('icecast:reload', ['--graceful' => true]);

with this code icecast reloads perfectly


        //quiet reload icecast
        $result = Artisan::call('icecast:reload', ['--graceful' => true]);

my question is WHY!!

any help is greatly appreciated

0 likes
2 replies
mooseh's avatar

bump! I would love to know why this is

mooseh's avatar
mooseh
OP
Best Answer
Level 5

ignore this, it was a software bug (on certain versions) and not my code :D

Please or to participate in this conversation.