fix preheat

pull/110/head
Matthew Butterick 8 years ago
parent 10e3918fba
commit 63eb8a74ff

@ -75,7 +75,7 @@ version print the version (~a)" (world:current-server-port) world
(define (handle-setup directory-maybe)
(displayln "preheating cache ...")
((dynamic-require 'pollen/cache 'preheat-cache) directory-maybe))
((dynamic-require 'pollen/private/preheat-cache 'preheat-cache) directory-maybe))
(define (handle-render)

@ -1,8 +1,9 @@
#lang racket/base
(require "../world.rkt" "../file.rkt" racket/file "cache-utils.rkt" "debug.rkt" racket/path racket/place sugar/list)
(require "file-utils.rkt" racket/file "cache-utils.rkt" "debug.rkt" racket/path racket/place sugar/list)
(provide preheat-cache)
(define (preheat-cache [starting-dir (world:current-project-root)])
(when (or (not (path-string? starting-dir)) (not (directory-exists? starting-dir)))
(define (preheat-cache starting-dir)
(unless (and (path-string? starting-dir) (directory-exists? starting-dir))
(error 'preheat-cache (format "~a is not a directory" starting-dir)))
(define max-places 8) ; number of parallel processes to spawn at a time

Loading…
Cancel
Save