concierge/main.py

16 lines
308 B
Python
Raw Normal View History

2020-04-15 21:22:30 +02:00
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)