date added
parent
8f629b2089
commit
5518d0c975
|
@ -40,8 +40,10 @@ function getClient(region) {
|
|||
if (!clients[region]) {
|
||||
clients[region] = new SQSClient({
|
||||
region,
|
||||
credentials: {
|
||||
accessKeyId: process.env.AWS_ACCESS_KEY,
|
||||
secretAccessKey: process.env.AWS_SECRET_KEY,
|
||||
},
|
||||
});
|
||||
}
|
||||
return clients[region];
|
||||
|
@ -208,7 +210,9 @@ async function processQueue(queue) {
|
|||
}
|
||||
|
||||
console.log(
|
||||
`[${queue.region}] ${queue.url} -> processed ${traffics.length} messages`
|
||||
`[${queue.region}] ${queue.url} -> processed ${traffics.length} messages ${DateTime.now().toFormat(
|
||||
"yyyy-MM-dd HH:mm:ss"
|
||||
)}`
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -227,7 +231,7 @@ async function runLoop() {
|
|||
try {
|
||||
await main(); // wait for current execution to finish
|
||||
} catch (err) {
|
||||
console.error('Error in main():', err);
|
||||
console.error("Error in main():", err);
|
||||
}
|
||||
|
||||
// Wait 5 seconds before running again
|
||||
|
|
Loading…
Reference in New Issue