@volter/supercode-teams 0.2.110 → 0.2.111
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/worker/index.mjs +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/supercode-teams",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.111",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A machine daemon serving this machine's doors, and a local or remote Teams server for shared session discovery, OpenTelemetry ingestion and access to enrolled machines.",
|
|
6
6
|
"license": "MIT",
|
package/worker/index.mjs
CHANGED
|
@@ -90,6 +90,8 @@ export class TeamsServer extends DurableObject {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
this.handler = createHttpHandler(this.api);
|
|
93
|
+
// Retention must also run after a restart: a full object may have failed to re-arm its alarm.
|
|
94
|
+
if (this.api.serverId) await maintain(this.api).catch(error => console.error(`maintain startup: ${error.message}`));
|
|
93
95
|
if (!(await ctx.storage.getAlarm())) await ctx.storage.setAlarm(Date.now() + MAINTAIN_MS);
|
|
94
96
|
});
|
|
95
97
|
}
|
|
@@ -118,7 +120,7 @@ export class TeamsServer extends DurableObject {
|
|
|
118
120
|
|
|
119
121
|
async alarm() {
|
|
120
122
|
await this.ready;
|
|
121
|
-
const done = this.api.serverId ? await maintain(this.api).catch(()
|
|
123
|
+
const done = this.api.serverId ? await maintain(this.api).catch(error => { console.error(`maintain failed: ${error.message}`); return null; }) : null;
|
|
122
124
|
// The database's size on every full pass, where `wrangler tail` reads it.
|
|
123
125
|
if (!done?.backlog) {
|
|
124
126
|
// What grows: free pages (space deletes left for reuse), and each busy table's newest rowid (its insert rate).
|