コード例 #1
0
ファイル: topic.py プロジェクト: feitianyiren/Icarus
    async def after_insert(self, raw_post: Dict, values: SQLValuesToWrite, record: DataRecord):
        # if self.do_mentions:
        #     self.do_mentions(record['user_id'], POST_TYPES.TOPIC, record['id'], {
        #         'title': record['title'],
        #     })

        # 添加统计记录
        post_stats_topic_new(record['board_id'], record['id'])
コード例 #2
0
ファイル: topic.py プロジェクト: taoyanli0808/Icarus
    async def after_insert(self, raw_post: Dict, values: SQLValuesToWrite,
                           record: DataRecord):
        # if self.do_mentions:
        #     self.do_mentions(record['user_id'], POST_TYPES.TOPIC, record['id'], {
        #         'title': record['title'],
        #     })

        # 添加统计记录
        post_stats_topic_new(record['board_id'], record['id'])

        if config.SEARCH_ENABLE:
            run_in_thread(esdb.es_update_topic, record['id'])