From db72929aec221f17cfc96ffebe6bf3b3c185c14f Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Thu, 31 May 2012 23:30:49 -0400 Subject: [PATCH] Fix blocking --- earwigbot/tasks/afc_statistics.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/earwigbot/tasks/afc_statistics.py b/earwigbot/tasks/afc_statistics.py index 5c3037f..017c924 100644 --- a/earwigbot/tasks/afc_statistics.py +++ b/earwigbot/tasks/afc_statistics.py @@ -34,7 +34,6 @@ from earwigbot.tasks import BaseTask __all__ = ["Task"] - class Task(BaseTask): """A task to generate statistics for WikiProject Articles for Creation. @@ -86,10 +85,10 @@ class Task(BaseTask): local database. """ action = kwargs.get("action") - if not self.db_access_lock.acquire(blocking=False): + if not self.db_access_lock.acquire(False): # Non-blocking if action == "sync": return - self.db_access_lock.acquire(blocking=True) + self.db_access_lock.acquire() try: self.site = self.bot.wiki.get_site()