resumer

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package resumer handles auto-resume of failed tasks

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd struct {
	Command string
	Fname   string
}

Cmd keeps file name and command

type Resumer

type Resumer struct {
	// contains filtered or unexported fields
}

Resumer keeps track of executed commands in .cronn files

func New

func New(location string, enabled bool) *Resumer

New makes resumer for given location. Enabled affects List only

func (*Resumer) List

func (r *Resumer) List() (res []Cmd)

List resumer files and filter old files from this result

func (*Resumer) OnFinish

func (r *Resumer) OnFinish(fname string) error

OnFinish removes cronn fileÒ

func (*Resumer) OnStart

func (r *Resumer) OnStart(cmd string) (string, error)

OnStart makes a file for started cmd as dt-seq.cronn

func (*Resumer) String

func (r *Resumer) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL