Skip to content

Commit 280a5cc

Browse files
committed
React to code organization changes
1 parent 2683ff7 commit 280a5cc

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

backend/monoprocess/diagnostics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"context"
55
"errors"
66

7+
"github.com/cschleiden/go-workflows/core"
78
"github.com/cschleiden/go-workflows/diag"
8-
"github.com/cschleiden/go-workflows/internal/core"
99
)
1010

1111
var _ diag.Backend = (*monoprocessBackend)(nil)

backend/monoprocess/monoprocess.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ import (
77
"time"
88

99
"github.com/cschleiden/go-workflows/backend"
10-
"github.com/cschleiden/go-workflows/internal/core"
11-
"github.com/cschleiden/go-workflows/internal/history"
12-
"github.com/cschleiden/go-workflows/internal/task"
10+
"github.com/cschleiden/go-workflows/backend/history"
11+
"github.com/cschleiden/go-workflows/core"
1312
"github.com/cschleiden/go-workflows/workflow"
1413
)
1514

@@ -39,7 +38,7 @@ func NewMonoprocessBackend(b backend.Backend) *monoprocessBackend {
3938
return mb
4039
}
4140

42-
func (b *monoprocessBackend) GetWorkflowTask(ctx context.Context) (*task.Workflow, error) {
41+
func (b *monoprocessBackend) GetWorkflowTask(ctx context.Context) (*backend.WorkflowTask, error) {
4342
// loop until either we find a task or the context is cancelled
4443
for {
4544
if w, err := b.Backend.GetWorkflowTask(ctx); w != nil || err != nil {
@@ -55,7 +54,7 @@ func (b *monoprocessBackend) GetWorkflowTask(ctx context.Context) (*task.Workflo
5554
}
5655
}
5756

58-
func (b *monoprocessBackend) GetActivityTask(ctx context.Context) (*task.Activity, error) {
57+
func (b *monoprocessBackend) GetActivityTask(ctx context.Context) (*backend.ActivityTask, error) {
5958
// loop until either we find a task or the context is cancelled
6059
for {
6160
if a, err := b.Backend.GetActivityTask(ctx); a != nil || err != nil {
@@ -81,7 +80,7 @@ func (b *monoprocessBackend) CreateWorkflowInstance(ctx context.Context, instanc
8180

8281
func (b *monoprocessBackend) CompleteWorkflowTask(
8382
ctx context.Context,
84-
task *task.Workflow,
83+
task *backend.WorkflowTask,
8584
instance *workflow.Instance,
8685
state core.WorkflowInstanceState,
8786
executedEvents, activityEvents, timerEvents []*history.Event,

backend/monoprocess/monoprocess_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66
"testing"
77

88
"github.com/cschleiden/go-workflows/backend"
9+
"github.com/cschleiden/go-workflows/backend/history"
910
"github.com/cschleiden/go-workflows/backend/sqlite"
1011
"github.com/cschleiden/go-workflows/backend/test"
11-
"github.com/cschleiden/go-workflows/internal/history"
1212
)
1313

1414
func Test_MonoprocessBackend(t *testing.T) {

backend/sqlite/sqlite_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"testing"
55

66
"github.com/cschleiden/go-workflows/backend"
7-
"github.com/cschleiden/go-workflows/backend/history"
87
"github.com/cschleiden/go-workflows/backend/test"
98
)
109

0 commit comments

Comments
 (0)