Merge branch 'master' into 88-no-extra-non-null-assertion

This commit is contained in:
Simon Larsen 2022-05-17 18:42:11 +01:00 committed by GitHub
commit 7a73a7a69e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 10 deletions

View File

@ -80,6 +80,7 @@
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-floating-promises":"error",
"@typescript-eslint/await-thenable":"error",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [

View File

@ -185,7 +185,7 @@ export default class ProbeMiddleware {
};
// Run in background.
ProbeService.updateLastAlive(probeName);
await ProbeService.updateLastAlive(probeName);
if (
probeVersion &&
@ -195,7 +195,10 @@ export default class ProbeMiddleware {
probeName
).version.toString() !== probeVersion.toString())
) {
ProbeService.updateProbeVersionByName(probeName, probeVersion);
await ProbeService.updateProbeVersionByName(
probeName,
probeVersion
);
}
return next();

View File

@ -75,7 +75,7 @@ export default class UserMiddleware {
oneuptimeRequest.authorizationType = AuthorizationType.User;
}
UserService.updateOneBy({
await UserService.updateOneBy({
query: {
_id: oneuptimeRequest.userAuthorization.userId.toString(),
},

View File

@ -433,7 +433,7 @@ class DatabaseService<TBaseModel extends BaseModel> {
const beforeDeleteBy: DeleteBy<TBaseModel> =
await this.onBeforeDelete(deleteBy);
this._updateBy({
await this._updateBy({
query: deleteBy.query,
data: {
deletedByUser: deleteBy.deletedByUser,

View File

@ -29,7 +29,7 @@ router.post(
const { appId }: $TSFixMe = req.params;
const { incoming, outgoing, sentAt }: $TSFixMe = req.body;
Promise.all([
await Promise.all([
PerformanceTrackerMetricService.createMetricsData(
appId,
'incoming',

View File

@ -22,15 +22,15 @@ const certOrderCronMinuteStartTime: $TSFixMe = Math.floor(Math.random() * 50);
// Esclation Policy: This cron runs every minute
cron.schedule('* * * * *', () => {
setTimeout(() => {
escalationPolicy.checkActiveEscalationPolicyAndSendAlerts();
setTimeout(async () => {
await escalationPolicy.checkActiveEscalationPolicyAndSendAlerts();
}, cronMinuteStartTime * 1000);
});
// Server Monitor: This cron runs every minute
cron.schedule('* * * * *', () => {
setTimeout(() => {
serverMonitorCron.checkAllServerMonitors();
setTimeout(async () => {
await serverMonitorCron.checkAllServerMonitors();
}, serverMonitorCronMinuteStartTime * 1000);
});

View File

@ -3,7 +3,7 @@ import ScriptOptions from './Types/ScriptOptions';
import Compile from './Services/Compile';
(async (): Promise<void> => {
await (async (): Promise<void> => {
const token: $TSFixMe = await question('Choose Option: ', {
choices: [ScriptOptions.CompileTypeScript],
});