コード例 #1
0
ファイル: mongo.py プロジェクト: bbglab/wok
	def load_workitem_result(self, case_name, task_cname, index):
		workitem_result_coll = self.__workitem_result_collection(case_name)
		result = workitem_result_coll.find_one({"_id" : "{}-{:08}".format(task_cname, index)})
		if result is not None:
			return TaskResult.from_native(result)
		else:
			return TaskResult()
コード例 #2
0
ファイル: mongo.py プロジェクト: philloidin/wok
 def load_workitem_result(self, case_name, task_cname, index):
     workitem_result_coll = self.__workitem_result_collection(case_name)
     result = workitem_result_coll.find_one(
         {"_id": "{}-{:08}".format(task_cname, index)})
     if result is not None:
         return TaskResult.from_native(result)
     else:
         return TaskResult()
コード例 #3
0
ファイル: files.py プロジェクト: philloidin/wok
	def load_workitem_result(self, case_name, task_cname, index):
		workitems_path = self.__workitems_path(case_name, task_cname)
		file_name = "{:08}-result.json".format(index)
		try:
			with open(os.path.join(workitems_path, file_name), "r") as f:
				return TaskResult.from_native(json.load(f))
		except:
			return TaskResult()