damned-lies r1200 - in trunk: . stats
- From: claudep svn gnome org
- To: svn-commits-list gnome org
- Subject: damned-lies r1200 - in trunk: . stats
- Date: Tue, 2 Dec 2008 19:44:13 +0000 (UTC)
Author: claudep
Date: Tue Dec 2 19:44:13 2008
New Revision: 1200
URL: http://svn.gnome.org/viewvc/damned-lies?rev=1200&view=rev
Log:
2008-12-02 Claude Paroz <claude 2xlibre net>
* stats/models.py: Launch the update_stats method asynchronously when
creating a new branch.
Modified:
trunk/ChangeLog
trunk/stats/models.py
Modified: trunk/stats/models.py
==============================================================================
--- trunk/stats/models.py (original)
+++ trunk/stats/models.py Tue Dec 2 19:44:13 2008
@@ -19,6 +19,7 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import os, sys, re, commands
+import threading
from datetime import datetime
from time import tzname
from itertools import islice
@@ -137,8 +138,9 @@
def save(self):
super(Branch, self).save()
- #FIXME: this command should be run in a separate thread
- self.update_stats(force=True)
+ # The update command is launched asynchronously in a separate thread
+ upd_thread = threading.Thread(target=self.update_stats, kwargs={'force':True})
+ upd_thread.start()
def is_head(self):
if self.module.vcs_type in ('cvs', 'svn') and self.name == "HEAD":
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]