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

遇到奇怪错误,HelloWorld报错,超时时间不能设置 #3

Open
laozhang713 opened this issue Apr 25, 2020 · 1 comment
Open

Comments

@laozhang713
Copy link

运行test

1.Helloworld 报错没这个函数

2.另外redis数据可以插入,但是timeout数据丢失....

@limccn
Copy link
Owner

limccn commented Apr 26, 2020

For integration testing, two test methods HelloWorld and RedisTest were implemented in c++ library and tested in test.mq4. you can just simply delete them.
The HelloWorld method is defined to return a string from c++ library as same as what input parameter string is.
And RedisTest method is defined to check availability of Redis server, which connect to a exist server and do nothing.

In this library, we use a light library hiredis [url:https://github.com/redis/hiredis] as client for Redis.
Methods end with WithTimeout were implemented to call redisConnectWithTimeout in order to check connection healthy before redisCommand is called.
In hiredis, the default timeout parameter is 1000ms, this might cause timeout error when Redis connection situation is bad.

1.Use RedisGet and RedisCommand when Redis server is located in your intranet.
2.Correspondingly, Use RedisGetWithTimeout and RedisCommandTimeout when Redis server connection healthy/availability is not good.

Other
Use EXPIRE and EXPIREAT command if you want to set an EXPIREable value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants