mirror of
https://github.com/tstack/lnav
synced 2024-11-03 23:15:38 +00:00
[pt] don't poll if max time is set
This commit is contained in:
parent
f11cca2366
commit
4f775dc1ae
@ -131,7 +131,7 @@ struct json_path_handler papertrail_proc::FORMAT_HANDLERS[] = {
|
||||
json_path_handler("^/(partial_results)", read_partial),
|
||||
json_path_handler("^/(reached_record_limit|reached_time_limit)", read_limit),
|
||||
json_path_handler("^/(min_id|min_time_at|max_time_at|"
|
||||
"reached_beginning|reached_end|tail)")
|
||||
"reached_beginning|reached_end|tail|no_events)")
|
||||
.add_cb(ignore_bool)
|
||||
.add_cb(ignore_str),
|
||||
json_path_handler("^/events#/\\w+")
|
||||
@ -162,6 +162,8 @@ void papertrail_proc::yajl_writer(void *context, const char *str, size_t len)
|
||||
|
||||
long papertrail_proc::complete(CURLcode result)
|
||||
{
|
||||
curl_request::complete(result);
|
||||
|
||||
yajl_reset(this->ptp_jhandle.in());
|
||||
|
||||
if (result != CURLE_OK) {
|
||||
@ -172,6 +174,10 @@ long papertrail_proc::complete(CURLcode result)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (this->ptp_max_time) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
this->set_url();
|
||||
if (this->ptp_partial_read) {
|
||||
this->ptp_partial_read = false;
|
||||
|
Loading…
Reference in New Issue
Block a user