… | |
… | |
545 | if ($ARGV[0] eq "run") { |
545 | if ($ARGV[0] eq "run") { |
546 | shift; |
546 | shift; |
547 | |
547 | |
548 | # d'oh |
548 | # d'oh |
549 | require AnyEvent::Watchdog; |
549 | require AnyEvent::Watchdog; |
550 | # now we can load extra modules |
550 | # only now can we load additional modules |
|
|
551 | |
|
|
552 | require AnyEvent; |
551 | |
553 | |
552 | require AnyEvent::Watchdog::Util; |
554 | require AnyEvent::Watchdog::Util; |
553 | AnyEvent::Watchdog::Util::autorestart (1); |
555 | AnyEvent::Watchdog::Util::autorestart (1); |
554 | AnyEvent::Watchdog::Util::heartbeat (300); |
556 | AnyEvent::Watchdog::Util::heartbeat (300); |
555 | |
557 | |
556 | require AnyEvent; |
|
|
557 | require AnyEvent::MP::Kernel; |
558 | require AnyEvent::MP::Kernel; |
558 | AnyEvent::MP::Kernel::configure (@ARGV); |
559 | AnyEvent::MP::Kernel::configure (@ARGV); |
559 | |
560 | |
560 | AnyEvent::detect () eq "AnyEvent::Impl::EV" |
561 | AnyEvent::detect () eq "AnyEvent::Impl::EV" |
561 | ? EV::loop () |
562 | ? EV::loop () |