Skip to content

Commit 1b78c21

Browse files
sjuarezBeta Bot
authored andcommitted
Cherry pick branch 'genexuslabs:AzureFunctions' into beta
1 parent 8e9db20 commit 1b78c21

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

gxazureserverless/src/main/java/com/genexus/cloud/serverless/azure/handler/AzureQueueHandler.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,7 @@ public void run(
3030
EventMessage msg = new EventMessage();
3131
msg.setMessageId(id);
3232
msg.setMessageSourceType(EventMessageSourceType.QUEUE_MESSAGE);
33-
try {
34-
String sanitizedTime = insertionTime.replace("\"", "");
35-
if (!sanitizedTime.endsWith("Z") && !sanitizedTime.matches(".*[+-]\\d{2}:\\d{2}$")) {
36-
sanitizedTime += "Z";
37-
}
38-
Instant instant = Instant.from(Instant.parse(sanitizedTime));
39-
msg.setMessageDate(Date.from(instant));
40-
}
41-
catch (Exception exception)
42-
{
43-
context.getLogger().severe(exception.toString());
44-
}
33+
msg.setMessageDate(Date.from(Instant.now()));
4534
msg.setMessageData(message);
4635
List<EventMessageProperty> msgAtts = msg.getMessageProperties();
4736
msgAtts.add(new EventMessageProperty("Id", id));

gxazureserverless/src/main/java/com/genexus/cloud/serverless/helpers/ServiceBusSingleMessageProcessor.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,7 @@ public ServiceBusProcessedMessage processQueueMessage(GXProcedureExecutor execut
1818
EventMessage msg = new EventMessage();
1919
msg.setMessageId(messageId);
2020
msg.setMessageSourceType(EventMessageSourceType.SERVICE_BUS_MESSAGE);
21-
try {
22-
String sanitizedTime = enqueuedTimeUtc.replace("\"", "");
23-
if (!sanitizedTime.endsWith("Z") && !sanitizedTime.matches(".*[+-]\\d{2}:\\d{2}$")) {
24-
sanitizedTime += "Z";
25-
}
26-
Instant instant = Instant.from(Instant.parse(sanitizedTime));
27-
msg.setMessageDate(Date.from(instant));
28-
}
29-
catch (Exception exception)
30-
{
31-
context.getLogger().severe(exception.toString());
32-
}
21+
msg.setMessageDate(Date.from(Instant.now()));
3322
msg.setMessageData(message);
3423
List<EventMessageProperty> msgProperties = msg.getMessageProperties();
3524
msgProperties.add(new EventMessageProperty("Id", messageId));

0 commit comments

Comments
 (0)