Project

drctrl

0.0
No commit activity in last 3 years
No release in over 3 years
A local control for DRb service.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

Runtime

 Project Readme

drctrl

A local control for DRb service.

Gem Version GitHub license Code Climate

This gem provides a local dRuby service for control purposes and a command line tool for it.

Usage

At server side

require 'drctrl'

DRCtrl.start_service do
  # some finalize code
end

. . . . .


DRCtrl.wait

This code creates object with methods stop and restart. And it starts a dRuby service at unix-socket /tmp/<appname>-<pid>.

Use DRCtrl.wait instead DRb.thread.join for correct stopping.

At client side

Use a command line tool drctrl or your own code with require 'drctrl/client'.

drctrl find appropriate dRuby server and send to it command and arguments.

drctrl [<options>] <command> [<args>]
    -U, --uri=URI
    -P, --path=PATH
    -N, --name=NAME
    -I, --pid=PID

There is required to set one of options: --uri (any dRuby URI), --path (a path to unix-socket), or --name (name of controlled app).