Skip to content

crazyoptimist/distributed-background-jobs-asynq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distributed Background Jobs with Asynq

This applicaton demonstrates distributed background jobs handling with asynq.

Asynq is very impressive and easy to use. It ensures a task to be run at least once and only once.

Instructions for Demo

Create an env file.

cp ./deployments/.env.example ./deployments/.env

Run the app with docker.

make docker
make upd
make log

Request bunch of (virtual)heavy tasks via exposed API.

for i in {1..11}; do; echo $i:; http http://localhost:8080/sleep seconds:=5; done;

Then watch logs to see what's happening. Individual worker containers run tasks concurrently. Concurrency inside a worker has been disabled for demonstration purposes, which is configurable in the worker configuration code.

Makefile

build docker images

make docker

run with docker compose

make up

run in detached mode

make upd

docker compose log

make log

docker compose down

make down

run the test suite

make test

About

Distributed Background Task Handling with Asynq Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published