From 74f52fc02ba372c80885f6881cd353abcc8b7b8a Mon Sep 17 00:00:00 2001 From: Jan Koppe Date: Wed, 15 Apr 2020 21:22:30 +0200 Subject: [PATCH] stub import --- .travis.yml | 9 +++++++++ main.py | 15 +++++++++++++++ requirements.txt | 1 + setup.cfg | 3 +++ 4 files changed, 28 insertions(+) create mode 100644 .travis.yml create mode 100644 main.py create mode 100644 requirements.txt create mode 100644 setup.cfg 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