def set_recipe(self, recipe, start_time):
"""
Set the currently running recipe... this is the CouchDB recipe document.
"""
with self.lock:
if self.__recipe is not None:
raise RecipeRunningError("Recipe is already running")
# Set recipe and time
self.__recipe = recipe
self.__start_time = start_time
if self.__start_time is None:
self.__start_time = rospy.get_time()
rospy.set_param(params.CURRENT_RECIPE, recipe["_id"])
rospy.set_param(params.CURRENT_RECIPE_START, self.__start_time )
return self
评论列表
文章目录