@gholl-studio/pier-connector 0.2.23 → 0.2.25
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/package.json +1 -1
- package/src/index.js +4 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gholl-studio/pier-connector",
|
|
3
3
|
"author": "gholl",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.25",
|
|
5
5
|
"description": "OpenClaw plugin that connects to the Pier job marketplace. Automatically fetches, executes, and reports distributed tasks for rewards.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "src/index.js",
|
package/src/index.js
CHANGED
|
@@ -265,7 +265,7 @@ export default function register(api) {
|
|
|
265
265
|
try {
|
|
266
266
|
let consumer;
|
|
267
267
|
try {
|
|
268
|
-
consumer = await this.
|
|
268
|
+
consumer = await this.js.consumers.get(streamName, durableName);
|
|
269
269
|
} catch {
|
|
270
270
|
await this.jsm.consumers.add(streamName, {
|
|
271
271
|
durable_name: durableName,
|
|
@@ -274,7 +274,7 @@ export default function register(api) {
|
|
|
274
274
|
ack_policy: AckPolicy.Explicit,
|
|
275
275
|
ack_wait: 1000 * 60 * 60,
|
|
276
276
|
});
|
|
277
|
-
consumer = await this.
|
|
277
|
+
consumer = await this.js.consumers.get(streamName, durableName);
|
|
278
278
|
}
|
|
279
279
|
|
|
280
280
|
const iter = await consumer.consume();
|
|
@@ -526,8 +526,8 @@ export default function register(api) {
|
|
|
526
526
|
if (!natsConfig) throw new Error('No NATS config');
|
|
527
527
|
|
|
528
528
|
this.nc = await createNatsConnection(natsConfig.url || this.config.natsUrl, logger);
|
|
529
|
-
this.js = this.nc
|
|
530
|
-
this.jsm = await this.nc
|
|
529
|
+
this.js = jetstream(this.nc);
|
|
530
|
+
this.jsm = await jetstreamManager(this.nc);
|
|
531
531
|
this.connectionStatus = 'connected';
|
|
532
532
|
this.connectedAt = new Date();
|
|
533
533
|
|