Fix preview deicison-maker; speed-up tests

This commit is contained in:
Matej Bačo
2025-03-13 10:33:28 +01:00
parent ee1ee7ecfe
commit acb9548e85
4 changed files with 14 additions and 23 deletions
@@ -794,9 +794,10 @@ class Builds extends Action
$config['sleep'] = 3000; // 3 seconds
// Makes tests much faster
$isDevelopment = System::getEnv('_APP_ENV', 'development') === 'development';
if ($isDevelopment) {
$config['timeout'] = 10000; // 10 seconds
$config['sleep'] = 0; // Override this when running Screenshot.php task
}
$response = $client->fetch(
@@ -37,6 +37,8 @@ class Screenshot extends Action
throw new \Exception("Template {$templateId} not found. Find correct ID in app/config/templates/site.php");
}
Console::warning('Make sure to override $config[\'sleep\'] in Builds.php worker to high number, like 10000 (10 seconds)');
Console::info("Found: " . $template['name']);
$client = new Client();