예제 #1
0
 def check(self):
   contest = Contest(self.contestId)
   if contest.systemTest():
     users = contest.participants()
     channels = []
     for user in users:
       if self.toFilter.count(user) > 0:
         print "Will send to ... " + user 
         channels.append(fix(user) + 'SystemTest')
     print "System Test is Final"
     sender = NotificationSender('CF Contest %d, system test is over' % self.contestId, channels)
     print sender.send()
     return True
   return False
예제 #2
0
 def check(self):
   contest = Contest(self.contestId)
   if contest.ratingChanges():
     users = contest.participants()
     channels = []
     for user in users:
       if self.toFilter.count(user) > 0:
         print "Will send to ... " + user
         channels.append(fix(user) + 'Rating')
     print "Ratings are out!"
     sender = NotificationSender('CF Contest %d, Ratings are updated!' % self.contestId, channels)
     print sender.send()
     return True
   return False
예제 #3
0
 def check(self):
     contest = Contest(self.contestId)
     if contest.ratingChanges():
         users = contest.participants()
         channels = []
         for user in users:
             if self.toFilter.count(user) > 0:
                 print "Will send to ... " + user
                 channels.append(fix(user) + 'Rating')
         print "Ratings are out!"
         sender = NotificationSender(
             'CF Contest %d, Ratings are updated!' % self.contestId,
             channels)
         print sender.send()
         return True
     return False
예제 #4
0
 def check(self):
     contest = Contest(self.contestId)
     if contest.systemTest():
         users = contest.participants()
         channels = []
         for user in users:
             if self.toFilter.count(user) > 0:
                 print "Will send to ... " + user
                 channels.append(fix(user) + 'SystemTest')
         print "System Test is Final"
         sender = NotificationSender(
             'CF Contest %d, system test is over' % self.contestId,
             channels)
         print sender.send()
         return True
     return False