Skip to main content

durable_queue_workmanager 1.1.0 copy "durable_queue_workmanager: ^1.1.0" to clipboard
durable_queue_workmanager: ^1.1.0 copied to clipboard

Run durable_queue tasks in Workmanager background jobs on Android and iOS, with a lease that keeps the app and the background job from running the queue twice.

1.1.0 #

  • QueueLease now lives in durable_queue, so storages can implement it. It is still exported from this package; existing code keeps compiling.
  • durable_queue_sqlite's new SqliteQueueLease can replace FileQueueLease when the queue is stored in SQLite.
  • With durable_queue 1.1.0, rate limits are kept in storages that support it (SQLite, drift), so a background job no longer starts with empty limits.
  • Requires durable_queue 1.1.0 or later.

1.0.0 #

  • First stable release, for durable_queue 1.0. No API changes from 0.1.0; breaking changes now wait for 2.0.

0.1.0 #

  • Initial release.
  • QueueBackgroundWork: registers a periodic Workmanager job (schedule, cancel) and runs the queue in it (handles, run): takes the lease, drains for up to timeLimit (20 seconds on iOS, 8 minutes elsewhere by default), and closes the queue. On Android it also registers a one-off job for the next due task, or soon after a run that hit the time limit.
  • LeasedQueueRunner: runs the app's queue only while it holds the lease; waits for the lease while a background job drains, and releases it on stop.
  • LeasedQueueLifecycle.attach(runner): starts the runner in the foreground and stops it when the app is hidden or paused.
  • drainWithLease: the background part without Workmanager, returning a LeasedDrainResult.
  • foregroundService: run the jobs as Android foreground services for longer runs.
  • QueueLease interface and FileQueueLease, a lease kept in a file that works between isolates of one process, renewed by its holder and taken over when abandoned.
  • Requires durable_queue 0.5.3 or later, workmanager 0.10.10 or later, and Flutter 3.38 or later. Android and iOS.
0
likes
160
points
343
downloads

Documentation

API reference

Publisher

verified publisherboffincoders.com

Weekly Downloads

Run durable_queue tasks in Workmanager background jobs on Android and iOS, with a lease that keeps the app and the background job from running the queue twice.

Repository (GitHub)
View/report issues
Contributing

Topics

#queue #background #workmanager #offline #retry

License

MIT (license)

Dependencies

durable_queue, flutter, workmanager

More

Packages that depend on durable_queue_workmanager