示例#1
0
 public void Start()
 {
     if (isRunning)
     {
         log.Warn("Engine is already started");
         return;
     }
     isRunning = true;
     CheckJsonFile();
     try
     {
         foreach (var site in context.Sites)
         {
             log.Debug($"Creating processor for site {site.Name} || {site.BaseUrl}");
             var proc = new SiteProcessor(context, site);
             processors.Add(proc);
             proc.Start();
         }
     }
     catch (Exception ex)
     {
         log.Fatal(ex.Message, ex);
     }
 }