Riverqueue

Latest version: v0.7.0

Safety actively analyzes 682244 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 8

0.10.1

Fixed

- Migration version 005 has been altered so that it can run even if the `river_migration` table isn't present, making it more friendly for projects that aren't using River's internal migration system. [PR 465](https://github.com/riverqueue/river/pull/465).

0.10.0

shell
go install github.com/riverqueue/river/cmd/riverlatest
river migrate-up --database-url "$DATABASE_URL"


If not using River's internal migration system, the raw SQL can alternatively be dumped with:

shell
go install github.com/riverqueue/river/cmd/riverlatest
river migrate-get --version 5 --up > river5.up.sql
river migrate-get --version 5 --down > river5.down.sql


The migration **includes a new index**. Users with a very large job table may want to consider raising the index separately using `CONCURRENTLY` (which must be run outside of a transaction), then run `river migrate-up` to finalize the process (it will tolerate an index that already exists):

sql
ALTER TABLE river_job
ADD COLUMN unique_key bytea;

CREATE UNIQUE INDEX CONCURRENTLY river_job_kind_unique_key_idx ON river_job (kind, unique_key) WHERE unique_key IS NOT NULL;


shell
go install github.com/riverqueue/river/cmd/riverlatest
river migrate-up --database-url "$DATABASE_URL"


Added

- Fully functional driver for `database/sql` for use with packages like Bun and GORM. [PR 351](https://github.com/riverqueue/river/pull/351).
- Queues can be added after a client is initialized using `client.Queues().Add(queueName string, queueConfig QueueConfig)`. [PR 410](https://github.com/riverqueue/river/pull/410).
- Migration that adds a `line` column to the `river_migration` table so that it can support multiple migration lines. [PR 435](https://github.com/riverqueue/river/pull/435).
- `--line` flag added to the River CLI. [PR 454](https://github.com/riverqueue/river/pull/454).

Changed

- Tags are now limited to 255 characters in length, and should match the regex `\A[\w][\w\-]+[\w]\z` (importantly, they can't contain commas). [PR 351](https://github.com/riverqueue/river/pull/351).
- Many info logging statements have been demoted to debug level. [PR 452](https://github.com/riverqueue/river/pull/452).
- `pending` is now part of the default set of unique job states. [PR 461](https://github.com/riverqueue/river/pull/461).

0.9.0

Added

- `Config.TestOnly` has been added. It disables various features in the River client like staggered maintenance service start that are useful in production, but may be somewhat harmful in tests because they make start/stop slower. [PR 414](https://github.com/riverqueue/river/pull/414).

Changed

⚠️ Version 0.9.0 has a small breaking change in `ErrorHandler`. As before, we try never to make breaking changes, but this one was deemed quite important because `ErrorHandler` was fundamentally lacking important functionality.

- **Breaking change:** Add stack trace to `ErrorHandler.HandlePanicFunc`. Fixing code only requires adding a new `trace string` argument to `HandlePanicFunc`. [PR 423](https://github.com/riverqueue/river/pull/423).

go
before
HandlePanic(ctx context.Context, job *rivertype.JobRow, panicVal any) *ErrorHandlerResult

after
HandlePanic(ctx context.Context, job *rivertype.JobRow, panicVal any, trace string) *ErrorHandlerResult


Fixed

- Pausing or resuming a queue that was already paused or not paused respectively no longer returns `rivertype.ErrNotFound`. The same goes for pausing or resuming using the all queues string (`*`) when no queues are in the database (previously that also returned `rivertype.ErrNotFound`). [PR 408](https://github.com/riverqueue/river/pull/408).
- Fix a bug where periodic job constructors were only called once when adding the periodic job rather than being invoked every time the periodic job is scheduled. [PR 420](https://github.com/riverqueue/river/pull/420).

0.8.0

Added

- Add transaction variants for queue-related client functions: `QueueGetTx`, `QueueListTx`, `QueuePauseTx`, and `QueueResumeTx`. [PR 402](https://github.com/riverqueue/river/pull/402).

Fixed

- Fix possible Client shutdown panics if the user-provided context is cancelled while jobs are still running. [PR 401](https://github.com/riverqueue/river/pull/401).

0.7.0

Added

- The default max attempts of 25 can now be customized on a per-client basis using `Config.MaxAttempts`. This is in addition to the ability to customize at the job type level with `JobArgs`, or on a per-job basis using `InsertOpts`. [PR 383](https://github.com/riverqueue/river/pull/383).
- Add `JobDelete` / `JobDeleteTx` APIs on `Client` to allow permanently deleting any job that's not currently running. [PR 390](https://github.com/riverqueue/river/pull/390).

Fixed

- Fix `StopAndCancel` to not hang if called in parallel to an ongoing `Stop` call. [PR 376](https://github.com/riverqueue/river/pull/376).

0.6.1

Fixed

- River now considers per-worker timeout overrides when rescuing jobs so that jobs with a long custom timeout won't be rescued prematurely. [PR 350](https://github.com/riverqueue/river/pull/350).
- River CLI now exits with status 1 in the case of a problem with commands or flags, like an unknown command or missing required flag. [PR 363](https://github.com/riverqueue/river/pull/363).
- Fix migration version 4 (from 0.5.0) so that the up migration can be re-run after it was originally rolled back. [PR 364](https://github.com/riverqueue/river/pull/364).

Page 2 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.