Skip to content

Commit

Permalink
Merge pull request #66 from vansante/instantiate-emitter
Browse files Browse the repository at this point in the history
Dont forget to instantiate the emitter
  • Loading branch information
vansante authored Apr 22, 2024
2 parents 9352a68 + 4ddd519 commit 107c12a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion job/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const (
// NewRunner creates a new job runner
func NewRunner(ctx context.Context, conf Config, logger *slog.Logger) *Runner {
r := &Runner{
Emitter: eventemitter.NewEmitter(false),
config: conf,
datasetLock: make(map[string]struct{}),
remoteCache: make(map[string]map[string]datasetCache),
Expand All @@ -39,7 +40,7 @@ func NewRunner(ctx context.Context, conf Config, logger *slog.Logger) *Runner {

// Runner runs Create, Send and Prune snapshot jobs. Additionally, it can prune filesystems.
type Runner struct {
eventemitter.Emitter
*eventemitter.Emitter

config Config
mapLock sync.Mutex
Expand Down
2 changes: 1 addition & 1 deletion job/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func runnerTest(t *testing.T, fn func(url string, runner *Runner)) {
// Create another zpool as 'source':
zfs.TestZPool(testZPool, func() {
r := &Runner{
Emitter: *eventemitter.NewEmitter(false),
Emitter: eventemitter.NewEmitter(false),
datasetLock: make(map[string]struct{}),
remoteCache: make(map[string]map[string]datasetCache),
config: Config{
Expand Down

0 comments on commit 107c12a

Please sign in to comment.