Compare commits
3 Commits
7a7f3591d2
...
156ef04b61
Author | SHA1 | Date | |
---|---|---|---|
156ef04b61 | |||
b10918569c | |||
c99dd127e0 |
18
daemon.py
Executable file
18
daemon.py
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
import time
|
||||||
|
|
||||||
|
import requests
|
||||||
|
|
||||||
|
import config
|
||||||
|
from plugins import plugins
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
data = requests.get(config.CAR_API_URL)
|
||||||
|
for plugin in plugins:
|
||||||
|
plugin.check(data)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
while True:
|
||||||
|
main()
|
||||||
|
time.sleep(config.DELAY)
|
1
plugins/__init__.py
Normal file
1
plugins/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
plugins = []
|
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
requests>=2.0
|
@ -1,2 +1,3 @@
|
|||||||
OSD_URL = "http://localhost:5050/send/"
|
OSD_URL = "http://localhost:5050/send/"
|
||||||
CAR_API_URL = "http://localhost:5000/all/"
|
CAR_API_URL = "http://localhost:5000/all/"
|
||||||
|
DELAY = 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user