Run asynchronous object controllers from accepted graph jobs

This commit is contained in:
Timothy J. Aveni
2026-09-20 21:31:56 -07:00
parent 1dadc642d1
commit d638a9ed28
4 changed files with 33 additions and 0 deletions
+12
View File
@@ -10,6 +10,8 @@ workspace AsyncObjects id "workspace:async" revision "workspace:async@1" commit
private state Content id "async:state:content" on Document : string policy register;
private state Summary id "async:state:summary" on Document : record { text: string; basedOn: string; }
policy register default { "text": "", "basedOn": "" };
private state PendingJob id "async:state:pending-job" on Document : optional<record { operationId: string; }>
policy register default null;
private edge ProviderLink id "async:provider-link" {
atom Document projection provider id "async:provider-projection" exactly-one public-traversal;
atom Provider projection documents id "async:documents-projection" many-unique;
@@ -18,12 +20,22 @@ workspace AsyncObjects id "workspace:async" revision "workspace:async@1" commit
bind content.get to state Content.read;
bind summary.get to state Summary.read;
bind summary.set to state Summary.write;
bind pendingJob.get to state PendingJob.read;
bind pendingJob.set to state PendingJob.write;
bind recordSummary.call to package ControllerRuntime.finish with {
job to state PendingJob;
summary to state Summary;
};
}
conform Document as SummaryController id "async:document:controller" {
bind refresh.call to package ControllerRuntime.refresh with {
document to interface DocumentData;
provider to interface Summarizer via edge ProviderLink.provider;
};
bind processPending.call to package ControllerRuntime.runPending with {
document to interface DocumentData;
provider to interface Summarizer via edge ProviderLink.provider;
};
}
conform Provider as Summarizer id "async:provider:summarizer" {
bind summarize.call to package ProviderRuntime.summarize;