Trees | Index | Help |
---|
Package flumotion :: Package common :: Module common |
|
Classes | |
---|---|
InitMixin |
A mixin class to help with object initialization. |
Function Summary | |
---|---|
Get the host name of an IPv4 address. | |
Get the port number of an IPv4 address. | |
Return a string representing the given args. | |
Invoke all implementations of a method on an object. | |
Invoke all implementations of a method on an object. | |
Check if the given pid is currently running. | |
int |
Compares two version strings. |
str |
Create a componentId based on the parentName
and componentName . |
Create a path string out of the name of a component and its parent. | |
This forks the current process into a daemon. | |
Daemonize a process, writing log files and PID files to conventional locations. | |
str |
Delete the pid file in the run directory, using the given process type and process name for the filename. |
Ensure the given directory exists, creating it if not. | |
str |
Create a feedId based on the componentName
and feedName . |
string |
Nicely formats a storage size using SI units. |
string |
Nicely format time in a human-readable format. |
str |
Create a fullFeedId based on the flowName ,
componentName and feedName . |
Return the (at most) two-letter language code set for message translation. | |
Get the pid from the pid file in the run directory, using the given process type and process name for the filename. | |
Get the full path to the pid file for the given process type and name. | |
Returns a method you can use as _ to translate strings for the given domain. | |
Send the given process a KILL signal. | |
Merge the __implements__ tuples of the given classes into one tuple. | |
Return a string giving the fully qualified class of the given object. | |
tuple of (str, str) |
Return tuple of (flowName, componentName) |
tuple of (str, str) |
Return tuple of (componentName, feedName) |
tuple of (str, str, str) |
Return tuple of (flowName, componentName, feedName) |
Convert the given (relative) path to the python module it would have to be imported as. | |
Prepare a process for starting, logging appropriate standarised messages. | |
Return true if the string represents a value we interpret as true. | |
Send the given process a TERM signal. | |
Print a version block for the flumotion binaries. | |
str |
Converts a version tuple to a string. |
Wait until we get killed by a TERM signal (from someone else). | |
Wait for the given process type and name to have started and created a pid file. | |
str |
Write a pid file in the run directory, using the given process type and process name for the filename. |
_call_each_method(obj,
method,
mro,
args,
kwargs)
| |
Filters out duplicate entries in a list. |
Function Details |
---|
addressGetHost(a)Get the host name of an IPv4 address.
|
addressGetPort(a)Get the port number of an IPv4 address.
|
argRepr(args=(), kwargs={}, max=-1)Return a string representing the given args. |
call_each_method(obj, method, *args, **kwargs)Invoke all implementations of a method on an object. Searches for method implementations in the object's class and all of the class' superclasses. Calls the methods in method resolution order, which goes from subclasses to superclasses. |
call_each_method_reversed(obj, method, *args, **kwargs)Invoke all implementations of a method on an object. Like call_each_method, but calls the methods in reverse method resolution order, from superclasses to subclasses. |
checkPidRunning(pid)Check if the given pid is currently running.
|
compareVersions(first, second)Compares two version strings. Returns -1, 0 or 1 if first is smaller than, equal to or larger than second.
|
componentId(parentName, componentName)Create a componentId uniquely identifies a component within a
planet.
|
componentPath(componentName, parentName)Create a path string out of the name of a component and its parent.
|
daemonize(stdin='/dev/null', stdout='/dev/null', stderr='/dev/null', directory='/')This forks the current process into a daemon. The stdin, stdout, and stderr arguments are file names that will be opened and be used to replace the standard file descriptors in sys.stdin, sys.stdout, and sys.stderr. These arguments are optional and default to /dev/null. The fork will switch to the given directory. |
daemonizeHelper(processType, daemonizeTo='/', processName=None)Daemonize a process, writing log files and PID files to conventional locations.
|
deletePidFile(type, name=None)Delete the pid file in the run directory, using the given process type and process name for the filename.
|
ensureDir(dir, description)Ensure the given directory exists, creating it if not. Raises a SystemError if this fails, including the given description. |
feedId(componentName, feedName)Create a feedId uniquely identifies a feed within a flow or
atmosphere. It identifies the feed from a feeder to an eater.
|
formatStorage(units, precision=2)Nicely formats a storage size using SI units. See Wikipedia and other sources for rationale. Prefixes are k, M, G, ... Sizes are powers of 10. Actual result should be suffixed with bit or byte, not b or B.
|
formatTime(seconds, fractional=0)Nicely format time in a human-readable format. Will chunks weeks, days, hours and minutes.
|
fullFeedId(flowName, componentName, feedName)Create a fullFeedId uniquely identifies a feed within a
planet.
|
getLL()Return the (at most) two-letter language code set for message translation. |
getPid(type, name=None)Get the pid from the pid file in the run directory, using the given process type and process name for the filename.
|
getPidPath(type, name=None)Get the full path to the pid file for the given process type and name. |
gettexter(domain)Returns a method you can use as _ to translate strings for the given domain. |
killPid(pid)Send the given process a KILL signal.
|
mergeImplements(*classes)Merge the __implements__ tuples of the given classes into one tuple. |
objRepr(object)Return a string giving the fully qualified class of the given object. |
parseComponentId(componentId)
|
parseFeedId(feedId)
|
parseFullFeedId(fullFeedId)
|
pathToModuleName(path)Convert the given (relative) path to the python module it would have to be imported as. Return None if the path is not a valid python module |
startup(processType, processName, daemonize=False, daemonizeTo='/')Prepare a process for starting, logging appropriate standarised messages. First daemonizes the process, if daemonize is true. |
strToBool(string)
|
termPid(pid)Send the given process a TERM signal.
|
version(binary)Print a version block for the flumotion binaries.
|
versionTupleToString(versionTuple)Converts a version tuple to a string. If the tuple has a zero nano number, it is dropped from the string.
|
waitForTerm()Wait until we get killed by a TERM signal (from someone else). |
waitPidFile(type, name=None)Wait for the given process type and name to have started and created a pid file. Return the pid. |
writePidFile(type, name=None)Write a pid file in the run directory, using the given process type and process name for the filename.
|
_uniq(l, key=<function <lambda> at 0x2ad262a48848>)Filters out duplicate entries in a list. |
Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Sun Oct 26 16:39:17 2008 | http://epydoc.sf.net |