Skip to content

Commit

Permalink
new line
Browse files Browse the repository at this point in the history
  • Loading branch information
gotham13 committed Apr 8, 2024
1 parent 2cd7557 commit 1b3b62d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/utils/queue-batch-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import Logstash from "./logstash";

export default async (queue: Queue, logstash: Logstash) => {
const jobs = await queue.getJobs(undefined, 0, -1, true);
let jobData = "";
let jobData = [];
for (let job of jobs) {
jobData = jobData + JSON.stringify(job.data) + "\r\n";
jobData.push(job.data);
}
if (jobData.length > 0) {
if(jobData.length>0) {
logstash.log(jobData, async () => {
for (let job of jobs) {
await job.remove();
}
});
for (let job of jobs) {
await job.remove();
}
});
}
};

0 comments on commit 1b3b62d

Please sign in to comment.