Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

appengine-in-memory-taskqueue

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appengine-in-memory-taskqueue

Development stub for the taskqueue to replace it with an in-memory version wich does not rely on the docker+appengine middleware setup to function properly thus making your development cycle easier.

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

appengine-in-memory-taskqueue

Development replacement for the taskqueue to have an in-memory dropin wich does not rely on the docker+appengine middleware setup to function properly.

Currently, NodeJS support of Google App Engine is still in the experimental phase. You can use the appengine experimental nodejs library to gain some interaction with the platform. But for using the TaskQueue a lot of appengine middleware needs to be set up so that each request contains all metadata for accessing the taskqueue. This is done by the GAE Nodejs Docker container + deploying to GAE which takes a lot of time.

To alleviate these issues this packages has been created. It contains a stub for the taskqueue which is an in-memory replacement and will execute the inserted items onto the current localhost application.

Usage

var taskqueue;
var appengine = require('appengine');
if(isDevelopmentMode) {
  taskqueue = require('appengine-in-memory-taskqueue');

  // optional; reconfigure to different settings for port / retries.
  // default = localhost:8080 no retries
  taskqueue.configure('localhost', 8181, 3);
}
else {
  // production, use the regular appengine taskqueue
  taskqueue = appengine.taskqueue;
}

//use like the default taskqueue
taskqueue.add(req, options);

The in-memory taskqueue is internally a simple array which is looped over to process all tasks sequentially. If no tasks are in the queue it will iterate once every 500ms to evaluate if new tasks are added to the queue.

Dependencies

This library has dependencies on the following npm packages:

  • q
  • winston

Missing features?

This replacement only covers basic usage of the taskqueue and is provided as-is. Send me a Pull Request if you want to contribute.

Obvious missing features:

  • Custom header setting
  • POST/PUT body appending
  • Implement 'future' tasks using etaUsec
  • Multiple concurrent queues using queueName

Keywords

FAQs

Package last updated on 26 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc