@powerhousedao/network-admin 0.0.29 → 0.0.30
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../processors/workstreams/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAEnI,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,aAAa,CAAC;AAGtC,qBAAa,oBAAqB,SAAQ,qBAAqB,CAAC,EAAE,CAAC;WACjD,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAKtC,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B,SAAS,CACtB,OAAO,EAAE,yBAAyB,EAAE,GACnC,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../processors/workstreams/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAEnI,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,aAAa,CAAC;AAGtC,qBAAa,oBAAqB,SAAQ,qBAAqB,CAAC,EAAE,CAAC;WACjD,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAKtC,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B,SAAS,CACtB,OAAO,EAAE,yBAAyB,EAAE,GACnC,OAAO,CAAC,IAAI,CAAC;IAwCV,YAAY;IAelB,aAAa,GAAU,QAAQ,yBAAyB,mBA8BvD;IAED,iCAAiC,GAAU,QAAQ,yBAAyB,EAAE,WAAW,uBAAuB,mBA2C/G;IAED,yBAAyB,GAAU,QAAQ,yBAAyB,EAAE,WAAW,uBAAuB,mBAwCvG;IAED,gBAAgB,GAAU,QAAQ,yBAAyB,EAAE,WAAW,uBAAuB,mBAyC9F;CACF"}
|
|
@@ -42,7 +42,21 @@ export class WorkstreamsProcessor extends RelationalDbProcessor {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
async onDisconnect() {
|
|
45
|
+
async onDisconnect() {
|
|
46
|
+
// Clean up all workstreams for this drive's namespace when the drive is deleted
|
|
47
|
+
// Since the database is already namespaced per drive, we delete all rows
|
|
48
|
+
// This ensures no orphaned data remains after drive deletion
|
|
49
|
+
try {
|
|
50
|
+
await this.relationalDb
|
|
51
|
+
.deleteFrom("workstreams")
|
|
52
|
+
.execute();
|
|
53
|
+
console.log(`Cleaned up workstreams for namespace: ${this.namespace}`);
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
console.error(`Error cleaning up workstreams for namespace ${this.namespace}:`, error);
|
|
57
|
+
// Don't throw - cleanup errors shouldn't prevent drive deletion
|
|
58
|
+
}
|
|
59
|
+
}
|
|
46
60
|
setWorkstream = async (strand) => {
|
|
47
61
|
const docId = strand.documentId;
|
|
48
62
|
const existingWorkstreamPhids = await this.relationalDb
|