@anchrd/intel-api 0.12.0 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,12 +5,20 @@ const ApiOrigin = "https://api.cloudflare.com/client/v4";
|
|
|
5
5
|
* How many pages of gateway log are read before the answer is declared a floor.
|
|
6
6
|
*
|
|
7
7
|
* A run is several model turns and a five-minute schedule is 8 640 runs a month, so "read
|
|
8
|
-
* everything" is not on the table.
|
|
8
|
+
* everything" is not on the table. Twenty pages of fifty is the last thirty days of a busy agent
|
|
9
9
|
* or the last few days of a very busy one; past that the screen says "at least this much" rather
|
|
10
10
|
* than a number nobody can check.
|
|
11
|
+
*
|
|
12
|
+
* ⚠️ `PerPage` is Cloudflare's ceiling, not a chosen number. The endpoint answers `per_page=100`
|
|
13
|
+
* with `HTTP 400` and `Number must be less than or equal to 50`, the adapter turns that into
|
|
14
|
+
* `cloudflare_api_refused`, and the screen says `unreadable` — so the whole cost view read nothing,
|
|
15
|
+
* ever, and looked like an outage while doing it (#294). Raising it back is not an optimisation;
|
|
16
|
+
* it switches the feature off. `MaxPages` carries the reach instead: the product of the two is what
|
|
17
|
+
* "the last thousand calls" means, and lowering one without raising the other halves the window
|
|
18
|
+
* silently.
|
|
11
19
|
*/
|
|
12
|
-
const MaxPages =
|
|
13
|
-
const PerPage =
|
|
20
|
+
const MaxPages = 20;
|
|
21
|
+
const PerPage = 50;
|
|
14
22
|
/**
|
|
15
23
|
* The gateway's log entry, read tolerantly.
|
|
16
24
|
*
|