assign workflows

This commit is contained in:
Victor Vrantchan
2016-05-05 14:14:44 -04:00
parent 257e6120ea
commit 92ca9751f2
3 changed files with 130 additions and 20 deletions

32
main.go
View File

@@ -78,6 +78,22 @@ func main() {
os.Exit(1)
}
//profileDB must exist before workflowDB
// TODO this is getting messy and migrations should be handled by a separate thing
profileDB := profile.NewDB(
"postgres",
*flPGconn,
profile.Logger(logger),
profile.Debug(),
)
workflowDB := workflow.NewDB(
"postgres",
*flPGconn,
workflow.Logger(logger),
workflow.Debug(),
)
deviceDB := device.NewDB(
"postgres",
*flPGconn,
@@ -119,22 +135,6 @@ func main() {
)
connectHandler := connect.ServiceHandler(ctx, connectSvc)
//profileDB must exist before workflowDB
// TODO this is getting messy and migrations should be handled by a separate thing
profileDB := profile.NewDB(
"postgres",
*flPGconn,
profile.Logger(logger),
profile.Debug(),
)
workflowDB := workflow.NewDB(
"postgres",
*flPGconn,
workflow.Logger(logger),
workflow.Debug(),
)
workflowSvc := workflow.NewService(workflow.DB(workflowDB))
workflowHandler := workflow.ServiceHandler(ctx, workflowSvc)
// profiles