querysub 0.305.0 → 0.306.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
|
@@ -334,19 +334,12 @@ const runScreenCommand = measureWrap(async function runScreenCommand(config: {
|
|
|
334
334
|
let prefix = getTmuxPrefix();
|
|
335
335
|
let screenName = config.screenName;
|
|
336
336
|
|
|
337
|
-
if (config.rollingWindow) {
|
|
337
|
+
if (config.rollingWindow !== undefined) {
|
|
338
338
|
let screens = await getScreenState();
|
|
339
339
|
let rollingObj = rollingKeepScreenAlive.get(screenName);
|
|
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
|
-
}
|
|
350
343
|
let existingScreen = screens.find(x => x.screenName === screenName);
|
|
351
344
|
if (existingScreen && !rollingObj) {
|
|
352
345
|
let nodeIdPath = os.homedir() + "/" + SERVICE_FOLDER + screenName + "/" + SERVICE_NODE_FILE_NAME;
|