Base class and common code for
It is used internally by
dirq modules and should not
be used elsewhere.
License and Copyright¶
Copyright (C) CERN 2011-2016
QueueBase(path, umask=None, rndhex=None)¶
Copy/clone the object. Return copy of the object.
- the main purpose is to copy/clone the iterator cached state
- the other structured attributes (including schema) are not cloned
Return the first element in the queue and cache information about the next ones.
- OSError - can’t list directories
Return iterator over element names.
Return name of the next element in the queue, only using cached information. When queue is empty, depending on the iterator protocol - return empty string or raise StopIteration.
- name of the next element in the queue
- StopIteration - when used as Python iterator via
- __iter__() method
Touch an element directory to indicate that it is still being used.
- this is only really useful for locked elements but we allow it for all.
- EnvironmentError - on any IOError, OSError in utime()
NOTE: this may not work on OSes with directories implemented not as files (eg. Windows). See doc for os.utime().