Beispiel #1
0
        private async Task DoExecute()
        {
            try
            {
                var mpList = await _mpAccountAppService.GetList();

                foreach (var mp in mpList)
                {
                    try
                    {
                        LogWriter.Info(string.Format("同步公众号{0}[{1}]的用户开始", mp.Name, mp.Id));
                        await ReFreshFans(mp);

                        LogWriter.Info(string.Format("同步公众号{0}[{1}]的用户结束", mp.Name, mp.Id));
                    }
                    catch (Exception ex)
                    {
                        LogWriter.Error(string.Format("同步公众号{0}[{1}]的分组和用户出现错误,错误信息:{2}", mp.Name, mp.Id, ex));
                    }
                }
            }
            catch (Exception e)
            {
                LogWriter.Error(string.Format("同步公众号出现错误,错误信息:{0}", e));
            }
        }