stub import
This commit is contained in:
		
							parent
							
								
									65730c0dbd
								
							
						
					
					
						commit
						74f52fc02b
					
				| 
						 | 
					@ -0,0 +1,9 @@
 | 
				
			||||||
 | 
					language: python
 | 
				
			||||||
 | 
					python:
 | 
				
			||||||
 | 
					  - "3.7"
 | 
				
			||||||
 | 
					  - "3.8"
 | 
				
			||||||
 | 
					install:
 | 
				
			||||||
 | 
					  - pip install -r requirements.txt
 | 
				
			||||||
 | 
					  - pip install flake8
 | 
				
			||||||
 | 
					script:
 | 
				
			||||||
 | 
					  - flake8
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,15 @@
 | 
				
			||||||
 | 
					from celery import Celery
 | 
				
			||||||
 | 
					from xmlrpc.client import ServerProxy
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					server = ServerProxy('http://localhost:9001/RPC2')
 | 
				
			||||||
 | 
					app = Celery('tasks', broker='redis://localhost')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					print(server.supervisor.getState())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@app.task
 | 
				
			||||||
 | 
					def start_restream(name):
 | 
				
			||||||
 | 
					    print(name)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@app.task
 | 
				
			||||||
 | 
					def stop_restream(name):
 | 
				
			||||||
 | 
					    print(name)
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					celery>=4.4
 | 
				
			||||||
		Loading…
	
		Reference in New Issue