Skip to content

fix: Use localStorage for memqueue tests instead of Redis for #162#163

Merged
vmihailenco merged 1 commit into
vmihailenco:v3from
shaunco:fix-no-redis-in-memqueue
Nov 22, 2021
Merged

fix: Use localStorage for memqueue tests instead of Redis for #162#163
vmihailenco merged 1 commit into
vmihailenco:v3from
shaunco:fix-no-redis-in-memqueue

Conversation

@shaunco

@shaunco shaunco commented Nov 21, 2021

Copy link
Copy Markdown
Contributor

Structured similarly to how #106 moved storage to storage.go, but I made a few changes:

  • Added NewLocalStorage() function to allow taskq users to do opt.Storage = taskq.NewLocalStorage(), as I agree with your comment in fixed panics on msg.Name != "" & redis is disabled #106 that introducing a new default will be unexpected by most and I'd also rather see an error when storage is not configured
  • NewLocalStorage() and newRedisStorage() return Storage interfaces instead of their internal types
  • Exist methods take pointers for their receiver argument, since LocalStorage would otherwise pass its sync.Mutex by value

@shaunco

shaunco commented Nov 21, 2021

Copy link
Copy Markdown
Contributor Author

Let me know if you want me to fix the commitlint complaint (subject must not be sentence-case, start-case, pascal-case, upper-case [subject-case]), even though it is complaining about localStorage and Redis, which should have those specific cases 😩

@vmihailenco

Copy link
Copy Markdown
Owner

Thanks 👍

@vmihailenco
vmihailenco merged commit 720ffc5 into vmihailenco:v3 Nov 22, 2021
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

Successfully merging this pull request may close these issues.

2 participants