2023-02-23 12:39:43 +00:00
|
|
|
// accounting_timestamps saves the last time an process completed.
|
2023-01-06 16:27:42 +00:00
|
|
|
model accounting_timestamps (
|
|
|
|
key name
|
|
|
|
|
2023-02-23 12:39:43 +00:00
|
|
|
// name is one of "LastAtRestTally", "LastBandwidthTally" or "LastRollup".
|
|
|
|
// See the details in satellite/accounting/common.go for their meaning.
|
2023-01-06 16:27:42 +00:00
|
|
|
field name text
|
2023-02-23 12:39:43 +00:00
|
|
|
// value is the last time that the specific event completed.
|
2023-01-06 16:27:42 +00:00
|
|
|
field value timestamp ( updatable )
|
|
|
|
)
|
|
|
|
|
2022-12-15 19:22:18 +00:00
|
|
|
create accounting_timestamps ( noreturn, replace )
|
2023-01-06 16:27:42 +00:00
|
|
|
update accounting_timestamps (
|
|
|
|
where accounting_timestamps.name = ?
|
|
|
|
noreturn
|
|
|
|
)
|
|
|
|
|
|
|
|
read scalar (
|
|
|
|
select accounting_timestamps.value
|
|
|
|
where accounting_timestamps.name = ?
|
|
|
|
)
|