Giter VIP home page Giter VIP logo

tdengine-restful-connector's Issues

WARNING Channel::~Channel() (ERRNO 10003): channel is destroyed, 976 producers will be discarded

 [Coroutine-1970]
--------------------------------------------------------------------
#0  Swoole\Coroutine\Channel->push() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/yurun-http/src/YurunHttp/Handler/Swoole/SwooleHttpConnectionPool.php:97]
#1  Yurun\Util\YurunHttp\Handler\Swoole\SwooleHttpConnectionPool->release() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/yurun-http/src/YurunHttp/Handler/Swoole/SwooleHttpConnectionManager.php:100]
#2  Yurun\Util\YurunHttp\Handler\Swoole\SwooleHttpConnectionManager->release() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/yurun-http/src/YurunHttp/Handler/Swoole.php:404]
#3  Yurun\Util\YurunHttp\Handler\Swoole->recvDefer() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/yurun-http/src/YurunHttp/Handler/Swoole.php:227]
#4  Yurun\Util\YurunHttp\Handler\Swoole->send() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/yurun-http/src/YurunHttp.php:117]
#5  Yurun\Util\YurunHttp::send() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/yurun-http/src/HttpRequest.php:977]
#6  Yurun\Util\HttpRequest->send() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/yurun-http/src/HttpRequest.php:1036]
#7  Yurun\Util\HttpRequest->post() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/tdengine-restful-connector/src/Client.php:63]
#8  Yurun\TDEngine\Client->request() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/tdengine-restful-connector/src/Client.php:99]
#9  Yurun\TDEngine\Client->sql() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/tdengine-orm/src/ClientHandler/Restful/Handler.php:18]
#10 Yurun\TDEngine\Orm\ClientHandler\Restful\Handler->query() called at [/home/www/hyperf-skeleton/app/Service/CreateAlert2.php:23]
#11 App\Service\CreateAlert2->handle() called at [/home/www/hyperf-skeleton/app/Command/NodeCommand.php:57]
#12 App\Command\NodeCommand->App\Command\{closure}() called at [/home/www/hyperf-skeleton/vendor/hyperf/utils/src/Functions.php:274]
#13 call() called at [/home/www/hyperf-skeleton/vendor/hyperf/utils/src/Coroutine.php:62]

use 0.94960713386536 s
[2022-11-25 02:57:28 @5365.0]   WARNING Channel::~Channel() (ERRNO 10003): channel is destroyed, 976 producers will be discarded

查询时间戳显示问题

`use Yurun\TDEngine;
$taosClient = new TDEngine\Client(new TDEngine\ClientConfig([
'host' => '127.0.0.1',
'hostName' => '',
'port' => 6041,
'user' => 'root',
'password' => 'taosdata',
'db' => 'weather',
'ssl' => false,
'timestampFormat' => TDEngine\Constants\TimeStampFormat::LOCAL_STRING, // 此配置 TDengine 3.0 下失效,统一返回格式为:2022-11-25T05:41:04.690Z
'keepAlive' => true,
'version' => '3', // TDengine 版本
'timezone' => 'UTC', // TDengine >= 3.0 时支持,可选参数,指定返回时间的时区
]));

$result = $taosClient->sql(sprintf('select * from weather.station');
`
查询出来的时间为"ts": "2023-12-02T15:26:34.000Z",用convert报错,该怎么调整代码能够显示2023-12-02 23:26:34.000

似乎不支持3.0?

看起来是taosd的RESTful接口返回内容变了:

image

如上图,我是依赖codeception创建了测试代码,在2.6上是可以正确运行的。

翻查了提示信息中对应部分的源码,发现是处理POST请求的返回值时解析错误。

WARNING Channel::~Channel() (ERRNO 10003): channel is destroyed, 976 producers will be discarded

 [Coroutine-1970]
--------------------------------------------------------------------
#0  Swoole\Coroutine\Channel->push() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/yurun-http/src/YurunHttp/Handler/Swoole/SwooleHttpConnectionPool.php:97]
#1  Yurun\Util\YurunHttp\Handler\Swoole\SwooleHttpConnectionPool->release() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/yurun-http/src/YurunHttp/Handler/Swoole/SwooleHttpConnectionManager.php:100]
#2  Yurun\Util\YurunHttp\Handler\Swoole\SwooleHttpConnectionManager->release() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/yurun-http/src/YurunHttp/Handler/Swoole.php:404]
#3  Yurun\Util\YurunHttp\Handler\Swoole->recvDefer() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/yurun-http/src/YurunHttp/Handler/Swoole.php:227]
#4  Yurun\Util\YurunHttp\Handler\Swoole->send() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/yurun-http/src/YurunHttp.php:117]
#5  Yurun\Util\YurunHttp::send() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/yurun-http/src/HttpRequest.php:977]
#6  Yurun\Util\HttpRequest->send() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/yurun-http/src/HttpRequest.php:1036]
#7  Yurun\Util\HttpRequest->post() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/tdengine-restful-connector/src/Client.php:63]
#8  Yurun\TDEngine\Client->request() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/tdengine-restful-connector/src/Client.php:99]
#9  Yurun\TDEngine\Client->sql() called at [/home/www/hyperf-skeleton/vendor/yurunsoft/tdengine-orm/src/ClientHandler/Restful/Handler.php:18]
#10 Yurun\TDEngine\Orm\ClientHandler\Restful\Handler->query() called at [/home/www/hyperf-skeleton/app/Service/CreateAlert2.php:23]
#11 App\Service\CreateAlert2->handle() called at [/home/www/hyperf-skeleton/app/Command/NodeCommand.php:57]
#12 App\Command\NodeCommand->App\Command\{closure}() called at [/home/www/hyperf-skeleton/vendor/hyperf/utils/src/Functions.php:274]
#13 call() called at [/home/www/hyperf-skeleton/vendor/hyperf/utils/src/Coroutine.php:62]

use 0.94960713386536 s
[2022-11-25 02:57:28 @5365.0]   WARNING Channel::~Channel() (ERRNO 10003): channel is destroyed, 976 producers will be discarded

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.