1.4.2 • Published 2 years ago

expo-job-queue v1.4.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

expo-job-queue

An SQLite based job queue for Expo

Installation

yarn add expo-job-queue

Usage

import ExpoJobQueue from "expo-job-queue";

// ...

ExpoJobQueue.configure({
  onQueueFinish: () => {
    console.log("Queue stopped and executed")
  },
})

ExpoJobQueue.addWorker("testWorker", async (payload) => {
  return new Promise((resolve) => {
    setTimeout(() => {
      console.log("JOB RAN: " + JSON.stringify(payload))
      resolve(undefined)
    }, payload.delay)
  })
})

// ...
ExpoJobQueue.addJob("testWorker", { text: "THIS IS FANTASTIC", delay: 1000 })

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Heavily copied from and inspired by react-native-job-queue licensed under the MIT License.

1.4.2

2 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.4.0

3 years ago