Skip to content

Commit

Permalink
chore: remove redundant Func
Browse files Browse the repository at this point in the history
  • Loading branch information
brucexc committed Dec 13, 2024
1 parent 4d0ca59 commit ad244b8
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions internal/engine/worker/rss/factory.go
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
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
}

0 comments on commit ad244b8

Please sign in to comment.