idk claude

This commit is contained in:
zramsay 2025-06-26 11:42:56 -04:00
parent 84fd528619
commit fc53cae044
2 changed files with 25 additions and 9 deletions

View File

@ -168,8 +168,6 @@ while true; do
--ip "${DEPLOYMENT_IP}" \
--lrn "$LRN" \
--min-required-payment ${MIN_REQUIRED_PAYMENT:-0} \
--atom-payment-address "${ATOM_PAYMENT_ADDRESS:-}" \
--min-atom-payment ${MIN_ATOM_PAYMENT:-1} \
--config-upload-dir "$UPLOAD_DIRECTORY" \
--private-key-file "$OPENPGP_PRIVATE_KEY_FILE" \
--private-key-passphrase "$OPENPGP_PASSPHRASE" \

View File

@ -72,14 +72,18 @@ export class RegHelper {
} else {
const records = await this.registry.getRecordsByIds([id]);
for (const r of records) {
this.cache.set(r.id, r);
if (Array.isArray(r.names)) {
for (const n of r.names) {
this.cache.set(n, r);
// Check if record is not null before accessing its properties
if (r && r.id) {
this.cache.set(r.id, r);
if (Array.isArray(r.names)) {
for (const n of r.names) {
this.cache.set(n, r);
}
}
}
}
return records[0];
// Return the first non-null record, or null if none found
return records.find(r => r !== null) || null;
}
}
@ -144,11 +148,13 @@ export class RegHelper {
const deploymentsByRequest = new Map<string, any>();
for (const d of deployments) {
deploymentsByRequest.set(d.attributes.request, d);
if (d && d.attributes?.request) {
deploymentsByRequest.set(d.attributes.request, d);
}
}
const removalsByRequest = new Map<string, any>();
for (const rr of removalRequests) {
if (rr.attributes.request) {
if (rr && rr.attributes?.request) {
removalsByRequest.set(rr.attributes.request, rr);
}
}
@ -157,9 +163,21 @@ export class RegHelper {
const ret = [];
for (const r of requests) {
// Skip null or invalid requests
if (!r || !r.id || !r.createTime) {
console.warn('Skipping invalid request:', r);
continue;
}
const status = new RequestStatus(r.id, r.createTime);
ret.push(status);
// Skip if application attribute is missing
if (!r.attributes?.application) {
status.lastState = 'ERROR';
continue;
}
const app = await this.getRecord(r.attributes.application);
if (!app) {
status.lastState = 'ERROR';