Skip to content
This repository was archived by the owner on Feb 8, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmd/payroll/worker/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ type PayrollWorkerConfig struct {
Host string `mapstructure:"host" json:"host,omitempty"`
Port string `mapstructure:"port" json:"port,omitempty"`
} `mapstructure:"datadog" json:"datadog"`
Database struct {
DSN string `mapstructure:"dsn" json:"dsn,omitempty"`
} `mapstructure:"database" json:"database,omitempty"`
}

func GetConfigure() (*PayrollWorkerConfig, error) {
Expand Down
12 changes: 12 additions & 0 deletions cmd/payroll/worker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import (
"github.com/sirupsen/logrus"
"github.com/vultisig/verifier/vault"

"github.com/vultisig/plugin/internal/scheduler"
"github.com/vultisig/plugin/internal/tasks"
"github.com/vultisig/plugin/storage/postgres"
)

func main() {
Expand Down Expand Up @@ -50,6 +52,16 @@ func main() {
if err != nil {
panic(fmt.Errorf("failed to create vault service: %w", err))
}
postgressDB, err := postgres.NewPostgresBackend(cfg.Database.DSN, nil)
if err != nil {
panic(fmt.Errorf("failed to create postgres backend: %w", err))
}
schedulerSvc, err := scheduler.NewSchedulerService(postgressDB, client, redisOptions)
if err != nil {
panic(fmt.Errorf("failed to create scheduler service: %w", err))
}
schedulerSvc.Start()
defer schedulerSvc.Stop()
Comment thread
johnnyluo marked this conversation as resolved.
mux := asynq.NewServeMux()
// mux.HandleFunc(tasks.TypePluginTransaction, vaultService.HandlePluginTransaction)
mux.HandleFunc(tasks.TypeKeySignDKLS, vaultService.HandleKeySignDKLS)
Expand Down