blob: a13310740f78c58a275029d51341a9ccd81280ae [file] [log] [blame]
Copybara854996b2021-09-07 19:36:02 +00001# Copyright 2017 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style
3# license that can be found in the LICENSE file or at
4# https://developers.google.com/open-source/licenses/bsd
5
6"""A class to handle the initial warmup request from AppEngine."""
7from __future__ import print_function
8from __future__ import division
9from __future__ import absolute_import
10
11import logging
12
Copybara854996b2021-09-07 19:36:02 +000013
Adrià Vilanova Martínez9f9ade52022-10-10 23:20:11 +020014def Warmup():
Copybara854996b2021-09-07 19:36:02 +000015 """Placeholder for warmup work. Used only to enable min_idle_instances."""
Adrià Vilanova Martínez9f9ade52022-10-10 23:20:11 +020016 # Don't do anything that could cause a jam when many instances start.
17 logging.info('/_ah/startup does nothing in Monorail.')
18 logging.info('However it is needed for min_idle_instances in app.yaml.')
19 return ''
Adrià Vilanova Martínezde942802022-07-15 14:06:55 +020020
21
Adrià Vilanova Martínez9f9ade52022-10-10 23:20:11 +020022def Start():
Copybara854996b2021-09-07 19:36:02 +000023 """Placeholder for start work. Used only to enable manual_scaling."""
Adrià Vilanova Martínez9f9ade52022-10-10 23:20:11 +020024 # Don't do anything that could cause a jam when many instances start.
25 logging.info('/_ah/start does nothing in Monorail.')
26 logging.info('However it is needed for manual_scaling in app.yaml.')
27 return ''
Copybara854996b2021-09-07 19:36:02 +000028
Adrià Vilanova Martínezde942802022-07-15 14:06:55 +020029
Adrià Vilanova Martínez9f9ade52022-10-10 23:20:11 +020030def Stop():
Copybara854996b2021-09-07 19:36:02 +000031 """Placeholder for stop work. Used only to enable manual_scaling."""
Adrià Vilanova Martínez9f9ade52022-10-10 23:20:11 +020032 # Don't do anything that could cause a jam when many instances start."""
33 logging.info('/_ah/stop does nothing in Monorail.')
34 logging.info('However it is needed for manual_scaling in app.yaml.')
35 return ''