https://github.com/goenning/yago
An asynchronous task runner built to be easy to use, safe and scalable.
https://github.com/goenning/yago
Last synced: 3 months ago
JSON representation
An asynchronous task runner built to be easy to use, safe and scalable.
- Host: GitHub
- URL: https://github.com/goenning/yago
- Owner: goenning
- Created: 2016-09-08T22:26:55.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-23T14:56:08.000Z (over 8 years ago)
- Last Synced: 2025-03-08T07:37:32.253Z (3 months ago)
- Language: TypeScript
- Homepage:
- Size: 214 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Yago
An asynchronous task runner built to be easy to use, safe and scalable. Powered by Node.js and TypeScript.
[](https://www.npmjs.com/package/yago)
[](https://travis-ci.org/goenning/yago)
[](https://coveralls.io/github/goenning/yago?branch=master)

# How it works
## TaskRunner
It's a class that knows how to run a Task.
Every new `TaskRunner` is registered using a new unique name and it's used to match which `Tasks` the runner can handle.## Task
A task is an instruction of something that has to be done at some time.
Each task carries within the following information:
- An unique id
- A common name
- The expected date/time to start
- Payload: Additional information that can be used by the `TaskRunner`
Every new task is first queued and will be processed when it's start date is reached.
New tasks can be scheduled by:
- A cron settings
- Manually through the UI
- REST API
- yago-client (Node, Java, .Net, Python, etc.)## Queue
The queue holds a list of `Tasks` that are waiting to be processed.
By default Yago supports two queue Implementation: InProcess and Redis.
- `InProcessQueue`: Useful when there's only one Yago instance and it's okay to lose the queue in case of a service outage.
- `RedisQueue`: The safer and best option for a bigger Yago implementation. Can handle cluster scenarios.