Skip to content

Latest commit

 

History

History
118 lines (81 loc) · 4.35 KB

CHANGELOG.md

File metadata and controls

118 lines (81 loc) · 4.35 KB

Version 2.0

  • Implemented GET/POST /v2/job-types, to create or retrieve information about job types.

  • The new httptypes package contains requests and responses, which allow other packages to avoid importing all of Rickover just to get the HTTP request types.

  • archived_jobs.Get and archived_jobs.GetRetry both accept a context.Context.

  • Various *Retry functions accept an int instead of a uint8 for convenience.

Version 1.3

This is a checkpoint release before making more breaking changes; there may be breaking changes from version 1.2.

  • server.Get now accepts a Config object, with an Authorizer field, instead of accepting an Authorizer directly.

  • When a new job type is created, the dequeuer will restart itself to ensure that jobs begin processing for the new job type immediately.

  • Requests without Basic Auth credentials will only receive a 401 if the Authorizer returns an error.

  • Get with a nil Authorizer will panic.

  • Use pg_advisory_xact_lock to lock queued jobs before marking them as in progress, instead of selecting a row for update.

  • Removed go-dberror due to lack of a LICENSE. As a result, error messages and types may change.

  • Removed Sleep() interface from the Worker.

  • JobProcessor now has a Handler interface that is more flexible for how work is to be performed. NewJobProcessor accepts a Handler; the old downstreamUrl and Password can be created by calling

    NewJobProcessor(NewDownstreamHandler(url, password))
    
  • Many function calls, including database queries and the downstream client, now accept a context.Context, including the dequeuer, which no longer has a QuitChan. Use a context.CancelFunc to cancel the dequeuer.

  • The services.JobProcessor does not automatically use a downstream.Client, it has a Handle(context.Context, *QueuedJob) interface that can be used to swap out the implementation of the thing that actually processes the downstream job.

  • A new WorkServer struct in the dequeuer package is designed to simplify configuration of the deqeueuer. Call dequeuer.New() with a dequeuer.Config to retrieve a WorkServer, then call Run() on the WorkServer to start the dequeuer, the stuck job watcher, and all metrics observers.

    See the Example in the top level package for more usage guidance.

  • If we attempted to record a failed job but the attempt numbers don't match up with what's in the database, previously we would return a 500. Now we catch the error and return an appropriate 400.

  • Use log15 instead of the standard library logger. Some functions now accept a log.Logger as an argument. Use log15.New() to create a Logger to pass to these functions.

  • A new Metrics interface exists - override metrics.Client with your own implementation to control where metrics are sent. See the README for more information.

Version 0.37

Fixes a crashing error in dequeuer.CreatePools (and adds tests so it can't happen again)

Version 0.36

The job_ prefix is now retrieved as part of the database query instead of being attached in the model. You'll need to update go-types to version 0.13 at the latest.

Version 0.35

  • Fixes an error in a test committed shortly before version 0.34.

Version 0.34

Version 0.33

  • All uses of Id have been renamed to ID, per the Go Code Review Comments guidelines. I don't like breaking this, but I'd rather keep the naming idiomatic, Go will detect incorrect references at compile time, and I haven't received any evidence that anyone else is using the project, so I am not too worried about breaking compatibility in the wild.

  • When replaying a job, use the expires_at value from the old job to determine whether to re-run it.

  • Enabled several skipped tests and improved their speed/reduced their size.

Version 0.32

  • The archived_jobs table now has an expires_at column storing when the job expired, or should have expired. This is useful for replaying jobs - you can batch replay jobs and the server will correctly mark them as expired.