Skip to content

Commit

Permalink
feat(device): implement RefreshPollerMixin for Device object
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitrgadiya committed Jul 9, 2024
1 parent d0553ce commit 35005ea
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rapyuta_io/clients/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from rapyuta_io.utils.utils import create_auth_header, get_error, get_api_response_data, \
validate_key_value, response_validator, is_true
from rapyuta_io.utils.partials import PartialMixin
from rapyuta_io.utils.pollers import RefreshPollerMixin

DEVICE_API_ERRORS = {
400: ParameterMissingException,
Expand Down Expand Up @@ -218,7 +219,7 @@ def __str__(self):
PYTHON3 = '3'


class Device(PartialMixin, ObjDict):
class Device(PartialMixin, RefreshPollerMixin, ObjDict):
"""
Device class represents a device. Member variables of the class represent the
properties of device. \n
Expand Down Expand Up @@ -353,6 +354,9 @@ def is_online(self):
return True
return False

def is_ready(self):
return self.is_online()

def get_runtime(self):
"""
Get the device runtime
Expand Down

0 comments on commit 35005ea

Please sign in to comment.