Permalink
Browse files

remove print, update finished list first

  • Loading branch information...
1 parent a16117f commit 36e547f67996d4e6029c0e0ecbed1f7f0b43825e Binux committed Jan 31, 2012
Showing with 4 additions and 5 deletions.
  1. +0 −1 handlers/login.py
  2. +4 −4 libs/db_task_manager.py
View
@@ -22,7 +22,6 @@ def get(self):
def _on_auth(self, user):
if not user:
raise HTTPError(500, "Google auth failed")
- print user
self.set_secure_cookie("name", user["name"])
self.set_secure_cookie("email", user["email"])
self.user_manager.update_user(user["email"], user["name"])
View
@@ -385,6 +385,10 @@ def _random():
@sqlalchemy_rollback
def update(self):
+ if self._last_update_task + options.finished_task_check_interval < time():
+ self._last_update_task = time()
+ self._update_task_list(options.task_list_limit)
+
if self._last_update_downloading_task + \
options.downloading_task_check_interval < self._last_get_task_list or \
self._last_update_downloading_task + \
@@ -396,9 +400,5 @@ def update(self):
self._task_scheduling()
- if self._last_update_task + options.finished_task_check_interval < time():
- self._last_update_task = time()
- self._update_task_list(options.task_list_limit)
-
def async_update(self):
thread.start_new_thread(DBTaskManager.update, (self, ))

0 comments on commit 36e547f

Please sign in to comment.