Browse Source

Remove log data.

master
t123yh 7 years ago
parent
commit
df71cddb03
  1. 2
      src/frontend-syzoj/daemonRouter.ts
  2. 2
      src/frontend-syzoj/rmq.ts
  3. 2
      src/frontend-syzoj/socketio.ts
  4. 2
      src/rmq-common.ts

2
src/frontend-syzoj/daemonRouter.ts

@ -26,7 +26,7 @@ taskRouter.put('/task', async (req, res) => {
return res.sendStatus(400); return res.sendStatus(400);
} }
try { try {
winston.info("Got task: " + JSON.stringify(req.body)); winston.info("Got task: " + JSON.stringify(req.body.content.taskId));
const task = req.body as JudgeTask; const task = req.body as JudgeTask;
let extraData: Buffer = null; let extraData: Buffer = null;
if (task.extraFileLocation != null) { if (task.extraFileLocation != null) {

2
src/frontend-syzoj/rmq.ts

@ -34,7 +34,7 @@ async function newChannel(): Promise<amqp.Channel> {
} }
export function pushTask(task: any) { export function pushTask(task: any) {
winston.info("Got task", task); winston.info("Got task, pushing to queue");
publicChannel.sendToQueue(rmqCommon.judgeQueueName, msgpack.encode(task), { publicChannel.sendToQueue(rmqCommon.judgeQueueName, msgpack.encode(task), {
priority: task.content.priority priority: task.content.priority
}); });

2
src/frontend-syzoj/socketio.ts

@ -265,7 +265,7 @@ export function updateCompileStatus(taskId: string, result: CompilationResult) {
} }
export function updateProgress(taskId: string, data: OverallResult) { export function updateProgress(taskId: string, data: OverallResult) {
winston.verbose(`Updating progress for #${taskId}, data: ${JSON.stringify(data)}`); winston.verbose(`Updating progress for #${taskId}`);
currentJudgeList[taskId] = data; currentJudgeList[taskId] = data;
forAllClients(detailProgressNamespace, taskId, (client) => { forAllClients(detailProgressNamespace, taskId, (client) => {

2
src/rmq-common.ts

@ -39,7 +39,7 @@ export async function waitForTask<T>(conn: amqp.Connection, queueName: string, p
channel.prefetch(1); channel.prefetch(1);
await channel.consume(queueName, (msg: amqp.Message) => { await channel.consume(queueName, (msg: amqp.Message) => {
const data = msgpack.decode(msg.content) as T; const data = msgpack.decode(msg.content) as T;
winston.verbose('Got task', data); winston.verbose('Got task');
handle(data).then(async () => { handle(data).then(async () => {
channel.ack(msg); channel.ack(msg);

Loading…
Cancel
Save