r7425 - dumbhippo/trunk/firehose/firehose/jobs



Author: walters
Date: 2008-04-16 14:57:48 -0500 (Wed, 16 Apr 2008)
New Revision: 7425

Modified:
   dumbhippo/trunk/firehose/firehose/jobs/master.py
Log:
Don't lose on empty keys, when last item ends in newline.


Modified: dumbhippo/trunk/firehose/firehose/jobs/master.py
===================================================================
--- dumbhippo/trunk/firehose/firehose/jobs/master.py	2008-04-16 19:37:53 UTC (rev 7424)
+++ dumbhippo/trunk/firehose/firehose/jobs/master.py	2008-04-16 19:57:48 UTC (rev 7425)
@@ -166,6 +166,8 @@
     
     def __add_task_keys_unlocked(self, keys):
         for key in keys:
+            if key == '':
+                continue
             if key in self.__tasks_map:
                 continue 
             key = key.strip()
@@ -232,8 +234,8 @@
             _logger.debug("checking for messages")
             message = self.__sqs_incoming_q.read()
             if message is not None:
-                _logger.debug("got message: %s", message.id)
                 body = message.get_body()
+                _logger.debug("got message: %s body: %s", message.id, body)                
                 if body.startswith('load '):
                     (bucket_name, key_name) = body[5:].split(' ', 1)
                     self.__do_load_from_s3(bucket_name, key_name)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]