mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## What changed?
<!-- Describe what has changed in this PR -->
Remove license header from every file. Because it is really hard to
follow in this PR here is the summary:
1. License header is removed from all `.go` and `.proto` files
:fireworks::fireworks:🎆.
2. `LICENSE` file in the root directory has only Temporal and Uber
copyrights.
3. 5 other `LICENSE` files added to the packages which have copyrights
different from Temporal and Uber: Datadog, Xargin, "Mat Ryer, Tyler
Bunnell and contributors".
4. `license_file` flag is removed from all code generation tools.
5. `copyright_file` flag is removed from `go:generate mockgen`
directive.
6. All copyright related targets are removed from `Makefile`.
7. Updated Temporal copyright year to 2025 everywhere.
## Why?
<!-- Tell your future self why have you made these changes -->
I double checked with legal department that it is not needed to have
license header in every file. One file per repo is enough. I put all
copyrights to the root `LICENSE` file and removed header from all other
files. Also updated tools and `Makefile`.
56 lines
1.8 KiB
Go
56 lines
1.8 KiB
Go
package common
|
|
|
|
import (
|
|
"math"
|
|
"time"
|
|
)
|
|
|
|
const (
|
|
// FirstEventID is the id of the first event in the history
|
|
FirstEventID int64 = 1
|
|
// LastEventID is the id of the last possible event in the history
|
|
LastEventID int64 = math.MaxInt64
|
|
// EmptyEventID is the id of the empty event
|
|
EmptyEventID int64 = 0
|
|
// EmptyVersion is used as the default value for failover version when no value is provided
|
|
EmptyVersion int64 = 0
|
|
// EndEventID is the id of the end event, here we use the int64 max
|
|
EndEventID int64 = 1<<63 - 1
|
|
// BufferedEventID is the id of the buffered event
|
|
BufferedEventID int64 = -123
|
|
// EmptyEventTaskID is uninitialized id of the task id within event
|
|
EmptyEventTaskID int64 = 0
|
|
// TransientEventID is the id of the transient event
|
|
TransientEventID int64 = -124
|
|
// FirstBlobPageToken is the page token identifying the first blob for each history archival
|
|
FirstBlobPageToken = 1
|
|
// LastBlobNextPageToken is the next page token on the last blob for each history archival
|
|
LastBlobNextPageToken = -1
|
|
// EndMessageID is the id of the end message, here we use the int64 max
|
|
EndMessageID int64 = 1<<63 - 1
|
|
)
|
|
|
|
const (
|
|
// MinLongPollTimeout is the minimum context timeout for long poll API, below which
|
|
// the request won't be processed
|
|
MinLongPollTimeout = time.Second * 2
|
|
// CriticalLongPollTimeout is a threshold for the context timeout passed into long poll API,
|
|
// below which a warning will be logged
|
|
CriticalLongPollTimeout = time.Second * 10
|
|
)
|
|
|
|
const (
|
|
// Limit for schedule notes field
|
|
ScheduleNotesSizeLimit = 1000
|
|
)
|
|
|
|
const (
|
|
// DefaultQueueReaderID is the default readerID when loading history tasks
|
|
DefaultQueueReaderID int64 = 0
|
|
)
|
|
|
|
const (
|
|
// DefaultOperatorRPSRatio is the default percentage of rate limit that should be used for operator priority requests
|
|
DefaultOperatorRPSRatio float64 = 0.2
|
|
)
|