def set_process_title(progname, info=None): """Set the ps name for the currently running process if :mod`setproctitle` is installed.""" if _setproctitle: proctitle = "[%s]" % progname proctitle = info and "%s %s" % (proctitle, info) or proctitle _setproctitle(proctitle)
def setproctitle(x): try: from setproctitle import setproctitle as _setproctitle _setproctitle(x) except ImportError: pass
def set_process_title(progname, info=None): """Set the ps name for the currently running process. Only works if :mod`setproctitle` is installed. """ proctitle = "[%s]" % progname proctitle = info and "%s %s" % (proctitle, info) or proctitle if _setproctitle: _setproctitle(proctitle) return proctitle
def set_process_title(progname, info=None): """Set the ps name for the currently running process. Only works if :mod:`setproctitle` is installed. """ proctitle = "[%s]" % progname proctitle = info and "%s %s" % (proctitle, info) or proctitle if _setproctitle: _setproctitle(proctitle) return proctitle
def setproctitle(title): from accelerator import g if hasattr(g, 'params'): title = '%s %s (%s)' % (g.job, uni(title), g.params.method,) elif hasattr(g, 'job'): title = '%s %s' % (g.job, uni(title),) else: title = uni(title) if PY2: title = title.encode('utf-8') _setproctitle(title)
def setproctitle(title): import g if hasattr(g, 'METHOD'): title = '%s %s (%s)' % ( g.JOBID, uni(title), g.METHOD, ) else: title = '%s %s' % ( g.JOBID, uni(title), ) if PY2: title = title.encode('utf-8') _setproctitle(title)
def setproctitle(title): _setproctitle("huskar: %s" % title)
def setproctitle(title): _setproctitle("vos: %s" % title)
def set_process_title(progname, info=None): if _setproctitle: proctitle = "[%s]" % progname proctitle = info and "%s %s" % (proctitle, info) or proctitle _setproctitle(proctitle)