mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-01-04 07:39:43 -06:00
* feat: create worker with label * feat: worker context * feat: dynamic labels * feat: affinity * fix: ptr * fix: nil labels * feat: sticky dag * feat: sticky docs * feat: sticky children * chore: lint * fix: tests * fix: possibly nil workerId * chore: cleanup unneeded pointers
39 lines
597 B
Go
39 lines
597 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/joho/godotenv"
|
|
|
|
"github.com/hatchet-dev/hatchet/pkg/cmdutils"
|
|
)
|
|
|
|
type userCreateEvent struct {
|
|
Username string `json:"username"`
|
|
UserID string `json:"user_id"`
|
|
Data map[string]string `json:"data"`
|
|
}
|
|
|
|
type stepOneOutput struct {
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
func main() {
|
|
err := godotenv.Load()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
ch := cmdutils.InterruptChan()
|
|
cleanup, err := run()
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
<-ch
|
|
|
|
if err := cleanup(); err != nil {
|
|
panic(fmt.Errorf("cleanup() error = %v", err))
|
|
}
|
|
}
|