Update api route timeout, this is resource intensive task, find a better way to handle this

This commit is contained in:
Aarish
2025-05-23 00:42:22 -05:00
parent 365c599cd3
commit b194ff6924

View File

@@ -9,12 +9,13 @@ var router = express.Router();
* // TODO: Crawl site map and queue all pages * // TODO: Crawl site map and queue all pages
*/ */
router.get('/test/accessibility/:domain', function(req, res) { router.get('/test/accessibility/:domain', function(req, res) {
req.setTimeout(5000000000000);
const domain = req.params.domain; // Get the domain from the request parameters const domain = req.params.domain; // Get the domain from the request parameters
const playwrightService = new PlaywrightService(domain); const playwrightService = new PlaywrightService(domain);
// Call the runAccessibilityTest method // Call the runAccessibilityTest method
playwrightService.runAccessibilityTest().then(results => { playwrightService.getAccessibilityResults().then(results => {
// Send the results as a JSON response // Send the results as a JSON response
res.json(results); res.json(results);
}).catch(err => { }).catch(err => {