querysub 0.579.0 → 0.580.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
|
@@ -28,7 +28,8 @@ export function getScreenName(config: { serviceKey: string; index: number }): st
|
|
|
28
28
|
const RETIRING_MARKER = "-retiring-";
|
|
29
29
|
/** A version being replaced is renamed to this, which frees the canonical name for its replacement at once. The name carries WHEN it is to be killed, so nothing has to remember: any pass that sees the screen can read its own deadline off it, and a restart loses nothing. */
|
|
30
30
|
export function getRetiringScreenName(canonicalScreenName: string, killTime: number): string {
|
|
31
|
-
|
|
31
|
+
// Rounded because tmux reads a "." in a target as the window/pane separator, so a fractional time makes the name unkillable - it goes looking for a pane named after everything past the point
|
|
32
|
+
return canonicalScreenName.slice(0, -SCREEN_SUFFIX.length) + RETIRING_MARKER + Math.round(killTime) + SCREEN_SUFFIX;
|
|
32
33
|
}
|
|
33
34
|
/** When a retiring screen is due to be killed, or undefined when it is not a retiring screen at all. */
|
|
34
35
|
export function getRetiringKillTime(screenName: string): number | undefined {
|