mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-18 20:57:56 +00:00
Add 'rhizome.api.restful.newsince_poll_ms' config option
This commit is contained in:
parent
833466411c
commit
29fab6dcb7
@ -398,6 +398,7 @@ END_STRUCT
|
||||
STRUCT(rhizome_api_restful)
|
||||
SUB_STRUCT(userlist, users,)
|
||||
ATOM(uint32_t, newsince_timeout, 60, uint32_time_interval,, "Time to block while reporting new bundles")
|
||||
ATOM(uint32_t, newsince_poll_ms, 2000, uint32_nonzero,, "Database poll interval while blocked reporting new bundles")
|
||||
END_STRUCT
|
||||
|
||||
STRUCT(rhizome_api)
|
||||
|
@ -474,7 +474,7 @@ static int restful_rhizome_bundlelist_json_content_chunk(sqlite_retry_state *ret
|
||||
r->u.list.phase = LIST_DONE;
|
||||
return 0;
|
||||
}
|
||||
time_ms_t wake_at = now + 2000;
|
||||
time_ms_t wake_at = now + config.rhizome.api.restful.newsince_poll_ms;
|
||||
if (wake_at > r->u.list.end_time)
|
||||
wake_at = r->u.list.end_time;
|
||||
http_request_pause_response(&r->http, wake_at);
|
||||
|
@ -240,6 +240,7 @@ doc_RhizomeNewSince="Fetch Rhizome bundle list since token in JSON format"
|
||||
setup_RhizomeNewSince() {
|
||||
setup
|
||||
executeOk_servald config set rhizome.api.restful.newsince_timeout 60s
|
||||
executeOk_servald config set rhizome.api.restful.newsince_poll_ms 500
|
||||
add_bundles 0 5
|
||||
executeOk curl \
|
||||
--silent --fail --show-error \
|
||||
|
Loading…
Reference in New Issue
Block a user