Spaces:
Running
Running
Commit
·
35489cf
1
Parent(s):
5bf82d0
gonna delete everything wish me luck
Browse files- api_monitor.py +13 -8
api_monitor.py
CHANGED
@@ -377,11 +377,23 @@ def activate_monitoring(config_id, mcp_api_key):
|
|
377 |
}
|
378 |
|
379 |
ERROR HANDLING: If config_id not found or invalid, returns success=False with error message
|
|
|
|
|
380 |
"""
|
381 |
try:
|
382 |
conn = connect_to_db()
|
383 |
# TODO: Implement activation logic here
|
|
|
384 |
conn.close()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
#get config from database
|
386 |
|
387 |
|
@@ -431,14 +443,7 @@ def activate_monitoring(config_id, mcp_api_key):
|
|
431 |
"message": f"Failed to create scheduler: {str(e)}",
|
432 |
"config_id": config_id,
|
433 |
}
|
434 |
-
|
435 |
-
|
436 |
-
# if we get down here something is horribly wrong, we should never get here
|
437 |
-
return {
|
438 |
-
"success": False,
|
439 |
-
"message": "SOMETHING WENT HORRIBLY WRONG, THIS SHOULD NEVER HAPPEN",
|
440 |
-
"config_id": config_id,
|
441 |
-
}
|
442 |
except Exception as e:
|
443 |
return {
|
444 |
"success": False,
|
|
|
377 |
}
|
378 |
|
379 |
ERROR HANDLING: If config_id not found or invalid, returns success=False with error message
|
380 |
+
"""
|
381 |
+
|
382 |
"""
|
383 |
try:
|
384 |
conn = connect_to_db()
|
385 |
# TODO: Implement activation logic here
|
386 |
+
#problem is that we probably want activation to be completely separate from everything
|
387 |
conn.close()
|
388 |
+
|
389 |
+
except Exception as e:
|
390 |
+
return {
|
391 |
+
"success": False,
|
392 |
+
"message": f"Database connection failed: {str(e)}",
|
393 |
+
"config_id": config_id,
|
394 |
+
}
|
395 |
+
"""
|
396 |
+
|
397 |
#get config from database
|
398 |
|
399 |
|
|
|
443 |
"message": f"Failed to create scheduler: {str(e)}",
|
444 |
"config_id": config_id,
|
445 |
}
|
446 |
+
# if we get down here something is horribly wrong, we should never get her
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
447 |
except Exception as e:
|
448 |
return {
|
449 |
"success": False,
|