public void AddFile(FileObject fileObject)
        {
            Log.Debug("enter");

            if (!CanIngest(fileObject.RelativeUri))
            {
                Log.Warning($"file already ingested. skipping: {fileObject.RelativeUri}");
                return;
            }

            ImportJson(FileMgr.ProcessFile(fileObject));
        }
        public void AddFile(FileObject fileObject)
        {
            Log.Debug("enter");

            if (!CanIngest(fileObject.RelativeUri))
            {
                Log.Warning($"file already ingested. skipping: {fileObject.RelativeUri}");
                return;
            }

            if (Config.KustoUseBlobAsSource)
            {
                IngestSingleFile(fileObject);
            }
            else
            {
                IngestMultipleFiles(FileMgr.ProcessFile(fileObject));
            }
        }
Esempio n. 3
0
        public void QueueForIngest(FileObject fileObject)
        {
            Log.Debug("enter");

            if (Config.IsKustoConfigured() | Config.IsLogAnalyticsConfigured())
            {
                if (Config.IsKustoConfigured())
                {
                    _taskManager.QueueTaskAction(() => _kusto.AddFile(fileObject));
                }

                if (Config.IsLogAnalyticsConfigured())
                {
                    _taskManager.QueueTaskAction(() => _logAnalytics.AddFile(fileObject));
                }
            }
            else
            {
                _taskManager.QueueTaskAction(() => FileMgr.ProcessFile(fileObject));
            }
        }