1.3.0 • Published 10 months ago

@nbn23/cloud-tasks v1.3.0

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

NBN23 CloudTasks

CloudTasks is a wrapper over a cloud task library to avoid vendor lock and provide an utility to schedule HTTP requests as tasks. The current version works over @google-cloud/tasks library in Google Cloud Platorm.

Getting Started

Install CloudTasks using npm.

npm install --save @nbn23/cloud-tasks

Note: CloudTasks assumes a TypeScript environment

Usage

import { CloudTasks } from "@nbn23/cloud-tasks";

const projectId = "string";
const location = "españa-west-1";
const cloudTasks = await CloudTasks.newInstance({ projectId, location });

const task = {
  url: "https://fake.com",
  method: Method.POST,
  headers: { "Content-Type": "application/json" },
  body: { foo: "bar" }
};
const queue = "name-queue";
await cloudTasks.schedule(queue, task);
1.2.5

11 months ago

1.2.4

11 months ago

1.2.3

11 months ago

1.3.0

10 months ago

1.2.2

1 year ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.5

2 years ago

1.0.1

3 years ago

1.0.0

3 years ago