feat(pipeline-task):通过任务完成消息更新数据库中的任务信息。
This commit is contained in:
@@ -29,12 +29,13 @@ export class PipelineTaskFlushService {
|
||||
queue: getSelfInstanceQueueKey(QUEUE_WRITE_PIPELINE_TASK_LOG),
|
||||
queueOptions: {
|
||||
autoDelete: true,
|
||||
durable: true,
|
||||
},
|
||||
})
|
||||
async write(message: PipelineTaskEvent) {
|
||||
await this.redisService
|
||||
.getClient()
|
||||
.rpush(this.getKey(message.taskId), JSON.stringify(message));
|
||||
const client = this.redisService.getClient();
|
||||
await client.rpush(this.getKey(message.taskId), JSON.stringify(message));
|
||||
await client.expire(this.getKey(message.taskId), 600); // ten minutes
|
||||
if (isNil(message.unit) && terminalTaskStatuses.includes(message.status)) {
|
||||
this.amqpConnection.request({
|
||||
exchange: EXCHANGE_PIPELINE_TASK_TOPIC,
|
||||
|
Reference in New Issue
Block a user