Adding two placeholder containers
This commit is contained in:
9
worker-placeholder/Dockerfile
Normal file
9
worker-placeholder/Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM python:3
|
||||
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
|
||||
ENTRYPOINT ["python", "app.py"]
|
||||
15
worker-placeholder/app.py
Normal file
15
worker-placeholder/app.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import logging
|
||||
import threading
|
||||
|
||||
|
||||
logger = logging.getLogger('worker')
|
||||
|
||||
|
||||
def fake_it():
|
||||
threading.Timer(5.0, fake_it).start()
|
||||
logger.info('Checking for work')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
fake_it()
|
||||
Reference in New Issue
Block a user