Skip to content

Commit

Permalink
Merge pull request #319 from golemfactory/task_header_cleanup
Browse files Browse the repository at this point in the history
Remove resource_size from TaskHeader
  • Loading branch information
badb authored Feb 28, 2019
2 parents d7d863a + 7b991e8 commit 443572f
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion golem_messages/datastructures/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ class TaskHeader(datastructures.Container):
fail_msg="Subtask timeout is less than 0",
),
),
'resource_size': (validators.validate_integer, ),
# environment.get_id()
'environment': (validators.validate_varchar128, ),
'min_version': (validators.validate_version, ),
Expand Down
1 change: 0 additions & 1 deletion golem_messages/factories/datastructures/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class Meta:
)
deadline = factory.LazyFunction(lambda: int(time.time()) + 3600)
subtask_timeout = factory.Faker('random_int', min=60, max=600)
resource_size = factory.Faker('random_int', max=4096)
environment = "DEFAULT"
min_version = factory.LazyFunction(helpers.fake_version)
estimated_memory = factory.Faker('random_int', max=4096)
Expand Down
2 changes: 1 addition & 1 deletion golem_messages/factories/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Meta:
package_hash = factory.LazyFunction(lambda: 'sha1:' + faker.Faker().sha1())
size = factory.Faker('random_int', min=1 << 20, max=10 << 20)
price = factory.Faker('random_int', min=1 << 20, max=10 << 20)
resources_options = factory.Faker('uuid4')
resources_options = None

@classmethod
def with_signed_nested_messages(
Expand Down
1 change: 1 addition & 0 deletions golem_messages/message/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ class REASON(datastructures.StringEnum):
InsufficientDeposit = enum.auto() # GNTB deposit too low
TooShortDeposit = enum.auto() # GNTB deposit has too short lock
OfferCancelled = enum.auto()
ResourcesTooBig = enum.auto()


@library.register(TASK_MSG_BASE + 27)
Expand Down
1 change: 0 additions & 1 deletion tests/datastructures/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def setUp(self):
"subtasks_count": 21,
"max_price": 10,
"min_version": "0.19.0",
"resource_size": 0,
"estimated_memory": 0,
"timestamp": int(time.time()),
}
Expand Down

0 comments on commit 443572f

Please # to comment.