
Aslak Kjølås-Sæverud
AslakKS
Recent Forum Posts
PDG Services: Writing to work item attributes? March 28, 2023, 6:30 a.m.
Hi,
I was wondering if there was any way to send work item attributes back when cooking with a service.
What I'm trying to do is cache some geometry + store some stats about that cache as PDG attributes.
When using out of process cooking there is this (from docs):
Is there a equivalent to this using services?
I was wondering if there was any way to send work item attributes back when cooking with a service.
What I'm trying to do is cache some geometry + store some stats about that cache as PDG attributes.
When using out of process cooking there is this (from docs):
from pdgjson import WorkItem # create WorkItem object from the data serialized to `$PDG_TEMP/data/workitem.json` work_item = WorkItem.fromJobEnvironment() # read attrib values from the running work item val = work_item.attribValue('myintattrib') # Send data back to PDG work item via network calls work_item.setStringAttrib('runtime_attrib', 'test value', 0) work_item.addOutputFile('/tmp/myoutput.txt')
Is there a equivalent to this using services?
Day 10 | Nature | Wave | Image March 11, 2023, 11:35 a.m.
- Right -
Day 9 | Nature | River | Image March 10, 2023, 6:21 a.m.
- roll -