mirror of https://github.com/enpaul/kodak.git
19 lines
452 B
Python
19 lines
452 B
Python
from kodak import configuration
|
|
from kodak import database
|
|
from kodak.resources._shared import KodakResource
|
|
from kodak.resources._shared import ResponseTuple
|
|
|
|
|
|
class Heartbeat(KodakResource):
|
|
|
|
routes = ("/heartbeat",)
|
|
|
|
def get(self) -> ResponseTuple:
|
|
configuration.load()
|
|
database.ImageRecord.select().count()
|
|
|
|
return self.make_response(None)
|
|
|
|
def head(self) -> ResponseTuple:
|
|
return self._head(self.get())
|