Skip to content

Commit

Permalink
Converts to nonmaster. This closes #134
Browse files Browse the repository at this point in the history
  • Loading branch information
brotherlogic committed Jun 9, 2020
1 parent 64073f2 commit 1b8aa74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions wantslist.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,12 @@ func main() {

server.GoServer.KSclient = *keystoreclient.GetClient(server.DialMaster)

err := server.RegisterServerV2("wantslist", false, false)
err := server.RegisterServerV2("wantslist", false, true)
if err != nil {
return
}

server.RegisterRepeatingTask(server.prodProcess, "process_want_lists", time.Minute)
server.RegisterLockingTask(server.prodProcess, "process_want_lists")

fmt.Printf("%v", server.Serve())
}
4 changes: 2 additions & 2 deletions wantslistutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
pb "github.com/brotherlogic/wantslist/proto"
)

func (s *Server) prodProcess(ctx context.Context) error {
return s.processWantLists(ctx, s.listWait)
func (s *Server) prodProcess(ctx context.Context) (time.Time, error) {
return time.Now().Add(time.Hour), s.processWantLists(ctx, s.listWait)
}

func (s *Server) updateWant(ctx context.Context, v *pb.WantListEntry) error {
Expand Down

0 comments on commit 1b8aa74

Please sign in to comment.