private void runJobSingle( HtmlJobItem x ) { try { Object p = ObjectContext.CreateObject( x.Name ); if (strUtil.HasText( x.Ids )) { rft.CallMethod( p, x.Method, new object[] { x.Ids } ); cdb.delete( x ); } else if (x.PostId > 0) { rft.CallMethod( p, x.Method, new object[] { x.PostId } ); cdb.delete( x ); } else { logger.Info( "param is invalid. type=" + x.Name + ", method=" + x.Method ); } } catch (Exception ex) { logger.Error( ex.Message ); logger.Error( ex.StackTrace ); } }
public static void PostUpdate( ContentPost post ) { HtmlJobItem item = new HtmlJobItem(); item.Name = typeof( JobProcessor ).FullName; item.Method = getMethodName( new JobProcessor().AfterPostUpdate ); item.PostId = post.Id; cdb.insert( item ); }
public static void PostAdd(ContentPost post) { HtmlJobItem item = new HtmlJobItem(); item.Name = typeof(JobProcessor).FullName; item.Method = getMethodName(new JobProcessor().AfterPostAdd); item.PostId = post.Id; cdb.insert(item); }
public static void ImportPost( List<int> ids ) { if (ids == null || ids.Count == 0) return; HtmlJobItem item = new HtmlJobItem(); item.Name = typeof( JobProcessor ).FullName; item.Method = "AfterImport"; item.Ids = strUtil.GetIds( ids ); cdb.insert( item ); }
private void runJobSingle(HtmlJobItem x) { try { Object p = ObjectContext.CreateObject(x.Name); rft.CallMethod(p, x.Method, new object[] { x.PostId }); cdb.delete(x); } catch (Exception ex) { logger.Error(ex.Message); logger.Error(ex.StackTrace); } }
public static void ImportPost(List <int> ids) { if (ids == null || ids.Count == 0) { return; } HtmlJobItem item = new HtmlJobItem(); item.Name = typeof(JobProcessor).FullName; item.Method = "AfterImport"; item.Ids = strUtil.GetIds(ids); cdb.insert(item); }
private void runJobSingle( HtmlJobItem x ) { try { Object p = ObjectContext.CreateObject( x.Name ); rft.CallMethod( p, x.Method, new object[] { x.PostId } ); cdb.delete( x ); } catch (Exception ex) { logger.Error( ex.Message ); logger.Error( ex.StackTrace ); } }