Skip to content
Merged
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
1 change: 1 addition & 0 deletions deployment/aliyun/binance-lob-archiver@.service
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ RequiresMountsFor=/data
Type=simple
User=hftcollector
Group=hftcollector
StateDirectory=hft-collector

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu

rg -n 'STATE_DIRECTORY|SPOOL_DIR|ossutil|cache|queue' deployment rust_hft \
  --glob '!**/.git/**'

rg -n 'EnvironmentFile|Environment=' deployment/aliyun/binance-lob-archiver@.service

Repository: proerror77/monday

Length of output: 50373


🏁 Script executed:

#!/bin/bash
set -eu

printf '\n## service\n'
cat -n deployment/aliyun/binance-lob-archiver@.service

printf '\n## env files in deployment/aliyun matching archiver\n'
fd -a 'binance-lob-archiver*.env' deployment/aliyun

printf '\n## spot env\n'
cat -n deployment/aliyun/binance-lob-archiver-spot.env

printf '\n## references to STATE_DIRECTORY in deployment/aliyun and rust_hft/tools/collector\n'
rg -n 'STATE_DIRECTORY|SPOOL_DIR|COLLECTOR_SPOOL_DIR|ossutil' deployment/aliyun rust_hft/tools/collector --glob '!**/.git/**'

Repository: proerror77/monday

Length of output: 4367


🏁 Script executed:

#!/bin/bash
set -eu

printf '\n## service file\n'
cat -n deployment/aliyun/binance-lob-archiver@.service

printf '\n## archiver env files\n'
for f in deployment/aliyun/binance-lob-archiver*.env; do
  echo "== $f =="
  cat -n "$f"
done

printf '\n## archiver implementation references\n'
rg -n 'SPOOL_DIR|STATE_DIRECTORY|health\.json|queued|ossutil' deployment/aliyun rust_hft/tools/collector --glob '!**/.git/**' | head -n 120

Repository: proerror77/monday

Length of output: 5292


Wire SPOOL_DIR to ${STATE_DIRECTORY} in the env mapping.
StateDirectory=hft-collector only creates /var/lib/hft-collector; the service still loads SPOOL_DIR=/data/monday/spool/binance-lob/{spot,usdm} from the env files, so the systemd state dir remains unused. Map the archiver/ossutil state path through ${STATE_DIRECTORY} if this setting is meant to provide the persistent cache.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@deployment/aliyun/binance-lob-archiver`@.service at line 11, Update the
service’s environment mapping to set SPOOL_DIR under ${STATE_DIRECTORY},
replacing the hard-coded /data/monday/spool/binance-lob path for the archiver
and ossutil cache. Keep StateDirectory=hft-collector and ensure both spot and
usdm spool paths use the systemd-managed persistent state directory.

EnvironmentFile=/etc/monday/binance-lob-archiver-%i.env
ExecStart=/opt/monday/venv/bin/python /opt/monday/binance_lob_archiver.py
Restart=always
Expand Down
Loading