소스 검색

Add a rule to set status to NEEDASSIST if a case is NEW.

tags/v0.1^2
Ben Kurtovic 12 년 전
부모
커밋
0663e8c9b6
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. +6
    -1
      earwigbot/tasks/drn_clerkbot.py

+ 6
- 1
earwigbot/tasks/drn_clerkbot.py 파일 보기

@@ -312,11 +312,16 @@ class DRNClerkBot(Task):
def clerk_new_case(self, case, volunteers, signatures):
"""Clerk a case in the "brand new" state.

The case will be set to "open" if a volunteer edits it.
The case will be set to "open" if a volunteer edits it, or "needassist"
if it goes by without any volunteer edits for two days.
"""
notices = self.notify_parties(case)
if any([editor in volunteers for (editor, timestamp) in signatures]):
self.update_status(case, self.STATUS_OPEN)
else:
age = (datetime.utcnow() - case.file_time).total_seconds()
if age > 60 * 60 * 24 * 2:
self.update_status(case, self.STATUS_NEEDASSIST)
return notices

def clerk_open_case(self, case, signatures):


불러오는 중...
취소
저장