feat(source2): push all latest files - device labeling, help system, proxy docs, database isolation fix
- Added DOKUMENTASI-FILTER-PER-SITE.md (site isolation docs) - Fixed start-with-env.js to force-load .env.production - Fixed MONGODB_URI hostname from mongodb-netify to mongodb.prod.proit.id - Updated .gitignore to exclude sensitive scripts and credential files - Minor UI and labeling improvements
This commit is contained in:
1 parent
a403f752f3
commit
dd4c8f6876
385 files changed
+31016
-8268
No files matched your search
@@ -0,0 +1,28 @@
|
||||
|
||||
if (typeof globalThis.crypto === 'undefined') {
|
||||
globalThis.crypto = require('crypto');
|
||||
}
|
||||
const mongoose = require('mongoose');
|
||||
const path = require('path');
|
||||
require('dotenv').config({ path: path.join(__dirname, '..', '.env.production') });
|
||||
|
||||
const MONGODB_URI = process.env.MONGODB_URI;
|
||||
const { collectAllAgents } = require('../proxy/collector');
|
||||
|
||||
async function run() {
|
||||
console.log('[Trigger] Connecting to MongoDB...');
|
||||
await mongoose.connect(MONGODB_URI);
|
||||
console.log('[Trigger] Connected. Starting collection cycle...');
|
||||
try {
|
||||
const res = await collectAllAgents();
|
||||
console.log('[Trigger] Collection cycle finished successfully:', res);
|
||||
} catch (err) {
|
||||
console.error('[Trigger] Collection cycle failed:', err);
|
||||
} finally {
|
||||
await mongoose.connection.close();
|
||||
console.log('[Trigger] MongoDB connection closed.');
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
|
||||
Reference in new issue
Block a user