Skip to content

Instantly share code, notes, and snippets.

@sebastien
Created July 12, 2012 15:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebastien/3098696 to your computer and use it in GitHub Desktop.
Save sebastien/3098696 to your computer and use it in GitHub Desktop.
Generates a timeout in Retro
import time
from retro import *
class Timeout(Component):
@on(GET="{_:rest}")
def timeout( self, request, _ ):
time.sleep(20)
return request.respond("OK!")
run(Application(Timeout()))
# EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment