MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / QueueInflightExpiry

Method QueueInflightExpiry

queue.go:208–213  ·  view source on GitHub ↗

QueueInflightExpiry handles queuing a transaction for inflight expiration. This method is separate from the main Enqueue to ensure expiration is handled regardless of whether the transaction is queued or processed immediately. Parameters: - ctx context.Context: The context for the operation. - tran

(ctx context.Context, transaction *model.Transaction)

Source from the content-addressed store, hash-verified

206// Returns:
207// - error: An error if the expiration could not be queued.
208func (q *Queue) QueueInflightExpiry(ctx context.Context, transaction *model.Transaction) error {
209 if !transaction.InflightExpiryDate.IsZero() {
210 return q.queueInflightExpiry(transaction.TransactionID, transaction.InflightExpiryDate)
211 }
212 return nil
213}
214
215// geTask generates a task for a transaction and assigns it to a specific queue based on the balance ID.
216// It ensures that transactions are evenly distributed across multiple queues by hashing the balance ID.

Callers 1

QueueTransactionMethod · 0.80

Calls 1

queueInflightExpiryMethod · 0.95

Tested by

no test coverage detected