删除Row、FetchSpeed、ThreadID等字段

This commit is contained in:
大石头 2019-04-07 14:36:36 +08:00
parent 7dfd8173d4
commit 2e81e50a9c
11 changed files with 36 additions and 187 deletions

View File

@ -209,7 +209,6 @@ namespace AntJob.Data.Entity
Success = 0;
Times = 0;
Speed = 0;
FetchSpeed = 0;
Error = 0;
Save();

View File

@ -232,14 +232,6 @@ namespace AntJob.Data.Entity
[BindColumn("Speed", "速度", "")]
public Int32 Speed { get { return _Speed; } set { if (OnPropertyChanging(__.Speed, value)) { _Speed = value; OnPropertyChanged(__.Speed); } } }
private Int32 _FetchSpeed;
/// <summary>抽取速度</summary>
[DisplayName("抽取速度")]
[Description("抽取速度")]
[DataObjectField(false, false, false, 0)]
[BindColumn("FetchSpeed", "抽取速度", "")]
public Int32 FetchSpeed { get { return _FetchSpeed; } set { if (OnPropertyChanging(__.FetchSpeed, value)) { _FetchSpeed = value; OnPropertyChanged(__.FetchSpeed); } } }
private Boolean _Enable;
/// <summary>启用</summary>
[DisplayName("启用")]
@ -358,7 +350,6 @@ namespace AntJob.Data.Entity
case __.Error : return _Error;
case __.Times : return _Times;
case __.Speed : return _Speed;
case __.FetchSpeed : return _FetchSpeed;
case __.Enable : return _Enable;
case __.Description : return _Description;
case __.CreateUserID : return _CreateUserID;
@ -403,7 +394,6 @@ namespace AntJob.Data.Entity
case __.Error : _Error = value.ToInt(); break;
case __.Times : _Times = value.ToInt(); break;
case __.Speed : _Speed = value.ToInt(); break;
case __.FetchSpeed : _FetchSpeed = value.ToInt(); break;
case __.Enable : _Enable = value.ToBoolean(); break;
case __.Description : _Description = Convert.ToString(value); break;
case __.CreateUserID : _CreateUserID = value.ToInt(); break;
@ -505,9 +495,6 @@ namespace AntJob.Data.Entity
/// <summary>速度</summary>
public static readonly Field Speed = FindByName(__.Speed);
/// <summary>抽取速度</summary>
public static readonly Field FetchSpeed = FindByName(__.FetchSpeed);
/// <summary>启用</summary>
public static readonly Field Enable = FindByName(__.Enable);
@ -625,9 +612,6 @@ namespace AntJob.Data.Entity
/// <summary>速度</summary>
public const String Speed = "Speed";
/// <summary>抽取速度</summary>
public const String FetchSpeed = "FetchSpeed";
/// <summary>启用</summary>
public const String Enable = "Enable";
@ -746,9 +730,6 @@ namespace AntJob.Data.Entity
/// <summary>速度</summary>
Int32 Speed { get; set; }
/// <summary>抽取速度</summary>
Int32 FetchSpeed { get; set; }
/// <summary>启用</summary>
Boolean Enable { get; set; }

View File

@ -171,7 +171,6 @@ namespace AntJob.Data.Entity
/// <summary>重置</summary>
public void Reset()
{
Row = 0;
Total = 0;
Success = 0;
Status = JobStatus.;

View File

@ -74,14 +74,6 @@ namespace AntJob.Data.Entity
[BindColumn("End", "结束。小于,不等于", "")]
public DateTime End { get { return _End; } set { if (OnPropertyChanging(__.End, value)) { _End = value; OnPropertyChanged(__.End); } } }
private Int32 _Row;
/// <summary>行。分页起始行</summary>
[DisplayName("行")]
[Description("行。分页起始行")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Row", "行。分页起始行", "")]
public Int32 Row { get { return _Row; } set { if (OnPropertyChanging(__.Row, value)) { _Row = value; OnPropertyChanged(__.Row); } } }
private Int32 _Step;
/// <summary>步进。最大区间大小,秒</summary>
[DisplayName("步进")]
@ -146,14 +138,6 @@ namespace AntJob.Data.Entity
[BindColumn("Speed", "速度", "")]
public Int32 Speed { get { return _Speed; } set { if (OnPropertyChanging(__.Speed, value)) { _Speed = value; OnPropertyChanged(__.Speed); } } }
private Int32 _FetchSpeed;
/// <summary>抽取速度</summary>
[DisplayName("抽取速度")]
[Description("抽取速度")]
[DataObjectField(false, false, false, 0)]
[BindColumn("FetchSpeed", "抽取速度", "")]
public Int32 FetchSpeed { get { return _FetchSpeed; } set { if (OnPropertyChanging(__.FetchSpeed, value)) { _FetchSpeed = value; OnPropertyChanged(__.FetchSpeed); } } }
private Int32 _Cost;
/// <summary>耗时。秒</summary>
[DisplayName("耗时")]
@ -202,14 +186,6 @@ namespace AntJob.Data.Entity
[BindColumn("ProcessID", "进程", "")]
public Int32 ProcessID { get { return _ProcessID; } set { if (OnPropertyChanging(__.ProcessID, value)) { _ProcessID = value; OnPropertyChanged(__.ProcessID); } } }
private Int32 _ThreadID;
/// <summary>线程</summary>
[DisplayName("线程")]
[Description("线程")]
[DataObjectField(false, false, false, 0)]
[BindColumn("ThreadID", "线程", "")]
public Int32 ThreadID { get { return _ThreadID; } set { if (OnPropertyChanging(__.ThreadID, value)) { _ThreadID = value; OnPropertyChanged(__.ThreadID); } } }
private String _Key;
/// <summary>最后键</summary>
[DisplayName("最后键")]
@ -268,7 +244,6 @@ namespace AntJob.Data.Entity
case __.Client : return _Client;
case __.Start : return _Start;
case __.End : return _End;
case __.Row : return _Row;
case __.Step : return _Step;
case __.BatchSize : return _BatchSize;
case __.Offset : return _Offset;
@ -277,14 +252,12 @@ namespace AntJob.Data.Entity
case __.Error : return _Error;
case __.Times : return _Times;
case __.Speed : return _Speed;
case __.FetchSpeed : return _FetchSpeed;
case __.Cost : return _Cost;
case __.FullCost : return _FullCost;
case __.Status : return _Status;
case __.MsgCount : return _MsgCount;
case __.Server : return _Server;
case __.ProcessID : return _ProcessID;
case __.ThreadID : return _ThreadID;
case __.Key : return _Key;
case __.Data : return _Data;
case __.Message : return _Message;
@ -304,7 +277,6 @@ namespace AntJob.Data.Entity
case __.Client : _Client = Convert.ToString(value); break;
case __.Start : _Start = value.ToDateTime(); break;
case __.End : _End = value.ToDateTime(); break;
case __.Row : _Row = value.ToInt(); break;
case __.Step : _Step = value.ToInt(); break;
case __.BatchSize : _BatchSize = value.ToInt(); break;
case __.Offset : _Offset = value.ToInt(); break;
@ -313,14 +285,12 @@ namespace AntJob.Data.Entity
case __.Error : _Error = value.ToInt(); break;
case __.Times : _Times = value.ToInt(); break;
case __.Speed : _Speed = value.ToInt(); break;
case __.FetchSpeed : _FetchSpeed = value.ToInt(); break;
case __.Cost : _Cost = value.ToInt(); break;
case __.FullCost : _FullCost = value.ToInt(); break;
case __.Status : _Status = (JobStatus)value.ToInt(); break;
case __.MsgCount : _MsgCount = value.ToInt(); break;
case __.Server : _Server = Convert.ToString(value); break;
case __.ProcessID : _ProcessID = value.ToInt(); break;
case __.ThreadID : _ThreadID = value.ToInt(); break;
case __.Key : _Key = Convert.ToString(value); break;
case __.Data : _Data = Convert.ToString(value); break;
case __.Message : _Message = Convert.ToString(value); break;
@ -357,9 +327,6 @@ namespace AntJob.Data.Entity
/// <summary>结束。小于,不等于</summary>
public static readonly Field End = FindByName(__.End);
/// <summary>行。分页起始行</summary>
public static readonly Field Row = FindByName(__.Row);
/// <summary>步进。最大区间大小,秒</summary>
public static readonly Field Step = FindByName(__.Step);
@ -384,9 +351,6 @@ namespace AntJob.Data.Entity
/// <summary>速度</summary>
public static readonly Field Speed = FindByName(__.Speed);
/// <summary>抽取速度</summary>
public static readonly Field FetchSpeed = FindByName(__.FetchSpeed);
/// <summary>耗时。秒</summary>
public static readonly Field Cost = FindByName(__.Cost);
@ -405,9 +369,6 @@ namespace AntJob.Data.Entity
/// <summary>进程</summary>
public static readonly Field ProcessID = FindByName(__.ProcessID);
/// <summary>线程</summary>
public static readonly Field ThreadID = FindByName(__.ThreadID);
/// <summary>最后键</summary>
public static readonly Field Key = FindByName(__.Key);
@ -450,9 +411,6 @@ namespace AntJob.Data.Entity
/// <summary>结束。小于,不等于</summary>
public const String End = "End";
/// <summary>行。分页起始行</summary>
public const String Row = "Row";
/// <summary>步进。最大区间大小,秒</summary>
public const String Step = "Step";
@ -477,9 +435,6 @@ namespace AntJob.Data.Entity
/// <summary>速度</summary>
public const String Speed = "Speed";
/// <summary>抽取速度</summary>
public const String FetchSpeed = "FetchSpeed";
/// <summary>耗时。秒</summary>
public const String Cost = "Cost";
@ -498,9 +453,6 @@ namespace AntJob.Data.Entity
/// <summary>进程</summary>
public const String ProcessID = "ProcessID";
/// <summary>线程</summary>
public const String ThreadID = "ThreadID";
/// <summary>最后键</summary>
public const String Key = "Key";
@ -544,9 +496,6 @@ namespace AntJob.Data.Entity
/// <summary>结束。小于,不等于</summary>
DateTime End { get; set; }
/// <summary>行。分页起始行</summary>
Int32 Row { get; set; }
/// <summary>步进。最大区间大小,秒</summary>
Int32 Step { get; set; }
@ -571,9 +520,6 @@ namespace AntJob.Data.Entity
/// <summary>速度</summary>
Int32 Speed { get; set; }
/// <summary>抽取速度</summary>
Int32 FetchSpeed { get; set; }
/// <summary>耗时。秒</summary>
Int32 Cost { get; set; }
@ -592,9 +538,6 @@ namespace AntJob.Data.Entity
/// <summary>进程</summary>
Int32 ProcessID { get; set; }
/// <summary>线程</summary>
Int32 ThreadID { get; set; }
/// <summary>最后键</summary>
String Key { get; set; }

View File

@ -75,14 +75,6 @@ namespace AntJob.Data.Entity
[BindColumn("End", "结束。小于,不等于", "")]
public DateTime End { get { return _End; } set { if (OnPropertyChanging(__.End, value)) { _End = value; OnPropertyChanged(__.End); } } }
private Int32 _Row;
/// <summary>行。分页起始行</summary>
[DisplayName("行")]
[Description("行。分页起始行")]
[DataObjectField(false, false, false, 0)]
[BindColumn("Row", "行。分页起始行", "")]
public Int32 Row { get { return _Row; } set { if (OnPropertyChanging(__.Row, value)) { _Row = value; OnPropertyChanged(__.Row); } } }
private Int32 _Step;
/// <summary>步进。最大区间大小,秒</summary>
[DisplayName("步进")]
@ -131,14 +123,6 @@ namespace AntJob.Data.Entity
[BindColumn("ProcessID", "进程", "")]
public Int32 ProcessID { get { return _ProcessID; } set { if (OnPropertyChanging(__.ProcessID, value)) { _ProcessID = value; OnPropertyChanged(__.ProcessID); } } }
private Int32 _ThreadID;
/// <summary>线程</summary>
[DisplayName("线程")]
[Description("线程")]
[DataObjectField(false, false, false, 0)]
[BindColumn("ThreadID", "线程", "")]
public Int32 ThreadID { get { return _ThreadID; } set { if (OnPropertyChanging(__.ThreadID, value)) { _ThreadID = value; OnPropertyChanged(__.ThreadID); } } }
private String _ErrorCode;
/// <summary>错误码</summary>
[DisplayName("错误码")]
@ -189,14 +173,12 @@ namespace AntJob.Data.Entity
case __.Client : return _Client;
case __.Start : return _Start;
case __.End : return _End;
case __.Row : return _Row;
case __.Step : return _Step;
case __.BatchSize : return _BatchSize;
case __.Key : return _Key;
case __.Data : return _Data;
case __.Server : return _Server;
case __.ProcessID : return _ProcessID;
case __.ThreadID : return _ThreadID;
case __.ErrorCode : return _ErrorCode;
case __.Message : return _Message;
case __.CreateTime : return _CreateTime;
@ -215,14 +197,12 @@ namespace AntJob.Data.Entity
case __.Client : _Client = Convert.ToString(value); break;
case __.Start : _Start = value.ToDateTime(); break;
case __.End : _End = value.ToDateTime(); break;
case __.Row : _Row = value.ToInt(); break;
case __.Step : _Step = value.ToInt(); break;
case __.BatchSize : _BatchSize = value.ToInt(); break;
case __.Key : _Key = Convert.ToString(value); break;
case __.Data : _Data = Convert.ToString(value); break;
case __.Server : _Server = Convert.ToString(value); break;
case __.ProcessID : _ProcessID = value.ToInt(); break;
case __.ThreadID : _ThreadID = value.ToInt(); break;
case __.ErrorCode : _ErrorCode = Convert.ToString(value); break;
case __.Message : _Message = Convert.ToString(value); break;
case __.CreateTime : _CreateTime = value.ToDateTime(); break;
@ -258,9 +238,6 @@ namespace AntJob.Data.Entity
/// <summary>结束。小于,不等于</summary>
public static readonly Field End = FindByName(__.End);
/// <summary>行。分页起始行</summary>
public static readonly Field Row = FindByName(__.Row);
/// <summary>步进。最大区间大小,秒</summary>
public static readonly Field Step = FindByName(__.Step);
@ -279,9 +256,6 @@ namespace AntJob.Data.Entity
/// <summary>进程</summary>
public static readonly Field ProcessID = FindByName(__.ProcessID);
/// <summary>线程</summary>
public static readonly Field ThreadID = FindByName(__.ThreadID);
/// <summary>错误码</summary>
public static readonly Field ErrorCode = FindByName(__.ErrorCode);
@ -321,9 +295,6 @@ namespace AntJob.Data.Entity
/// <summary>结束。小于,不等于</summary>
public const String End = "End";
/// <summary>行。分页起始行</summary>
public const String Row = "Row";
/// <summary>步进。最大区间大小,秒</summary>
public const String Step = "Step";
@ -342,9 +313,6 @@ namespace AntJob.Data.Entity
/// <summary>进程</summary>
public const String ProcessID = "ProcessID";
/// <summary>线程</summary>
public const String ThreadID = "ThreadID";
/// <summary>错误码</summary>
public const String ErrorCode = "ErrorCode";
@ -385,9 +353,6 @@ namespace AntJob.Data.Entity
/// <summary>结束。小于,不等于</summary>
DateTime End { get; set; }
/// <summary>行。分页起始行</summary>
Int32 Row { get; set; }
/// <summary>步进。最大区间大小,秒</summary>
Int32 Step { get; set; }
@ -406,9 +371,6 @@ namespace AntJob.Data.Entity
/// <summary>进程</summary>
Int32 ProcessID { get; set; }
/// <summary>线程</summary>
Int32 ThreadID { get; set; }
/// <summary>错误码</summary>
String ErrorCode { get; set; }

View File

@ -81,7 +81,6 @@
<Column Name="Error" DataType="Int32" Description="错误" />
<Column Name="Times" DataType="Int32" Description="次数" />
<Column Name="Speed" DataType="Int32" Description="速度" />
<Column Name="FetchSpeed" DataType="Int32" Description="抽取速度" />
<Column Name="Enable" DataType="Boolean" Description="启用" />
<Column Name="Description" ColumnName="Message" DataType="String" Length="2000" Description="内容" />
<Column Name="CreateUserID" DataType="Int32" Description="创建者" />
@ -106,7 +105,6 @@
<Column Name="Client" DataType="String" Description="客户端。IP加进程" />
<Column Name="Start" DataType="DateTime" Description="开始。大于等于" />
<Column Name="End" DataType="DateTime" Description="结束。小于,不等于" />
<Column Name="Row" DataType="Int32" Description="行。分页起始行" />
<Column Name="Step" DataType="Int32" Description="步进。最大区间大小,秒" />
<Column Name="BatchSize" DataType="Int32" Description="批大小" />
<Column Name="Offset" DataType="Int32" Description="偏移。距离实时时间的秒数,部分业务不能跑到实时,秒" />
@ -115,14 +113,12 @@
<Column Name="Error" DataType="Int32" Description="错误" />
<Column Name="Times" DataType="Int32" Description="次数" />
<Column Name="Speed" DataType="Int32" Description="速度" />
<Column Name="FetchSpeed" DataType="Int32" Description="抽取速度" />
<Column Name="Cost" DataType="Int32" Description="耗时。秒" />
<Column Name="FullCost" DataType="Int32" Description="全部耗时。秒,从任务发放到执行完成的时间" />
<Column Name="Status" DataType="Int32" Description="状态" Type="JobStatus" />
<Column Name="MsgCount" DataType="Int32" Description="消费消息数" />
<Column Name="Server" DataType="String" Description="服务器" />
<Column Name="ProcessID" DataType="Int32" Description="进程" />
<Column Name="ThreadID" DataType="Int32" Description="线程" />
<Column Name="Key" DataType="String" Description="最后键" />
<Column Name="Data" DataType="String" Length="8000" Description="数据。可以是Json数据比如StatID" />
<Column Name="Message" DataType="String" Length="2000" Description="备注" />
@ -144,14 +140,12 @@
<Column Name="Client" DataType="String" Description="客户端。IP加进程" />
<Column Name="Start" DataType="DateTime" Description="开始。大于等于" />
<Column Name="End" DataType="DateTime" Description="结束。小于,不等于" />
<Column Name="Row" DataType="Int32" Description="行。分页起始行" />
<Column Name="Step" DataType="Int32" Description="步进。最大区间大小,秒" />
<Column Name="BatchSize" DataType="Int32" Description="批大小" />
<Column Name="Key" DataType="String" Description="数据键" />
<Column Name="Data" DataType="String" Length="2000" Description="数据" />
<Column Name="Server" DataType="String" Description="服务器" />
<Column Name="ProcessID" DataType="Int32" Description="进程" />
<Column Name="ThreadID" DataType="Int32" Description="线程" />
<Column Name="ErrorCode" DataType="String" Description="错误码" />
<Column Name="Message" DataType="String" Length="2000" Description="内容" />
<Column Name="CreateTime" DataType="DateTime" Description="创建时间" />

View File

@ -399,42 +399,38 @@ namespace AntJob.Server
#region
/// <summary>报告状态(进度、成功、错误)</summary>
/// <param name="item"></param>
/// <param name="task"></param>
/// <returns></returns>
[Api(nameof(Report))]
public Boolean Report(JobTask item)
public Boolean Report(JobTask task)
{
if (item == null || item.ID == 0) throw new InvalidOperationException("无效操作 JobItemID=" + item?.ID);
if (task == null || task.ID == 0) throw new InvalidOperationException("无效操作 JobItemID=" + task?.ID);
// 判断是否有权
var app = Session["App"] as App;
var ji = JobTask.FindByID(item.ID);
if (ji == null) throw new InvalidOperationException($"找不到任务[{item.ID}]");
var ji = JobTask.FindByID(task.ID);
if (ji == null) throw new InvalidOperationException($"找不到任务[{task.ID}]");
var job = Job.FindByID(ji.JobID);
if (job == null || job.AppID != app.ID)
{
XTrace.WriteLine(item.ToJson());
XTrace.WriteLine(task.ToJson());
throw new InvalidOperationException($"应用[{app}]无权操作作业[{job}#{ji}]");
}
// 只有部分字段允许客户端修改
if (item.Status > 0) ji.Status = item.Status;
if (task.Status > 0) ji.Status = task.Status;
ji.Row = item.Row;
ji.FetchSpeed = item.FetchSpeed;
ji.Speed = item.Speed;
ji.Total = item.Total;
ji.Success = item.Success;
ji.Cost = item.Cost;
ji.Key = item.Key;
ji.Message = item.Message;
ji.ThreadID = item.ThreadID;
ji.Speed = task.Speed;
ji.Total = task.Total;
ji.Success = task.Success;
ji.Cost = task.Cost;
ji.Key = task.Key;
ji.Message = task.Message;
// 动态调整步进
if (item.Status == JobStatus.)
if (task.Status == JobStatus.)
{
AdjustStep(job, ji, Session as IExtend);
@ -442,7 +438,7 @@ namespace AntJob.Server
//UpdateLatency(job, ji);
}
// 已终结的作业,汇总统计
if (item.Status == JobStatus. || item.Status == JobStatus.)
if (task.Status == JobStatus. || task.Status == JobStatus.)
{
ji.Times++;
@ -451,7 +447,7 @@ namespace AntJob.Server
// 记录状态
UpdateOnline(app, ji, Session as INetSession);
}
if (item.Status == JobStatus.)
if (task.Status == JobStatus.)
{
var ps = ControllerContext.Current.Parameters;
@ -474,18 +470,16 @@ namespace AntJob.Server
return true;
}
//private static readonly MsgRpcClient _MsgClient = new MsgRpcClient();
private void SetJobFinish(Job job, JobTask ji)
private void SetJobFinish(Job job, JobTask task)
{
job.Total += ji.Total;
job.Success += ji.Success;
job.Error += ji.Error;
job.Total += task.Total;
job.Success += task.Success;
job.Error += task.Error;
job.Times++;
var ths = job.MaxTask;
var p1 = ji.Speed * ths;
var p2 = ji.FetchSpeed * ths;
var p1 = task.Speed * ths;
if (p1 > 0)
{
@ -496,37 +490,27 @@ namespace AntJob.Server
job.Speed = p1;
}
if (p2 > 0)
{
if (job.FetchSpeed > 0)
job.FetchSpeed = (Int32)((job.FetchSpeed * 3L + p2) / 4);
else
job.FetchSpeed = p2;
}
job.SaveAsync();
//job.Save();
}
private JobError SetJobError(IJob job, JobTask ji, IDictionary<String, Object> ps)
private JobError SetJobError(IJob job, JobTask task, IDictionary<String, Object> ps)
{
var err = new JobError
{
AppID = job.AppID,
JobID = job.ID,
Start = ji.Start,
End = ji.End,
Row = ji.Row,
Step = ji.Step,
BatchSize = ji.BatchSize,
Start = task.Start,
End = task.End,
Step = task.Step,
BatchSize = task.BatchSize,
CreateTime = DateTime.Now,
UpdateTime = DateTime.Now,
Server = ji.Server,
ProcessID = ji.ProcessID,
ThreadID = ji.ThreadID,
Client = ji.Client,
Server = task.Server,
ProcessID = task.ProcessID,
Client = task.Client,
};
err.Key = ji.Key;
err.Key = task.Key;
err.Data = ps["Data"] + "";
@ -534,7 +518,7 @@ namespace AntJob.Server
if (code != nameof(Exception)) code = code.TrimEnd(nameof(Exception));
err.ErrorCode = code;
var msg = ji.Message;
var msg = task.Message;
if (!msg.IsNullOrEmpty() && msg.Contains("Exception:")) msg = msg.Substring("Exception:").Trim();
err.Message = msg;

View File

@ -48,11 +48,7 @@ namespace AntJob.Web.Areas.Ant.Controllers
if (dt == null) throw new ArgumentNullException(nameof(id), "找不到任务 " + id);
dt.Status = JobStatus.;
dt.Row = 0;
if (dt.Times >= 10)
{
dt.Times = 0;
}
if (dt.Times >= 10) dt.Times = 0;
dt.Save();
}
@ -66,11 +62,8 @@ namespace AntJob.Web.Areas.Ant.Controllers
if (dt != null)
{
dt.Status = JobStatus.;
dt.Row = 0;
if (dt.Times >= 10)
{
dt.Times = 0;
}
if (dt.Times >= 10) dt.Times = 0;
dt.Save();
}
}

View File

@ -27,7 +27,6 @@
<th class="text-center hidden-md hidden-sm hidden-xs"><a href="@Html.Raw(page.GetSortUrl("ID"))">编号</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("AppID"))">应用</a></th>
<th class="text-center" style="min-width:134px;"><a href="@Html.Raw(page.GetSortUrl("TaskItemID"))">任务项</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Row"))">行</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Step"))">步进</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("BatchSize"))">批大小</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Key"))">数据键</a></th>
@ -47,7 +46,6 @@
<td class="text-center hidden-md hidden-sm hidden-xs">@entity.ID</td>
<td><a href="Job?AppID=@entity.AppID">@entity.AppName</a></td>
<td><a href="JobLog?JobID=@entity.JobID">@entity.JobName</a></td>
<td class="text-right">@entity.Row.ToString("n0")</td>
<td class="text-right">@entity.Step.ToString("n0")</td>
<td class="text-right">@entity.BatchSize.ToString("n0")</td>
<td>@entity.Key</td>

View File

@ -1,4 +1,4 @@
@model IList<AntJob.Data.Entity.JobLog>
@model IList<AntJob.Data.Entity.JobTask>
@using NewLife;
@using NewLife.Web;
@using XCode;
@ -24,7 +24,6 @@
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("TaskID"))">任务</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Start"))">开始</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Client"))">客户端</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Row"))">行</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Step"))">步进</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("BatchSize"))">批大小</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Total"))">总数</a></th>
@ -32,7 +31,6 @@
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Error"))">错误</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Times"))">次数</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Speed"))">速度</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("FetchSpeed"))">抽取速度</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Cost"))">耗时</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("FullCost"))">全耗时</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Status"))">状态</a></th>
@ -79,7 +77,6 @@
<td class="text-center"><a href="Job?ID=@entity.JobID">@entity.JobName</a></td>
<td>@entity.Start.ToFullString("")</td>
<td>@entity.Client</td>
<td class="text-right">@entity.Row.ToString("n0")</td>
<td class="text-right">@entity.Step.ToString("n0")</td>
<td class="text-right">@entity.BatchSize.ToString("n0")</td>
<td class="text-right">@entity.Total.ToString("n0")</td>
@ -87,7 +84,6 @@
<td class="text-right" style="color:red">@entity.Error.ToString("n0")</td>
<td class="text-right">@entity.Times.ToString("n0")</td>
<td class="text-right">@entity.Speed.ToString("n0")</td>
<td class="text-right">@entity.FetchSpeed.ToString("n0")</td>
<td class="text-right">@TimeSpan.FromSeconds(entity.Cost)</td>
<td class="text-right">@TimeSpan.FromSeconds(entity.FullCost)</td>
<td class="text-center @cls">@entity.Status</td>

View File

@ -137,7 +137,7 @@ namespace AntJob
/// <returns></returns>
public Boolean Report(ITask task, Object ext = null)
{
var dic = new { item = task }.ToDictionary();
var dic = new { task }.ToDictionary();
if (ext != null) dic = dic.Merge(ext);
var retry = 3;