Merge branch 'main' into avm99963-monorail
Merged commit 3779da353b36d43cf778e7d4f468097714dd4540
GitOrigin-RevId: 6451a5c6b75afb0fd1f37b3f14521148d0722ea8
diff --git a/framework/warmup.py b/framework/warmup.py
index ace76ce..a133107 100644
--- a/framework/warmup.py
+++ b/framework/warmup.py
@@ -10,55 +10,26 @@
import logging
-from framework import jsonfeed
-
-# TODO(https://crbug.com/monorail/6511): Convert to FlaskInternalTask
-class Warmup(jsonfeed.InternalTask):
+def Warmup():
"""Placeholder for warmup work. Used only to enable min_idle_instances."""
-
- def HandleRequest(self, _mr):
- """Don't do anything that could cause a jam when many instances start."""
- logging.info('/_ah/startup does nothing in Monorail.')
- logging.info('However it is needed for min_idle_instances in app.yaml.')
-
- return {
- 'success': 1,
- }
-
- # def GetWarmup(self, **kwargs):
- # return self.handler(**kwargs)
+ # Don't do anything that could cause a jam when many instances start.
+ logging.info('/_ah/startup does nothing in Monorail.')
+ logging.info('However it is needed for min_idle_instances in app.yaml.')
+ return ''
-# TODO(https://crbug.com/monorail/6511): Convert to FlaskInternalTask
-class Start(jsonfeed.InternalTask):
+def Start():
"""Placeholder for start work. Used only to enable manual_scaling."""
-
- def HandleRequest(self, _mr):
- """Don't do anything that could cause a jam when many instances start."""
- logging.info('/_ah/start does nothing in Monorail.')
- logging.info('However it is needed for manual_scaling in app.yaml.')
-
- return {
- 'success': 1,
- }
-
- # def GetStart(self, **kwargs):
- # return self.handler(**kwargs)
+ # Don't do anything that could cause a jam when many instances start.
+ logging.info('/_ah/start does nothing in Monorail.')
+ logging.info('However it is needed for manual_scaling in app.yaml.')
+ return ''
-# TODO(https://crbug.com/monorail/6511): Convert to FlaskInternalTask
-class Stop(jsonfeed.InternalTask):
+def Stop():
"""Placeholder for stop work. Used only to enable manual_scaling."""
-
- def HandleRequest(self, _mr):
- """Don't do anything that could cause a jam when many instances start."""
- logging.info('/_ah/stop does nothing in Monorail.')
- logging.info('However it is needed for manual_scaling in app.yaml.')
-
- return {
- 'success': 1,
- }
-
- # def GetStop(self, **kwargs):
- # return self.handler(**kwargs)
+ # Don't do anything that could cause a jam when many instances start."""
+ logging.info('/_ah/stop does nothing in Monorail.')
+ logging.info('However it is needed for manual_scaling in app.yaml.')
+ return ''