Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perf/arr field sort #36

Merged
merged 3 commits into from
Jul 15, 2024
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
36 changes: 21 additions & 15 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,27 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npm run test:coverage
- name: Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- run: pnpm run build
- run: pnpm test
- run: pnpm run test:coverage
- name: Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
16 changes: 11 additions & 5 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,25 @@
PORT: 3000
MONGODB:
URL: 'mongodb://127.0.0.1:27017/test'
OPTIONS:
readPreference: secondaryPreferred
orangemi marked this conversation as resolved.
Show resolved Hide resolved

# for production
# LOGGERS:
# base:
# transport: null
# MONGODB_QUERY_OPTIONS:
# maxTimeMs: 10000 # mongodb 查询超时时间
# maxResultWindow: 10000 # 最大查询数的限制
# SERVER_RATELIMIT:
# '^spaceId:[0-9a-fA-F]{24}-entityId:[0-9a-fA-F]{24}-RecordGroupAPI/group$': 1000
# '^spaceId:[0-9a-fA-F]{24}-entityId:[0-9a-fA-F]{24}-RecordCountAPI/count': 1000
# '^spaceId:[0-9a-fA-F]{24}-entityId:[0-9a-fA-F]{24}-RecordAPI/queryArray': 1000
# '^spaceId:[0-9a-fA-F]{24}-entityId:[0-9a-fA-F]{24}-RecordCountAPI/count': 1000
# '^spaceId:[0-9a-fA-F]{24}-entityId:[0-9a-fA-F]{24}-RecordAPI/queryArray': 1000
# '^spaceId:[0-9a-fA-F]{24}-entityId:[0-9a-fA-F]{24}$': 1000 # spaceId + entityId 支持正则表达式
# 单机限流时间
# SERVER_RATELIMIT_RESET_INTERVAL_MS: 20
# 单机限流重试时间
# SERVER_RATELIMIT_RETRY_INTERVAL_MS: 10

LOGGERS:
base:
level: info
transport:
target: pino-pretty
Loading
Loading