Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry start of neo4j service on Windows #21

Open
wants to merge 1 commit into
base: 1.3
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions boltkit/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,10 +459,19 @@ def extract(cls, archive, path):
def os_dependent_config(cls, instance_id):
return {config.WINDOWS_SERVICE_NAME_SETTING: instance_id}

def _start(self):
params = [path_join(self.home, "bin", "neo4j.bat"), "start"]
try:
_invoke(params)
except CalledProcessError:
# Try again to cover for weird prunsrv timeout when starting service.
# Remove this when investigated and solved!
_invoke(params)

def start(self, timeout=0):
http_uri, bolt_uri = config.extract_http_and_bolt_uris(self.home)
_invoke([path_join(self.home, "bin", "neo4j.bat"), "install-service"])
_invoke([path_join(self.home, "bin", "neo4j.bat"), "start"])
self._start()
if timeout:
wait_for_server(http_uri.hostname, http_uri.port, timeout=timeout)
return InstanceInfo(http_uri, bolt_uri, self.home)
Expand Down Expand Up @@ -566,7 +575,6 @@ def _install(edition, version, path, **kwargs):
else:
return home


def install():
parser = ArgumentParser(
description="Download and extract a Neo4j server package for the current platform.\r\n"
Expand Down