Skip to content

Commit

Permalink
disable docker stuff till I figure out permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
ilude committed Mar 25, 2024
1 parent 0386dca commit 6ac1060
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# 600 seconds = 10 minutes
cache = Cache(app, config={'CACHE_TYPE': 'simple',
'CACHE_DEFAULT_TIMEOUT': 600})
docker_client = APIClient(base_url='unix://var/run/docker.sock')
#docker_client = APIClient(base_url='unix://var/run/docker.sock')
current_working_directory = os.path.dirname(os.path.realpath(__file__))

last_modified_times = {}
Expand Down Expand Up @@ -74,16 +74,16 @@ def process_duplicates(data):
def inject_current_date():
return {'today_date': datetime.now()}

def docker_event_stream():
events = docker_client.events()
for event in events:
yield 'data: {}\n\n'.format(event)
# def docker_event_stream():
# events = docker_client.events()
# for event in events:
# yield 'data: {}\n\n'.format(event)

@app.route('/events')
def events():
return app.response_class(
docker_event_stream(),
mimetype='text/event-stream'
# @app.route('/events')
# def events():
# return app.response_class(
# docker_event_stream(),
# mimetype='text/event-stream'
)

# Define route to render the template
Expand Down

0 comments on commit 6ac1060

Please sign in to comment.