pooled-ed
parent
96c16902f1
commit
8ed2daf5ad
|
@ -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* ;
|
||||
|
|
Loading…
Reference in New Issue