def update_available(self):
"""Whether an update is available.
.. versionadded:: 1.9
See :ref:`manual-updates` in the :ref:`user-manual` for detailed
information on how to enable your workflow to update itself.
:returns: ``True`` if an update is available, else ``False``
"""
# Create a new workflow object to ensure standard serialiser
# is used (update.py is called without the user's settings)
update_data = Workflow().cached_data('__workflow_update_status',
max_age=0)
self.logger.debug('update_data : {0}'.format(update_data))
if not update_data or not update_data.get('available'):
return False
return update_data['available']
评论列表
文章目录