Changeset 12735 in project


Ignore:
Timestamp:
12/03/08 10:28:30 (11 years ago)
Author:
azul
Message:

Define the maximum number of retries for DB-locked errors. Also, when registering symbols, register their type.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/3/svnwiki-chicken/trunk/svnwiki-chicken.scm

    r12734 r12735  
    3333
    3434(define *db* #f)
     35(define *max-retries* 8)
    3536
    3637(define (db-run env query . params)
     
    7071
    7172(define (scheme-definitions-db-create env)
    72   (db-run env "CREATE TABLE definitions ( name varchar, page varchar );")
     73  (db-run env "CREATE TABLE definitions ( name varchar, type varchar, page varchar );")
    7374  (db-run env "CREATE TABLE tests ( expr varchar, expect varchar, cmp varchar, page varchar, blessed varchar );")
    7475  (db-run env "CREATE TABLE tests_results ( version varchar, received varchar, pass boolean, date integer );"))
     
    110111        ((scheme-definitions)
    111112          (let-from-environment env (return)
    112             (return (get-definition-name text)))
     113            (return (list name (get-definition-name text))))
    113114          stream-null)
    114115        (else
     
    192193    (db-run env "DELETE FROM definitions WHERE page = ?;" path)
    193194    (stream-for-each
    194       (lambda (name)
    195         (format (current-error-port) "Insert definition: ~A~%" name)
    196         (db-run env "INSERT INTO definitions VALUES ( ?, ? );" name path))
     195      (lambda (data)
     196        (db-run env "INSERT INTO definitions VALUES ( ?, ?, ? );" (cadr data) (car data) path))
    197197      (iterator->stream
    198198        (lambda (return stop)
Note: See TracChangeset for help on using the changeset viewer.