Browse Source
Merge pull request #1285 from colinin/fix-args-be-null
fix(tasks): Fix args that might be empty
pull/1312/head
yx lin
8 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
5 additions and
1 deletions
-
apps/vben5/packages/@abp/tasks/src/components/job-infos/JobInfoDrawer.vue
-
aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.Domain/LINGYUN/Abp/TaskManagement/BackgroundJobInfo.cs
|
|
|
@ -94,6 +94,7 @@ const [Drawer, drawerApi] = useVbenDrawer({ |
|
|
|
if (isOpen) { |
|
|
|
try { |
|
|
|
formModel.value = { |
|
|
|
args: {}, |
|
|
|
beginTime: formatToDate(new Date()), |
|
|
|
isEnabled: true, |
|
|
|
jobType: JobType.Once, |
|
|
|
|
|
|
|
@ -146,7 +146,10 @@ public class BackgroundJobInfo : AuditedAggregateRoot<string>, IMultiTenant |
|
|
|
// TODO: 是否需要将参数挪到另一个实体?
|
|
|
|
// 任务参数的建议是尽量最小化, 仅存储关键信息
|
|
|
|
Args = new ExtraPropertyDictionary(); |
|
|
|
Args.AddIfNotContains(args); |
|
|
|
if (args != null) |
|
|
|
{ |
|
|
|
Args.AddIfNotContains(args); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public void SetPeriodJob(string cron) |
|
|
|
|