Module jqueue
source code
Module implementing the job queue handling.
Locking: there's a single, large lock in the JobQueue class.
It's used by all other classes in this module.
tuple
|
|
|
_CallJqUpdate(runner,
names,
file_name,
content)
Updates job queue file after virtualizing filename. |
source code
|
|
|
_EncodeOpError(err)
Encodes an error which occurred while processing an opcode. |
source code
|
|
|
|
|
|
|
|
|
JOBQUEUE_THREADS = 25
the number of worker threads we start for processing jobs
|
|
_LOCK = "_lock"
|
|
_QUEUE = "_queue"
|
|
_GetIdAttr = operator.attrgetter("id")
Retrieves "id" attribute
|
Imports:
logging,
errno,
time,
weakref,
threading,
itertools,
operator,
pyinotify,
asyncnotifier,
constants,
serializer,
workerpool,
locking,
luxi,
opcodes,
opcodes_base,
errors,
mcpu,
utils,
jstore,
rpc,
runtime,
netutils,
compat,
ht,
query,
qlang,
pathutils,
vcluster
Returns the current timestamp.
- Returns: tuple
- the current time in the (seconds, microseconds) format
|
Decorator for "public" functions.
This function should be used for all 'public' functions. That is,
functions usually called from other classes. Note that this should be
applied only to methods (not plain functions), since it expects that the
decorated function is called with a first argument that has a
'_queue_filelock' argument.
Warning:
Use this decorator only after locking.ssynchronized
Example:
@locking.ssynchronized(_LOCK)
@_RequireOpenQueue
def Example(self):
pass
|
Decorator checking for a non-drained queue.
To be used with functions submitting new jobs.
|