Commit d762604a authored by lixiaofang's avatar lixiaofang

add

parent 3ab283e9
This diff is collapsed.
{"timestamp": "2019-01-24T19:24:35.764409+08:00", "gm_request_id": "", "log_locating_info": "log_id=None span_id=None parent_span_id=None", "format_exc": "Traceback (most recent call last):\n File \"/Users/lxrent/LiXiaoFang/lib/python3.6/site-packages/gm_rpcd/internals/dispatcher.py\", line 78, in process_single_request\n result = method_function(**request.params)\nTypeError: contrast_similar() got an unexpected keyword argument 'query'\n", "request_json_str": "{\"request_id\": null, \"method\": \"physical/search/query_contrast_similar\", \"params\": {\"query\": \"1\"}, \"environment\": {\"client_info\": null, \"l5d_path\": \"\"}}"}
{"timestamp": "2019-01-24T19:25:17.568488+08:00", "gm_request_id": "", "log_locating_info": "log_id=None span_id=None parent_span_id=None", "format_exc": "Traceback (most recent call last):\n File \"/Users/lxrent/LiXiaoFang/lib/python3.6/site-packages/gm_rpcd/internals/dispatcher.py\", line 78, in process_single_request\n result = method_function(**request.params)\nTypeError: contrast_similar() got an unexpected keyword argument 'query'\n", "request_json_str": "{\"request_id\": null, \"method\": \"physical/search/query_contrast_similar\", \"params\": {\"query\": \"1\"}, \"environment\": {\"client_info\": null, \"l5d_path\": \"\"}}"}
{"timestamp": "2019-01-24T19:26:19.904293+08:00", "gm_request_id": "", "log_locating_info": "log_id=None span_id=None parent_span_id=None", "format_exc": "Traceback (most recent call last):\n File \"/Users/lxrent/LiXiaoFang/lib/python3.6/site-packages/gm_rpcd/internals/dispatcher.py\", line 78, in process_single_request\n result = method_function(**request.params)\nTypeError: contrast_similar() got an unexpected keyword argument 'query'\n", "request_json_str": "{\"request_id\": null, \"method\": \"physical/search/query_contrast_similar\", \"params\": {\"query\": \"1\"}, \"environment\": {\"client_info\": null, \"l5d_path\": \"\"}}"}
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<DBN-PSQL>
<case-options enabled="false">
<option name="KEYWORD_CASE" value="lower" />
<option name="FUNCTION_CASE" value="lower" />
<option name="PARAMETER_CASE" value="lower" />
<option name="DATATYPE_CASE" value="lower" />
<option name="OBJECT_CASE" value="preserve" />
</case-options>
<formatting-settings enabled="false" />
</DBN-PSQL>
<DBN-SQL>
<case-options enabled="false">
<option name="KEYWORD_CASE" value="lower" />
<option name="FUNCTION_CASE" value="lower" />
<option name="PARAMETER_CASE" value="lower" />
<option name="DATATYPE_CASE" value="lower" />
<option name="OBJECT_CASE" value="preserve" />
</case-options>
<formatting-settings enabled="false">
<option name="STATEMENT_SPACING" value="one_line" />
<option name="CLAUSE_CHOP_DOWN" value="chop_down_if_statement_long" />
<option name="ITERATION_ELEMENTS_WRAPPING" value="chop_down_if_not_single" />
</formatting-settings>
</DBN-SQL>
<DBN-PSQL>
<case-options enabled="false">
<option name="KEYWORD_CASE" value="lower" />
<option name="FUNCTION_CASE" value="lower" />
<option name="PARAMETER_CASE" value="lower" />
<option name="DATATYPE_CASE" value="lower" />
<option name="OBJECT_CASE" value="preserve" />
</case-options>
<formatting-settings enabled="false" />
</DBN-PSQL>
<DBN-SQL>
<case-options enabled="false">
<option name="KEYWORD_CASE" value="lower" />
<option name="FUNCTION_CASE" value="lower" />
<option name="PARAMETER_CASE" value="lower" />
<option name="DATATYPE_CASE" value="lower" />
<option name="OBJECT_CASE" value="preserve" />
</case-options>
<formatting-settings enabled="false">
<option name="STATEMENT_SPACING" value="one_line" />
<option name="CLAUSE_CHOP_DOWN" value="chop_down_if_statement_long" />
<option name="ITERATION_ELEMENTS_WRAPPING" value="chop_down_if_not_single" />
</formatting-settings>
</DBN-SQL>
</code_scheme>
</component>
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 2.7" project-jdk-type="Python SDK" />
<component name="PyCharmProfessionalAdvertiser">
<option name="shown" value="true" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/physical.iml" filepath="$PROJECT_DIR$/.idea/physical.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="projectConfiguration" value="Nosetests" />
<option name="PROJECT_TEST_RUNNER" value="Nosetests" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
This diff is collapsed.
File added
import sys
from gm_rpcd.commands.utils import add_cwd_to_path
from gm_rpcd.internals.utils import serve
def main(args):
add_cwd_to_path()
from gm_rpcd.internals.configuration import config
config.is_develop_mode = True
config.freeze()
host = '127.0.0.1'
port = 9000
try:
first_arg = args[0]
except IndexError:
pass
else:
if ':' in first_arg:
host, port = first_arg.split(':')
port = int(port)
else:
port = int(first_arg)
print('Serving on {}:{}'.format(host, port))
serve(host=host, port=port)
if __name__ == '__main__':
main(sys.argv[1:])
# coding=utf-8
import json
def setup_tracer(request):
return {
# 'service_name': '',
# 'sampled': '',
# 'debug': tracer.get('debug', False),
# 'trace_id': tracer['trace_id'],
# 'span_id': tracer['span_id'],
# 'span_name': seqs[0]['method'],
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment