mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-01-30 06:22:04 +00:00
feat: implement template compression and view count filtering
- Add gzip compression for workflow JSONs (89% size reduction) - Filter templates with ≤10 views to remove low-quality content - Reduce template count from 4,505 to 2,596 high-quality templates - Compress template data from ~75MB to 12.10MB - Total database reduced from 117MB to 48MB - Add on-the-fly decompression for template retrieval - Update schema to support compressed workflow storage 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
32
monitor_fetch.sh
Normal file
32
monitor_fetch.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Monitoring template fetch progress..."
|
||||
echo "=================================="
|
||||
|
||||
while true; do
|
||||
# Check if process is still running
|
||||
if ! pgrep -f "fetch-templates" > /dev/null; then
|
||||
echo "Fetch process completed!"
|
||||
break
|
||||
fi
|
||||
|
||||
# Get database size
|
||||
DB_SIZE=$(ls -lh data/nodes.db 2>/dev/null | awk '{print $5}')
|
||||
|
||||
# Get template count
|
||||
TEMPLATE_COUNT=$(sqlite3 data/nodes.db "SELECT COUNT(*) FROM templates" 2>/dev/null || echo "0")
|
||||
|
||||
# Get last log entry
|
||||
LAST_LOG=$(tail -n 1 fetch_log.txt 2>/dev/null | grep "Fetching template details" | tail -1)
|
||||
|
||||
# Display status
|
||||
echo -ne "\rDB Size: $DB_SIZE | Templates: $TEMPLATE_COUNT | $LAST_LOG"
|
||||
|
||||
sleep 5
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "Final statistics:"
|
||||
echo "-----------------"
|
||||
ls -lh data/nodes.db
|
||||
sqlite3 data/nodes.db "SELECT COUNT(*) as count, printf('%.1f MB', SUM(LENGTH(workflow_json_compressed))/1024.0/1024.0) as compressed_size FROM templates"
|
||||
Reference in New Issue
Block a user