I use custom code for now:
job = Job(job_id)
result = job.collection.find_one({"_id": ObjectId(self._job_id)},
fields={'result': 1, 'status': 1})
but obviously it could be encapsulated in the Job class.
I looked at the Job code but the constructor parameters are not crystal clear (indeed fetch does not fetch all the job data, especially not the result). Maybe a Job(id, fetch=true) then job.result would do the job? ;-)
I use custom code for now:
but obviously it could be encapsulated in the Job class.
I looked at the Job code but the constructor parameters are not crystal clear (indeed
fetchdoes not fetch all the job data, especially not the result). Maybe aJob(id, fetch=true)thenjob.resultwould do the job? ;-)