def rst_id(self, rst_id):
"""
Sets the run status of this node.
:param int rst_id: The new run status for this node.
"""
old_rst_id = self.rst_id
self.__rst_id_wrapper(rst_id)
# Update the start datetime of this node.
if rst_id == C.ENK_RST_ID_RUNNING:
if not self._rnd_datetime_start:
self._rnd_datetime_start = strftime("%Y-%m-%d %H:%M:%S", localtime())
self._rnd_datetime_stop = None
# Update the stop datetime of this node.
if old_rst_id != rst_id and rst_id in (C.ENK_RST_ID_COMPLETED, C.ENK_RST_ID_ERROR):
self._rnd_datetime_stop = strftime("%Y-%m-%d %H:%M:%S", localtime())
# ------------------------------------------------------------------------------------------------------------------
评论列表
文章目录