开启数据推送(用于缓存)
--consolemode=pushdata
if (pf.PushMapperFieldIdx != null && pf.PushMapperFieldIdx.Count() > 0)
{
var mode = AppArgsUtil.GetConsoleMode() ?? "";
var msg = "";
if (mode.Contains("pushdata"))
{
foreach (var item in pf.PushMapperFieldIdx)
{
await _logConsoleAbstract.Write(pf, $"【{DateTimeUtil.Now()}】【Data】【{pfMapper.ModuleKey}】【{pf.MapperField}】【pushpull.data.services.detail】【推送开始】");
pf.MapperField = item;
await _popedomPushAbstract.Datas<IEnumerable<string>>(pf, null);
}
}
else
{
msg = "未开启【--consolemode=pushdata】,不执行数据推送。";
}
await _capBus.PublishAsync("pushpull.ws.data.services.pro", pfMapper);
await _logConsoleAbstract.Write(pf, $"【Data】【{pfMapper.ModuleKey}】【pushpull.data.services.detail】【推送结束】{msg}");
}
else
{
await _logConsoleAbstract.Write(pf, $"【Data】【{pfMapper.ModuleKey}】【pushpull.data.services.detail】【推送结束】【PushMapperFieldIdx未配置】");
}
文档更新时间: 2024-08-31 22:11 作者:admin