@shushed/helpers 0.0.70 → 0.0.71
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.
- package/dist/index.js +10 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -859,7 +859,13 @@ var PubSubHelper = class extends Runtime {
|
|
|
859
859
|
return result;
|
|
860
860
|
})());
|
|
861
861
|
}
|
|
862
|
-
return Promise.all(promises)
|
|
862
|
+
return Promise.all(promises).then((x) => {
|
|
863
|
+
this.logging.log(`Published ${x.length} messages. Message Ids: ${x.join(",")}`);
|
|
864
|
+
return x;
|
|
865
|
+
}).catch((err) => {
|
|
866
|
+
this.logging.error(`Failed to publish messages. Error: ${err.message}`);
|
|
867
|
+
throw err;
|
|
868
|
+
});
|
|
863
869
|
}
|
|
864
870
|
async createOrUpdate(opts) {
|
|
865
871
|
this.logging.log("createOrUpdate called with", opts);
|
|
@@ -1237,7 +1243,7 @@ var PubSubHelper = class extends Runtime {
|
|
|
1237
1243
|
const mainSubscriptionName = `${infraPrefix}-${shortHash(this.triggerId)}`;
|
|
1238
1244
|
this.logging.log("isRunning checking the", mainSubscriptionName);
|
|
1239
1245
|
const mainSubscription = mainTopicSubscriptions?.find((x) => this.getNameFromFullyQualifiedName(x.name) === mainSubscriptionName) || null;
|
|
1240
|
-
this.logging.log("isRunning found the", mainSubscription);
|
|
1246
|
+
this.logging.log("isRunning found the", mainSubscription?.name);
|
|
1241
1247
|
const [metadata] = await mainSubscription?.getMetadata() || [null];
|
|
1242
1248
|
this.logging.log("isRunning received metadata", metadata);
|
|
1243
1249
|
return {
|
|
@@ -1257,7 +1263,7 @@ var PubSubHelper = class extends Runtime {
|
|
|
1257
1263
|
const mainSubscriptionName = `${infraPrefix}-${shortHash(this.triggerId)}`;
|
|
1258
1264
|
this.logging.log("isRunning checking the", mainSubscriptionName);
|
|
1259
1265
|
const mainSubscription = mainTopicSubscriptions?.find((x) => this.getNameFromFullyQualifiedName(x.name) === mainSubscriptionName) || null;
|
|
1260
|
-
this.logging.log("pause found the", mainSubscription);
|
|
1266
|
+
this.logging.log("pause found the", mainSubscription?.name);
|
|
1261
1267
|
if (mainSubscription) {
|
|
1262
1268
|
try {
|
|
1263
1269
|
await mainSubscription.setMetadata({
|
|
@@ -1287,7 +1293,7 @@ var PubSubHelper = class extends Runtime {
|
|
|
1287
1293
|
const mainSubscriptionName = `${infraPrefix}-${shortHash(this.triggerId)}`;
|
|
1288
1294
|
this.logging.log("resume checking the", mainSubscriptionName);
|
|
1289
1295
|
const mainSubscription = mainTopicSubscriptions?.find((x) => this.getNameFromFullyQualifiedName(x.name) === mainSubscriptionName) || null;
|
|
1290
|
-
this.logging.log("resume found the", mainSubscription);
|
|
1296
|
+
this.logging.log("resume found the", mainSubscription?.name);
|
|
1291
1297
|
if (mainSubscription) {
|
|
1292
1298
|
try {
|
|
1293
1299
|
this.logging.log("resume setting metadata", {
|