def buzz_join_apply_review_mail(): ago = int(time()) - 18*60*60 c = EventJoiner.raw_sql('select distinct(event_id) from event_joiner where state=%s and create_time<%s;', EVENT_JOIN_STATE_NEW, ago) event_id_list = c.fetchall() for event_id, in event_id_list: event_review_join_apply(event_id)
def post(self, id, state): current_user_id = self.current_user_id state = int(state) o = EventJoiner.mc_get(id) if o: event = o.event o_state = o.state if event: if event.can_admin(current_user_id): if state: if o_state == EVENT_JOIN_STATE_NEW: event_joiner_yes(o) else: if o_state in (EVENT_JOIN_STATE_NEW, EVENT_JOIN_STATE_YES): txt = self.get_argument('txt', '') if txt: event_joiner_no(o, txt) self.finish('{}')