~didrocks/ubuntuone-client/dont-suffer-zg-crash

« back to all changes in this revision

Viewing changes to ubuntuone/syncdaemon/action_queue.py

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Moya
  • Date: 2010-06-23 23:08:15 UTC
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20100623230815-4m3ugh10u9x9xzw5
Tags: upstream-1.3.2
ImportĀ upstreamĀ versionĀ 1.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
438
438
            logger.warning("run() called with %s queue empty!", self.name)
439
439
            return
440
440
 
 
441
        if self._head is not None:
 
442
            # already executing something, not start another command
 
443
            return
 
444
 
441
445
        self._head = command = self._get_next_runnable_command()
442
446
        d = command.run()
443
447
        d.addBoth(passit(lambda _: self.done()))
680
684
        if not enough:
681
685
            logger.info("Not enough space for upload %s bytes (available: %s)",
682
686
                        upload_size, free)
 
687
            self.event_queue.push('SYS_QUOTA_EXCEEDED', volume_id=share_id)
 
688
 
683
689
        return enough
684
690
 
685
691
    def handle_SYS_USER_CONNECT(self, access_token):
2516
2522
        """
2517
2523
        if getattr(self.tempfile, 'name', None) is not None:
2518
2524
            os.unlink(self.tempfile.name)
 
2525
 
 
2526
        if failure.check(protocol_errors.QuotaExceededError):
 
2527
            self.action_queue.event_queue.push('SYS_QUOTA_EXCEEDED',
 
2528
                                               volume_id=self.share_id)
 
2529
 
2519
2530
        self.action_queue.event_queue.push('AQ_UPLOAD_ERROR',
2520
2531
                                           error=failure.getErrorMessage(),
2521
2532
                                           share_id=self.share_id,