Machinery
Machinery is an asynchronous task queue/job queue
Machinery is an asynchronous task queue/job queue based on distributed message passing. Please be advised that V2 is work in progress and breaking changes can and will happen until it is ready. You can use the current V2 in order to avoid having to import all dependencies for brokers and backends you are not using. Instead of factory, you will need to inject broker and backend objects to the server constructor. In order to consume tasks, you need to have one or more workers running. All you need to run a worker is a Server instance with registered tasks. Each worker will only consume registered tasks. For each task on the queue the Worker.Process() method will be run in a goroutine. Use the second parameter of server.NewWorker to limit the number of concurrently running Worker.Process() calls (per worker). Example: 1 will serialize task execution while 0 makes the number of concurrently executed tasks unlimited (default).