Sha256: 8d78bf8633ebcdc8a92d258418a580460bd6e2607ea2dbc7149d360738b3ae96
Contents?: true
Size: 1.14 KB
Versions: 5
Compression:
Stored size: 1.14 KB
Contents
module Eye::Process::Controller def send_command(command, *args) schedule command, *args, Eye::Reason::User.new(command) end def start if load_external_pid_file == :ok switch :already_running :ok else start_process end end def stop stop_process switch :unmonitoring end def restart load_external_pid_file unless pid # unmonitored case restart_process end def monitor if self[:auto_start] start else if load_external_pid_file == :ok switch :already_running else schedule :unmonitor, Eye::Reason.new(:'not found') end end end def unmonitor switch :unmonitoring end def delete if self[:stop_on_delete] info 'process has stop_on_delete option, so sync-stop it first' stop end remove_watchers remove_children remove_triggers terminate end def signal(sig = 0) send_signal(sig) if self.pid end def user_command(name) if self[:user_commands] && c = self[:user_commands][name.to_sym] execute_user_command(name, c) end end def freeze scheduler_freeze end end
Version data entries
5 entries across 5 versions & 1 rubygems