feat(1.4.0-beta1): 1. 修复删除重试信息失败 2. 修复执行失败问题
This commit is contained in:
		
							parent
							
								
									ce1424825e
								
							
						
					
					
						commit
						e1db9e8930
					
				@ -284,7 +284,8 @@ export const retryOperationReasonRecord: Record<Api.Common.RetryOperationReason,
 | 
				
			|||||||
  7: 'common.retryOperationReason.items.mannerStop',
 | 
					  7: 'common.retryOperationReason.items.mannerStop',
 | 
				
			||||||
  8: 'common.retryOperationReason.items.noRunningRetry',
 | 
					  8: 'common.retryOperationReason.items.noRunningRetry',
 | 
				
			||||||
  9: 'common.retryOperationReason.items.sceneClosed',
 | 
					  9: 'common.retryOperationReason.items.sceneClosed',
 | 
				
			||||||
  10: 'common.retryOperationReason.items.retryFail'
 | 
					  10: 'common.retryOperationReason.items.retryFail',
 | 
				
			||||||
 | 
					  11: 'common.retryOperationReason.items.clientTriggerRetryStop'
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
export const retryOperationReasonOptions = transformRecordToNumberOption(retryOperationReasonRecord);
 | 
					export const retryOperationReasonOptions = transformRecordToNumberOption(retryOperationReasonRecord);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -236,7 +236,7 @@ const local: App.I18n.Schema = {
 | 
				
			|||||||
        mannerStop: '手动停止',
 | 
					        mannerStop: '手动停止',
 | 
				
			||||||
        noRunningRetry: '当前重试非运行中',
 | 
					        noRunningRetry: '当前重试非运行中',
 | 
				
			||||||
        sceneClosed: '当前场景已关闭',
 | 
					        sceneClosed: '当前场景已关闭',
 | 
				
			||||||
        retryFail: '重试失败',
 | 
					        retryFail: '客户端执行重试失败',
 | 
				
			||||||
        clientTriggerRetryStop: '客户端触发任务停止'
 | 
					        clientTriggerRetryStop: '客户端触发任务停止'
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										9
									
								
								src/typings/api.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								src/typings/api.d.ts
									
									
									
									
										vendored
									
									
								
							@ -118,8 +118,11 @@ declare namespace Api {
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    type OperationReason = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14;
 | 
					    type OperationReason = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /** 1、任务执行超时 2、无客户端节点 3、JOB已关闭 4、任务丢弃 5、任务被覆盖 6、无可执行任务项 7、任务执行期间发生非预期异常 8、手动停止 8、当前重试非运行中 9、当前场景已关闭 10、重试失败 */
 | 
					    /**
 | 
				
			||||||
    type RetryOperationReason = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
 | 
					     * 1、任务执行超时 2、无客户端节点 3、JOB已关闭 4、任务丢弃 5、任务被覆盖 6、无可执行任务项 7、任务执行期间发生非预期异常 8、手动停止 8、当前重试非运行中 9、当前场景已关闭 10、重试失败
 | 
				
			||||||
 | 
					     * 11、客户端触发任务停止
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    type RetryOperationReason = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /**
 | 
					  /**
 | 
				
			||||||
@ -1249,7 +1252,7 @@ declare namespace Api {
 | 
				
			|||||||
      /** 客户端信息 */
 | 
					      /** 客户端信息 */
 | 
				
			||||||
      clientInfo: string;
 | 
					      clientInfo: string;
 | 
				
			||||||
      /** 失败原因 */
 | 
					      /** 失败原因 */
 | 
				
			||||||
      operationReason: Common.OperationReason;
 | 
					      operationReason: Common.RetryOperationReason;
 | 
				
			||||||
    }>;
 | 
					    }>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /** retryLog search params */
 | 
					    /** retryLog search params */
 | 
				
			||||||
 | 
				
			|||||||
@ -187,14 +187,11 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
 | 
				
			|||||||
            show: row.retryStatus !== 1 && row.retryStatus !== 2,
 | 
					            show: row.retryStatus !== 1 && row.retryStatus !== 2,
 | 
				
			||||||
            render: () => (
 | 
					            render: () => (
 | 
				
			||||||
              <div class="flex-center">
 | 
					              <div class="flex-center">
 | 
				
			||||||
                <NPopconfirm
 | 
					                <NPopconfirm onPositiveClick={() => handleExecute(row.groupName!, row.id! as any)}>
 | 
				
			||||||
                  onPositiveClick={() => handleExecute(row.groupName!, row.id! as any)}
 | 
					 | 
				
			||||||
                  v-if="row.retryStatus !== 1 && row.retryStatus !== 2"
 | 
					 | 
				
			||||||
                >
 | 
					 | 
				
			||||||
                  {{
 | 
					                  {{
 | 
				
			||||||
                    default: () => $t('common.confirmExecute'),
 | 
					                    default: () => $t('common.confirmExecute'),
 | 
				
			||||||
                    trigger: () => (
 | 
					                    trigger: () => (
 | 
				
			||||||
                      <NButton type="error" text ghost size="small">
 | 
					                      <NButton type="error" quaternary size="small">
 | 
				
			||||||
                        {$t('common.execute')}
 | 
					                        {$t('common.execute')}
 | 
				
			||||||
                      </NButton>
 | 
					                      </NButton>
 | 
				
			||||||
                    )
 | 
					                    )
 | 
				
			||||||
@ -219,7 +216,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
 | 
				
			|||||||
                  {{
 | 
					                  {{
 | 
				
			||||||
                    default: () => $t('common.confirmPause'),
 | 
					                    default: () => $t('common.confirmPause'),
 | 
				
			||||||
                    trigger: () => (
 | 
					                    trigger: () => (
 | 
				
			||||||
                      <NButton type="success" text ghost size="small">
 | 
					                      <NButton type="success" quaternary size="small">
 | 
				
			||||||
                        {$t('common.pause')}
 | 
					                        {$t('common.pause')}
 | 
				
			||||||
                      </NButton>
 | 
					                      </NButton>
 | 
				
			||||||
                    )
 | 
					                    )
 | 
				
			||||||
@ -231,7 +228,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
 | 
				
			|||||||
          {
 | 
					          {
 | 
				
			||||||
            type: 'divider',
 | 
					            type: 'divider',
 | 
				
			||||||
            key: 'd2',
 | 
					            key: 'd2',
 | 
				
			||||||
            show: row.retryStatus === 0
 | 
					            show: row.retryStatus === 3
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            label: $t('common.pause'),
 | 
					            label: $t('common.pause'),
 | 
				
			||||||
@ -244,7 +241,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
 | 
				
			|||||||
                  {{
 | 
					                  {{
 | 
				
			||||||
                    default: () => $t('common.confirmResume'),
 | 
					                    default: () => $t('common.confirmResume'),
 | 
				
			||||||
                    trigger: () => (
 | 
					                    trigger: () => (
 | 
				
			||||||
                      <NButton type="info" text ghost size="small">
 | 
					                      <NButton type="info" quaternary size="small">
 | 
				
			||||||
                        {$t('common.resume')}
 | 
					                        {$t('common.resume')}
 | 
				
			||||||
                      </NButton>
 | 
					                      </NButton>
 | 
				
			||||||
                    )
 | 
					                    )
 | 
				
			||||||
@ -256,7 +253,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
 | 
				
			|||||||
          {
 | 
					          {
 | 
				
			||||||
            type: 'divider',
 | 
					            type: 'divider',
 | 
				
			||||||
            key: 'd2',
 | 
					            key: 'd2',
 | 
				
			||||||
            show: row.retryStatus === 0
 | 
					            show: row.retryStatus !== 1 && row.retryStatus !== 2
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            label: $t('common.finish'),
 | 
					            label: $t('common.finish'),
 | 
				
			||||||
@ -268,7 +265,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
 | 
				
			|||||||
                  {{
 | 
					                  {{
 | 
				
			||||||
                    default: () => $t('common.confirmFinish'),
 | 
					                    default: () => $t('common.confirmFinish'),
 | 
				
			||||||
                    trigger: () => (
 | 
					                    trigger: () => (
 | 
				
			||||||
                      <NButton type="warning" text ghost size="small">
 | 
					                      <NButton type="warning" quaternary size="small">
 | 
				
			||||||
                        {$t('common.finish')}
 | 
					                        {$t('common.finish')}
 | 
				
			||||||
                      </NButton>
 | 
					                      </NButton>
 | 
				
			||||||
                    )
 | 
					                    )
 | 
				
			||||||
@ -277,7 +274,6 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
 | 
				
			|||||||
              </div>
 | 
					              </div>
 | 
				
			||||||
            )
 | 
					            )
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
 | 
					 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            type: 'divider',
 | 
					            type: 'divider',
 | 
				
			||||||
            key: 'd2'
 | 
					            key: 'd2'
 | 
				
			||||||
 | 
				
			|||||||
@ -148,7 +148,7 @@ async function setIdempotentId() {
 | 
				
			|||||||
  const groupName = model.groupName;
 | 
					  const groupName = model.groupName;
 | 
				
			||||||
  const sceneName = model.sceneName;
 | 
					  const sceneName = model.sceneName;
 | 
				
			||||||
  const executorName = model.executorName;
 | 
					  const executorName = model.executorName;
 | 
				
			||||||
  const argsStr = model.argsStr;
 | 
					  const argsStr = JSON.stringify(argsList.value);
 | 
				
			||||||
  const { data: idempotentId, error } = await fetchIdempotentIdGenerate({
 | 
					  const { data: idempotentId, error } = await fetchIdempotentIdGenerate({
 | 
				
			||||||
    groupName,
 | 
					    groupName,
 | 
				
			||||||
    sceneName,
 | 
					    sceneName,
 | 
				
			||||||
@ -174,6 +174,35 @@ async function setIdempotentId() {
 | 
				
			|||||||
          :disabled="props.operateType === 'edit'"
 | 
					          :disabled="props.operateType === 'edit'"
 | 
				
			||||||
        />
 | 
					        />
 | 
				
			||||||
      </NFormItem>
 | 
					      </NFormItem>
 | 
				
			||||||
 | 
					      <NFormItem :label="$t('page.retryTask.bizNo')" path="bizNo">
 | 
				
			||||||
 | 
					        <NInput
 | 
				
			||||||
 | 
					          v-model:value="model.bizNo"
 | 
				
			||||||
 | 
					          :placeholder="$t('page.retryTask.form.bizNo')"
 | 
				
			||||||
 | 
					          :disabled="props.operateType === 'edit'"
 | 
				
			||||||
 | 
					        />
 | 
				
			||||||
 | 
					      </NFormItem>
 | 
				
			||||||
 | 
					      <NFormItem :label="$t('page.retry.executorName')" path="executorName">
 | 
				
			||||||
 | 
					        <NInput
 | 
				
			||||||
 | 
					          v-model:value="model.executorName"
 | 
				
			||||||
 | 
					          :placeholder="$t('page.retry.form.executorName')"
 | 
				
			||||||
 | 
					          :disabled="props.operateType === 'edit'"
 | 
				
			||||||
 | 
					        />
 | 
				
			||||||
 | 
					      </NFormItem>
 | 
				
			||||||
 | 
					      <NFormItem :label="$t('page.retry.argsStr')" path="argsStr">
 | 
				
			||||||
 | 
					        <NDynamicInput v-model:value="argsList" :on-create="() => ''">
 | 
				
			||||||
 | 
					          <template #default="{ index }">
 | 
				
			||||||
 | 
					            <NFormItem
 | 
				
			||||||
 | 
					              class="w-full"
 | 
				
			||||||
 | 
					              ignore-path-change
 | 
				
			||||||
 | 
					              :show-label="false"
 | 
				
			||||||
 | 
					              :show-feedback="false"
 | 
				
			||||||
 | 
					              :path="`argsStr[${index}]`"
 | 
				
			||||||
 | 
					            >
 | 
				
			||||||
 | 
					              <CodeMirror v-model="argsList[index]" lang="json" :placeholder="$t('page.retry.argsStr')" />
 | 
				
			||||||
 | 
					            </NFormItem>
 | 
				
			||||||
 | 
					          </template>
 | 
				
			||||||
 | 
					        </NDynamicInput>
 | 
				
			||||||
 | 
					      </NFormItem>
 | 
				
			||||||
      <NFormItem :label="$t('page.retryTask.idempotentId')" path="idempotentId">
 | 
					      <NFormItem :label="$t('page.retryTask.idempotentId')" path="idempotentId">
 | 
				
			||||||
        <NInputGroup>
 | 
					        <NInputGroup>
 | 
				
			||||||
          <NInput
 | 
					          <NInput
 | 
				
			||||||
@ -187,43 +216,14 @@ async function setIdempotentId() {
 | 
				
			|||||||
                <icon-clarity:thin-client-solid class="text-icon" />
 | 
					                <icon-clarity:thin-client-solid class="text-icon" />
 | 
				
			||||||
              </NButton>
 | 
					              </NButton>
 | 
				
			||||||
            </template>
 | 
					            </template>
 | 
				
			||||||
            {{ $t('page.retryTask.generateIdempotentId') }}
 | 
					            {{ $t('page.retry.generateIdempotentId') }}
 | 
				
			||||||
          </NTooltip>
 | 
					          </NTooltip>
 | 
				
			||||||
        </NInputGroup>
 | 
					        </NInputGroup>
 | 
				
			||||||
      </NFormItem>
 | 
					      </NFormItem>
 | 
				
			||||||
      <NFormItem :label="$t('page.retryTask.bizNo')" path="bizNo">
 | 
					      <NFormItem :label="$t('page.retry.retryStatus')" path="retryStatus">
 | 
				
			||||||
        <NInput
 | 
					 | 
				
			||||||
          v-model:value="model.bizNo"
 | 
					 | 
				
			||||||
          :placeholder="$t('page.retryTask.form.bizNo')"
 | 
					 | 
				
			||||||
          :disabled="props.operateType === 'edit'"
 | 
					 | 
				
			||||||
        />
 | 
					 | 
				
			||||||
      </NFormItem>
 | 
					 | 
				
			||||||
      <NFormItem :label="$t('page.retryTask.executorName')" path="executorName">
 | 
					 | 
				
			||||||
        <NInput
 | 
					 | 
				
			||||||
          v-model:value="model.executorName"
 | 
					 | 
				
			||||||
          :placeholder="$t('page.retryTask.form.executorName')"
 | 
					 | 
				
			||||||
          :disabled="props.operateType === 'edit'"
 | 
					 | 
				
			||||||
        />
 | 
					 | 
				
			||||||
      </NFormItem>
 | 
					 | 
				
			||||||
      <NFormItem :label="$t('page.retryTask.argsStr')" path="argsStr">
 | 
					 | 
				
			||||||
        <NDynamicInput v-model:value="argsList" :on-create="() => ''">
 | 
					 | 
				
			||||||
          <template #default="{ index }">
 | 
					 | 
				
			||||||
            <NFormItem
 | 
					 | 
				
			||||||
              class="w-full"
 | 
					 | 
				
			||||||
              ignore-path-change
 | 
					 | 
				
			||||||
              :show-label="false"
 | 
					 | 
				
			||||||
              :show-feedback="false"
 | 
					 | 
				
			||||||
              :path="`argsStr[${index}]`"
 | 
					 | 
				
			||||||
            >
 | 
					 | 
				
			||||||
              <CodeMirror v-model="argsList[index]" lang="json" :placeholder="$t('page.jobTask.form.argsStr')" />
 | 
					 | 
				
			||||||
            </NFormItem>
 | 
					 | 
				
			||||||
          </template>
 | 
					 | 
				
			||||||
        </NDynamicInput>
 | 
					 | 
				
			||||||
      </NFormItem>
 | 
					 | 
				
			||||||
      <NFormItem :label="$t('page.retryTask.retryStatus')" path="retryStatus">
 | 
					 | 
				
			||||||
        <NSelect
 | 
					        <NSelect
 | 
				
			||||||
          v-model:value="model.retryStatus"
 | 
					          v-model:value="model.retryStatus"
 | 
				
			||||||
          :placeholder="$t('page.retryTask.form.retryStatus')"
 | 
					          :placeholder="$t('page.retry.form.retryStatus')"
 | 
				
			||||||
          :options="translateOptions(retryStatusTypeOptions)"
 | 
					          :options="translateOptions(retryStatusTypeOptions)"
 | 
				
			||||||
        />
 | 
					        />
 | 
				
			||||||
      </NFormItem>
 | 
					      </NFormItem>
 | 
				
			||||||
 | 
				
			|||||||
@ -12,7 +12,7 @@ import {
 | 
				
			|||||||
import { $t } from '@/locales';
 | 
					import { $t } from '@/locales';
 | 
				
			||||||
import { useAppStore } from '@/store/modules/app';
 | 
					import { useAppStore } from '@/store/modules/app';
 | 
				
			||||||
import { useTable, useTableOperate } from '@/hooks/common/table';
 | 
					import { useTable, useTableOperate } from '@/hooks/common/table';
 | 
				
			||||||
import { operationReasonRecord, retryTaskStatusTypeRecord, retryTaskTypeRecord } from '@/constants/business';
 | 
					import { retryOperationReasonRecord, retryTaskStatusTypeRecord, retryTaskTypeRecord } from '@/constants/business';
 | 
				
			||||||
import { monthRangeISO8601, tagColor } from '@/utils/common';
 | 
					import { monthRangeISO8601, tagColor } from '@/utils/common';
 | 
				
			||||||
import SvgIcon from '@/components/custom/svg-icon.vue';
 | 
					import SvgIcon from '@/components/custom/svg-icon.vue';
 | 
				
			||||||
import RetryLogSearch from './modules/retry-task-search.vue';
 | 
					import RetryLogSearch from './modules/retry-task-search.vue';
 | 
				
			||||||
@ -142,12 +142,12 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
 | 
				
			|||||||
      key: 'operationReason',
 | 
					      key: 'operationReason',
 | 
				
			||||||
      title: $t('page.retryTask.operationReason'),
 | 
					      title: $t('page.retryTask.operationReason'),
 | 
				
			||||||
      align: 'center',
 | 
					      align: 'center',
 | 
				
			||||||
      width: 120,
 | 
					      width: 240,
 | 
				
			||||||
      render: row => {
 | 
					      render: row => {
 | 
				
			||||||
        if (row.operationReason === null) {
 | 
					        if (row.operationReason === null) {
 | 
				
			||||||
          return null;
 | 
					          return null;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        const label = $t(operationReasonRecord[row.operationReason!]);
 | 
					        const label = $t(retryOperationReasonRecord[row.operationReason!]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return <NTag type={tagColor(row.operationReason!)}>{label}</NTag>;
 | 
					        return <NTag type={tagColor(row.operationReason!)}>{label}</NTag>;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user