public AbstractLeadProcessor(int leadNumber, AmoAccount acc, ProcessQueue processQueue, Log log, CancellationToken token) { _leadRepo = acc.GetRepo <Lead>(); _processQueue = processQueue; _token = token; _acc = acc; _leadNumber = leadNumber; _log = log; custom_fields_values = new(); tags = new(); try { Thread.Sleep((int)TimeSpan.FromSeconds(3).TotalMilliseconds); lead = _leadRepo.GetById(leadNumber); if (lead is not null && lead._embedded is not null && lead._embedded.tags is not null) { tags = lead._embedded.tags; } } catch (Exception e) { _processQueue.Stop(leadNumber.ToString()); _processQueue.Remove(leadNumber.ToString()); _log.Add($"Error: Unable to create leadProcessor {leadNumber}: {e.Message}"); } }
public SmilarcompaniesCheckProcessor(int companyNumber, AmoAccount acc, ProcessQueue processQueue, Log log, CancellationToken token, RecentlyUpdatedEntityFilter filter) { _companyNumber = companyNumber; _compRepo = acc.GetRepo <Company>(); _token = token; _log = log; _filter = filter; _processQueue = processQueue; }
public AbstractLeadProcessor(AmoAccount acc, ProcessQueue processQueue, Log log, CancellationToken token) { _leadRepo = acc.GetRepo <Lead>(); _processQueue = processQueue; _token = token; _acc = acc; _log = log; custom_fields_values = new(); tags = new(); }
public PPIELeadsProcessor(int leadNumber, AmoAccount acc, ProcessQueue processQueue, Log log, CancellationToken token) { _leadRepo = acc.GetRepo <Lead>(); _processQueue = processQueue; _token = token; _leadNumber = leadNumber; _log = log; try { Thread.Sleep((int)TimeSpan.FromSeconds(3).TotalMilliseconds); lead = _leadRepo.GetById(leadNumber); } catch (Exception e) { _processQueue.Stop(leadNumber.ToString()); _processQueue.Remove(leadNumber.ToString()); _log.Add($"Error: Unable to create leadProcessor {leadNumber}: {e.Message}"); } }
/// <summary> /// Формирует отчёт для корпоративного отдела. Выгружает список компаний с которыми отсутствовали недавние контакты. /// </summary> internal AbandonedCompaniesProcessor(AmoAccount acc, ProcessQueue processQueue, GSheets gSheets, string spreadsheetId, long dateFrom, long dateTo, string taskName, CancellationToken token) : base(acc, processQueue, gSheets, spreadsheetId, dateFrom, dateTo, taskName, token) { }
/// <summary> /// Формирует отчёт по продажам для корпоративного отдела. /// </summary> internal CorpReportProcessor(AmoAccount acc, ProcessQueue processQueue, GSheets gSheets, string spreadsheetId, long dateFrom, long dateTo, string taskName, CancellationToken token) : base(acc, processQueue, gSheets, spreadsheetId, dateFrom, dateTo, taskName, token) { _locker = new(); }
public UnsortedProcessor(string uid, AmoAccount acc, ProcessQueue processQueue, Log log, CancellationToken token) //Процессор принимает сделку из Неразобранного : base(acc, processQueue, log, token) { _uid = uid; }
public InitialLeadProcessor(int leadNumber, AmoAccount acc, Amo amo, GSheets gSheets, ProcessQueue processQueue, Log log, CancellationToken token) : base(leadNumber, acc, processQueue, log, token) { _gSheets = gSheets; _amo = amo; }