Skip to content

Commit

Permalink
docs: add list of executors and drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxiao committed Apr 21, 2020
1 parent fc30d7c commit b3bcdab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
9 changes: 3 additions & 6 deletions jina/flow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,12 @@ def _dump_instance_to_yaml(data):
r = {}
if data._kwargs:
r['with'] = data._kwargs
# when dump we save every pod, including gateway, so when we reload it no_gateway has to be turned on
r['with']['no_gateway'] = True
if data._pod_nodes:
r['pods'] = {}
for k, v in data._pod_nodes.items():
if not data.args.no_gateway and k == 'gateway':
continue
if not data.args.no_gateway and 'gateway' in v.needs:
_needs = list(v.needs).remove('gateway')
else:
_needs = list(v.needs)
_needs = list(v.needs)
if _needs:
kwargs = {'needs': _needs}
else:
Expand Down
2 changes: 2 additions & 0 deletions jina/logging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
from .base import get_logger

default_logger = get_logger('JINA') #: a logger at the global-level

if 'JINA_LOG_PROFILING' in os.environ:
profile_logger = get_logger('PROFILE', log_profile=True) #: a logger for profiling
default_logger.success('profiling is enabled')
else:
profile_logger = default_logger
2 changes: 1 addition & 1 deletion jina/logging/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def get_logger(context: str, context_len: int = 15,
logger.handlers = []
logger.setLevel(verbose_level.value)

if ('JINA_LOG_PROFILING' in os.environ) or log_profile:
if log_profile:
h = QueueHandler(__profile_queue__)
# profile logger always use debug level
h.setLevel(LogVerbosity.DEBUG.value)
Expand Down

0 comments on commit b3bcdab

Please sign in to comment.