changeset 115:3f94c56f8f47

further abstraction ::sigh::
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 22 Jan 2011 18:11:16 -0800
parents 60e307e74829
children c6fbb0d981e9
files autobot/changes/poller.py
diffstat 1 files changed, 19 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/autobot/changes/poller.py	Sat Jan 22 17:58:41 2011 -0800
+++ b/autobot/changes/poller.py	Sat Jan 22 18:11:16 2011 -0800
@@ -185,23 +185,28 @@
                 % (self.name, self.changeCount, revList, self.workdir) )
 
         # get metadata for changes and send them to master
-        _dl = []
+        d = defer.succeed()
         for rev in revList:
-            self.commitInfo = {}
+            d.addCallback(self._process_change, rev)
+
+        return d
 
-            # get metadata
-            dl = defer.DeferredList([
-                self._get_commit_timestamp(rev),
-                self._get_commit_name(rev),
-                self._get_commit_files(rev),
-                self._get_commit_comments(rev),
-                ], consumeErrors=True)
+    def _process_change(self, rev):
+        self.commitInfo = {}
+        log.msg('%s: processing change %s' % rev)
+        d = defer.succeed(None)
+        return d
+#             # get metadata
+#             dl = defer.DeferredList([
+#                 self._get_commit_timestamp(rev),
+#                 self._get_commit_name(rev),
+#                 self._get_commit_files(rev),
+#                 self._get_commit_comments(rev),
+#                 ], consumeErrors=True)
 
-            # add the change, apparently
-            dl.addCallback(self._add_change, rev)
-            _dl.append(dl)
-        return defer.DeferredList(_dl)
-        return d
+#             # add the change, apparently
+#             dl.addCallback(self._add_change, rev)
+        
 
     def _add_change(self, change):
         log.msg("_add_change results")