machinery-plugins/task/types/type.go

45 lines
1.6 KiB
Go
Raw Normal View History

2024-06-01 06:25:48 +00:00
/*
* Tencent is pleased to support the open source community by making Blueking Container Service available.
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/MIT
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions and
* limitations under the License.
*/
// Package types for task
package types
import (
"time"
)
const (
// TaskTimeFormat task time format, e.g. 2006-01-02T15:04:05Z07:00
TaskTimeFormat = time.RFC3339
// DefaultJsonExtrasContent default json extras content
DefaultJsonExtrasContent = "{}"
// DefaultMaxExecuteTime default max execute time for 1 hour
DefaultMaxExecuteTimeSeconds = 3600
)
const (
// TaskStatusInit INIT task status
TaskStatusInit = "INITIALIZING"
// TaskStatusRunning running task status
TaskStatusRunning = "RUNNING"
// TaskStatusSuccess task success
TaskStatusSuccess = "SUCCESS"
// TaskStatusFailure task failed
TaskStatusFailure = "FAILURE"
// TaskStatusTimeout task run timeout
TaskStatusTimeout = "TIMEOUT"
// TaskStatusForceTerminate force task terminate
TaskStatusForceTerminate = "FORCETERMINATE"
// TaskStatusNotStarted force task terminate
TaskStatusNotStarted = "NOTSTARTED"
)