querysub 0.300.0 → 0.302.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "querysub",
3
- "version": "0.300.0",
3
+ "version": "0.302.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
@@ -229,7 +229,10 @@ async function edgeNodeFunction(config: {
229
229
  // JUST use it on the first loop, so if we can't find any matches, we ignore it.
230
230
  if (liveHashOverrideObj) {
231
231
  try {
232
- let liveHashOverrideObject = JSON.parse(liveHashOverrideObj);
232
+ let liveHashOverrideObject = JSON.parse(liveHashOverrideObj) as {
233
+ liveHash: string;
234
+ time: number;
235
+ };
233
236
  liveHashOverrideExpiryTime = liveHashOverrideObject.time + 1000 * 30;
234
237
  liveHashOverride = liveHashOverrideObject.liveHash;
235
238
  } catch (e: any) {
@@ -87,9 +87,11 @@ function onLiveHashChange(liveHash: string, refreshThresholdTime: number) {
87
87
  if (i < notifyIntervals.length - 2 && waitDuration <= 30 * 1000) continue;
88
88
 
89
89
  // Update the URL override for manual refreshes
90
- Querysub.localCommit(() => {
91
- liveHashOverrideURL.value = { liveHash, time: Date.now() };
92
- });
90
+ if (!liveHash.startsWith("forced")) {
91
+ Querysub.localCommit(() => {
92
+ liveHashOverrideURL.value = { liveHash, time: Date.now() };
93
+ });
94
+ }
93
95
  if (!skipFirst) {
94
96
  if (currentNotification) {
95
97
  currentNotification.close();
@@ -340,6 +340,13 @@ const runScreenCommand = measureWrap(async function runScreenCommand(config: {
340
340
  if (rollingObj) {
341
341
  rollingObj.pinnedDuration = config.rollingWindow;
342
342
  }
343
+ // Without this check we might have only 1 service up for a long period of time. I guess even with it we can still have only 1 service up for a long period of time (if the rolling window is alive, but barely), but... idk... this seems better?
344
+ if (rollingObj && rollingObj.pinnedTime + rollingObj.pinnedDuration < Date.now()) {
345
+ console.log(red(`Rolling screen ${screenName} is finished, deleting it, it should be killed shortly`));
346
+ rollingKeepScreenAlive.delete(screenName);
347
+ rollingScreens.delete(rollingObj.rollingScreenName);
348
+ rollingObj = undefined;
349
+ }
343
350
  let existingScreen = screens.find(x => x.screenName === screenName);
344
351
  if (existingScreen && !rollingObj) {
345
352
  let nodeIdPath = os.homedir() + "/" + SERVICE_FOLDER + screenName + "/" + SERVICE_NODE_FILE_NAME;
@@ -1,9 +1,17 @@
1
- Hmm... our cyoa servers are dying very fast... why?
2
-
3
1
  1) Verify clientside notifications work when we rolling update cyoa
4
2
  2) Verify edge nodes are removed when we rolling update cyoa
5
3
  3) Update cyoa rolling time back to 4 hours
6
4
 
5
+ 1) Auto restart if the connect to the cyoa server is down, after 30 seconds, instead of just infinitely erroring out.
6
+ - Give a notification after 15 seconds warning them, with the ability to not restart if they click "do not restart"
7
+ - In edgeClientWatcher
8
+
9
+
10
+ 9) In machine info, support an object which can show current, and max, so we can show it as a bar and the max amount for:
11
+ RAM
12
+ CPU
13
+ DISK
14
+
7
15
  10) Add RAM total, ram % used, cpu count, CPU %, disk size, disk % used to machine info
8
16
  - Show this all in the list page, with nice bars?
9
17
  - Filled, but the total size will also depend on the maximum (to a degree), so it's very nice.
@@ -11,4 +19,5 @@ Hmm... our cyoa servers are dying very fast... why?
11
19
  (Yes, it overlaps with node metrics, but that's okay, sometimes we want to look at machines, other times services, and the types of errors that show up in either changes).
12
20
 
13
21
 
14
- 11) Restart the server and verify everything starts up nicely on reboot!
22
+ 11) Restart the server and verify everything starts up nicely on reboot!
23
+ - Or... screw it, and move onto audio apis...