Skip to content

Commit

Permalink
fix check for node map in update/add res
Browse files Browse the repository at this point in the history
  • Loading branch information
kthare10 committed Jul 9, 2024
1 parent 3575165 commit 41faf6d
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions fabric_cf/actor/core/plugins/db/actor_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,14 @@ def add_reservation(self, *, reservation: ABCReservationMixin):
if node_id:
components = []
for c in sliver.attached_components_info.devices.values():
bqm_id, comp_id = c.get_node_map()
if c.labels and c.labels.bdf:
bdf = c.labels.bdf
if isinstance(c.labels.bdf, str):
bdf = [c.labels.bdf]
for x in bdf:
components.append((node_id, comp_id, x))
if c.get_node_map():
bqm_id, comp_id = c.get_node_map()
if c.labels and c.labels.bdf:
bdf = c.labels.bdf
if isinstance(c.labels.bdf, str):
bdf = [c.labels.bdf]
for x in bdf:
components.append((node_id, comp_id, x))

term = reservation.get_term()

Expand Down Expand Up @@ -377,13 +378,14 @@ def update_reservation(self, *, reservation: ABCReservationMixin):
if node_id:
components = []
for c in sliver.attached_components_info.devices.values():
bqm_id, comp_id = c.get_node_map()
if c.labels and c.labels.bdf:
bdf = c.labels.bdf
if isinstance(c.labels.bdf, str):
bdf = [c.labels.bdf]
for x in bdf:
components.append((node_id, comp_id, x))
if c.get_node_map():
bqm_id, comp_id = c.get_node_map()
if c.labels and c.labels.bdf:
bdf = c.labels.bdf
if isinstance(c.labels.bdf, str):
bdf = [c.labels.bdf]
for x in bdf:
components.append((node_id, comp_id, x))

term = reservation.get_term()
begin = time.time()
Expand Down

0 comments on commit 41faf6d

Please sign in to comment.