Skip to content

Commit 217f7dc

Browse files
author
Gabriel Monroy
committed
only run commands against nodes in runtime layers
1 parent 378c865 commit 217f7dc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

api/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ def logs(self):
516516

517517
def run(self, command):
518518
"""Run a one-off command in an ephemeral app container."""
519-
nodes = self.formation.node_set.order_by('?')
519+
nodes = self.formation.node_set.filter(layer__runtime=True).order_by('?')
520520
if not nodes:
521521
raise EnvironmentError('No nodes available to run command')
522522
app_id, node = self.id, nodes[0]

0 commit comments

Comments
 (0)