WorkItemRepository
The repository to set and get the work item's for processing. See pushNew for creating work items, and pullOutstanding for retrieving them.
Value parameters
- collectionName
-
the name of the mongo collection.
- extraCodecs
-
optional - to support more types
- extraIndexes
-
optional - to add additional indexes
- itemFormat
-
a play Json format to map the item to mongo entities
- replaceIndexes
-
optional - default is true If true, existing indices should be removed/updated to match the provided indices. If false, any old indices are left behind, and indices with changed definitions will throw IndexConflict exceptions.
- workItemFields
-
the internal fields for WorkItem, allowing customisation
Attributes
- Graph
-
- Supertypes
- Known subtypes
-
class WorkItemModuleRepository[T]
Members list
Type members
Inherited classlikes
Attributes
- Inherited from:
- ObservableFutureImplicits
- Supertypes
-
class ObservableImplicits.this.ObservableFuture[T]class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- ObservableFutureImplicits
- Supertypes
-
class ObservableImplicits.this.SingleObservableFuture[T]class Objecttrait Matchableclass Any
Value members
Abstract methods
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
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
Concrete 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.
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
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
Returns the number of WorkItems in the specified ProcessingStatus
Returns the number of WorkItems in the specified ProcessingStatus
Attributes
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
Attributes
- Definition Classes
-
MetricSource
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 methods
Attributes
- Inherited from:
- PlayMongoRepository
Attributes
- Inherited from:
- PlayMongoRepository
Concrete fields
Inherited fields
Attributes
- Inherited from:
- PlayMongoRepository
Attributes
- Inherited from:
- PlayMongoRepository
Attributes
- Inherited from:
- PlayMongoRepository
Attributes
- Inherited from:
- PlayMongoRepository
Attributes
- Inherited from:
- PlayMongoRepository
Implicits
Inherited implicits
Attributes
- Inherited from:
- ObservableFutureImplicits
Attributes
- Inherited from:
- ObservableFutureImplicits