Skip to content

Commit e2f40f7

Browse files
committed
wip
1 parent fcd99b3 commit e2f40f7

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

synapse/lib/aha.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,15 +1024,6 @@ async def addAhaSvc(self, name, info, network=None):
10241024
await self.fire('aha:svcadd', svcinfo=svcinfo)
10251025
await self.fire(f'aha:svcadd:{svcfull}', svcinfo=svcinfo)
10261026

1027-
async def reqAhaSvcProxy(self, svcdef, timeout=None):
1028-
1029-
proxy = await self.getAhaSvcProxy(svcdef, timeout=timeout)
1030-
if proxy is not None:
1031-
return proxy
1032-
1033-
mesg = f'The service is not ready {svcdef.get("name")}.'
1034-
raise s_exc.NotReady(mesg=mesg)
1035-
10361027
async def getAhaSvcProxy(self, svcdef, timeout=None):
10371028

10381029
client = await self.getAhaSvcClient(svcdef)

synapse/lib/cell.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4457,7 +4457,7 @@ async def callPeerApi(self, todo, timeout=None):
44574457
Yield responses from our peers via the AHA gather call API.
44584458
'''
44594459
proxy = await self.getAhaProxy(timeout=timeout, feats=(feat_aha_callpeers_v1,))
4460-
if proxy is None:
4460+
if proxy is None: # pragma: no cover
44614461
return
44624462

44634463
async for item in proxy.callAhaPeerApi(self.iden, todo, timeout=timeout, skiprun=self.runid):
@@ -4468,7 +4468,7 @@ async def callPeerGenr(self, todo, timeout=None):
44684468
Yield responses from invoking a generator via the AHA gather API.
44694469
'''
44704470
proxy = await self.getAhaProxy(timeout=timeout, feats=(feat_aha_callpeers_v1,))
4471-
if proxy is None:
4471+
if proxy is None: # pragma: no cover
44724472
return
44734473

44744474
async for item in proxy.callAhaPeerGenr(self.iden, todo, timeout=timeout, skiprun=self.runid):
@@ -4490,7 +4490,7 @@ async def getTasks(self, peers=True, timeout=None):
44904490
# we can ignore the yielded aha names because we embed it in the task
44914491
async for (ahasvc, (ok, retn)) in self.callPeerGenr(todo, timeout=timeout):
44924492

4493-
if not ok:
4493+
if not ok: # pragma: no cover
44944494
logger.warning(f'getTasks() on {ahasvc} failed: {retn}')
44954495
continue
44964496

@@ -4510,7 +4510,7 @@ async def getTask(self, iden, peers=True, timeout=None):
45104510
todo = s_common.todo('getTask', iden, peers=False, timeout=timeout)
45114511
async for ahasvc, (ok, retn) in self.callPeerApi(todo, timeout=timeout):
45124512

4513-
if not ok:
4513+
if not ok: # pragma: no cover
45144514
logger.warning(f'getTask() on {ahasvc} failed: {retn}')
45154515
continue
45164516

@@ -4530,7 +4530,7 @@ async def killTask(self, iden, peers=True, timeout=None):
45304530
todo = s_common.todo('killTask', iden, peers=False, timeout=timeout)
45314531
async for ahasvc, (ok, retn) in self.callPeerApi(todo, timeout=timeout):
45324532

4533-
if not ok:
4533+
if not ok: # pragma: no cover
45344534
logger.warning(f'killTask() on {ahasvc} failed: {retn}')
45354535
continue
45364536

0 commit comments

Comments
 (0)