Add dummy-emitter

(not functioning in current state)
This commit is contained in:
2022-02-14 09:45:34 +02:00
parent 08a261e491
commit 82b91e7161
3 changed files with 88 additions and 0 deletions

6
emitter/Dockerfile Normal file
View File

@@ -0,0 +1,6 @@
FROM python
WORKDIR /emitter
COPY ./emitter.py ./
ENTRYPOINT emitter.py
LABEL name="emitter"

13
emitter/emitter.py Normal file
View File

@@ -0,0 +1,13 @@
from pymongo import MongoClient
from bson.objectid import ObjectId
from time import sleep
MONGO_URI="mongodb://127.0.0.1:27017"
client = MongoClient(MONGO_URI)
db = client['default']
col = db['eventlog']
while True:
col.insertOne({"foo": "bar"})
sleep(1)