Revision b459a848 lib/jqueue.py
b/lib/jqueue.py | ||
---|---|---|
37 | 37 |
import itertools |
38 | 38 |
|
39 | 39 |
try: |
40 |
# pylint: disable-msg=E0611
|
|
40 |
# pylint: disable=E0611 |
|
41 | 41 |
from pyinotify import pyinotify |
42 | 42 |
except ImportError: |
43 | 43 |
import pyinotify |
... | ... | |
177 | 177 |
@ivar writable: Whether the job is allowed to be modified |
178 | 178 |
|
179 | 179 |
""" |
180 |
# pylint: disable-msg=W0212
|
|
180 |
# pylint: disable=W0212 |
|
181 | 181 |
__slots__ = ["queue", "id", "ops", "log_serial", "ops_iter", "cur_opctx", |
182 | 182 |
"received_timestamp", "start_timestamp", "end_timestamp", |
183 | 183 |
"__weakref__", "processor_lock", "writable"] |
... | ... | |
1048 | 1048 |
logging.exception("%s: Canceling job", opctx.log_prefix) |
1049 | 1049 |
assert op.status == constants.OP_STATUS_CANCELING |
1050 | 1050 |
return (constants.OP_STATUS_CANCELING, None) |
1051 |
except Exception, err: # pylint: disable-msg=W0703
|
|
1051 |
except Exception, err: # pylint: disable=W0703 |
|
1052 | 1052 |
logging.exception("%s: Caught exception in %s", |
1053 | 1053 |
opctx.log_prefix, opctx.summary) |
1054 | 1054 |
return (constants.OP_STATUS_ERROR, _EncodeOpError(err)) |
... | ... | |
1241 | 1241 |
"""The actual job workers. |
1242 | 1242 |
|
1243 | 1243 |
""" |
1244 |
def RunTask(self, job): # pylint: disable-msg=W0221
|
|
1244 |
def RunTask(self, job): # pylint: disable=W0221 |
|
1245 | 1245 |
"""Job executor. |
1246 | 1246 |
|
1247 | 1247 |
@type job: L{_QueuedJob} |
... | ... | |
1358 | 1358 |
self._lock = locking.SharedLock("JobDepMgr") |
1359 | 1359 |
|
1360 | 1360 |
@locking.ssynchronized(_LOCK, shared=1) |
1361 |
def GetLockInfo(self, requested): # pylint: disable-msg=W0613
|
|
1361 |
def GetLockInfo(self, requested): # pylint: disable=W0613 |
|
1362 | 1362 |
"""Retrieves information about waiting jobs. |
1363 | 1363 |
|
1364 | 1364 |
@type requested: set |
... | ... | |
1481 | 1481 |
|
1482 | 1482 |
""" |
1483 | 1483 |
def wrapper(self, *args, **kwargs): |
1484 |
# pylint: disable-msg=W0212
|
|
1484 |
# pylint: disable=W0212 |
|
1485 | 1485 |
assert self._queue_filelock is not None, "Queue should be open" |
1486 | 1486 |
return fn(self, *args, **kwargs) |
1487 | 1487 |
return wrapper |
... | ... | |
1945 | 1945 |
try: |
1946 | 1946 |
data = serializer.LoadJson(raw_data) |
1947 | 1947 |
job = _QueuedJob.Restore(self, data, writable) |
1948 |
except Exception, err: # pylint: disable-msg=W0703
|
|
1948 |
except Exception, err: # pylint: disable=W0703 |
|
1949 | 1949 |
raise errors.JobFileCorrupted(err) |
1950 | 1950 |
|
1951 | 1951 |
return job |
Also available in: Unified diff