I am using python client
I am trying to find the details of the instance the worker is supposed to process
Looking at a Java example - I find the following methods
job.getWorkflowInstanceKey()
Instant.ofEpochMilli(job.getDeadline())
job.getCustomHeaders()
job.getVariables()
what are the equivalent python functions - how can I get the properties of the instance
Hi @S.Gopalakrishnan4, it looks like the job variable is a dictionary, from the Python client README. Here is the relevant part of the example from there:
for response in activate_jobs_response:
for job in response.jobs:
try:
print(job.variables)
stub.CompleteJob(gateway_pb2.CompleteJobRequest(jobKey=job.key, variables=json.dumps({})))
logging.info('Job Completed')
except Exception as e:
stub.FailJob(gateway_pb2.FailJobRequest(jobKey=job.key))
logging.info('Job Failed {}'.format(e))