r7357 - in dumbhippo/trunk: firehose/firehose/jobs server/src/com/dumbhippo/polling



Author: walters
Date: 2008-03-11 19:23:22 -0500 (Tue, 11 Mar 2008)
New Revision: 7357

Modified:
   dumbhippo/trunk/firehose/firehose/jobs/master.py
   dumbhippo/trunk/server/src/com/dumbhippo/polling/SwarmPollingSystem.java
Log:
Some logging tweaks.


Modified: dumbhippo/trunk/firehose/firehose/jobs/master.py
===================================================================
--- dumbhippo/trunk/firehose/firehose/jobs/master.py	2008-03-11 21:42:46 UTC (rev 7356)
+++ dumbhippo/trunk/firehose/firehose/jobs/master.py	2008-03-12 00:23:22 UTC (rev 7357)
@@ -177,7 +177,6 @@
         self.__requeue_poll(immediate=immediate)
         
     def __set_task_status(self, cursor, taskkey, hashcode, timestamp):
-        _logger.debug("updating task %r values (%r %r)", taskkey, hashcode, timestamp)
         cursor.execute('''INSERT OR REPLACE INTO Tasks VALUES (?, ?, ?)''',
                        (taskkey, hashcode, timestamp))
     
@@ -336,6 +335,7 @@
         _logger.debug("in poll")
         
         tasksets = []
+        eligible_total = 0
         curtime = time.time()
         taskset_limit = curtime + TASKSET_TIMEOUT_SECS
         try:
@@ -365,6 +365,10 @@
             if len(taskset) > 0:
                 tasksets.append(taskset)
             taskset = None
+            for qtask in self.__tasks_queue:
+                 eligible = qtask.eligibility < taskset_limit
+                 if eligible:
+                     eligible_total += 1
         finally:
             self.__task_lock.release()
         taskset_count = len(tasksets)
@@ -372,7 +376,7 @@
         if taskset_count > curworker_count:
             _logger.info("Need worker activation, current=%d, required=%d", curworker_count, taskset_count)
             self.__activate_workers()
-        _logger.info("have %d tasksets to be sent", taskset_count)
+        _logger.info("have %d tasksets to be sent; %d total next eligible", taskset_count, eligible_total)
         if taskset_count > 0:
             for worker,taskset in zip(self.__worker_endpoints,tasksets):
                 self.__enqueue_taskset(worker, taskset)

Modified: dumbhippo/trunk/server/src/com/dumbhippo/polling/SwarmPollingSystem.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/polling/SwarmPollingSystem.java	2008-03-11 21:42:46 UTC (rev 7356)
+++ dumbhippo/trunk/server/src/com/dumbhippo/polling/SwarmPollingSystem.java	2008-03-12 00:23:22 UTC (rev 7357)
@@ -201,7 +201,7 @@
 				if (result.isObsolete()) {
 					obsoleteTasks(Collections.singleton(task));
 				} else if (firehoseEnabled && task.isExternallyPolled()) {
-					logger.debug("Externally-polled task {} complete", task);
+					logger.debug("Externally-polled task {} (id {}) complete", task, task.getExternalId());
 				} else {
 					recalculateTaskStats(task, result);
 					long periodicityScheduleSecs;



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