diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..e56d1cd --- /dev/null +++ b/.travis.yml @@ -0,0 +1,9 @@ +language: python +python: + - "3.7" + - "3.8" +install: + - pip install -r requirements.txt + - pip install flake8 +script: + - flake8 diff --git a/main.py b/main.py new file mode 100644 index 0000000..0509915 --- /dev/null +++ b/main.py @@ -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) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d23fa5d --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +celery>=4.4 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..1e30e03 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,3 @@ +[flake8] +exclude = .git,*migrations* +max-line-length = 120