Change package URL to the blender.org repository
This commit is contained in:
parent
e70a44a146
commit
47e36c927c
2
Makefile
2
Makefile
@ -1,4 +1,4 @@
|
||||
PKG := gitlab.com/blender/flamenco-ng-poc
|
||||
PKG := git.blender.org/flamenco
|
||||
VERSION := $(shell git describe --tags --dirty --always)
|
||||
PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/)
|
||||
|
||||
|
@ -36,15 +36,15 @@ import (
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/ziflex/lecho/v3"
|
||||
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/appinfo"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/api_impl"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/config"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/job_compilers"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/persistence"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/swagger_ui"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/task_logs"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/task_state_machine"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
"git.blender.org/flamenco/internal/appinfo"
|
||||
"git.blender.org/flamenco/internal/manager/api_impl"
|
||||
"git.blender.org/flamenco/internal/manager/config"
|
||||
"git.blender.org/flamenco/internal/manager/job_compilers"
|
||||
"git.blender.org/flamenco/internal/manager/persistence"
|
||||
"git.blender.org/flamenco/internal/manager/swagger_ui"
|
||||
"git.blender.org/flamenco/internal/manager/task_logs"
|
||||
"git.blender.org/flamenco/internal/manager/task_state_machine"
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
var cliArgs struct {
|
||||
|
@ -36,8 +36,8 @@ import (
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/appinfo"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/worker"
|
||||
"git.blender.org/flamenco/internal/appinfo"
|
||||
"git.blender.org/flamenco/internal/worker"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -9,10 +9,11 @@ import (
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/ziflex/lecho/v3"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/appinfo"
|
||||
|
||||
gosocketio "github.com/graarh/golang-socketio"
|
||||
"github.com/graarh/golang-socketio/transport"
|
||||
|
||||
"git.blender.org/flamenco/internal/appinfo"
|
||||
)
|
||||
|
||||
type Message struct {
|
||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
||||
module gitlab.com/blender/flamenco-ng-poc
|
||||
module git.blender.org/flamenco
|
||||
|
||||
go 1.18
|
||||
|
||||
|
@ -25,12 +25,12 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"git.blender.org/flamenco/internal/manager/job_compilers"
|
||||
"git.blender.org/flamenco/internal/manager/persistence"
|
||||
"git.blender.org/flamenco/internal/manager/task_state_machine"
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/rs/zerolog"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/job_compilers"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/persistence"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/task_state_machine"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
)
|
||||
|
||||
type Flamenco struct {
|
||||
@ -44,7 +44,7 @@ type Flamenco struct {
|
||||
var _ api.ServerInterface = (*Flamenco)(nil)
|
||||
|
||||
// Generate mock implementations of these interfaces.
|
||||
//go:generate go run github.com/golang/mock/mockgen -destination mocks/api_impl_mock.gen.go -package mocks gitlab.com/blender/flamenco-ng-poc/internal/manager/api_impl PersistenceService,JobCompiler,LogStorage,ConfigService,TaskStateMachine
|
||||
//go:generate go run github.com/golang/mock/mockgen -destination mocks/api_impl_mock.gen.go -package mocks git.blender.org/flamenco/internal/manager/api_impl PersistenceService,JobCompiler,LogStorage,ConfigService,TaskStateMachine
|
||||
|
||||
type PersistenceService interface {
|
||||
StoreAuthoredJob(ctx context.Context, authoredJob job_compilers.AuthoredJob) error
|
||||
|
@ -25,11 +25,11 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"git.blender.org/flamenco/internal/manager/persistence"
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
"github.com/google/uuid"
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/rs/zerolog"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/persistence"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
)
|
||||
|
||||
func (f *Flamenco) GetJobTypes(e echo.Context) error {
|
||||
|
@ -24,10 +24,10 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"git.blender.org/flamenco/internal/manager/persistence"
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/persistence"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
)
|
||||
|
||||
func ptr[T any](value T) *T {
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: gitlab.com/blender/flamenco-ng-poc/internal/manager/api_impl (interfaces: PersistenceService,JobCompiler,LogStorage,ConfigService,TaskStateMachine)
|
||||
// Source: git.blender.org/flamenco/internal/manager/api_impl (interfaces: PersistenceService,JobCompiler,LogStorage,ConfigService,TaskStateMachine)
|
||||
|
||||
// Package mocks is a generated GoMock package.
|
||||
package mocks
|
||||
@ -8,12 +8,12 @@ import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
config "git.blender.org/flamenco/internal/manager/config"
|
||||
job_compilers "git.blender.org/flamenco/internal/manager/job_compilers"
|
||||
persistence "git.blender.org/flamenco/internal/manager/persistence"
|
||||
api "git.blender.org/flamenco/pkg/api"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
zerolog "github.com/rs/zerolog"
|
||||
config "gitlab.com/blender/flamenco-ng-poc/internal/manager/config"
|
||||
job_compilers "gitlab.com/blender/flamenco-ng-poc/internal/manager/job_compilers"
|
||||
persistence "gitlab.com/blender/flamenco-ng-poc/internal/manager/persistence"
|
||||
api "gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
)
|
||||
|
||||
// MockPersistenceService is a mock of PersistenceService interface.
|
||||
|
@ -29,10 +29,11 @@ import (
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/labstack/echo/v4"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/api_impl/mocks"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/persistence"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
"gorm.io/gorm"
|
||||
|
||||
"git.blender.org/flamenco/internal/manager/api_impl/mocks"
|
||||
"git.blender.org/flamenco/internal/manager/persistence"
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
type mockedFlamenco struct {
|
||||
|
@ -21,9 +21,9 @@ package api_impl
|
||||
* ***** END GPL LICENSE BLOCK ***** */
|
||||
|
||||
import (
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/config"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/persistence"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
"git.blender.org/flamenco/internal/manager/config"
|
||||
"git.blender.org/flamenco/internal/manager/persistence"
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
type VariableReplacer interface {
|
||||
|
@ -24,9 +24,10 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/config"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/persistence"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/internal/manager/config"
|
||||
"git.blender.org/flamenco/internal/manager/persistence"
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
func varreplTestTask() api.AssignedTask {
|
||||
|
@ -27,8 +27,9 @@ import (
|
||||
oapi_middle "github.com/deepmap/oapi-codegen/pkg/middleware"
|
||||
"github.com/getkin/kin-openapi/openapi3filter"
|
||||
"github.com/labstack/echo/v4"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/persistence"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
"git.blender.org/flamenco/internal/manager/persistence"
|
||||
)
|
||||
|
||||
type workerContextKey string
|
||||
|
@ -32,8 +32,8 @@ import (
|
||||
"github.com/rs/zerolog"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/persistence"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
"git.blender.org/flamenco/internal/manager/persistence"
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
// RegisterWorker registers a new worker and stores it in the database.
|
||||
|
@ -29,8 +29,9 @@ import (
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/persistence"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/internal/manager/persistence"
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
func TestTaskScheduleHappy(t *testing.T) {
|
||||
|
@ -23,7 +23,7 @@ package config
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
// The default configuration, use DefaultConfig() to obtain a copy.
|
||||
|
@ -28,7 +28,8 @@ import (
|
||||
"github.com/dop251/goja"
|
||||
"github.com/google/uuid"
|
||||
"github.com/rs/zerolog/log"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
// Author allows scripts to author tasks and commands.
|
||||
|
@ -31,7 +31,8 @@ import (
|
||||
"github.com/dop251/goja_nodejs/require"
|
||||
"github.com/google/uuid"
|
||||
"github.com/rs/zerolog/log"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
var ErrJobTypeUnknown = errors.New("job type unknown")
|
||||
|
@ -29,7 +29,8 @@ import (
|
||||
|
||||
"github.com/benbjohnson/clock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
func exampleSubmittedJob() api.SubmittedJob {
|
||||
|
@ -27,7 +27,7 @@ import (
|
||||
"github.com/rs/zerolog/log"
|
||||
"gorm.io/gorm"
|
||||
|
||||
sqlite "gitlab.com/blender/flamenco-ng-poc/pkg/gorm-modernc-sqlite"
|
||||
sqlite "git.blender.org/flamenco/pkg/gorm-modernc-sqlite"
|
||||
)
|
||||
|
||||
// DB provides the database interface.
|
||||
|
@ -27,9 +27,10 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/job_compilers"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
"gorm.io/gorm"
|
||||
|
||||
"git.blender.org/flamenco/internal/manager/job_compilers"
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
type Job struct {
|
||||
|
@ -26,9 +26,10 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/job_compilers"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"git.blender.org/flamenco/internal/manager/job_compilers"
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
func TestStoreAuthoredJob(t *testing.T) {
|
||||
|
@ -25,8 +25,9 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
"gorm.io/gorm"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -27,8 +27,9 @@ import (
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/job_compilers"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/internal/manager/job_compilers"
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
func TestNoTasks(t *testing.T) {
|
||||
|
@ -25,8 +25,9 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
"gorm.io/gorm"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
type Worker struct {
|
||||
|
@ -27,8 +27,9 @@ import (
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
func TestCreateFetchWorker(t *testing.T) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: gitlab.com/blender/flamenco-ng-poc/internal/manager/task_state_machine (interfaces: PersistenceService)
|
||||
// Source: git.blender.org/flamenco/internal/manager/task_state_machine (interfaces: PersistenceService)
|
||||
|
||||
// Package mocks is a generated GoMock package.
|
||||
package mocks
|
||||
@ -8,9 +8,9 @@ import (
|
||||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
persistence "git.blender.org/flamenco/internal/manager/persistence"
|
||||
api "git.blender.org/flamenco/pkg/api"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
persistence "gitlab.com/blender/flamenco-ng-poc/internal/manager/persistence"
|
||||
api "gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
)
|
||||
|
||||
// MockPersistenceService is a mock of PersistenceService interface.
|
||||
|
@ -26,8 +26,9 @@ import (
|
||||
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/rs/zerolog/log"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/persistence"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/internal/manager/persistence"
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
// taskFailJobPercentage is the percentage of a job's tasks that need to fail to
|
||||
@ -40,7 +41,7 @@ type StateMachine struct {
|
||||
}
|
||||
|
||||
// Generate mock implementations of these interfaces.
|
||||
//go:generate go run github.com/golang/mock/mockgen -destination mocks/interfaces_mock.gen.go -package mocks gitlab.com/blender/flamenco-ng-poc/internal/manager/task_state_machine PersistenceService
|
||||
//go:generate go run github.com/golang/mock/mockgen -destination mocks/interfaces_mock.gen.go -package mocks git.blender.org/flamenco/internal/manager/task_state_machine PersistenceService
|
||||
|
||||
type PersistenceService interface {
|
||||
SaveTask(ctx context.Context, task *persistence.Task) error
|
||||
|
@ -30,9 +30,9 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gorm.io/gorm"
|
||||
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/persistence"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/manager/task_state_machine/mocks"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
"git.blender.org/flamenco/internal/manager/persistence"
|
||||
"git.blender.org/flamenco/internal/manager/task_state_machine/mocks"
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
type StateMachineMocks struct {
|
||||
|
@ -21,11 +21,11 @@ package worker
|
||||
* ***** END GPL LICENSE BLOCK ***** */
|
||||
|
||||
import (
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
// Generate the mock for the client interface.
|
||||
//go:generate go run github.com/golang/mock/mockgen -destination mocks/client.gen.go -package mocks gitlab.com/blender/flamenco-ng-poc/internal/worker FlamencoClient
|
||||
//go:generate go run github.com/golang/mock/mockgen -destination mocks/client.gen.go -package mocks git.blender.org/flamenco/internal/worker FlamencoClient
|
||||
|
||||
// FlamencoClient is a wrapper for api.ClientWithResponsesInterface so that locally mocks can be created.
|
||||
type FlamencoClient interface {
|
||||
|
@ -32,7 +32,8 @@ import (
|
||||
|
||||
"github.com/google/shlex"
|
||||
"github.com/rs/zerolog"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
// The buffer size used to read stdout/stderr output from Blender.
|
||||
|
@ -7,7 +7,8 @@ import (
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
/* ***** BEGIN GPL LICENSE BLOCK *****
|
||||
|
@ -29,7 +29,8 @@ import (
|
||||
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/rs/zerolog/log"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
type CommandExecutor struct {
|
||||
@ -46,7 +47,7 @@ var _ CommandRunner = (*CommandExecutor)(nil)
|
||||
type commandCallable func(ctx context.Context, logger zerolog.Logger, taskID string, cmd api.Command) error
|
||||
|
||||
// Generate mock implementation of this interface.
|
||||
//go:generate go run github.com/golang/mock/mockgen -destination mocks/command_listener.gen.go -package mocks gitlab.com/blender/flamenco-ng-poc/internal/worker CommandListener
|
||||
//go:generate go run github.com/golang/mock/mockgen -destination mocks/command_listener.gen.go -package mocks git.blender.org/flamenco/internal/worker CommandListener
|
||||
|
||||
// CommandListener sends the result of commands (log, output files) to the Manager.
|
||||
type CommandListener interface {
|
||||
@ -63,7 +64,7 @@ type TimeService interface {
|
||||
Now() time.Time
|
||||
}
|
||||
|
||||
//go:generate go run github.com/golang/mock/mockgen -destination mocks/cli_runner.gen.go -package mocks gitlab.com/blender/flamenco-ng-poc/internal/worker CommandLineRunner
|
||||
//go:generate go run github.com/golang/mock/mockgen -destination mocks/cli_runner.gen.go -package mocks git.blender.org/flamenco/internal/worker CommandLineRunner
|
||||
// CommandLineRunner is an interface around exec.CommandContext().
|
||||
type CommandLineRunner interface {
|
||||
CommandContext(ctx context.Context, name string, arg ...string) *exec.Cmd
|
||||
|
@ -26,8 +26,9 @@ import (
|
||||
"github.com/benbjohnson/clock"
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/worker/mocks"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/internal/worker/mocks"
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
type CommandExecutorMocks struct {
|
||||
|
@ -30,7 +30,8 @@ import (
|
||||
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/rs/zerolog/log"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
// cmdEcho executes the "echo" command.
|
||||
|
@ -27,7 +27,8 @@ import (
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
func TestCommandEcho(t *testing.T) {
|
||||
|
@ -29,7 +29,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
var _ CommandListener = (*Listener)(nil)
|
||||
|
@ -8,7 +8,8 @@ import (
|
||||
"github.com/benbjohnson/clock"
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/worker/mocks"
|
||||
|
||||
"git.blender.org/flamenco/internal/worker/mocks"
|
||||
)
|
||||
|
||||
/* ***** BEGIN GPL LICENSE BLOCK *****
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: gitlab.com/blender/flamenco-ng-poc/internal/worker (interfaces: CommandLineRunner)
|
||||
// Source: git.blender.org/flamenco/internal/worker (interfaces: CommandLineRunner)
|
||||
|
||||
// Package mocks is a generated GoMock package.
|
||||
package mocks
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: gitlab.com/blender/flamenco-ng-poc/internal/worker (interfaces: FlamencoClient)
|
||||
// Source: git.blender.org/flamenco/internal/worker (interfaces: FlamencoClient)
|
||||
|
||||
// Package mocks is a generated GoMock package.
|
||||
package mocks
|
||||
@ -9,8 +9,8 @@ import (
|
||||
io "io"
|
||||
reflect "reflect"
|
||||
|
||||
api "git.blender.org/flamenco/pkg/api"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
api "gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
)
|
||||
|
||||
// MockFlamencoClient is a mock of FlamencoClient interface.
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: gitlab.com/blender/flamenco-ng-poc/internal/worker (interfaces: CommandListener)
|
||||
// Source: git.blender.org/flamenco/internal/worker (interfaces: CommandListener)
|
||||
|
||||
// Package mocks is a generated GoMock package.
|
||||
package mocks
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: gitlab.com/blender/flamenco-ng-poc/internal/worker (interfaces: TaskExecutionListener)
|
||||
// Source: git.blender.org/flamenco/internal/worker (interfaces: TaskExecutionListener)
|
||||
|
||||
// Package mocks is a generated GoMock package.
|
||||
package mocks
|
||||
|
@ -31,8 +31,9 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/appinfo"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/internal/appinfo"
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -25,7 +25,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
const durationSleepCheck = 3 * time.Second
|
||||
|
@ -26,7 +26,8 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -25,7 +25,8 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
func (w *Worker) gotoStateShutdown(context.Context) {
|
||||
|
@ -24,7 +24,8 @@ import (
|
||||
"context"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
func (w *Worker) setupStateMachine() {
|
||||
|
@ -25,7 +25,8 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
// queryManagerForStateChange asks the Manager whether we should go to another state or not.
|
||||
|
@ -25,7 +25,8 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
type CommandRunner interface {
|
||||
@ -33,7 +34,7 @@ type CommandRunner interface {
|
||||
}
|
||||
|
||||
// Generate mock implementation of this interface.
|
||||
//go:generate go run github.com/golang/mock/mockgen -destination mocks/task_exe_listener.gen.go -package mocks gitlab.com/blender/flamenco-ng-poc/internal/worker TaskExecutionListener
|
||||
//go:generate go run github.com/golang/mock/mockgen -destination mocks/task_exe_listener.gen.go -package mocks git.blender.org/flamenco/internal/worker TaskExecutionListener
|
||||
|
||||
// TaskExecutionListener sends task lifecycle events (start/fail/complete) to the Manager.
|
||||
type TaskExecutionListener interface {
|
||||
|
@ -31,9 +31,9 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
_ "modernc.org/sqlite"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
// TODO: pull the SQLite stuff out of this file into a more global place, so
|
||||
|
@ -29,10 +29,10 @@ import (
|
||||
"github.com/benbjohnson/clock"
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gitlab.com/blender/flamenco-ng-poc/internal/worker/mocks"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
_ "modernc.org/sqlite"
|
||||
|
||||
"git.blender.org/flamenco/internal/worker/mocks"
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
const testBufferDBFilename = "test-flamenco-worker.db"
|
||||
|
@ -25,7 +25,8 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
"gitlab.com/blender/flamenco-ng-poc/pkg/api"
|
||||
|
||||
"git.blender.org/flamenco/pkg/api"
|
||||
)
|
||||
|
||||
// Worker performs regular Flamenco Worker operations.
|
||||
|
Loading…
Reference in New Issue
Block a user