EverydayTech Platform - Developer Reference
Complete Source Code Documentation - All Applications
Loading...
Searching...
No Matches
trigger-tenant-sync.js
Go to the documentation of this file.
1/**
2 * Manually trigger tenant-meshcentral sync
3 * Creates device groups for all tenants
4 */
5
6// Set delay BEFORE requiring the module (5 seconds for manual execution)
7process.env.TENANT_SYNC_DELAY = process.env.TENANT_SYNC_DELAY || '5000';
8
9const { runStartupSync } = require('../startup/tenant-meshcentral-sync');
10
11console.log('šŸ”„ Manually triggering tenant-MeshCentral sync...\n');
12
13runStartupSync()
14 .then(() => {
15 console.log('\nāœ… Sync complete!');
16 process.exit(0);
17 })
18 .catch((err) => {
19 console.error('\nāŒ Sync failed:', err);
20 process.exit(1);
21 });