Skip to content

Commit 45877f4

Browse files
committed
use Buffer.from() instead of new Buffer()
1 parent 63d536f commit 45877f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rabbitmq/jobqueue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ amqp.connect(`amqp://${config.AMQP.USER}:${config.AMQP.PASS}@${config.AMQP.HOST}
5555
* @returns {boolean} true if job was put on queue successfully
5656
*/
5757
function queueJob(job: JudgeJob) {
58-
return jobChannel.sendToQueue(jobQ, new Buffer(JSON.stringify(job)), {persistent: true})
58+
return jobChannel.sendToQueue(jobQ, Buffer.from(JSON.stringify(job)), {persistent: true})
5959
}
6060
export {
6161
queueJob,

0 commit comments

Comments
 (0)