Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
caffix committed Feb 23, 2025
1 parent 951f1ff commit bd0e554
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 27 deletions.
29 changes: 22 additions & 7 deletions engine/api/graphql/server/schema.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 17 additions & 20 deletions engine/sessions/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,21 @@ import (
)

type Session struct {
id uuid.UUID
log *slog.Logger
ps *pubsub.Logger
cfg *config.Config
scope *scope.Scope
db repository.Repository
dsn string
dbtype string
c *cache.Cache
ranger cidranger.Ranger
tmpdir string
stats *et.SessionStats
done chan struct{}
set *stringset.Set
id uuid.UUID
log *slog.Logger
ps *pubsub.Logger
cfg *config.Config
scope *scope.Scope
db repository.Repository
dsn string
dbtype string
c *cache.Cache
ranger cidranger.Ranger
tmpdir string
stats *et.SessionStats
done chan struct{}
finished bool
set *stringset.Set
}

// CreateSession initializes a new Session object based on the provided configuration.
Expand Down Expand Up @@ -127,12 +128,7 @@ func (s *Session) EventSet() *stringset.Set {
}

func (s *Session) Done() bool {
select {
case <-s.done:
return true
default:
}
return false
return s.finished
}

func (s *Session) Kill() {
Expand All @@ -142,6 +138,7 @@ func (s *Session) Kill() {
default:
}
close(s.done)
s.finished = true
}

func (s *Session) setupDB() error {
Expand Down

0 comments on commit bd0e554

Please sign in to comment.