~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/canonical/lazr/doc/pidfile.txt

  • Committer: Curtis Hovey
  • Date: 2011-12-29 05:29:36 UTC
  • mto: This revision was merged to the branch mainline in revision 14606.
  • Revision ID: curtis.hovey@canonical.com-20111229052936-c261pibg1p6ze6m4
Moved canonical.config to lp.services.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
`pidfile_path` is the key to all four of them. Usually, you simply pass it the
18
18
name of a service. It then gets the configured name for the current instance
19
 
from `canonical.config.config`, and returns a pidfile path that combines the
 
19
from `lp.services.config.config`, and returns a pidfile path that combines the
20
20
instance name with the service name.
21
21
 
22
22
    >>> from canonical.lazr.pidfile import (
23
23
    ...     pidfile_path, make_pidfile, remove_pidfile, get_pid)
24
 
    >>> from canonical.config import config
 
24
    >>> from lp.services.config import config
25
25
 
26
26
    >>> pidfile_path('nuts') == '/var/tmp/%s-nuts.pid' % config.instance_name
27
27
    True