- Check if pool already exists before creating a new one - Set pool size limits (min=2, max=10) to prevent exhaustion - Multiple calls to init_db() were creating new pools without closing old ones, leading to "too many clients" errors Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
27 lines
788 B
Common Lisp
27 lines
788 B
Common Lisp
;; Simple Test - No external assets required
|
|
;; Just generates a color gradient that changes over time
|
|
|
|
(stream "simple_test"
|
|
:fps 30
|
|
:width 720
|
|
:height 720
|
|
:seed 42
|
|
|
|
;; Load standard primitives
|
|
(require-primitives "geometry")
|
|
(require-primitives "core")
|
|
(require-primitives "math")
|
|
(require-primitives "image")
|
|
(require-primitives "color_ops")
|
|
|
|
;; Frame pipeline - animated gradient
|
|
(frame
|
|
(let [;; Time-based color cycling (0-1 range)
|
|
r (+ 0.5 (* 0.5 (math:sin (* t 1))))
|
|
g (+ 0.5 (* 0.5 (math:sin (* t 1.3))))
|
|
b (+ 0.5 (* 0.5 (math:sin (* t 1.7))))
|
|
;; Convert to 0-255 range and create solid color frame
|
|
color [(* r 255) (* g 255) (* b 255)]
|
|
frame (image:make-image 720 720 color)]
|
|
frame)))
|