markusthoemmes commented on a change in pull request #2632: Use the stale
parameter on listing activations
URL:
https://github.com/apache/incubator-openwhisk/pull/2632#discussion_r134692157
##########
File path: common/scala/src/main/scala/whisk/core/database/ArtifactStore.scala
##########
@@ -28,6 +28,11 @@ import whisk.common.Logging
import whisk.common.TransactionId
import whisk.core.entity.DocInfo
+abstract class StaleParameter(val value: Option[String])
+case object StaleOk extends StaleParameter(Some("ok"))
+case object StaleUpdateAfter extends StaleParameter(Some("update_after"))
+case object NoStale extends StaleParameter(None)
Review comment:
Awesome!!
One nit: You can wrap the implementations into a companion object like:
```scala
object StaleParameter {
case object Ok extends StaleParameter(Some("ok"))
case object UpdateAfter extends StaleParameter(Some("update_after"))
case object None extends StaleParameter(None)
}
```
I think that makes scoping a bit easier and its best practice.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services