Merge branch 'master' of https://git.kmlabz.com/GoldenPogacsa/producer
This commit is contained in:
		@@ -1,5 +1,6 @@
 | 
				
			|||||||
#!/usr/bin/env python
 | 
					#!/usr/bin/env python
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import random
 | 
				
			||||||
import requests
 | 
					import requests
 | 
				
			||||||
from singleton import Singleton
 | 
					from singleton import Singleton
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -23,21 +24,21 @@ class Communicator(Singleton):
 | 
				
			|||||||
        :param message:
 | 
					        :param message:
 | 
				
			||||||
        :return: none
 | 
					        :return: none
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        pass
 | 
					        return None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def discoveravailableconsumers(self) -> list:
 | 
					    def discoveravailableconsumers(self) -> list:
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        Get the list of available consumer from the current primary consumer.
 | 
					        Get the list of available consumer from the current primary consumer.
 | 
				
			||||||
        :return:
 | 
					        :return:
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        pass
 | 
					        return ["10.69.42.1","10.42.69.1","10.10.10.10","10.6.66.1"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def isconsumeravailable(self) -> bool:
 | 
					    def isconsumeravailable(self) -> bool:
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        Readiness probe primary consumer.
 | 
					        Readiness probe primary consumer.
 | 
				
			||||||
        :return:
 | 
					        :return:
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        pass
 | 
					        return bool(random.getrandbits(1))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def checkconsumer(self, consumer: str) -> bool:
 | 
					    def checkconsumer(self, consumer: str) -> bool:
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
@@ -45,4 +46,4 @@ class Communicator(Singleton):
 | 
				
			|||||||
        :param consumer:
 | 
					        :param consumer:
 | 
				
			||||||
        :return:
 | 
					        :return:
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
        pass
 | 
					        return bool(random.getrandbits(1))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user