Coder Social home page Coder Social logo

node-bull-redis-lab's Introduction

node-bull-redis-lab

๐Ÿงช An Experiment of Job-Queue System in Node.js with Bull & Redis.

Usage

docker-compose up

This will create task and external queues and put 5 sample jobs to each queue.

Execute Example

> docker-compose up
Starting bull-test_redis_1 ... done
Starting bull-test_queue_1 ... done
Attaching to bull-test_redis_1, bull-test_queue_1
redis_1  | 1:C 12 Feb 2020 01:12:03.671 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1  | 1:C 12 Feb 2020 01:12:03.671 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1  | 1:C 12 Feb 2020 01:12:03.671 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1  | 1:M 12 Feb 2020 01:12:03.675 * Running mode=standalone, port=6379.
redis_1  | 1:M 12 Feb 2020 01:12:03.675 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1  | 1:M 12 Feb 2020 01:12:03.675 # Server initialized
redis_1  | 1:M 12 Feb 2020 01:12:03.675 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis_1  | 1:M 12 Feb 2020 01:12:03.677 * DB loaded from disk: 0.001 seconds
redis_1  | 1:M 12 Feb 2020 01:12:03.678 * Ready to accept connections
queue_1  | [task] ๐Ÿ”ง process job...
queue_1  | [task] data: { name: 'task-0', value: 0 }
queue_1  | [task] ๐Ÿ”ง process job...
queue_1  | [task] data: { name: 'task-1', value: 1 }
queue_1  | [task] ๐Ÿ”ง process job...
queue_1  | [task] data: { name: 'task-2', value: 4 }
queue_1  | [task] ๐Ÿ”ง process job...
queue_1  | [task] data: { name: 'task-3', value: 9 }
queue_1  | [task] ๐Ÿ”ง process job...
queue_1  | [task] data: { name: 'task-4', value: 16 }
queue_1  | [external] ๐Ÿ”ง process external job...
queue_1  | [external] data: { name: 'task-0', value: 0 }
queue_1  | [external] ๐Ÿ”ง process external job...
queue_1  | [external] data: { name: 'task-1', value: 1 }
queue_1  | [external] ๐Ÿ”ง process external job...
queue_1  | [external] data: { name: 'task-2', value: 4 }
queue_1  | [external] ๐Ÿ”ง process external job...
queue_1  | [external] data: { name: 'task-3', value: 9 }
queue_1  | [external] ๐Ÿ”ง process external job...
queue_1  | [external] data: { name: 'task-4', value: 16 }
^CGracefully stopping... (press Ctrl+C again to force)
Stopping bull-test_queue_1 ... done
Stopping bull-test_redis_1 ... done

node-bull-redis-lab's People

Contributors

shuuji3 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.