// Copyright 2023 schukai GmbH // SPDX-License-Identifier: AGPL-3.0 package jobqueue import ( "context" "sync" ) func NewDummyRunnableFromMap(data map[string]any) (*DummyRunnable, error) { return &DummyRunnable{}, nil } // DummyResult is a dummy result type DummyResult struct { } type DummyRunnable struct { mu sync.Mutex } func (d *DummyRunnable) Run(_ context.Context) (RunResult[DummyResult], error) { return RunResult[DummyResult]{ Status: ResultStatusSuccess, }, nil } func (d *DummyRunnable) GetType() string { return "dummy" } func (c *DummyRunnable) GetPersistence() RunnableImport { c.mu.Lock() defer c.mu.Unlock() data := JSONMap{} return RunnableImport{ Type: c.GetType(), Data: data, } }