Skip to content

Commit

Permalink
gofuzzy.py - launch the local binary
Browse files Browse the repository at this point in the history
  • Loading branch information
raghur committed May 18, 2018
1 parent 8540572 commit 4b35c7e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions rplugin/python3/denite/filter/matcher/gofuzzy.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
if pkgPath not in sys.path:
logger.debug("added %s to sys.path" % pkgPath)
sys.path.insert(0, pkgPath)

binDir = os.path.dirname(__file__).split(os.path.sep)[:-5]
binDir = binDir + ["bin", "fuzzy-denite"]
exe = os.path.sep.join(binDir)
import api_pb2_grpc
import api_pb2

Expand All @@ -41,8 +43,9 @@ def _startProcess(self):
# reap any existing process
self._reapProcess()
# start the server here
self.debug("[%s] starting fuzzy-denite GRPC server" % (time.time()))
self.proc = subprocess.Popen(['fuzzy-denite', '--log', 'info',
self.debug("[%s] starting fuzzy-denite GRPC server %s " %
(time.time(), exe))
self.proc = subprocess.Popen([exe, '--log', 'info',
'server', '-p', '51000', '--grpc'])
self.debug("[%s] pid: %s" % (time.time(), self.proc.pid))
self.conn = grpc.insecure_channel('localhost:51000')
Expand Down

0 comments on commit 4b35c7e

Please sign in to comment.