public static bool Initialize(IBMemoryServiceInterface _MemoryService, Action <string> _ErrorMessageAction = null) { try { MemoryService = _MemoryService; PodManager = new K8sObjectManager(KubernetesClientManager.GetDefaultKubernetesClient()); Instance = new BatchProcessingStateService(); LongRunningThread = new Thread(GeneralStatusCheck); LongRunningThread.IsBackground = true; LongRunningThread.Start(_ErrorMessageAction); return(true); } catch (Exception ex) { _ErrorMessageAction?.Invoke($"{ex.Message}\n{ex.StackTrace}"); return(false); } }
private BatchProcessingCreationService() { K8sManager = new K8sObjectManager(KubernetesClientManager.GetDefaultKubernetesClient()); }