feat: Enhance logging and error handling for job streaming and photo uploads
CI / skip-ci-check (pull_request) Successful in 8s
CI / lint-and-type-check (pull_request) Successful in 1m12s
CI / python-lint (pull_request) Successful in 36s
CI / test-backend (pull_request) Successful in 3m47s
CI / build (pull_request) Successful in 3m28s
CI / secret-scanning (pull_request) Successful in 14s
CI / dependency-scan (pull_request) Successful in 13s
CI / sast-scan (pull_request) Successful in 1m33s
CI / workflow-summary (pull_request) Successful in 5s
CI / skip-ci-check (pull_request) Successful in 8s
CI / lint-and-type-check (pull_request) Successful in 1m12s
CI / python-lint (pull_request) Successful in 36s
CI / test-backend (pull_request) Successful in 3m47s
CI / build (pull_request) Successful in 3m28s
CI / secret-scanning (pull_request) Successful in 14s
CI / dependency-scan (pull_request) Successful in 13s
CI / sast-scan (pull_request) Successful in 1m33s
CI / workflow-summary (pull_request) Successful in 5s
- Added new logging scripts for quick access to service logs and troubleshooting. - Updated job streaming API to support authentication via query parameters for EventSource. - Improved photo upload process to capture and validate EXIF dates and original modification times. - Enhanced error handling for file uploads and EXIF extraction failures. - Introduced new configuration options in ecosystem.config.js to prevent infinite crash loops.
This commit is contained in:
@@ -49,6 +49,40 @@ Database-related shell scripts remain in `scripts/`:
|
||||
- `grant_auth_db_delete_permission.sh` - Grant delete permissions
|
||||
- `setup_postgresql.sh` - Set up PostgreSQL
|
||||
|
||||
## Log Management Scripts
|
||||
|
||||
Quick access to service logs for troubleshooting:
|
||||
- `check-logs.sh` - Check recent errors from all services
|
||||
- `tail-errors.sh` - Follow error logs in real-time
|
||||
- `view-recent-errors.sh` - View errors from the last N minutes (default: 10)
|
||||
- `setup-log-rotation.sh` - Configure PM2 log rotation to prevent log bloat
|
||||
|
||||
### Quick Usage
|
||||
|
||||
```bash
|
||||
# Check all service logs for recent errors
|
||||
./scripts/check-logs.sh
|
||||
|
||||
# Follow error logs in real-time (Ctrl+C to exit)
|
||||
./scripts/tail-errors.sh
|
||||
|
||||
# View errors from last 10 minutes
|
||||
./scripts/view-recent-errors.sh
|
||||
|
||||
# View errors from last 30 minutes
|
||||
./scripts/view-recent-errors.sh 30
|
||||
|
||||
# Setup log rotation (run once)
|
||||
./scripts/setup-log-rotation.sh
|
||||
```
|
||||
|
||||
**Log Locations:**
|
||||
- All logs: `/home/appuser/.pm2/logs/`
|
||||
- API errors: `/home/appuser/.pm2/logs/punimtag-api-error.log`
|
||||
- Worker errors: `/home/appuser/.pm2/logs/punimtag-worker-error.log`
|
||||
- Admin errors: `/home/appuser/.pm2/logs/punimtag-admin-error.log`
|
||||
- Viewer errors: `/home/appuser/.pm2/logs/punimtag-viewer-error.log`
|
||||
|
||||
## Usage
|
||||
|
||||
Most scripts can be run directly:
|
||||
|
||||
Reference in New Issue
Block a user