浏览代码

Fix blocking

tags/v0.1^2
Ben Kurtovic 12 年前
父节点
当前提交
db72929aec
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. +2
    -3
      earwigbot/tasks/afc_statistics.py

+ 2
- 3
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()


正在加载...
取消
保存