npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@datafire/google_taskqueue

v6.0.0

Published

DataFire integration for TaskQueue

Downloads

22

Readme

@datafire/google_taskqueue

Client library for TaskQueue

Installation and Usage

npm install --save @datafire/google_taskqueue
let google_taskqueue = require('@datafire/google_taskqueue').create({
  access_token: "",
  refresh_token: "",
  client_id: "",
  client_secret: "",
  redirect_uri: ""
});

.then(data => {
  console.log(data);
});

Description

Accesses a Google App Engine Pull Task Queue over REST.

Actions

oauthCallback

Exchange the code passed to your redirect URI for an access_token

google_taskqueue.oauthCallback({
  "code": ""
}, context)

Input

  • input object
    • code required string

Output

  • output object
    • access_token string
    • refresh_token string
    • token_type string
    • scope string
    • expiration string

oauthRefresh

Exchange a refresh_token for an access_token

google_taskqueue.oauthRefresh(null, context)

Input

This action has no parameters

Output

  • output object
    • access_token string
    • refresh_token string
    • token_type string
    • scope string
    • expiration string

taskqueues.get

Get detailed information about a TaskQueue.

google_taskqueue.taskqueues.get({
  "project": "",
  "taskqueue": ""
}, context)

Input

  • input object
    • getStats boolean: Whether to get stats. Optional.
    • project required string: The project under which the queue lies.
    • taskqueue required string: The id of the taskqueue to get the properties of.
    • alt string (values: json): Data format for the response.
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
    • userIp string: IP address of the site where the request originates. Use this if you want to enforce per-user limits.

Output

tasks.list

List Tasks in a TaskQueue

google_taskqueue.tasks.list({
  "project": "",
  "taskqueue": ""
}, context)

Input

  • input object
    • project required string: The project under which the queue lies.
    • taskqueue required string: The id of the taskqueue to list tasks from.
    • alt string (values: json): Data format for the response.
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
    • userIp string: IP address of the site where the request originates. Use this if you want to enforce per-user limits.

Output

tasks.insert

Insert a new task in a TaskQueue

google_taskqueue.tasks.insert({
  "project": "",
  "taskqueue": ""
}, context)

Input

  • input object
    • body Task
    • project required string: The project under which the queue lies
    • taskqueue required string: The taskqueue to insert the task into
    • alt string (values: json): Data format for the response.
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
    • userIp string: IP address of the site where the request originates. Use this if you want to enforce per-user limits.

Output

tasks.lease

Lease 1 or more tasks from a TaskQueue.

google_taskqueue.tasks.lease({
  "leaseSecs": 0,
  "numTasks": 0,
  "project": "",
  "taskqueue": ""
}, context)

Input

  • input object
    • groupByTag boolean: When true, all returned tasks will have the same tag
    • leaseSecs required integer: The lease in seconds.
    • numTasks required integer: The number of tasks to lease.
    • project required string: The project under which the queue lies.
    • tag string: The tag allowed for tasks in the response. Must only be specified if group_by_tag is true. If group_by_tag is true and tag is not specified the tag will be that of the oldest task by eta, i.e. the first available tag
    • taskqueue required string: The taskqueue to lease a task from.
    • alt string (values: json): Data format for the response.
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
    • userIp string: IP address of the site where the request originates. Use this if you want to enforce per-user limits.

Output

tasks.delete

Delete a task from a TaskQueue.

google_taskqueue.tasks.delete({
  "project": "",
  "task": "",
  "taskqueue": ""
}, context)

Input

  • input object
    • project required string: The project under which the queue lies.
    • task required string: The id of the task to delete.
    • taskqueue required string: The taskqueue to delete a task from.
    • alt string (values: json): Data format for the response.
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
    • userIp string: IP address of the site where the request originates. Use this if you want to enforce per-user limits.

Output

Output schema unknown

tasks.get

Get a particular task from a TaskQueue.

google_taskqueue.tasks.get({
  "project": "",
  "task": "",
  "taskqueue": ""
}, context)

Input

  • input object
    • project required string: The project under which the queue lies.
    • task required string: The task to get properties of.
    • taskqueue required string: The taskqueue in which the task belongs.
    • alt string (values: json): Data format for the response.
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
    • userIp string: IP address of the site where the request originates. Use this if you want to enforce per-user limits.

Output

tasks.patch

Update tasks that are leased out of a TaskQueue. This method supports patch semantics.

google_taskqueue.tasks.patch({
  "newLeaseSeconds": 0,
  "project": "",
  "task": "",
  "taskqueue": ""
}, context)

Input

  • input object
    • body Task
    • newLeaseSeconds required integer: The new lease in seconds.
    • project required string: The project under which the queue lies.
    • task required string
    • taskqueue required string
    • alt string (values: json): Data format for the response.
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
    • userIp string: IP address of the site where the request originates. Use this if you want to enforce per-user limits.

Output

tasks.update

Update tasks that are leased out of a TaskQueue.

google_taskqueue.tasks.update({
  "newLeaseSeconds": 0,
  "project": "",
  "task": "",
  "taskqueue": ""
}, context)

Input

  • input object
    • body Task
    • newLeaseSeconds required integer: The new lease in seconds.
    • project required string: The project under which the queue lies.
    • task required string
    • taskqueue required string
    • alt string (values: json): Data format for the response.
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
    • userIp string: IP address of the site where the request originates. Use this if you want to enforce per-user limits.

Output

Definitions

Task

  • Task object
    • enqueueTimestamp string: Time (in seconds since the epoch) at which the task was enqueued.
    • id string: Name of the task.
    • kind string: The kind of object returned, in this case set to task.
    • leaseTimestamp string: Time (in seconds since the epoch) at which the task lease will expire. This value is 0 if the task isnt currently leased out to a worker.
    • payloadBase64 string: A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded.
    • queueName string: Name of the queue that the task is in.
    • retry_count integer: The number of leases applied to this task.
    • tag string: Tag for the task, could be used later to lease tasks grouped by a specific tag.

TaskQueue

  • TaskQueue object
    • acl object: ACLs that are applicable to this TaskQueue object.
      • adminEmails array: Email addresses of users who are "admins" of the TaskQueue. This means they can control the queue, eg set ACLs for the queue.
        • items string
      • consumerEmails array: Email addresses of users who can "consume" tasks from the TaskQueue. This means they can Dequeue and Delete tasks from the queue.
        • items string
      • producerEmails array: Email addresses of users who can "produce" tasks into the TaskQueue. This means they can Insert tasks into the queue.
        • items string
    • id string: Name of the taskqueue.
    • kind string: The kind of REST object returned, in this case taskqueue.
    • maxLeases integer: The number of times we should lease out tasks before giving up on them. If unset we lease them out forever until a worker deletes the task.
    • stats object: Statistics for the TaskQueue object in question.
      • leasedLastHour string: Number of tasks leased in the last hour.
      • leasedLastMinute string: Number of tasks leased in the last minute.
      • oldestTask string: The timestamp (in seconds since the epoch) of the oldest unfinished task.
      • totalTasks integer: Number of tasks in the queue.

Tasks

  • Tasks object
    • items array: The actual list of tasks returned as a result of the lease operation.
    • kind string: The kind of object returned, a list of tasks.

Tasks2

  • Tasks2 object
    • items array: The actual list of tasks currently active in the TaskQueue.
    • kind string: The kind of object returned, a list of tasks.