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

w.WaitTimeSecond not available #4

Open
brunozrk opened this issue Mar 15, 2019 · 1 comment
Open

w.WaitTimeSecond not available #4

brunozrk opened this issue Mar 15, 2019 · 1 comment

Comments

@brunozrk
Copy link

Im getting the following error while trying to set a different WaitTimeSecond:

w.WaitTimeSecond undefined (type *worker.Service has no field or method WaitTimeSecond)

code:

    w, err := worker.NewService(QueueName)
    if err != nil {
        log.Printf("Error creating new Worker Service: %s\n", err)
    }

    w.WaitTimeSecond = 10
    w.Start(worker.HandlerFunc(Process))

What is wrong?

I don't know a lot about golang, but looking into code, there isn't a part of the code replacing the default value
https://github.com/bufferapp/sqs-worker-go/blob/master/worker/worker.go#L56
https://github.com/bufferapp/sqs-worker-go/blob/master/worker/worker.go#L101

@DiegoGallegos4
Copy link

I think it should be:

worker.WaitTimeSecond

If you see at worker.go Service struct does not have a WaitTimeSecond property. It is an exported variable WaitTimeSecond.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants