Changeset 3627
- Timestamp:
- 17/10/08 18:29:10 (3 months ago)
- Location:
- trunk/beacon
- Files:
-
- 2 modified
-
bin/beacon-search (modified) (2 diffs)
-
src/server/monitor.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/beacon/bin/beacon-search
r3625 r3627 143 143 print 144 144 145 def changed(result ):145 def changed(result, details): 146 146 print '\nBeacon query update:' 147 147 print_results(result, details) … … 273 273 result = yield kaa.beacon.query(**query) 274 274 275 t2 = time.time() 276 print_results(result, details) 277 if not isinstance(result.get(), (list, tuple)): 278 result = [ result.get() ] 279 print 'Query took %s seconds; %d results' % ((t2-t1), len(result)) 275 280 if not monitor: 276 t2 = time.time()277 print_results(result, details)278 if not isinstance(result.get(), (list, tuple)):279 result = [ result.get() ]280 print 'Query took %s seconds; %d results' % ((t2-t1), len(result))281 281 sys.exit(0) 282 else: 283 result.signals['changed'].connect(changed, result) 284 result.signals['progress'].connect(progress) 285 result.signals['up-to-date'].connect(uptodate) 286 result.monitor() 287 288 kaa.main.run() 289 sys.exit(0) 282 result.signals['changed'].connect(changed, result, details) 283 result.signals['progress'].connect(progress) 284 result.signals['up-to-date'].connect(uptodate) 285 result.monitor() 290 286 291 287 if __name__ == '__main__': -
trunk/beacon/src/server/monitor.py
r3611 r3627 233 233 yield False 234 234 235 if not changed:236 # no changes but send the 'changed' ipc to the client237 self.notify_client('changed', False)238 self._checking = False239 yield False240 241 235 for pos, item in enumerate(changed): 242 236 self.notify_client('progress', pos+1, len(changed), item.url) … … 261 255 OneShotTimer(self.check, []).start(0.5) 262 256 self.notify_client('checked') 257 self.notify_client('changed', True) 263 258 self._checking = False 264 259 yield False
