Optimized API update logic

This commit is contained in:
2025-07-19 23:30:27 -07:00
parent e8712a4a3d
commit 5f60e55e93
3 changed files with 723 additions and 34 deletions

View File

@@ -1,10 +1,10 @@
{ {
"401095ca": { "401095ca": {
"channel_id": "1392730642206429307", "channel_id": "1392730642206429307",
"message_id": "1395282129377689671" "message_id": "1396377026000322712"
}, },
"548c4f18": { "548c4f18": {
"channel_id": "1392730682576343121", "channel_id": "1392730682576343121",
"message_id": "1395282135237001358" "message_id": "1396377032589447258"
} }
} }

629
pterodactyl_bot_log.sample Normal file
View File

@@ -0,0 +1,629 @@
2025-07-19 23:23:41,814 - INFO - Initialized logging system with file and console output
2025-07-19 23:23:41,814 - INFO - Configuration validation passed
2025-07-19 23:23:41,815 - DEBUG - Loaded and validated configuration values from config.ini
2025-07-19 23:23:41,816 - INFO - Initialized PterodactylBot instance with state tracking
2025-07-19 23:23:41,817 - INFO - Starting bot initialization
2025-07-19 23:23:42,336 - INFO - Running bot setup hook
2025-07-19 23:23:42,337 - INFO - Initialized PterodactylAPI client with provided credentials
2025-07-19 23:23:42,337 - DEBUG - Created new aiohttp ClientSession
2025-07-19 23:23:42,337 - INFO - Initialized Pterodactyl API client
2025-07-19 23:23:42,338 - DEBUG - Attempting to load embed locations from storage
2025-07-19 23:23:42,338 - INFO - Loaded 2 embed locations from storage
2025-07-19 23:23:42,338 - INFO - Started background status update task
2025-07-19 23:23:42,339 - DEBUG - Waiting for bot readiness before starting update task
2025-07-19 23:23:44,729 - INFO - Starting full refresh of all server embeds
2025-07-19 23:23:44,730 - INFO - Bot connected as Serendipity Systems PteroAPI (ID: 1392436613354754068)
2025-07-19 23:23:44,931 - INFO - Successfully synced 2 command(s) to guild 1391752412947288155: ['server_status', 'refresh_embeds']
2025-07-19 23:23:45,732 - DEBUG - Server cache empty, fetching fresh server list
2025-07-19 23:23:45,732 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:23:45,732 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:23:45,733 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:23:46,064 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:23:46,065 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:23:46,066 - INFO - Populated server cache with 19 servers
2025-07-19 23:23:46,066 - DEBUG - Creating new embed for server 401095ca
2025-07-19 23:23:46,067 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:23:46,067 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:23:46,067 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:23:46,361 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:23:46,361 - DEBUG - Server 401095ca current state: running
2025-07-19 23:23:46,361 - DEBUG - Building status embed for server Vintage Story (401095ca)
2025-07-19 23:23:46,362 - DEBUG - Created ServerStatusView for Vintage Story (401095ca)
2025-07-19 23:23:46,362 - DEBUG - Successfully built status components for Vintage Story
2025-07-19 23:23:46,605 - INFO - Created new embed for server Vintage Story
2025-07-19 23:23:47,606 - DEBUG - Creating new embed for server 548c4f18
2025-07-19 23:23:47,607 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:23:47,607 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:23:47,607 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:23:47,893 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:23:47,894 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:23:47,894 - DEBUG - Building status embed for server Cobblemon (548c4f18)
2025-07-19 23:23:47,894 - DEBUG - Created ServerStatusView for Cobblemon (548c4f18)
2025-07-19 23:23:47,894 - DEBUG - Successfully built status components for Cobblemon
2025-07-19 23:23:48,080 - INFO - Created new embed for server Cobblemon
2025-07-19 23:23:49,082 - INFO - Created 2 new embeds, skipped 17 servers
2025-07-19 23:23:49,531 - DEBUG - Deleted old embed for server 401095ca
2025-07-19 23:23:50,544 - DEBUG - Deleted old embed for server 548c4f18
2025-07-19 23:23:51,045 - INFO - Deleted 2 old embeds, 0 already missing
2025-07-19 23:23:51,046 - DEBUG - Attempting to save embed locations to storage
2025-07-19 23:23:51,047 - DEBUG - Successfully saved embed locations to disk
2025-07-19 23:23:51,047 - INFO - Starting optimized server status update cycle
2025-07-19 23:23:51,048 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:23:51,048 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:23:51,049 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:23:51,298 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:23:51,298 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:23:51,299 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:23:51,299 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:23:51,300 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:23:51,300 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:23:51,300 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:23:51,465 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:23:51,466 - DEBUG - Server 401095ca current state: running
2025-07-19 23:23:51,466 - DEBUG - Power state changed for Vintage Story: None -> running
2025-07-19 23:23:51,467 - DEBUG - Building status embed for server Vintage Story (401095ca)
2025-07-19 23:23:51,467 - DEBUG - Created ServerStatusView for Vintage Story (401095ca)
2025-07-19 23:23:51,468 - DEBUG - Successfully built status components for Vintage Story
2025-07-19 23:23:53,300 - DEBUG - Updated status for Vintage Story
2025-07-19 23:23:53,801 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:23:53,802 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:23:53,802 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:23:53,802 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:23:53,983 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:23:53,983 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:23:53,984 - DEBUG - Power state changed for Cobblemon: None -> offline
2025-07-19 23:23:53,984 - DEBUG - Building status embed for server Cobblemon (548c4f18)
2025-07-19 23:23:53,984 - DEBUG - Created ServerStatusView for Cobblemon (548c4f18)
2025-07-19 23:23:53,984 - DEBUG - Successfully built status components for Cobblemon
2025-07-19 23:23:54,440 - DEBUG - Updated status for Cobblemon
2025-07-19 23:23:54,941 - INFO - Update cycle complete: 2 updated, 0 skipped, 0 missing, 0 errors
2025-07-19 23:24:01,051 - INFO - Starting optimized server status update cycle
2025-07-19 23:24:01,051 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:24:01,052 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:24:01,052 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:24:01,265 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:24:01,266 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:24:01,267 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:24:01,267 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:24:01,267 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:24:01,268 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:24:01,268 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:24:01,451 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:24:01,451 - DEBUG - Server 401095ca current state: running
2025-07-19 23:24:01,452 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:24:01,953 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:24:01,954 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:24:01,954 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:24:01,955 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:24:02,131 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:24:02,131 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:24:02,131 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:24:02,632 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:24:11,057 - INFO - Starting optimized server status update cycle
2025-07-19 23:24:11,058 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:24:11,059 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:24:11,060 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:24:11,283 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:24:11,284 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:24:11,284 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:24:11,285 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:24:11,285 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:24:11,285 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:24:11,286 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:24:11,569 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:24:11,570 - DEBUG - Server 401095ca current state: running
2025-07-19 23:24:11,571 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:24:12,072 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:24:12,072 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:24:12,072 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:24:12,072 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:24:12,312 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:24:12,313 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:24:12,313 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:24:12,814 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:24:21,052 - INFO - Starting optimized server status update cycle
2025-07-19 23:24:21,053 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:24:21,054 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:24:21,054 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:24:21,272 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:24:21,272 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:24:21,273 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:24:21,274 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:24:21,274 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:24:21,274 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:24:21,275 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:24:21,442 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:24:21,443 - DEBUG - Server 401095ca current state: running
2025-07-19 23:24:21,443 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:24:21,944 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:24:21,945 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:24:21,945 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:24:21,945 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:24:22,120 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:24:22,120 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:24:22,120 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:24:22,621 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:24:31,052 - INFO - Starting optimized server status update cycle
2025-07-19 23:24:31,053 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:24:31,054 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:24:31,054 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:24:31,280 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:24:31,281 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:24:31,281 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:24:31,282 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:24:31,282 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:24:31,283 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:24:31,283 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:24:31,453 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:24:31,453 - DEBUG - Server 401095ca current state: running
2025-07-19 23:24:31,454 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:24:31,955 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:24:31,956 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:24:31,956 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:24:31,956 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:24:32,127 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:24:32,128 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:24:32,128 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:24:32,629 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:24:41,052 - INFO - Starting optimized server status update cycle
2025-07-19 23:24:41,053 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:24:41,054 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:24:41,054 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:24:41,277 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:24:41,278 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:24:41,278 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:24:41,279 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:24:41,279 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:24:41,280 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:24:41,280 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:24:41,532 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:24:41,533 - DEBUG - Server 401095ca current state: running
2025-07-19 23:24:41,533 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:24:42,034 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:24:42,035 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:24:42,035 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:24:42,035 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:24:42,300 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:24:42,301 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:24:42,301 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:24:42,802 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:24:51,048 - INFO - Starting optimized server status update cycle
2025-07-19 23:24:51,049 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:24:51,050 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:24:51,050 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:24:51,290 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:24:51,290 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:24:51,291 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:24:51,291 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:24:51,291 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:24:51,291 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:24:51,291 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:24:51,457 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:24:51,458 - DEBUG - Server 401095ca current state: running
2025-07-19 23:24:51,458 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:24:51,959 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:24:51,960 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:24:51,960 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:24:51,960 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:24:52,131 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:24:52,132 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:24:52,132 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:24:52,633 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:25:01,056 - INFO - Starting optimized server status update cycle
2025-07-19 23:25:01,058 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:25:01,058 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:25:01,058 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:25:01,303 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:25:01,303 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:25:01,305 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:25:01,306 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:25:01,306 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:25:01,306 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:25:01,306 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:25:01,493 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:25:01,494 - DEBUG - Server 401095ca current state: running
2025-07-19 23:25:01,494 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:25:01,996 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:25:01,996 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:25:01,996 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:25:01,996 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:25:02,170 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:25:02,170 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:25:02,170 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:25:02,672 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:25:11,052 - INFO - Starting optimized server status update cycle
2025-07-19 23:25:11,053 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:25:11,053 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:25:11,053 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:25:11,277 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:25:11,278 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:25:11,279 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:25:11,279 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:25:11,279 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:25:11,280 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:25:11,280 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:25:11,531 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:25:11,531 - DEBUG - Server 401095ca current state: running
2025-07-19 23:25:11,531 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:25:12,032 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:25:12,033 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:25:12,033 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:25:12,033 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:25:12,305 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:25:12,305 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:25:12,306 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:25:12,806 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:25:21,054 - INFO - Starting optimized server status update cycle
2025-07-19 23:25:21,055 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:25:21,055 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:25:21,055 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:25:21,282 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:25:21,282 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:25:21,282 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:25:21,283 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:25:21,283 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:25:21,284 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:25:21,284 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:25:21,450 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:25:21,450 - DEBUG - Server 401095ca current state: running
2025-07-19 23:25:21,451 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:25:21,952 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:25:21,952 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:25:21,952 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:25:21,952 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:25:22,119 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:25:22,120 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:25:22,120 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:25:22,621 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:25:31,055 - INFO - Starting optimized server status update cycle
2025-07-19 23:25:31,056 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:25:31,057 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:25:31,057 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:25:31,278 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:25:31,279 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:25:31,280 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:25:31,280 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:25:31,280 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:25:31,281 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:25:31,281 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:25:31,448 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:25:31,449 - DEBUG - Server 401095ca current state: running
2025-07-19 23:25:31,450 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:25:31,951 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:25:31,951 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:25:31,951 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:25:31,951 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:25:32,122 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:25:32,122 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:25:32,122 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:25:32,624 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:25:41,052 - INFO - Starting optimized server status update cycle
2025-07-19 23:25:41,052 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:25:41,053 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:25:41,053 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:25:41,278 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:25:41,278 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:25:41,279 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:25:41,279 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:25:41,279 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:25:41,280 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:25:41,280 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:25:41,525 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:25:41,526 - DEBUG - Server 401095ca current state: running
2025-07-19 23:25:41,526 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:25:42,027 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:25:42,028 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:25:42,028 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:25:42,029 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:25:42,279 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:25:42,280 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:25:42,280 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:25:42,781 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:25:51,052 - INFO - Starting optimized server status update cycle
2025-07-19 23:25:51,053 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:25:51,054 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:25:51,054 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:25:51,296 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:25:51,296 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:25:51,297 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:25:51,297 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:25:51,297 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:25:51,297 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:25:51,297 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:25:51,461 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:25:51,462 - DEBUG - Server 401095ca current state: running
2025-07-19 23:25:51,462 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:25:51,963 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:25:51,963 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:25:51,964 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:25:51,964 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:25:52,132 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:25:52,132 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:25:52,133 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:25:52,634 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:26:01,056 - INFO - Starting optimized server status update cycle
2025-07-19 23:26:01,057 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:26:01,057 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:26:01,057 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:26:01,277 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:26:01,278 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:26:01,279 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:26:01,279 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:26:01,280 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:26:01,280 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:26:01,281 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:26:01,444 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:26:01,445 - DEBUG - Server 401095ca current state: running
2025-07-19 23:26:01,446 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:26:01,947 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:26:01,947 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:26:01,947 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:26:01,947 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:26:02,123 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:26:02,124 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:26:02,124 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:26:02,626 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:26:11,048 - INFO - Starting optimized server status update cycle
2025-07-19 23:26:11,049 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:26:11,049 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:26:11,049 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:26:11,291 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:26:11,291 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:26:11,292 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:26:11,292 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:26:11,292 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:26:11,293 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:26:11,293 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:26:11,532 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:26:11,533 - DEBUG - Server 401095ca current state: running
2025-07-19 23:26:11,533 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:26:12,033 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:26:12,034 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:26:12,034 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:26:12,034 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:26:12,289 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:26:12,289 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:26:12,289 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:26:12,790 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:26:21,053 - INFO - Starting optimized server status update cycle
2025-07-19 23:26:21,053 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:26:21,054 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:26:21,054 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:26:21,289 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:26:21,289 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:26:21,290 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:26:21,290 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:26:21,290 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:26:21,290 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:26:21,290 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:26:21,456 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:26:21,456 - DEBUG - Server 401095ca current state: running
2025-07-19 23:26:21,456 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:26:21,957 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:26:21,958 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:26:21,958 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:26:21,958 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:26:22,127 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:26:22,127 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:26:22,127 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:26:22,628 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:26:31,048 - INFO - Starting optimized server status update cycle
2025-07-19 23:26:31,049 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:26:31,050 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:26:31,050 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:26:31,291 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:26:31,291 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:26:31,292 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:26:31,292 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:26:31,292 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:26:31,292 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:26:31,292 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:26:31,457 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:26:31,458 - DEBUG - Server 401095ca current state: running
2025-07-19 23:26:31,458 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:26:31,959 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:26:31,959 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:26:31,959 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:26:31,960 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:26:32,123 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:26:32,123 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:26:32,123 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:26:32,624 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:26:41,056 - INFO - Starting optimized server status update cycle
2025-07-19 23:26:41,057 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:26:41,058 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:26:41,058 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:26:41,313 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:26:41,313 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:26:41,314 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:26:41,314 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:26:41,314 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:26:41,315 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:26:41,315 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:26:41,569 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:26:41,570 - DEBUG - Server 401095ca current state: running
2025-07-19 23:26:41,570 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:26:42,072 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:26:42,072 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:26:42,073 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:26:42,073 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:26:42,310 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:26:42,311 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:26:42,311 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:26:42,812 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:26:51,052 - INFO - Starting optimized server status update cycle
2025-07-19 23:26:51,053 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:26:51,053 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:26:51,053 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:26:51,266 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:26:51,266 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:26:51,267 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:26:51,267 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:26:51,268 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:26:51,268 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:26:51,268 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:26:51,440 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:26:51,440 - DEBUG - Server 401095ca current state: running
2025-07-19 23:26:51,441 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:26:51,942 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:26:51,942 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:26:51,942 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:26:51,942 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:26:52,113 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:26:52,113 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:26:52,113 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:26:52,614 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:27:01,048 - INFO - Starting optimized server status update cycle
2025-07-19 23:27:01,049 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:27:01,049 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:27:01,049 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:27:01,261 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:27:01,262 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:27:01,263 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:27:01,264 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:27:01,264 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:27:01,265 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:27:01,265 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:27:01,440 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:27:01,441 - DEBUG - Server 401095ca current state: running
2025-07-19 23:27:01,442 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:27:01,943 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:27:01,943 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:27:01,944 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:27:01,944 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:27:02,112 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:27:02,113 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:27:02,113 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:27:02,614 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:27:11,051 - INFO - Starting optimized server status update cycle
2025-07-19 23:27:11,052 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:27:11,052 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:27:11,053 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:27:11,274 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:27:11,274 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:27:11,275 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:27:11,275 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:27:11,275 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:27:11,275 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:27:11,275 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:27:11,524 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:27:11,524 - DEBUG - Server 401095ca current state: running
2025-07-19 23:27:11,524 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:27:12,025 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:27:12,025 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:27:12,026 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:27:12,026 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:27:12,266 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:27:12,267 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:27:12,267 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:27:12,768 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:27:21,055 - INFO - Starting optimized server status update cycle
2025-07-19 23:27:21,056 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:27:21,056 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:27:21,057 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:27:21,282 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:27:21,282 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:27:21,283 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:27:21,283 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:27:21,283 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:27:21,284 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:27:21,284 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:27:21,456 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:27:21,457 - DEBUG - Server 401095ca current state: running
2025-07-19 23:27:21,457 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:27:21,958 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:27:21,958 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:27:21,958 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:27:21,959 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:27:22,137 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:27:22,138 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:27:22,138 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:27:22,639 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:27:31,048 - INFO - Starting optimized server status update cycle
2025-07-19 23:27:31,049 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:27:31,050 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:27:31,050 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:27:31,283 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:27:31,284 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:27:31,285 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:27:31,285 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:27:31,285 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:27:31,285 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:27:31,285 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:27:31,476 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:27:31,476 - DEBUG - Server 401095ca current state: running
2025-07-19 23:27:31,476 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:27:31,977 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:27:31,978 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:27:31,978 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:27:31,978 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:27:32,157 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:27:32,157 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:27:32,157 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:27:32,658 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:27:41,057 - INFO - Starting optimized server status update cycle
2025-07-19 23:27:41,058 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:27:41,059 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:27:41,059 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:27:41,293 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:27:41,294 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:27:41,294 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:27:41,294 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:27:41,294 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:27:41,295 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:27:41,295 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:27:41,532 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:27:41,532 - DEBUG - Server 401095ca current state: running
2025-07-19 23:27:41,533 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:27:42,034 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:27:42,034 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:27:42,034 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:27:42,034 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:27:42,277 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:27:42,277 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:27:42,277 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:27:42,778 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:27:51,049 - INFO - Starting optimized server status update cycle
2025-07-19 23:27:51,050 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:27:51,051 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:27:51,051 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:27:51,287 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:27:51,288 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:27:51,288 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:27:51,288 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:27:51,289 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:27:51,289 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:27:51,289 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:27:51,452 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:27:51,453 - DEBUG - Server 401095ca current state: running
2025-07-19 23:27:51,453 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:27:51,954 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:27:51,954 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:27:51,954 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:27:51,954 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:27:52,127 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:27:52,127 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:27:52,127 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:27:52,628 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors
2025-07-19 23:28:01,056 - INFO - Starting optimized server status update cycle
2025-07-19 23:28:01,057 - INFO - Fetching list of all servers from Pterodactyl panel
2025-07-19 23:28:01,058 - DEBUG - Preparing GET request to application/servers using Application API key
2025-07-19 23:28:01,058 - DEBUG - Acquired lock for API request to application/servers
2025-07-19 23:28:01,284 - DEBUG - Received response from application/servers with status 200
2025-07-19 23:28:01,284 - INFO - Retrieved 19 servers from Pterodactyl panel
2025-07-19 23:28:01,284 - DEBUG - Updated server cache with 19 servers
2025-07-19 23:28:01,284 - DEBUG - Checking status for server Vintage Story (401095ca)
2025-07-19 23:28:01,284 - DEBUG - Fetching resource usage for server 401095ca
2025-07-19 23:28:01,285 - DEBUG - Preparing GET request to client/servers/401095ca/resources using Client API key
2025-07-19 23:28:01,285 - DEBUG - Acquired lock for API request to client/servers/401095ca/resources
2025-07-19 23:28:01,450 - DEBUG - Received response from client/servers/401095ca/resources with status 200
2025-07-19 23:28:01,450 - DEBUG - Server 401095ca current state: running
2025-07-19 23:28:01,450 - DEBUG - No changes detected for Vintage Story, skipping update
2025-07-19 23:28:01,951 - DEBUG - Checking status for server Cobblemon (548c4f18)
2025-07-19 23:28:01,952 - DEBUG - Fetching resource usage for server 548c4f18
2025-07-19 23:28:01,952 - DEBUG - Preparing GET request to client/servers/548c4f18/resources using Client API key
2025-07-19 23:28:01,952 - DEBUG - Acquired lock for API request to client/servers/548c4f18/resources
2025-07-19 23:28:02,117 - DEBUG - Received response from client/servers/548c4f18/resources with status 200
2025-07-19 23:28:02,118 - DEBUG - Server 548c4f18 current state: offline
2025-07-19 23:28:02,118 - DEBUG - No changes detected for Cobblemon, skipping update
2025-07-19 23:28:02,619 - INFO - Update cycle complete: 0 updated, 2 skipped, 0 missing, 0 errors

View File

@@ -57,8 +57,8 @@ logger.info("Initialized logging system with file and console output")
# CONFIGURATION SETUP # CONFIGURATION SETUP
# ============================================== # ==============================================
generate_config.generate_config() # generate_config.generate_config()
logger.debug("Gennerated config.ini file using values from .env") # logger.debug("Gennerated config.ini file using values from .env")
config = configparser.ConfigParser() config = configparser.ConfigParser()
config.read('config.ini') config.read('config.ini')
@@ -138,7 +138,7 @@ try:
DISCORD_TOKEN = config.get('Discord', 'Token') DISCORD_TOKEN = config.get('Discord', 'Token')
ALLOWED_GUILD_ID = config.getint('Discord', 'AllowedGuildID') ALLOWED_GUILD_ID = config.getint('Discord', 'AllowedGuildID')
REQUIRED_ROLE = "Game Server User" REQUIRED_ROLE = "Game Server User"
UPDATE_INTERVAL = 1 UPDATE_INTERVAL = 10
EMBED_LOCATIONS_FILE = "embed_locations.json" EMBED_LOCATIONS_FILE = "embed_locations.json"
logger.debug("Loaded and validated configuration values from config.ini") logger.debug("Loaded and validated configuration values from config.ini")
@@ -538,12 +538,15 @@ class PterodactylBot(commands.Bot):
Sets up caches, locks, and storage paths. Sets up caches, locks, and storage paths.
""" """
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
self.pterodactyl_api = None # Will be initialized in setup_hook self.pterodactyl_api = None # Pterodactyl API client
self.server_cache: Dict[str, dict] = {} # Cache of server data self.server_cache: Dict[str, dict] = {} # Cache of server data from Pterodactyl
self.embed_locations: Dict[str, Dict[str, int]] = {} # Tracks embed positions self.embed_locations: Dict[str, Dict[str, int]] = {} # Tracks where embeds are posted
self.update_lock = asyncio.Lock() # Prevents concurrent updates self.update_lock = asyncio.Lock() # Prevents concurrent updates
self.embed_storage_path = Path(EMBED_LOCATIONS_FILE) # Storage file path self.embed_storage_path = Path(EMBED_LOCATIONS_FILE) # File to store embed locations
logger.info("Initialized PterodactylBot instance") # Track previous server states and CPU usage to detect changes
# Format: {server_id: (state, cpu_usage)}
self.previous_states: Dict[str, Tuple[str, float]] = {}
logger.info("Initialized PterodactylBot instance with state tracking")
async def setup_hook(self): async def setup_hook(self):
""" """
@@ -773,28 +776,39 @@ class PterodactylBot(commands.Bot):
logger.debug(f"Successfully built status components for {name}") logger.debug(f"Successfully built status components for {name}")
return embed, view return embed, view
@tasks.loop(minutes=UPDATE_INTERVAL) @tasks.loop(seconds=UPDATE_INTERVAL)
async def update_status(self): async def update_status(self):
"""Background task to update all server status embeds periodically.""" """
logger.info("Starting scheduled server status update cycle") Background task to update server status embeds when:
async with self.update_lock: 1. Server power state changes (started/stopped/restarted)
2. Significant CPU usage change (>50% difference)
3. First time seeing the server
This minimizes API calls to Discord and updates while maintaining
real-time awareness of important server changes.
"""
logger.info("Starting optimized server status update cycle")
async with self.update_lock: # Ensure only one update runs at a time
try: try:
# Get current server list # Fetch current server list from Pterodactyl
servers = await self.pterodactyl_api.get_servers() servers = await self.pterodactyl_api.get_servers()
if not servers: if not servers:
logger.warning("No servers found in Pterodactyl panel during update") logger.warning("No servers found in Pterodactyl panel during update")
return return
# Update cache # Update our local cache with fresh server data
self.server_cache = {server['attributes']['identifier']: server for server in servers} self.server_cache = {server['attributes']['identifier']: server for server in servers}
logger.debug(f"Updated server cache with {len(servers)} servers") logger.debug(f"Updated server cache with {len(servers)} servers")
# Update each server's embed # Variables to track our update statistics
update_count = 0 update_count = 0 # Successful updates
error_count = 0 error_count = 0 # Failed updates
missing_count = 0 missing_count = 0 # Missing embeds
skipped_count = 0 # Servers that didn't need updates
# Process each server we're tracking embeds for
for server_id, location in list(self.embed_locations.items()): for server_id, location in list(self.embed_locations.items()):
# Skip if server no longer exists in Pterodactyl
if server_id not in self.server_cache: if server_id not in self.server_cache:
logger.warning(f"Server {server_id} not found in cache, skipping update") logger.warning(f"Server {server_id} not found in cache, skipping update")
continue continue
@@ -803,38 +817,84 @@ class PterodactylBot(commands.Bot):
server_name = server_data['attributes']['name'] server_name = server_data['attributes']['name']
try: try:
logger.debug(f"Updating status for server {server_name} ({server_id})") logger.debug(f"Checking status for server {server_name} ({server_id})")
# Get current server resource usage
resources = await self.pterodactyl_api.get_server_resources(server_id) resources = await self.pterodactyl_api.get_server_resources(server_id)
embed, view = await self.get_server_status_embed(server_data, resources) current_state = resources.get('attributes', {}).get('current_state', 'offline')
cpu_usage = round(resources.get('attributes', {}).get('resources', {}).get('cpu_absolute', 0), 2)
channel = self.get_channel(int(location['channel_id']))
if not channel: # Retrieve previous recorded state and CPU usage
logger.warning(f"Channel {location['channel_id']} not found for server {server_id}") prev_state, prev_cpu = self.previous_states.get(server_id, (None, 0))
continue
# DECISION LOGIC: Should we update the embed?
needs_update = False
# 1. Check if power state changed (most important)
if current_state != prev_state:
logger.debug(f"Power state changed for {server_name}: {prev_state} -> {current_state}")
needs_update = True
# 2. Check for significant CPU change (only if server is running)
elif current_state == 'running' and abs(cpu_usage - prev_cpu) > 50:
logger.debug(f"Significant CPU change for {server_name}: {prev_cpu}% -> {cpu_usage}%")
needs_update = True
# 3. First time we're seeing this server (initial update)
elif prev_state is None:
logger.debug(f"First check for {server_name}, performing initial update")
needs_update = True
# PERFORM UPDATE IF NEEDED
if needs_update:
# Generate fresh embed and view components
embed, view = await self.get_server_status_embed(server_data, resources)
message = await channel.fetch_message(int(location['message_id'])) # Get the channel where this server's embed lives
await message.edit(embed=embed, view=view) channel = self.get_channel(int(location['channel_id']))
update_count += 1 if not channel:
logger.debug(f"Successfully updated status for {server_name}") logger.warning(f"Channel {location['channel_id']} not found for server {server_id}")
continue
# Fetch and update the existing message
message = await channel.fetch_message(int(location['message_id']))
await message.edit(embed=embed, view=view)
update_count += 1
logger.debug(f"Updated status for {server_name}")
# Update our state tracking with new values
self.previous_states[server_id] = (current_state, cpu_usage)
else:
# No significant changes detected
skipped_count += 1
logger.debug(f"No changes detected for {server_name}, skipping update")
except discord.NotFound: except discord.NotFound:
# Embed message was deleted - clean up our tracking
logger.warning(f"Embed for server {server_id} not found, removing from tracking") logger.warning(f"Embed for server {server_id} not found, removing from tracking")
self.embed_locations.pop(server_id, None) self.embed_locations.pop(server_id, None)
self.previous_states.pop(server_id, None) # Also clean up state tracking
missing_count += 1 missing_count += 1
await self.save_embed_locations() await self.save_embed_locations()
except Exception as e: except Exception as e:
logger.error(f"Failed to update status for server {server_id}: {str(e)}") logger.error(f"Failed to update status for server {server_id}: {str(e)}")
error_count += 1 error_count += 1
await asyncio.sleep(1) # Delay between updates # Small delay between servers to avoid rate limits
await asyncio.sleep(0.5)
# Log summary of this update cycle
logger.info( logger.info(
f"Status update complete: {update_count} updated, " f"Update cycle complete: "
f"{missing_count} missing, {error_count} errors" f"{update_count} updated, "
f"{skipped_count} skipped, "
f"{missing_count} missing, "
f"{error_count} errors"
) )
except Exception as e: except Exception as e:
logger.error(f"Error in update_status task: {str(e)}") logger.error(f"Error in update_status task: {str(e)}")
# If something went wrong, wait before retrying
await asyncio.sleep(5) await asyncio.sleep(5)
@update_status.before_loop @update_status.before_loop