Moved definition

This commit is contained in:
allegroai 2019-07-09 01:52:06 +03:00
parent d9d5c6cb3c
commit c4c37c5cef
2 changed files with 3 additions and 2 deletions

View File

@ -40,6 +40,7 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
"""
_anonymous_dataview_id = '__anonymous__'
_development_tag = 'development'
class TaskTypes(Enum):
def __str__(self):
@ -215,7 +216,7 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
if project_name:
project_id = get_or_create_project(self, project_name, created_msg)
tags = ['development'] if not running_remotely() else []
tags = [self._development_tag] if not running_remotely() else []
req = tasks.CreateRequest(
name=task_name or make_message('Anonymous task (%(user)s@%(host)s %(time)s)'),

View File

@ -360,7 +360,7 @@ class Task(_Task):
# reset the task, so we can update it
task.reset(set_started_on_success=False, force=False)
# set development tags
task.set_tags(['development'])
task.set_tags([cls._development_tag])
# clear task parameters, they are not cleared by the Task reset
task.set_parameters({}, __update=False)
# clear the comment, it is not cleared on reset