Initial Release

This commit is contained in:
Tola Leng
2025-05-09 21:28:07 +07:00
commit 0c6cd18e6f
244 changed files with 50633 additions and 0 deletions
@@ -0,0 +1,24 @@
import { pb } from '@/lib/pocketbase';
import { startMonitoringService } from './startMonitoring';
/**
* Start monitoring for all active services
*/
export async function startAllActiveServices(): Promise<void> {
try {
// Get all services that are not paused
const result = await pb.collection('services').getList(1, 100, {
filter: 'status != "paused"'
});
console.log(`Starting monitoring for ${result.items.length} active services`);
// Start monitoring each active service
for (const service of result.items) {
await startMonitoringService(service.id);
}
} catch (error) {
console.error("Error starting all active services:", error);
}
}