pooled-ed

master
Steve Ayerhart 2022-01-24 08:10:31 -05:00
parent 96c16902f1
commit 8ed2daf5ad
No known key found for this signature in database
GPG Key ID: 5C815FDF3A00B8BA
1 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
! Copyright (C) 2020 .
! See http://factorcode.org/license.txt for BSD license.
USING: kernel fry db db.sqlite environment math.parser io.pathnames ;
USING: kernel fry db db.pools db.sqlite environment math.parser io.pathnames ;
IN: bonerbonerboner.services
@ -10,11 +10,11 @@ CONSTANT: bbb-default-port 8069
: bbb-data-directory ( -- path )
home ".bonerbonerboner" append-path ;
: <bbb-sqlite-db> ( -- db )
bbb-data-directory "bbb.db" append-path <sqlite-db> ;
: <bbb-sqlite-db> ( -- db-pool )
bbb-data-directory "bbb.db" append-path <sqlite-db> <db-pool> ;
: with-bbb-db ( quot -- )
'[ <bbb-sqlite-db> _ with-db ] call ; inline
'[ <bbb-sqlite-db> _ with-pooled-db ] call ; inline
: bbb-api-port ( -- port )
"BBB_API_PORT" os-env [ string>number ] [ bbb-default-port ] if* ;