Updating Scripts and CI Workflow
نجحت جميع الفحوصات
CI - Fruit API / build-and-test (push) Successful in 41s
نجحت جميع الفحوصات
CI - Fruit API / build-and-test (push) Successful in 41s
هذا الالتزام موجود في:
2
.github/workflows/ci.yml
مباع
2
.github/workflows/ci.yml
مباع
@@ -24,7 +24,7 @@ jobs:
|
||||
|
||||
- name: Run API in background
|
||||
run: |
|
||||
nohup python fruit_api.py &
|
||||
python fruit_api.py &
|
||||
sleep 5
|
||||
|
||||
- name: Run API tests
|
||||
|
@@ -337,3 +337,4 @@
|
||||
2025-09-30 23:59:59 - METHOD:GET - ENDPOINT:/fruits - STATUS:400 - ERROR: db not connected
|
||||
2025-10-01 00:15:00 - METHOD:GET - ENDPOINT:/fruits - STATUS:500 - ERROR: db not connected
|
||||
2025-10-01 00:15:00 - METHOD:GET - ENDPOINT:/fruits - STATUS:500 - ERROR: db not connected
|
||||
2025-10-01 00:15:00 - METHOD:GET - ENDPOINT:/fruits - STATUS:500 - ERROR: db not connected
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/bash
|
||||
LOG_FILE="fruit_api.log"
|
||||
# ALERT_URL="https://gahymah.systems.com"
|
||||
ALERT_URL=" " # Here Any Endpoint
|
||||
|
||||
tail -Fn0 "$LOG_FILE" | while read line; do
|
||||
if echo "$line" | grep -qiE "STATUS:(4[0-9]{2}|5[0-9]{2})|failed|timeout|error|exception"; then
|
||||
@@ -15,7 +15,7 @@ tail -Fn0 "$LOG_FILE" | while read line; do
|
||||
{
|
||||
"error": "$line",
|
||||
"timestamp": "$(date -u +"%Y-%m-%dT%H:%M:%SZ")",
|
||||
"message": "Error detected in Fruit API logs",
|
||||
"message": "Error detected in Ahmed Gamal's Fruit API logs",
|
||||
"server_metrics": {
|
||||
"ip": "$IP",
|
||||
"cpu_usage": "$CPU",
|
||||
|
@@ -796,3 +796,7 @@ Status: 200
|
||||
✅ Status: 200
|
||||
✅ Status: 200
|
||||
✅ Status: 201
|
||||
✅ Status: 200
|
||||
✅ Status: 200
|
||||
✅ Status: 200
|
||||
✅ Status: 201
|
||||
|
المرجع في مشكلة جديدة
حظر مستخدم