Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

fix in_shutdown type #4860

Merged
merged 1 commit into from
Nov 6, 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
2 changes: 1 addition & 1 deletion golem/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def __init__( # noqa pylint: disable=too-many-arguments,too-many-locals
self.config_approver = ConfigApprover(self.config_desc)

if self.config_desc.in_shutdown:
self.update_setting('in_shutdown', False)
self.update_setting('in_shutdown', 0)

logger.info(
'Client %s, datadir: %s',
Expand Down
4 changes: 2 additions & 2 deletions golem/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def graceful_shutdown(self) -> ShutdownResponse:

# is in shutdown? turn off as toggle
if self._config_desc.in_shutdown:
self.client.update_setting('in_shutdown', False)
self.client.update_setting('in_shutdown', 0)
logger.info('Turning off shutdown mode')
return ShutdownResponse.off

Expand All @@ -386,7 +386,7 @@ def graceful_shutdown(self) -> ShutdownResponse:

# configure in_shutdown
logger.info('Enabling shutdown mode, no more tasks can be started')
self.client.update_setting('in_shutdown', True)
self.client.update_setting('in_shutdown', 1)

# subscribe to events

Expand Down