Skip to content

Lupino/go-periodic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The periodic task system client for go.

Install

go get -v github.com/Lupino/go-preiodic

Usage

worker

import "github.com/Lupino/go-periodic"

var periodicServer = "unix:///tmp/periodic.sock"
var worker = periodic.NewWorker()
worker.Connect(periodicServer)

func handle(job periodic.Job) {
    job.Done()
    // job.Fail()
    // job.SchedLater(3)
}

worker.AddFunc("funcName", handle)

worker.Work()

client

import "github.com/Lupino/go-periodic"

var periodicServer = "unix:///tmp/periodic.sock"
var client = periodic.NewClient()
client.Connect(periodicServer)
client.SubmitJob(...)

example see here

About

The periodic task system client for go

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages