|
@@ -5,6 +5,7 @@ import com.aliyun.fc.runtime.PojoRequestHandler;
|
|
|
import com.rabbitmq.client.Channel;
|
|
import com.rabbitmq.client.Channel;
|
|
|
import com.rabbitmq.client.Connection;
|
|
import com.rabbitmq.client.Connection;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
+import net.yaoyi.pipeline.common.JacksonUtils;
|
|
|
import okhttp3.*;
|
|
import okhttp3.*;
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
@@ -18,7 +19,7 @@ import java.util.concurrent.TimeUnit;
|
|
|
@Slf4j
|
|
@Slf4j
|
|
|
public class RabbitConsumer implements PojoRequestHandler<Map<String, Object>, Void> {
|
|
public class RabbitConsumer implements PojoRequestHandler<Map<String, Object>, Void> {
|
|
|
|
|
|
|
|
- private static final String QUEUE_NAME = "vector.search.task.img.dul.check.queue";
|
|
|
|
|
|
|
+ private static final String QUEUE_NAME = "yyc_algorithm.task_img_dup.submit.queue";
|
|
|
|
|
|
|
|
private static final String PIPELINE_API = "http://1861991840278303.eventbridge.cn-beijing.aliyuncs.com/webhook/putEvents?token=62ed79329bb74d0d8ede5cc5d0487a45897a6ff99f5d4d61946daf9f6e9c7fbc766b9d55ef2241edb2c2cb3aee651ac101409d2783f341aa8e8d27fdb9869d86";
|
|
private static final String PIPELINE_API = "http://1861991840278303.eventbridge.cn-beijing.aliyuncs.com/webhook/putEvents?token=62ed79329bb74d0d8ede5cc5d0487a45897a6ff99f5d4d61946daf9f6e9c7fbc766b9d55ef2241edb2c2cb3aee651ac101409d2783f341aa8e8d27fdb9869d86";
|
|
|
|
|
|
|
@@ -31,7 +32,7 @@ public class RabbitConsumer implements PojoRequestHandler<Map<String, Object>, V
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public Void handleRequest(Map<String, Object> input, Context context) {
|
|
public Void handleRequest(Map<String, Object> input, Context context) {
|
|
|
- log.info("函数计算启动, Request ID: {}", context.getRequestId());
|
|
|
|
|
|
|
+ log.info("函数计算启动, Request ID: {}, data:{}", context.getRequestId(), JacksonUtils.toJson(input));
|
|
|
|
|
|
|
|
try (Connection connection = RabbitMQHelper.createConnection();
|
|
try (Connection connection = RabbitMQHelper.createConnection();
|
|
|
Channel channel = RabbitMQHelper.createChannel(connection, QUEUE_NAME)) {
|
|
Channel channel = RabbitMQHelper.createChannel(connection, QUEUE_NAME)) {
|