修复定时任务间隔较小,任务状态不准确

This commit is contained in:
whyour
2023-09-26 22:51:33 +08:00
parent 77a8e00b17
commit eddc03e295
8 changed files with 25 additions and 14 deletions
+3 -2
View File
@@ -25,8 +25,8 @@ body {
}
.ant-modal-body {
max-height: calc(90vh - 110px);
max-height: calc(90vh - var(--vh-offset, 110px));
max-height: calc(80vh - 110px);
max-height: calc(80vh - var(--vh-offset, 110px));
overflow-y: auto;
}
@@ -181,6 +181,7 @@ body {
.react-codemirror2,
.CodeMirror {
height: 100%;
overflow: auto;
}
}
}
+2 -1
View File
@@ -10,6 +10,7 @@ import {
import { PageLoading } from '@ant-design/pro-layout';
import { logEnded } from '@/utils';
import { CrontabStatus } from './type';
import Ansi from 'ansi-to-react';
const { Countdown } = Statistic;
@@ -148,7 +149,7 @@ const CronLogModal = ({
: {}
}
>
{value}
<Ansi>{value}</Ansi>
</pre>
)}
<div id="log-flag"></div>
+3 -2
View File
@@ -16,6 +16,7 @@ import SettingModal from './setting';
import { useTheme } from '@/utils/hooks';
import { getEditorMode, logEnded } from '@/utils';
import WebSocketManager from '@/utils/websocket';
import Ansi from 'ansi-to-react';
const { Option } = Select;
@@ -116,7 +117,7 @@ const EditModal = ({
}, 300);
}
setLog(p=>`${p}${_message}`);
setLog((p) => `${p}${_message}`);
}, []);
useEffect(() => {
@@ -246,7 +247,7 @@ const EditModal = ({
padding: '0 15px',
}}
>
{log}
<Ansi>{log}</Ansi>
</pre>
</SplitPane>
<SaveModal
+2 -2
View File
@@ -77,7 +77,7 @@ const CheckUpdate = ({ systemInfo }: any) => {
</div>
</>
),
content: <pre>{lastLog}</pre>,
content: <pre><Ansi>{lastLog}</Ansi></pre>,
okText: intl.get('下载更新'),
cancelText: intl.get('以后再说'),
onOk() {
@@ -102,7 +102,7 @@ const CheckUpdate = ({ systemInfo }: any) => {
okButtonProps: { disabled: true },
title: intl.get('下载更新中...'),
centered: true,
content: <pre>{value}</pre>,
content: <pre><Ansi>{value}</Ansi></pre>,
});
};
+2 -1
View File
@@ -9,6 +9,7 @@ import {
} from '@ant-design/icons';
import { PageLoading } from '@ant-design/pro-layout';
import { logEnded } from '@/utils';
import Ansi from 'ansi-to-react';
const SubscriptionLogModal = ({
subscription,
@@ -122,7 +123,7 @@ const SubscriptionLogModal = ({
: {}
}
>
{value}
<Ansi>{value}</Ansi>
</pre>
)}
</div>