'Python multithreading using Celery.beat and Celery in Python
I am trying to programm a demo version of a Controller Node and two different worker nodes in python with a login and heartbeat function. My Controller is supposed to send a Json with the tasks for each App, like in the example below:
AppA and B have similar functions, only the number or variables passed changes.
{App_A: {a=1,b=9, add=True, Sub= True, Mul = True, Div = False},
App_A: {a=2,b=8, add=True, Sub= True, Mul = False, Div =True},
App_A: {a=3,b=7, add=True, Sub= False, Mul = True, Div = True },
App_A: {a=4,b=6, add= False, Sub= True, Mul = True, Div = False},
App_A: {a=5,b=5, add=True, Sub= True, Mul = False, Div = False },
App_A: {a=6,b=4, add=True, Sub= False, Mul = False, Div = False},
App_A: {a=7,b=3, add= False, Sub= False, Mul = True, Div = False},
App_A: {a=8,b=2, add= False, Sub= True, Mul = False, Div = False},
App_A: {a=9,b=1, add= False, Sub= True, Mul = True, Div = False },
App_B: {a=1,b=9,c=4 , add=True, Sub= True, Mul = True, Div = False},
App_B: {a=2,b=8,c=5, add=True, Sub= True, Mul = False, Div =True},
App_B: {a=3,b=7,c=6, add=True, Sub= False, Mul = True, Div = True },
App_B: {a=4,b=6,c=7, add= False, Sub= True, Mul = True, Div = False},
App_B: {a=5,b=5,c=8, add=True, Sub= True, Mul = False, Div = False },
App_B: {a=6,b=4,c=9, add=True, Sub= False, Mul = False, Div = False},
App_B: {a=7,b=3,c=1, add= False, Sub= False, Mul = True, Div = False},
App_B: {a=8,b=2,c=2, add= False, Sub= True, Mul = False, Div = False},
App_B: {a=9,b=1,c=3, add= False, Sub= True, Mul = True, Div = False }}
I am quite new in Python and have not been able to find a good example/tutorial where I can get an idea from. If anyone can help showing me a link or some books that would help me finish my task that would be very appreciated.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
