Add a patch to remove SQS functionality
This commit is contained in:
parent
6a030735c9
commit
5e01e54bbb
2 changed files with 32 additions and 1 deletions
32
signal-server-patches/remove-sqs.patch
Normal file
32
signal-server-patches/remove-sqs.patch
Normal file
|
@ -0,0 +1,32 @@
|
|||
diff --git a/src/main/java/org/whispersystems/textsecuregcm/sqs/DirectoryQueue.java b/src/main/java/org/whispersystems/textsecuregcm/sqs/DirectoryQueue.java
|
||||
index bd05995..0d12f57 100644
|
||||
--- a/src/main/java/org/whispersystems/textsecuregcm/sqs/DirectoryQueue.java
|
||||
+++ b/src/main/java/org/whispersystems/textsecuregcm/sqs/DirectoryQueue.java
|
||||
@@ -66,26 +66,7 @@ public class DirectoryQueue {
|
||||
}
|
||||
|
||||
private void sendMessage(String action, String user) {
|
||||
- final Map<String, MessageAttributeValue> messageAttributes = new HashMap<>();
|
||||
- messageAttributes.put("id", new MessageAttributeValue().withDataType("String").withStringValue(user));
|
||||
- messageAttributes.put("action", new MessageAttributeValue().withDataType("String").withStringValue(action));
|
||||
- SendMessageRequest sendMessageRequest = new SendMessageRequest()
|
||||
- .withQueueUrl(queueUrl)
|
||||
- .withMessageBody("-")
|
||||
- .withMessageDeduplicationId(user + action)
|
||||
- .withMessageGroupId(user)
|
||||
- .withMessageAttributes(messageAttributes);
|
||||
- try {
|
||||
- sqs.sendMessage(sendMessageRequest);
|
||||
- } catch (AmazonServiceException ex) {
|
||||
- serviceErrorMeter.mark();
|
||||
- logger.warn("sqs service error: ", ex);
|
||||
- } catch (AmazonClientException ex) {
|
||||
- clientErrorMeter.mark();
|
||||
- logger.warn("sqs client error: ", ex);
|
||||
- } catch (Throwable t) {
|
||||
- logger.warn("sqs unexpected error: ", t);
|
||||
- }
|
||||
+ logger.info("Pretending to send SQS message: " + user + " " + action);
|
||||
}
|
||||
|
||||
}
|
|
@ -5,7 +5,6 @@ WORKDIR /usr/local/src/Signal-Server
|
|||
COPY signal-server-patches /tmp/signal-server-patches
|
||||
RUN /tmp/signal-server-patches/apply-patches.sh
|
||||
RUN mvn install -DskipTests
|
||||
RUN ls -lha target
|
||||
|
||||
FROM debian:9
|
||||
RUN apt-get update && apt-get install -y openjdk-8-jre-headless
|
||||
|
|
Loading…
Reference in a new issue