Beispiel #1
0
    def after_insert(self, raw_post: Dict, values: SQLValuesToWrite,
                     records: List[DataRecord]):
        record = records[0]
        statistic_add_topic(record['board_id'], record['id'])

        # 添加统计记录
        statistic_new(POST_TYPES.TOPIC, record['id'])
Beispiel #2
0
    def after_insert(self, raw_post: Dict, values: SQLValuesToWrite, records: List[DataRecord]):
        record = records[0]

        if self.do_mentions:
            self.do_mentions(record['user_id'], POST_TYPES.TOPIC, record['id'], {
                'title': record['title'],
            })

        statistic_add_topic(record['board_id'], record['id'])

        # 添加统计记录
        statistic_new(POST_TYPES.TOPIC, record['id'])