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

Fixing Job processing order without munging the job IDS #708

Closed
wants to merge 7 commits into from
Closed

Fixing Job processing order without munging the job IDS #708

wants to merge 7 commits into from

Commits on Aug 27, 2015

  1. Fixing FIFO problem

    Redis sorts zsets lexographically for members with the same priority.
    This causes jobs to run out of order. If you submit 11 jobs at the same
    priority level, they will run as 1,10,11,2,3,4,5,6,7,8,9.
    
    This adds a zid to the job that prepends the number of digits in the job
    id (001)1. This new zset value will be sorted correctly by redis. This
    is not desirable as a general purpose id, so it is hidden and the
    standard jobid can be used for all external purposes.
    
    The prepended value is stripped off when doing zpop.
    hockeytim11 committed Aug 27, 2015
    Configuration menu
    Copy the full SHA
    b77e3b5 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2015

  1. Making sure all tests pass

    Fixing range by and delay code so all tests pass again.
    hockeytim11 committed Sep 7, 2015
    Configuration menu
    Copy the full SHA
    77fdeaa View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2015

  1. Configuration menu
    Copy the full SHA
    dbf862f View commit details
    Browse the repository at this point in the history
  2. Making suggested changes

    The suggestion to remove 2 characters from the zid seemed reasonable.
    Also renaming parseID to stripFIFO to be consistent with the other file.
    hockeytim11 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    7cff696 View commit details
    Browse the repository at this point in the history
  3. Moving createFIFO and stripFIFO to the client so they are in one place.

    I didn't like defining the strip FIFO and create FIFO in separate files.
    This collocates them in one place next to the getKey call that is used
    everywhere.
    hockeytim11 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    131b483 View commit details
    Browse the repository at this point in the history
  4. Fixing whitespace issues.

    I was using tab characters, switching to spaces.
    hockeytim11 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    c18d581 View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2015

  1. Handling undefined zid's

    Expecting a string was causing a crash when undefined was passed in.
    Undefined doesn't resolve to an id, so we return null.
    hockeytim11 committed Oct 6, 2015
    Configuration menu
    Copy the full SHA
    1453c34 View commit details
    Browse the repository at this point in the history