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

introduced noop in message callbacks. #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mkuklis
Copy link

@mkuklis mkuklis commented Feb 12, 2014

This is just a cosmetic change so the callback in message could be avoided:

// Get a message
q.get(function(err, message) {
  // do something with the message
  // then delete it
  message.del();

  // need more time?
  // touch the message
  message.touch();

  // can't process the message
  // release the message
  message.release();
});

@ahallock
Copy link
Owner

Thanks for the PR. Can you elaborate on the benefit of this? I'm not familiar with the pattern, but are there really times when you're not interested in the result of the callback, say for error processing?

@mkuklis
Copy link
Author

mkuklis commented Feb 13, 2014

I have a situation where I just don't really care if something was successful or not so passing the callback looks unnecessary. This is a totally pedantic change so you don't have to merge it :).

@ahallock
Copy link
Owner

Let me mull that over, but I'll probably merge it. Hey, I noticed you're in Ithaca. I grew up near there in Homer haha. I need to get back soon and visit. Anyway...

@mkuklis
Copy link
Author

mkuklis commented Feb 13, 2014

ah cool! Homer is a nice little town. I play soccer very close to Homer once a week. Don't come now it's very cold and snowy :).

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