fix the dang integration tests
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 29m45s
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 29m45s
This commit is contained in:
@@ -796,6 +796,7 @@ async enqueueFlyerProcessing(
|
||||
|
||||
const baseUrl = baseUrlOverride || getBaseUrl(logger);
|
||||
// --- START DEBUGGING ---
|
||||
console.error(`[DEBUG] aiService.enqueueFlyerProcessing resolved baseUrl: "${baseUrl}"`);
|
||||
// Add a fail-fast check to ensure the baseUrl is a valid URL before enqueuing.
|
||||
// This will make the test fail at the upload step if the URL is the problem,
|
||||
// which is easier to debug than a worker failure.
|
||||
|
||||
@@ -103,7 +103,11 @@ export class FlyerProcessingService {
|
||||
// The main processed image path is already in `allFilePaths` via `createdImagePaths`.
|
||||
allFilePaths.push(path.join(iconsDir, iconFileName));
|
||||
|
||||
console.error('[DEBUG] FlyerProcessingService calling transformer with:', { originalFileName: job.data.originalFileName, imageFileName, iconFileName, checksum: job.data.checksum, baseUrl: job.data.baseUrl });
|
||||
// Ensure we have a valid base URL, preferring the one from the job data.
|
||||
// This is critical for workers where process.env.FRONTEND_URL might be undefined.
|
||||
const baseUrl = job.data.baseUrl || process.env.FRONTEND_URL || 'http://localhost:3000';
|
||||
console.error(`[DEBUG] FlyerProcessingService resolved baseUrl: "${baseUrl}" (job.data.baseUrl: "${job.data.baseUrl}", env.FRONTEND_URL: "${process.env.FRONTEND_URL}")`);
|
||||
console.error('[DEBUG] FlyerProcessingService calling transformer with:', { originalFileName: job.data.originalFileName, imageFileName, iconFileName, checksum: job.data.checksum, baseUrl });
|
||||
|
||||
const { flyerData, itemsForDb } = await this.transformer.transform(
|
||||
aiResult,
|
||||
@@ -113,7 +117,7 @@ export class FlyerProcessingService {
|
||||
job.data.checksum,
|
||||
job.data.userId,
|
||||
logger,
|
||||
job.data.baseUrl,
|
||||
baseUrl,
|
||||
);
|
||||
console.error('[DEBUG] FlyerProcessingService transformer output URLs:', { imageUrl: flyerData.image_url, iconUrl: flyerData.icon_url });
|
||||
stages[2].status = 'completed';
|
||||
|
||||
Reference in New Issue
Block a user