mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-02-09 12:14:03 +02:00
added hooksPool flag and updated doc comments
This commit is contained in:
parent
a557aa35f5
commit
c293994d2b
@ -38,6 +38,14 @@ func main() {
|
|||||||
"auto restart the app on pb_hooks file change",
|
"auto restart the app on pb_hooks file change",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var hooksPool int
|
||||||
|
app.RootCmd.PersistentFlags().IntVar(
|
||||||
|
&hooksPool,
|
||||||
|
"hooksPool",
|
||||||
|
120,
|
||||||
|
"the total prewarm goja.Runtime instances for the JS app hooks execution",
|
||||||
|
)
|
||||||
|
|
||||||
var migrationsDir string
|
var migrationsDir string
|
||||||
app.RootCmd.PersistentFlags().StringVar(
|
app.RootCmd.PersistentFlags().StringVar(
|
||||||
&migrationsDir,
|
&migrationsDir,
|
||||||
@ -89,6 +97,7 @@ func main() {
|
|||||||
MigrationsDir: migrationsDir,
|
MigrationsDir: migrationsDir,
|
||||||
HooksDir: hooksDir,
|
HooksDir: hooksDir,
|
||||||
HooksWatch: hooksWatch,
|
HooksWatch: hooksWatch,
|
||||||
|
HooksPoolSize: hooksPool,
|
||||||
})
|
})
|
||||||
|
|
||||||
// migrate command (with js templates)
|
// migrate command (with js templates)
|
||||||
|
@ -95,7 +95,7 @@ declare function routerPre(...middlewares: Array<string|echo.MiddlewareFunc>): v
|
|||||||
type appWithoutHooks = Omit<pocketbase.PocketBase, ` + "`on${string}`" + `>
|
type appWithoutHooks = Omit<pocketbase.PocketBase, ` + "`on${string}`" + `>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* $app is the current running PocketBase instance that is globally
|
* ` + "`$app`" + ` is the current running PocketBase instance that is globally
|
||||||
* available in each .pb.js file.
|
* available in each .pb.js file.
|
||||||
*
|
*
|
||||||
* @namespace
|
* @namespace
|
||||||
@ -302,7 +302,7 @@ declare class Dao implements daos.Dao {
|
|||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* $dbx defines common utility for working with the DB abstraction.
|
* ` + "`$dbx`" + ` defines common utility for working with the DB abstraction.
|
||||||
* For examples and guides please check the [Database guide](https://pocketbase.io/docs/js-database).
|
* For examples and guides please check the [Database guide](https://pocketbase.io/docs/js-database).
|
||||||
*
|
*
|
||||||
* @group PocketBase
|
* @group PocketBase
|
||||||
|
@ -48,7 +48,7 @@ type Config struct {
|
|||||||
// If not set it fallbacks to a relative "pb_data/../pb_hooks" directory.
|
// If not set it fallbacks to a relative "pb_data/../pb_hooks" directory.
|
||||||
HooksDir string
|
HooksDir string
|
||||||
|
|
||||||
// HooksPoolSize specifies how many goja.Runtime instances to preinit
|
// HooksPoolSize specifies how many goja.Runtime instances to prewarm
|
||||||
// and keep for the JS app hooks gorotines execution.
|
// and keep for the JS app hooks gorotines execution.
|
||||||
//
|
//
|
||||||
// Zero or negative value means that it will create a new goja.Runtime
|
// Zero or negative value means that it will create a new goja.Runtime
|
||||||
|
Loading…
x
Reference in New Issue
Block a user