docs: Enhance development setup documentation and update environment variable validation
- Added a new section in CURRENT_STATUS.md detailing prerequisites and quick start instructions for development setup. - Updated environment variable validation to include defaults for missing variables in env.ts. - Improved error handling in errorHandler.ts for better validation feedback. - Made various code adjustments across services to ensure robustness and clarity.
This commit is contained in:
@@ -30,7 +30,7 @@ export async function addToDLQ(
|
||||
* Get messages from DLQ for retry
|
||||
*/
|
||||
export async function getDLQMessages(queue: string, limit = 10): Promise<DeadLetterMessage[]> {
|
||||
const result = await query<DeadLetterMessage>(
|
||||
const result = await query<any>(
|
||||
`SELECT * FROM dead_letter_queue
|
||||
WHERE queue = $1 AND retry_count < 3
|
||||
ORDER BY created_at ASC
|
||||
@@ -38,13 +38,13 @@ export async function getDLQMessages(queue: string, limit = 10): Promise<DeadLet
|
||||
[queue, limit]
|
||||
);
|
||||
|
||||
return result.map((row) => ({
|
||||
return result.map((row: any) => ({
|
||||
messageId: row.message_id,
|
||||
originalQueue: row.queue,
|
||||
payload: typeof row.payload === "string" ? JSON.parse(row.payload) : row.payload,
|
||||
error: row.error,
|
||||
retryCount: row.retry_count,
|
||||
createdAt: row.created_at,
|
||||
createdAt: row.created_at ? (row.created_at instanceof Date ? row.created_at.toISOString() : String(row.created_at)) : new Date().toISOString(),
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user