querysub 0.330.0 → 0.332.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
|
@@ -1013,6 +1013,7 @@ export class Querysub {
|
|
|
1013
1013
|
await publishMachineARecords();
|
|
1014
1014
|
|
|
1015
1015
|
await Querysub.optionalStartupWait();
|
|
1016
|
+
console.log(magenta(`Started hosting service ${name}`));
|
|
1016
1017
|
}
|
|
1017
1018
|
|
|
1018
1019
|
/** Syncs keys AND values (as we won't return a key for a value that is undefined). */
|
|
@@ -1301,7 +1302,7 @@ import { formatNumber, formatTime } from "socket-function/src/formatting/format"
|
|
|
1301
1302
|
import { css } from "../4-dom/css";
|
|
1302
1303
|
import { getCountPerPaint } from "../functional/onNextPaint";
|
|
1303
1304
|
import { addEpsilons } from "../bits";
|
|
1304
|
-
import { blue } from "socket-function/src/formatting/logColors";
|
|
1305
|
+
import { blue, magenta } from "socket-function/src/formatting/logColors";
|
|
1305
1306
|
import { MachineController } from "../deployManager/machineController";
|
|
1306
1307
|
import { getRecords, setRecord } from "../-b-authorities/dnsAuthority";
|
|
1307
1308
|
import { testTCPIsListening } from "socket-function/src/networking";
|
|
@@ -124,7 +124,7 @@ export class ServicesListPage extends qreact.Component {
|
|
|
124
124
|
</div>
|
|
125
125
|
<div className={css.vbox(4)}>
|
|
126
126
|
<div>Updated {formatDateJSX(config.info.lastUpdatedTime)} AGO</div>
|
|
127
|
-
{config.parameters.rollingWindow && <div>Rolling window: {formatTime(config.parameters.rollingWindow)}</div>}
|
|
127
|
+
{config.parameters.rollingWindow && <div>Rolling window: {formatTime(config.parameters.rollingWindow)}</div> || undefined}
|
|
128
128
|
</div>
|
|
129
129
|
</div>
|
|
130
130
|
</Anchor>
|
|
@@ -58,7 +58,7 @@ export class UpdateButtons extends qreact.Component<{
|
|
|
58
58
|
showFullscreenModal({
|
|
59
59
|
content: <div>
|
|
60
60
|
<InputLabel
|
|
61
|
-
label="Commit message (shift+enter to commit, escape to cancel)"
|
|
61
|
+
label="Commit message (shift+enter/shift+tab to commit, escape to cancel)"
|
|
62
62
|
value={""}
|
|
63
63
|
textarea
|
|
64
64
|
fillWidth
|
|
@@ -67,7 +67,7 @@ export class UpdateButtons extends qreact.Component<{
|
|
|
67
67
|
onKeyDown={async e => {
|
|
68
68
|
let value = e.currentTarget.value;
|
|
69
69
|
if (!value) return;
|
|
70
|
-
if (e.key === "Enter" && e.shiftKey) {
|
|
70
|
+
if (e.key === "Enter" && e.shiftKey || e.key === "Tab" && e.shiftKey) {
|
|
71
71
|
await controller.commitPushAndPublishQuerysub.promise(value);
|
|
72
72
|
closeAllModals();
|
|
73
73
|
}
|
|
@@ -100,7 +100,7 @@ export class UpdateButtons extends qreact.Component<{
|
|
|
100
100
|
showFullscreenModal({
|
|
101
101
|
content: <div>
|
|
102
102
|
<InputLabel
|
|
103
|
-
label="Commit message (shift+enter to commit, escape to cancel)"
|
|
103
|
+
label="Commit message (shift+enter/shift+tab to commit, escape to cancel)"
|
|
104
104
|
value={""}
|
|
105
105
|
textarea
|
|
106
106
|
fillWidth
|
|
@@ -109,7 +109,7 @@ export class UpdateButtons extends qreact.Component<{
|
|
|
109
109
|
onKeyDown={async e => {
|
|
110
110
|
let value = e.currentTarget.value;
|
|
111
111
|
if (!value) return;
|
|
112
|
-
if (e.key === "Enter" && e.shiftKey) {
|
|
112
|
+
if (e.key === "Enter" && e.shiftKey || e.key === "Tab" && e.shiftKey) {
|
|
113
113
|
await controller.commitPushService.promise(value);
|
|
114
114
|
closeAllModals();
|
|
115
115
|
}
|
|
@@ -11,6 +11,7 @@ import { sendDiscordMessage } from "../../../email_ims_notifications/discord";
|
|
|
11
11
|
import { user_data } from "../../../user-implementation/userData";
|
|
12
12
|
import { createLink } from "../../../library-components/ATag";
|
|
13
13
|
import { getErrorLogsLink } from "./ErrorWarning";
|
|
14
|
+
import { magenta } from "socket-function/src/formatting/logColors";
|
|
14
15
|
|
|
15
16
|
const MAX_IMS_PER_DAY = 3;
|
|
16
17
|
const MAX_IMS_PER_HOURS = 1;
|
|
@@ -21,8 +22,6 @@ const MAX_PER_IM = 10;
|
|
|
21
22
|
// Wait a bit, because it's likely if there's one error, there are more errors.
|
|
22
23
|
const BATCH_TIME = timeInSecond * 30;
|
|
23
24
|
|
|
24
|
-
// 11) Deploy services to service
|
|
25
|
-
|
|
26
25
|
|
|
27
26
|
// NOTE: Yes, this is stored in memory, so if the server reboots or if this script keeps crashing, we might send a lot of instant messages. However, one, Discord will probably late rate limit us, and two, this means something is really wrong, especially if it happens a lot, and we really should fix it right away.
|
|
28
27
|
// NOTE: If we decide not to send IMs, we don't queue them up, because that's just extremely annoying. The point of the limit isn't to send the maximum we can that stays just under the limit! The point of the limit is if a lot happens at once, ignore most of it.
|
|
@@ -175,6 +174,7 @@ async function runIMNotifies() {
|
|
|
175
174
|
}
|
|
176
175
|
errorWatcherBase.watch(async (objs) => {
|
|
177
176
|
clearOldDays();
|
|
177
|
+
console.log(magenta(`Pre-suppression: received ${objs.length} recent errors at ${formatDateTime(Date.now())}`));
|
|
178
178
|
objs = await suppressionList.filterObjsToNonSuppressed(objs);
|
|
179
179
|
objs = objs.filter(x => !isDuplicate(x));
|
|
180
180
|
if (objs.length === 0) return;
|