Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions libs/services/data-record.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
const fp = require('fastify-plugin');

const BUFFER_CACHE_KEY = 'statistics:data-record:buffer';

module.exports = fp(async (fastify, options) => {
const { models } = fastify[options.name];
const { Op } = fastify.sequelize.Sequelize;
const sequelize = fastify.sequelize.instance;
const log = fastify.log;
const BUFFER_CACHE_KEY = `${options.name || 'statistics'}:data-record:buffer`;
const cache = options.cache || null;

const flushInterval = options.collectFlushInterval || 5000;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kne/fastify-statistics",
"version": "0.1.0-alpha.2",
"version": "0.1.0-alpha.3",
"description": "基于 Fastify 的数据采集与多周期聚合统计插件,支持缓冲写入、时区查询和自动 Cron 聚合",
"main": "index.js",
"scripts": {
Expand Down
Loading