Skip to content

Commit

Permalink
Merge 9fb1623 into 0898dfd
Browse files Browse the repository at this point in the history
  • Loading branch information
OlafSzmidt committed Oct 15, 2018
2 parents 0898dfd + 9fb1623 commit 4d314ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 1 addition & 3 deletions aimmo-game/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@ def _find_avatar_id_from_query(self, session_id, query_string):

def _send_logs(self, player_id_to_workers):
def should_send_logs(logs):
LOGGER.info("should_send_logs: " + str(logs))

return logs is not None and logs != ''
return bool(logs)

socket_session_id_to_player_id_copy = self._socket_session_id_to_player_id.copy()
for sid, player_id in socket_session_id_to_player_id_copy.iteritems():
Expand Down
8 changes: 5 additions & 3 deletions aimmo_runner/minikube.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/user/bin/env python
from __future__ import print_function

from subprocess import CalledProcessError

import docker
import kubernetes
import os
Expand Down Expand Up @@ -74,10 +76,10 @@ def start_cluster(minikube):
Starts the cluster unless it has been already started by the user.
:param minikube: Executable minikube installed beforehand.
"""
status = run_command([minikube, 'status'], True)
if 'minikube: Running' in status:
try:
run_command([minikube, 'status'], True)
print('Cluster already running')
else:
except CalledProcessError:
run_command([minikube, 'start', '--memory=2048', '--cpus=2'])


Expand Down

0 comments on commit 4d314ee

Please sign in to comment.