예제 #1
0
파일: HtmlJob.cs 프로젝트: Boshin/wojilu
        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 );
            }
        }
예제 #2
0
        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 );
        }
예제 #3
0
        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);
        }
예제 #4
0
파일: JobManager.cs 프로젝트: Boshin/wojilu
        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 );
        }
예제 #5
0
        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);
            }
        }
예제 #6
0
파일: JobManager.cs 프로젝트: zhdwwf/wojilu
        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);
        }
예제 #7
0
        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 );
            }
        }