Delay-tasks - A delayed tasks implementation for golang

Overview

delay-tasks

An implementation of delayed tasks.

diag-1

Usage

$ git clone https://github.com/rosbit/delay-tasks
$ cd delay-tasks
$ make

An executable delay-tasks will be generated. Run it like the following:

$ CONF_FILE=./sample.conf.json ./delay-tasks

API

1. Register category handler

  • POST /handler/:cate

  • Body:

    {"handler": "a http url"}
  • Response

    {
       "code": 200,
       "msg": "OK"
    }
  • A handler must be implemented as an endpoint satisfy the following:

    • method: POST
    • BODY: a JSON, see params detail in Create/Update task.
      {
         "cate": "task category",
         "key": uint64,  // task key in the category
         "params": JSON, // params when adding task
         "inAdvance": false|true // whether the task is run in advance.
      }

2. Create/Update a delayed task in a category

  • POST /task/:cate

  • Body:

    {
      "timestamp": in-seconds,
      "key": uint64,
      "params": {anything},
      "handler": "using caterory handler if it is blank"
    }
  • Response

    {
       "code": 200,
       "msg": "OK"
    }

3. Remove a delayed task in a category

  • DELETE /task/:cate

  • Body:

    {
       "timestamp": in-seconds,
       "key": uint64, 
       "exec": true|false // executing task before being removed if true.
    }
  • Response

    {
       "code": 200,
       "msg": "OK"
    }

4. Get task

  • GET /task/:cate/:key[?timestamp=xxx]

  • Response

    {
       "code": 200,
       "msg": "OK",
       "result": {
          "timeToRun": xxxx,
          "params": {JSON},
          "handler": "http://handler"
       }
    }

5. List tasks

  • GET /tasks
  • Result will be dumped as Response.
Owner
Long-time Go user and contributor.
null
high performance distributed task scheduling system, Support multi protocol scheduling tasks

high performance distributed task scheduling system, Support multi protocol scheduling tasks

null 40 Jan 13, 2022
Reminder is a Golang package to allow users to schedule alerts.

Reminder is a Golang package to allow users to schedule alerts. It has 4 parts: Scheduler Repeater Notifier Reminder A scheduler takes in a t

null 15 Oct 14, 2021
goCron: A Golang Job Scheduling Package.

goCron: A Golang Job Scheduling Package.

辣椒面 2.8k Jan 22, 2022
a fake clock for golang

clockwork A simple fake clock for Go. Usage Replace uses of the time package with the clockwork.Clock interface instead. For example, instead of using

Jonathan Boulle 368 Jan 8, 2022
golang job dispatcher

go-gearman The shardingkey is hashed to the same queue, each of which is bound to a worker.

fengyun.rui 18 Dec 26, 2021
Lightweight, fast and dependency-free Cron expression parser (due checker) for Golang (tested on v1.13 and above)

adhocore/gronx gronx is Golang cron expression parser ported from adhocore/cron-expr. Zero dependency. Very fast because it bails early in case a segm

Jitendra Adhikari 182 Jan 7, 2022
A lightweight job scheduler based on priority queue with timeout, retry, replica, context cancellation and easy semantics for job chaining. Build for golang web apps.

Table of Contents Introduction What is RIO? Concern An asynchronous job processor Easy management of these goroutines and chaining them Introduction W

Supratim Samanta 45 Jan 10, 2022
Simple, efficient background processing for Golang backed by RabbitMQ and Redis

Table of Contents How to Use Motivation Requirements Features Examples Setup Config Client/Server Task Worker/Task Hander Register The Handlers Send t

Hasan 35 Jan 6, 2022
cpuworker - A Customized Goroutine Scheduler over Golang Runtime

cpuworker Status Working in process. Run the Demo Make sure the GOMAXPROCS is bigger than 1 and there is at least GOMAXPROCS physical OS threads avail

Sen Han 16 Jan 17, 2022
YTask is an asynchronous task queue for handling distributed jobs in golang

YTask is an asynchronous task queue for handling distributed jobs in golang

gojuukaze 177 Jan 20, 2022
goInterLock is golang job/task scheduler with distributed locking mechanism (by Using Redis🔒).

goInterLock is golang job/task scheduler with distributed locking mechanism. In distributed system locking is preventing task been executed in every instant that has the scheduler,

Jay Ehsaniara 18 Jan 19, 2022
a self terminating concurrent job queue for indeterminate workloads in golang

jobtracker - a self terminating concurrent job queue for indeterminate workloads in golang This library is primarily useful for technically-recursive

maia tillie arson crimew 8 Nov 23, 2021
go-sche is a golang library that lets you schedule your task to be executed later.

go-sche is a golang library that lets you schedule your task to be executed later.

cza 2 Dec 13, 2021
Scheduler CRUD For Golang

scheduler-CRUD 從dbdiagram.io建立table與create語法 在mysql建立table 以sqlc建CRUD function與Transaction 加入viper讀環境變量 以gin開發REST API 加入Dockerfile docker build -t th

null 1 Dec 27, 2021
Scheduler: the scheduler of distbuild written in Golang

scheduler Introduction scheduler is the scheduler of distbuild written in Go. Pr

distbuild 0 Jan 9, 2022
Golang Delay Queue

[gdq] Golang Delay Queue GDQ is a library that leverage db or cache to be setup as a delay queue. For current version, Only redis can adapt to this li

Patrick Maurits Sangian 1 Jan 15, 2022
Go-http-sleep: Delayed response http server, useful for testing various timeout issue for application running behind proxy

delayed response http server, useful for testing various timeout issue for application running behind proxy

guessi 0 Jan 22, 2022
Package tasks is an easy to use in-process scheduler for recurring tasks in Go

Tasks Package tasks is an easy to use in-process scheduler for recurring tasks in Go. Tasks is focused on high frequency tasks that run quick, and oft

Benjamin Cane 68 Jan 2, 2022
Go language implementation of a blockchain based on the BDLS BFT protocol. The implementation was adapted from Ethereum and Sperax implementation

BDLS protocol based PoS Blockchain Most functionalities of this client is similar to the Ethereum golang implementation. If you do not find your quest

Yongge Wang 0 Jan 1, 2022
Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.

#1 Golang live reload and task runner Content - ⭐️ Top Features - ???? Get started - ?? Config sample - ?? Commands List - ?? Support and Suggestions

Oxequa 4.2k Jan 20, 2022
Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.

#1 Golang live reload and task runner Content - ⭐️ Top Features - ???? Get started - ?? Config sample - ?? Commands List - ?? Support and Suggestions

Oxequa 4.2k Jan 14, 2022
Golang client library for adding support for interacting and monitoring Celery workers, tasks and events.

Celeriac Golang client library for adding support for interacting and monitoring Celery workers and tasks. It provides functionality to place tasks on

Stefan von Cavallar 69 Dec 21, 2021
27 solved tasks on Golang (level 1)

golang-tasks-lvl1 Решение задач level# 1 (Golang) Запуск программы go run main.go Описание Проект состоит из файла main.go, директории с решением зада

Vitaly Gudza 0 Dec 3, 2021
Concurrent task runner, developer's routine tasks automation toolkit. Simple modern alternative to GNU Make 🧰

taskctl - concurrent task runner, developer's routine tasks automation toolkit Simple modern alternative to GNU Make. taskctl is concurrent task runne

null 151 Jan 13, 2022
A library for performing data pipeline / ETL tasks in Go.

Ratchet A library for performing data pipeline / ETL tasks in Go. The Go programming language's simplicity, execution speed, and concurrency support m

Daily Burn 385 Jan 19, 2022
Declarative streaming ETL for mundane tasks, written in Go

Benthos is a high performance and resilient stream processor, able to connect various sources and sinks in a range of brokering patterns and perform h

Ashley Jeffs 3.9k Jan 20, 2022
Declarative streaming ETL for mundane tasks, written in Go

Benthos is a high performance and resilient stream processor, able to connect various sources and sinks in a range of brokering patterns and perform hydration, enrichments, transformations and filters on payloads.

Ashley Jeffs 3.9k Jan 20, 2022
Run tasks concurrently with limits

Workerpool Package workerpool implements a concurrency limiting worker pool. Worker routines are spawned on demand as tasks are submitted. This packag

Cilium 13 Jan 12, 2022
A small utility that aims to automate and simplify some tasks related to software release cycles.

Stork is a small utility that aims to automate and simplify some tasks related to software release cycles such as reading the current version from a f

Simone Margaritelli 43 Dec 15, 2021