feat(gtm-architect): Finalize migration and implement web scraping

- Refactors the gtm-architect Dockerfile for a flat, more efficient build process.
- Implements robust web scraping via BeautifulSoup in helpers.py for URL analysis in phase1.
- Makes shared library imports (gspread, pandas, etc.) in helpers.py optional to prevent ModuleNotFoundErrors in microservices.
- Implements the main execution logic in the orchestrator to handle command-line arguments.
- Updates documentation to reflect the new architecture, scraping feature, and dependency handling.
This commit is contained in:
2026-01-03 08:43:53 +00:00
parent 2663d85ae7
commit 302a211239
7 changed files with 282 additions and 64 deletions

View File

@@ -4,6 +4,8 @@ const cors = require('cors');
const path = require('path');
const fs = require('fs');
const VERSION = "1.0.0"; // Added for debugging and tracking
const app = express();
const port = 3005;
@@ -33,7 +35,7 @@ app.post('/api/run', (req, res) => {
const payloadString = JSON.stringify(payload);
const payloadBase64 = Buffer.from(payloadString).toString('base64');
const pythonScriptPath = path.join(__dirname, '../gtm_architect_orchestrator.py');
const pythonScriptPath = path.join(__dirname, 'gtm_architect_orchestrator.py');
const pythonProcess = spawn('python3', [
pythonScriptPath,
'--mode', mode,
@@ -84,6 +86,9 @@ if (fs.existsSync(staticPath)) {
}
app.listen(port, () => {
console.log(`Server listening on port ${port}`);
});
const server = app.listen(port, () => {
console.log(`Server listening on port ${port} (Version: ${VERSION})`);
});
server.setTimeout(600000); // 10 minutes
server.keepAliveTimeout = 610000;
server.headersTimeout = 620000;