Skip to content

Commit

Permalink
Merge pull request #357 from golemfactory/mplebanski/add_task_type
Browse files Browse the repository at this point in the history
Add task_type to TaskHeader
  • Loading branch information
mplebanski committed Sep 4, 2019
2 parents f22a1af + 7e08924 commit 0514926
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions golem_messages/datastructures/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class TaskHeader(datastructures.Container):
fail_msg="Subtask timeout is less than 0",
),
),
'task_type': (validators.validate_varchar128, ),
# environment.get_id()
'environment': (validators.validate_varchar128, ),
'environment_prerequisites': (validators.validate_dict, ),
Expand All @@ -76,6 +77,7 @@ class TaskHeader(datastructures.Container):

REQUIRED = frozenset((
'task_id',
'task_type',
'task_owner',
'subtasks_count',
'min_version',
Expand Down
1 change: 1 addition & 0 deletions golem_messages/factories/datastructures/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class Meta:
o.requestor_public_key
),
)
task_type = "dummy"
task_owner = factory.LazyAttribute(
lambda o: dt_p2p_factories.Node(
key=o.requestor_public_key
Expand Down
1 change: 1 addition & 0 deletions tests/datastructures/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def setUp(self):
"pub_addr": "10.10.10.10",
"pub_port": 10101
},
"task_type": "dummy",
"environment": "DEFAULT",
"deadline": int(time.time() + 1201),
"subtask_timeout": 120,
Expand Down

0 comments on commit 0514926

Please sign in to comment.