[plt-scheme] plt web-server: adjust-timeout! ? BIRDBRAIN!

From: Hans Oesterholt-Dijkema (hdnews at gawab.com)
Date: Fri Jun 29 06:50:56 EDT 2007

However, I still don't get the results I'd like to see.
Given the add.scm below, I see following behaviour in my debug log:

Welcome to MzScheme version 360, Copyright (c) 2004-2006 PLT Schem
 > (require (planet "hwiki.scm" ("oesterholt" "hwiki.plt" 1 0)))
 > (hwiki)
Warning: No rewrite rules defined.
Servlet will be available through '/servlets/hwiki.scm/<page.html>

PostgreSQL connectionstring: host=pegasus dbname=test user=hans
copy-to: C:\Documents and Settings\hdijkema\Application Data\PLT S
Web server started on port 80
Visit URL http://localhost:80/servlets/hwiki.scm
Type stop to stop the server and exit
Type restart to restart the server
add-timer: ID=1 30000
revise-timer!: ID=1 30000
revise-timer!: ID=1 86400000
add-timer: ID=2 86400000
revise-timer!: ID=2 172800000.0
revise-timer!: ID=2 172800000.0
adjust-timeout! 1 180
**add-timer: ID=3 30000
revise-timer!: ID=3 259200000.0
revise-timer!: ID=3 180000
ALARM: id=3

/This is after 30 seconds, not after 180!/

*add-timer: ID=4 0
ALARM: id=4
revise-timer!: ID=4 30000
revise-timer!: ID=4 86400000
revise-timer!: ID=4 86547143.0
revise-timer!: ID=4 172947143.0
revise-timer!: ID=4 172947143.0
revise-timer!: ID=4 27146.0
revise-timer!: ID=4 259347143.0

(require (lib "unitsig.ss")
         (lib "servlet-sig.ss" "web-server")
         (lib "date.ss"))

(unit/sig () (import servlet^)

  ; request-number : str -> num
  (define (request-number which-number)
      (request-bindings (send/suspend (build-request-page which-number))))))

  ; build-request-page : str -> str -> response
  (define (build-request-page which-number)
    (lambda (k-url)
       (adjust-timeout! 180)
      `(html (head (title "Enter a Number to Add"))
             (body ([bgcolor "white"])
                   (form ([action ,k-url] [method "post"])
                         "Enter the " ,which-number " number to add: "
                         (input ([type "text"] [name "number"] [value ""]))
                         (input ([type "submit"] [name "enter"] [value 

  `(html (head (title "Sum"))
         (body ([bgcolor "white"])
               (p "The sum is "
                  ,(number->string (+ (request-number "first") 
(request-number "second")))))))

Matt Jadud schreef:
> I usually find that I answer most of my questions after asking them on
> the list. It's good to see others using the list for the same
> purpose... asking a question, answering it themselves, and then having
> the same forehead-slapping revelations that I do... :D
> Cheers,
> M
> On 6/29/07, Hans Oesterholt-Dijkema <hdnews at gawab.com> wrote:
>>  I'm such a birdbrain,
>>  adjust-timeout! has to be in the function given to send/supend of 
>> course!
>>  Thanks anyway!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070629/bcf4ed57/attachment.html>

Posted on the users mailing list.