~dobey/ubuntuone-client/transient-notify

« back to all changes in this revision

Viewing changes to ubuntuone/syncdaemon/main.py

  • Committer: Tarmac
  • Author(s): facundo at com
  • Date: 2012-02-10 14:19:23 UTC
  • mfrom: (1188.2.6 aq-offload-queue)
  • Revision ID: tarmac-20120210141923-304q8yrs13iqy48o
Put exceeding ops in an offload queue, pick them up and execute them later when operations finish.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# ubuntuone.syncdaemon.main - main SyncDaemon innards
 
1
# -*- coding: utf8 -*-
2
2
#
3
 
# Copyright 2009-2011 Canonical Ltd.
 
3
# Copyright 2009-2012 Canonical Ltd.
4
4
#
5
5
# This program is free software: you can redistribute it and/or modify it
6
6
# under the terms of the GNU General Public License version 3, as published
157
157
 
158
158
    def log_mark(self):
159
159
        """Log a "mark" that includes the current AQ state and queue size."""
160
 
        self.logger.note("---- MARK (state: %s; queue: %d; hash: %d) ----",
161
 
                         self.state_manager, len(self.action_q.queue),
162
 
                         len(self.hash_q))
 
160
        self.logger.note("---- MARK (state: %s; queue: %d; offloaded: %d; "
 
161
                         "hash: %d) ----", self.state_manager,
 
162
                         len(self.action_q.queue),
 
163
                         len(self.action_q.disk_queue), len(self.hash_q))
163
164
 
164
165
    def wait_for_nirvana(self, last_event_interval=0.5):
165
166
        """Get a deferred that will fire on Nirvana.