From: karim hamidou Date: Mon, 30 Jul 2012 09:57:16 +0000 (+0200) Subject: an utility object X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=1410a1cb80605d1d65f116b41bd543f46fc7f3ac;p=cagibi.git an utility object --- diff --git a/cagibi/filequeue.py b/cagibi/filequeue.py new file mode 100644 index 0000000..b9960de --- /dev/null +++ b/cagibi/filequeue.py @@ -0,0 +1,15 @@ +from Queue import Queue + +class FileQueue(object): + """A convenience class representing which files have been modified at a given time""" + def __init__(self): + super(FileQueue, self).__init__() + self.added = Queue() + self.removed = Queue() + self.modified = Queue() + + # The list of modified files is used when a file has been + # modified by the client itself, so that it doesn't try to + # upload it again to the server in a never-ending loop. + # No need for a mutex as it's thread-local + self.client_modified = []