mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-02 04:07:50 +08:00
chore: mutex task message of import and export (#4834)
This commit is contained in:
parent
2de6e2d0cc
commit
4b2ac3eeb0
@ -1,4 +1,5 @@
|
||||
{
|
||||
"Export warning": "每次最多导出 {{limit}} 行数据,超出的将被忽略。",
|
||||
"Start export": "开始导出"
|
||||
"Start export": "开始导出",
|
||||
"another export action is running, please try again later.": "另一导出任务正在运行,请稍后重试。"
|
||||
}
|
||||
|
@ -54,7 +54,11 @@ async function exportXlsxAction(ctx: Context, next: Next) {
|
||||
|
||||
export async function exportXlsx(ctx: Context, next: Next) {
|
||||
if (mutex.isLocked()) {
|
||||
throw new Error(`another export action is running, please try again later.`);
|
||||
throw new Error(
|
||||
ctx.t(`another export action is running, please try again later.`, {
|
||||
ns: 'action-export',
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
const release = await mutex.acquire();
|
||||
|
@ -25,5 +25,6 @@
|
||||
"Incorrect date format": "日期格式不正确",
|
||||
"Incorrect email format": "邮箱格式不正确",
|
||||
"Illegal percentage format": "百分比格式有误",
|
||||
"Imported template does not match, please download again.": "导入模板不匹配,请检查导入文件标题行或重新下载导入模板"
|
||||
"Imported template does not match, please download again.": "导入模板不匹配,请检查导入文件标题行或重新下载导入模板",
|
||||
"another import action is running, please try again later.": "另一导入任务正在运行,请稍后重试。"
|
||||
}
|
||||
|
@ -59,7 +59,11 @@ async function importXlsxAction(ctx: Context, next: Next) {
|
||||
|
||||
export async function importXlsx(ctx: Context, next: Next) {
|
||||
if (mutex.isLocked()) {
|
||||
throw new Error(`another import action is running, please try again later.`);
|
||||
throw new Error(
|
||||
ctx.t(`another import action is running, please try again later.`, {
|
||||
ns: 'action-import',
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
const release = await mutex.acquire();
|
||||
|
Loading…
Reference in New Issue
Block a user