Skip to content

Commit

Permalink
Merge pull request #39 from whdalsrnt/master
Browse files Browse the repository at this point in the history
chore: add logs
  • Loading branch information
whdalsrnt authored Jan 8, 2025
2 parents 4f5fe9d + cd6842a commit 3d72b31
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/spaceone/plugin/service/plugin_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,21 +250,27 @@ def _select_endpoint(self, plugin_ref, updated_version=None):
endpoint = installed_plugin.endpoint
endpoints = installed_plugin.endpoints
if endpoints:
_LOGGER.debug(f"[_select_endpoint] {endpoints}")
# endpoint = self._select_one(endpoints)

installed_plugin = installed_plugin.increment("current_index")

if installed_plugin.current_index >= len(endpoints):
installed_plugin = installed_plugin.update({"current_index": 0})

current_index = installed_plugin.current_index
_LOGGER.debug(
f"[_select_endpoint] select endpoint. (index = {current_index}, endpoints = {endpoints})"
)

endpoint = endpoints[installed_plugin.current_index]

endpoint_info = {"endpoint": endpoint}

if updated_version:
endpoint_info["updated_version"] = updated_version

_LOGGER.debug(f"[_select_endpoint] endpoint info: {endpoint_info}")

return endpoint_info

@staticmethod
Expand Down

0 comments on commit 3d72b31

Please sign in to comment.