Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove resource_size from TaskHeader #319

Merged
merged 6 commits into from
Feb 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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