blob: d597fd355448bb2e43282e6f77194c786db13e09 [file] [log] [blame]
Adrià Vilanova Martínezf19ea432024-01-23 20:20:52 +01001# Copyright 2017 The Chromium Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
Copybara854996b2021-09-07 19:36:02 +00004
5"""A class to handle the initial warmup request from AppEngine."""
6from __future__ import print_function
7from __future__ import division
8from __future__ import absolute_import
9
10import logging
11
Copybara854996b2021-09-07 19:36:02 +000012
Adrià Vilanova Martínez9f9ade52022-10-10 23:20:11 +020013def Warmup():
Copybara854996b2021-09-07 19:36:02 +000014 """Placeholder for warmup work. Used only to enable min_idle_instances."""
Adrià Vilanova Martínez9f9ade52022-10-10 23:20:11 +020015 # Don't do anything that could cause a jam when many instances start.
16 logging.info('/_ah/startup does nothing in Monorail.')
17 logging.info('However it is needed for min_idle_instances in app.yaml.')
18 return ''
Adrià Vilanova Martínezde942802022-07-15 14:06:55 +020019
20
Adrià Vilanova Martínez9f9ade52022-10-10 23:20:11 +020021def Start():
Copybara854996b2021-09-07 19:36:02 +000022 """Placeholder for start work. Used only to enable manual_scaling."""
Adrià Vilanova Martínez9f9ade52022-10-10 23:20:11 +020023 # Don't do anything that could cause a jam when many instances start.
24 logging.info('/_ah/start does nothing in Monorail.')
25 logging.info('However it is needed for manual_scaling in app.yaml.')
26 return ''
Copybara854996b2021-09-07 19:36:02 +000027
Adrià Vilanova Martínezde942802022-07-15 14:06:55 +020028
Adrià Vilanova Martínez9f9ade52022-10-10 23:20:11 +020029def Stop():
Copybara854996b2021-09-07 19:36:02 +000030 """Placeholder for stop work. Used only to enable manual_scaling."""
Adrià Vilanova Martínez9f9ade52022-10-10 23:20:11 +020031 # Don't do anything that could cause a jam when many instances start."""
32 logging.info('/_ah/stop does nothing in Monorail.')
33 logging.info('However it is needed for manual_scaling in app.yaml.')
34 return ''