concierge/main.py

18 lines
310 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())
2020-04-15 21:44:56 +02:00
2020-04-15 21:22:30 +02:00
@app.task
def start_restream(name):
print(name)
2020-04-15 21:44:56 +02:00
2020-04-15 21:22:30 +02:00
@app.task
def stop_restream(name):
print(name)