@seidor-cloud-produtos/orbit-backend-lib 2.0.66 → 2.0.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -124,13 +124,14 @@ class AmqpQueue {
|
|
|
124
124
|
buildedConfigs.expiration = fourTeenDaysExpiration;
|
|
125
125
|
}
|
|
126
126
|
try {
|
|
127
|
-
const promises = [
|
|
128
|
-
this.publishToServer(exchangeName, domainEvent, buildedConfigs),
|
|
129
|
-
];
|
|
127
|
+
const promises = [];
|
|
130
128
|
if (this.socketOptions?.timeoutSeconds) {
|
|
129
|
+
console.log('pushei', this.socketOptions.timeoutSeconds);
|
|
131
130
|
promises.push(AmqpQueue.delayOperation(this.socketOptions.timeoutSeconds));
|
|
132
131
|
}
|
|
132
|
+
promises.push(this.publishToServer(exchangeName, domainEvent, buildedConfigs));
|
|
133
133
|
const result = await Promise.race(promises);
|
|
134
|
+
console.log(result);
|
|
134
135
|
if (result instanceof Error) {
|
|
135
136
|
throw result;
|
|
136
137
|
}
|