3 from __future__ import absolute_import, print_function
5 from . import clientactor
8 class ArvadosNodeListMonitorActor(clientactor.RemotePollLoopActor):
9 """Actor to poll the Arvados node list.
11 This actor regularly polls the list of Arvados node records, and
12 sends it to subscribers.
15 CLIENT_ERRORS = config.ARVADOS_ERRORS
16 LOGGER_NAME = 'arvnodeman.arvados_nodes'
18 def _item_key(self, node):
21 def _send_request(self):
22 return self._client.nodes().list(limit=10000).execute()['items']
25 class CloudNodeListMonitorActor(clientactor.RemotePollLoopActor):
26 """Actor to poll the cloud node list.
28 This actor regularly polls the cloud to get a list of running compute
29 nodes, and sends it to subscribers.
32 CLIENT_ERRORS = config.CLOUD_ERRORS
33 LOGGER_NAME = 'arvnodeman.cloud_nodes'
35 def _item_key(self, node):
38 def _send_request(self):
39 return self._client.list_nodes()