~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/doc/pidfile.txt

  • Committer: William Grant
  • Date: 2011-12-30 08:13:14 UTC
  • mto: This revision was merged to the branch mainline in revision 14611.
  • Revision ID: william.grant@canonical.com-20111230081314-f73f4ozgkzdi5xqb
More stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
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
 
    >>> from canonical.lazr.pidfile import (
 
22
    >>> from lp.services.pidfile import (
23
23
    ...     pidfile_path, make_pidfile, remove_pidfile, get_pid)
24
24
    >>> from lp.services.config import config
25
25
 
55
55
 
56
56
    >>> cmd = '''
57
57
    ... import os.path, sys
58
 
    ... from canonical.lazr.pidfile import make_pidfile, pidfile_path
 
58
    ... from lp.services.pidfile import make_pidfile, pidfile_path
59
59
    ... make_pidfile('nuts')
60
60
    ... sys.exit(
61
61
    ...     int(open(pidfile_path('nuts')).read().strip() == str(os.getpid()))
78
78
    >>> import time
79
79
    >>> subprocess_code = '''
80
80
    ... import time
81
 
    ... from canonical.lazr.pidfile import make_pidfile
 
81
    ... from lp.services.pidfile import make_pidfile
82
82
    ... make_pidfile('nuts')
83
83
    ... try:
84
84
    ...     time.sleep(30)