github.com/blend/go-sdk@v1.20220411.3/cron/constants.go (about) 1 /* 2 3 Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package cron 9 10 import ( 11 "time" 12 ) 13 14 // Constats and defaults 15 const ( 16 DefaultTimeout time.Duration = 0 17 DefaultHistoryRestoreTimeout = 5 * time.Second 18 DefaultShutdownGracePeriod time.Duration = 0 19 ) 20 21 const ( 22 // DefaultDisabled is a default. 23 DefaultDisabled = false 24 // DefaultShouldSkipLoggerListeners is a default. 25 DefaultShouldSkipLoggerListeners = false 26 // DefaultShouldSkipLoggerOutput is a default. 27 DefaultShouldSkipLoggerOutput = false 28 ) 29 30 const ( 31 // FlagBegin is an event flag. 32 FlagBegin = "cron.begin" 33 // FlagComplete is an event flag. 34 FlagComplete = "cron.complete" 35 // FlagSuccess is an event flag. 36 FlagSuccess = "cron.success" 37 // FlagErrored is an event flag. 38 FlagErrored = "cron.errored" 39 // FlagCanceled is an event flag. 40 FlagCanceled = "cron.canceled" 41 // FlagBroken is an event flag. 42 FlagBroken = "cron.broken" 43 // FlagFixed is an event flag. 44 FlagFixed = "cron.fixed" 45 // FlagEnabled is an event flag. 46 FlagEnabled = "cron.enabled" 47 // FlagDisabled is an event flag. 48 FlagDisabled = "cron.disabled" 49 ) 50 51 // JobManagerState is a job manager status. 52 type JobManagerState string 53 54 // JobManagerState values. 55 const ( 56 JobManagerStateUnknown JobManagerState = "unknown" 57 JobManagerStateRunning JobManagerState = "started" 58 JobManagerStateStopped JobManagerState = "stopped" 59 ) 60 61 // JobSchedulerState is a job manager status. 62 type JobSchedulerState string 63 64 // JobManagerState values. 65 const ( 66 JobSchedulerStateUnknown JobSchedulerState = "unknown" 67 JobSchedulerStateRunning JobSchedulerState = "started" 68 JobSchedulerStateStopped JobSchedulerState = "stopped" 69 ) 70 71 // JobInvocationStatus is a job status. 72 type JobInvocationStatus string 73 74 // JobInvocationState values. 75 const ( 76 JobInvocationStatusIdle JobInvocationStatus = "idle" 77 JobInvocationStatusRunning JobInvocationStatus = "running" 78 JobInvocationStatusCanceled JobInvocationStatus = "canceled" 79 JobInvocationStatusErrored JobInvocationStatus = "errored" 80 JobInvocationStatusSuccess JobInvocationStatus = "success" 81 )