Add: CI/CD testing automation

This commit is contained in:
k.eaven committed 2025-10-23 13:20:39 +00:00
1 parent 55971496c8
commit 08dee3db99
6 files changed
+1075 -141

No files matched your search

+6 -6
View File
@@ -782,9 +782,9 @@ class PterodactylBot(commands.Bot):
# Format limit values - display ∞ for unlimited (0 limit)
def format_limit(value, unit=""):
if value == 0:
return f"{'∞':<8}{unit}" # Lemniscate symbol for infinity
return f"{'∞':<8}]{unit}" # Lemniscate symbol for infinity
else:
return f"{value:<8}{unit}"
return f"{value:<8}]{unit}"
# Get uptime from Pterodactyl API (in milliseconds)
uptime_ms = resource_attributes.get('resources', {}).get('uptime', 0)
@@ -812,9 +812,9 @@ class PterodactylBot(commands.Bot):
# Create dedicated usage text box with current usage and limits in monospace font
usage_text = (
f"```properties\n"
f"CPU: {cpu_usage:>8} / {format_limit(cpu_limit, ' %')}\n"
f"Memory: {memory_usage:>8} / {format_limit(memory_limit, ' MiB')}\n"
f"Disk: {disk_usage:>8} / {format_limit(disk_limit, ' MiB')}\n"
f"CPU : [{cpu_usage:>8} / {format_limit(cpu_limit, ' %')}\n"
f"Memory : [{memory_usage:>8} / {format_limit(memory_limit, ' MiB')}\n"
f"Disk : [{disk_usage:>8} / {format_limit(disk_limit, ' MiB')}\n"
f"```"
)
@@ -1567,4 +1567,4 @@ if __name__ == "__main__":
sys.exit(1) # Exit with error code for crash
finally:
logger.info("Bot shutdown complete")
sys.exit(0) # Explicit clean exit
sys.exit(0) # Explicit clean exit