Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove redundant Func #676

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions internal/engine/worker/rss/factory.go
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
package worker

import (
"fmt"

"github.com/redis/rueidis"
"github.com/rss3-network/node/config"
"github.com/rss3-network/node/internal/database"
"github.com/rss3-network/node/internal/engine"
"github.com/rss3-network/node/internal/engine/worker/federated/core/mastodon"
"github.com/rss3-network/node/schema/worker/rss"
)

func New(config *config.Module, databaseClient database.Client, redisClient rueidis.Client) (engine.Worker, error) {
switch config.Worker {
case rss.Core:
return mastodon.NewWorker(databaseClient, redisClient)
default:
return nil, fmt.Errorf("[federated/factory.go] unsupported worker %s", config.Worker)
}
func New(_ *config.Module) (engine.Worker, error) {
// Not implemented
// If the rsshub worker exists, it will be started by default, and there will not be a separate worker instance
return nil, nil
}
Loading