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
|
|
|
_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
|
|
JOBS_PER_ARCHIVE_DIRECTORY = 10000
|
|
_LOCK = "_lock"
|
|
_QUEUE = "_queue"
|
Imports:
os,
logging,
errno,
re,
time,
weakref,
pyinotify,
asyncnotifier,
constants,
serializer,
workerpool,
locking,
opcodes,
errors,
mcpu,
utils,
jstore,
rpc,
netutils,
compat
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
|