If you have multiple lifecycles on a WorkItem, you can use the WorkItemModuleRepository to interact with those lifecycles. It will namespace the lifecycle fields with the provided moduleName. It assumes creation of WorkItems are made through another view (e.g. a standard WorkItemRepository), it will only allow interacting with the WorkItem lifecycle, and will throw runtime exceptions if pushNew or pushNewBatch are called.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class WorkItemRepository[T]trait MetricSourcetrait FindById[T]trait Canceltrait MongoDatabaseCollectionclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Inherited methods
Sets the ProcessingStatus of a WorkItem to Cancelled.
Sets the ProcessingStatus of a WorkItem to Cancelled.
Attributes
- Returns
-
StatusUpdateResult.Updated if the WorkItem is cancelled, StatusUpdateResult.NotFound if it's not found, and StatusUpdateResult.NotUpdated if it's not in a cancellable ProcessingStatus.
- Inherited from:
- WorkItemRepository
Sets the ProcessingStatus of a WorkItem to a ResultStatus. It will also update the updatedAt timestamp. It will return false if the WorkItem is not InProgress.
Sets the ProcessingStatus of a WorkItem to a ResultStatus. It will also update the updatedAt timestamp. It will return false if the WorkItem is not InProgress.
Attributes
- Inherited from:
- WorkItemRepository
Deletes the WorkItem. It will return false if the WorkItem is not InProgress.
Deletes the WorkItem. It will return false if the WorkItem is not InProgress.
Attributes
- Inherited from:
- WorkItemRepository
Returns the number of WorkItems in the specified ProcessingStatus
Returns the number of WorkItems in the specified ProcessingStatus
Attributes
- Inherited from:
- WorkItemRepository
Attributes
- Inherited from:
- PlayMongoRepository
Attributes
- Inherited from:
- PlayMongoRepository
Attributes
- Inherited from:
- WorkItemRepository
Returns the timeout of any WorkItems marked as InProgress. WorkItems marked as InProgress will be hidden from pullOutstanding until this window expires.
Returns the timeout of any WorkItems marked as InProgress. WorkItems marked as InProgress will be hidden from pullOutstanding until this window expires.
Attributes
- Inherited from:
- WorkItemRepository
Sets the ProcessingStatus of a WorkItem. It will also update the updatedAt timestamp.
Sets the ProcessingStatus of a WorkItem. It will also update the updatedAt timestamp.
Attributes
- Inherited from:
- WorkItemRepository
Attributes
- Definition Classes
-
WorkItemRepository -> MetricSource
- Inherited from:
- WorkItemRepository
Returns the current date time for setting the updatedAt field. abstract to allow for test friendly implementations.
Returns the current date time for setting the updatedAt field. abstract to allow for test friendly implementations.
Attributes
- Inherited from:
- WorkItemRepository
Returns a WorkItem to be processed, if available. The item will be atomically set to ProcessingStatus.InProgress, so it will not be picked up by other calls to pullOutstanding until it's status has been explicitly marked as Failed or ToDo, or it's progress status has timed out (set by inProgressRetryAfter).
Returns a WorkItem to be processed, if available. The item will be atomically set to ProcessingStatus.InProgress, so it will not be picked up by other calls to pullOutstanding until it's status has been explicitly marked as Failed or ToDo, or it's progress status has timed out (set by inProgressRetryAfter).
A WorkItem will be considered for processing in the following order:
- Has ToDo status, and the availableAt field is before the availableBefore param.
- Has Failed status, and it was marked as Failed before the failedBefore param.
- Has InProgress status, and was marked as InProgress before the inProgressRetryAfter configuration. Basically a timeout to ensure WorkItems that don't advance from InProgress do not get stuck.
Value parameters
- availableBefore
-
it will only consider WorkItems where the availableAt field is before the availableBefore
- failedBefore
-
it will only consider WorkItems in FailedState if they were marked as Failed before the failedBefore. This can avoid retrying a failure immediately.
Attributes
- Inherited from:
- WorkItemRepository
Concrete fields
Inherited fields
Attributes
- Inherited from:
- PlayMongoRepository
Attributes
- Inherited from:
- PlayMongoRepository
Attributes
- Inherited from:
- PlayMongoRepository
Attributes
- Inherited from:
- PlayMongoRepository
Attributes
- Inherited from:
- PlayMongoRepository
Attributes
- Inherited from:
- WorkItemRepository