Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Commit

Permalink
YACHT-963: Adding sli calculation endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
radkomateusz committed Aug 17, 2018
1 parent 5d47117 commit d227512
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 16 deletions.
7 changes: 6 additions & 1 deletion slo-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ handlers:
upload: static/images/favicon.ico
application_readable: true
- url: /.*
script: src.slo.main.app
script: src.slo.slo_handlers.app
secure: always
login: admin
- url: /cron/slo/calculate
script: src.slo.slo_handlers.app
secure: always
login: admin

15 changes: 0 additions & 15 deletions src/slo/main.py

This file was deleted.

25 changes: 25 additions & 0 deletions src/slo/slo_handlers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import logging

import webapp2
from src.commons.handlers.common_handlers import BaseHandler

from src.commons.config.configuration import configuration


class MainPageHandler(BaseHandler):

def get(self):
self.render_response('index_slo.html')


class XDaysSLIHandler(webapp2.RequestHandler):

def get(self):
logging.info("TODO Recalculating SLI has been started.")


app = webapp2.WSGIApplication([
('/', MainPageHandler),
('/_ah/start', MainPageHandler),
('/cron/slo/calculate', XDaysSLIHandler)
], debug=configuration.debug_mode)

0 comments on commit d227512

Please sign in to comment.