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

Version 1.0 of fivebeans #10

Merged
merged 21 commits into from
May 6, 2013
Merged

Version 1.0 of fivebeans #10

merged 21 commits into from
May 6, 2013

Commits on May 4, 2013

  1. Begin bringing this module up to my current standards for node modules.

    - main is now index.js
    - each submodule in lib now exports one item
    - fixed some small style things
    - added code coverage tools to the test harness
    
    Pre-bumped the version number because this will be an API-breaking release.
    
    Next up: removing logging.
    ceejbot committed May 4, 2013
    Configuration menu
    Copy the full SHA
    1748d1b View commit details
    Browse the repository at this point in the history
  2. The worker now emits 'log' events instead of attempting to log all by…

    … itself.
    
    Documentation to follow in the readme once I'm happy with the format of the
    objects passed to the event.
    ceejbot committed May 4, 2013
    Configuration menu
    Copy the full SHA
    8883f39 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    34b40cb View commit details
    Browse the repository at this point in the history
  4. The client now emits errors on interesting events like connect, close…

    …, and error.
    
    You are expected to listen for those events and act upon them. In particular, the
    API has changed to that connect no longer takes a callback.
    
    worker.start() no longer takes a flag to ignore the default tube. Instead you
    can set 'ignoreDefault' in the options hash you pass to the worker constructor.
    
    The worker no longer attempts to ignore the default tube if it's not watching
    anything else.
    
    Started implementing tests for the worker. This brings coverage up over
    50% (which is pathetic, but it's a start) so I added coverage checking
    to the test targets run by Travis CI.
    ceejbot committed May 4, 2013
    Configuration menu
    Copy the full SHA
    a5e7cc2 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2013

  1. More logger expungement.

    I just invented that word.
    ceejbot committed May 5, 2013
    Configuration menu
    Copy the full SHA
    772d470 View commit details
    Browse the repository at this point in the history
  2. Some style tightening.

    More worker tests.
    ceejbot committed May 5, 2013
    Configuration menu
    Copy the full SHA
    54cfb50 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a4ce59b View commit details
    Browse the repository at this point in the history
  4. The worker is now restartable.

    That is, you can call stop() and then start() on it without needing to
    create a new one. You'll still need to re-watch any tubes you were
    watching. (Going to rework that, at which point this client will be far
    divorced from the original project.)
    
    Implemented more worker tests. Client test coverage is now at 91% and
    worker coverage at 92%.
    ceejbot committed May 5, 2013
    Configuration menu
    Copy the full SHA
    6f42c30 View commit details
    Browse the repository at this point in the history
  5. Added two more worker job-handling tests.

    The bad json test exposed a bug, which I fixed: we would cheerfully go
    on to try to use a bad job payload. Yay integration tests.
    ceejbot committed May 5, 2013
    Configuration menu
    Copy the full SHA
    c81732a View commit details
    Browse the repository at this point in the history
  6. Travis test timings are much slower than on my MacBook.

    I read that virtualization means I'm running these tests on the
    equivalent of a RaspberryPI, which is awesome. Anyway, try to work
    around the timing differences while maintaining the usefulness of the
    tests.
    ceejbot committed May 5, 2013
    Configuration menu
    Copy the full SHA
    8fae5cc View commit details
    Browse the repository at this point in the history
  7. The worker emits many more events to make processing jobs a little ni…

    …cer.
    
    Well, as scientifically measured, about a million times nicer.
    
    Here is a list of events emitted and some notes on what they mean. This
    will turn into documentation eventually:
    
    error: payload is error; cannot be recovered from
    close: worker got a close event from its client; no payload
    
    warning: payload is object with error information; execution continues
    info: the equivalent of info-level logging; payload is object with
    action info
    
    started: worker has started processing jobs; no payload
    stopped: worker has stopped processing jobs; no payload
    
    job.reserved: payload is jobid
    job.handled: payload is object with job info
    job.deleted: payload is jobid
    job.destroyed: payload is jobid
    job.buried: payload is jobid
    
    Rewrote the tests to use the events, which should make them less
    timing-dependent. I might still not be allowing enough slop for the
    slowness of TravisCI.
    ceejbot committed May 5, 2013
    Configuration menu
    Copy the full SHA
    dbbd87a View commit details
    Browse the repository at this point in the history
  8. Bump up the timeout on two worker tests.

    These are consistently passing for me, so perhaps it's just that the
    tests are running on a RaspberryPI hosted at Amazon.
    ceejbot committed May 5, 2013
    Configuration menu
    Copy the full SHA
    b91fcbe View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b54260f View commit details
    Browse the repository at this point in the history
  10. Don't test kick-job if the version of beanstalkd doesn't support it.

    kick-job was introduced in 1.8 in Nov 2012. Apparently the package
    Travis installs is older than that.
    
    Used semver to compare versions because I am very lazy.
    ceejbot committed May 5, 2013
    Configuration menu
    Copy the full SHA
    481de1d View commit details
    Browse the repository at this point in the history
  11. Resequence some tests.

    ceejbot committed May 5, 2013
    Configuration menu
    Copy the full SHA
    6a815d6 View commit details
    Browse the repository at this point in the history
  12. You can now specify a delay of 0 when releasing jobs.

    And use that in the worker release test, to completely removing timing
    issues from the test. This should fix Travis. Famous last words.
    ceejbot committed May 5, 2013
    Configuration menu
    Copy the full SHA
    9594702 View commit details
    Browse the repository at this point in the history
  13. Added basic tests for the runner.

    Code coverage is now up over 90%, so I set the travis-cov threshold to
    90. Next up: documentation.
    ceejbot committed May 5, 2013
    Configuration menu
    Copy the full SHA
    932d912 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    717e519 View commit details
    Browse the repository at this point in the history
  15. Brought documentation up to date.

    Documented the new client.connect() behavior.
    Documented the new worker events. Improved worker documentation overall.
    ceejbot committed May 5, 2013
    Configuration menu
    Copy the full SHA
    6312222 View commit details
    Browse the repository at this point in the history
  16. Brought examples up to date.

    They all run.
    ceejbot committed May 5, 2013
    Configuration menu
    Copy the full SHA
    0dc3cb3 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    94db5ea View commit details
    Browse the repository at this point in the history