scheduled_task_const.go 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // Copyright 2019 Yunion
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package scheduledtask
  15. const (
  16. ST_TYPE_TIMING = "timing" // 定时
  17. ST_TYPE_CYCLE = "cycle" // 周期
  18. ST_STATUS_READY = "ready"
  19. ST_STATUS_CREATE_FAILED = "create_failed"
  20. ST_RESOURCE_SERVER = "server"
  21. ST_RESOURCE_CLOUDACCOUNT = "cloudaccount"
  22. ST_RESOURCE_OPERATION_START = "start"
  23. ST_RESOURCE_OPERATION_STOP = "stop"
  24. ST_RESOURCE_OPERATION_RESTART = "restart"
  25. ST_RESOURCE_OPERATION_SYNC = "sync"
  26. ST_LABEL_ID = "id"
  27. ST_LABEL_TAG = "tag"
  28. ST_ACTIVITY_STATUS_EXEC = "execution" // 执行中
  29. ST_ACTIVITY_STATUS_SUCCEED = "succeed" // 成功
  30. ST_ACTIVITY_STATUS_PART_SUCCEED = "part_succeed" // 部分成功
  31. ST_ACTIVITY_STATUS_FAILED = "failed" // 失败
  32. ST_ACTIVITY_STATUS_REJECT = "reject" // 拒绝
  33. TIMER_TYPE_ONCE = "once"
  34. TIMER_TYPE_HOUR = "hour"
  35. TIMER_TYPE_DAY = "day"
  36. TIMER_TYPE_WEEK = "week"
  37. TIMER_TYPE_MONTH = "month"
  38. )