From 1410a1cb80605d1d65f116b41bd543f46fc7f3ac Mon Sep 17 00:00:00 2001 From: karim hamidou Date: Mon, 30 Jul 2012 11:57:16 +0200 Subject: [PATCH] an utility object --- cagibi/filequeue.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 cagibi/filequeue.py 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 = [] -- 2.43.0