You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2019/09/27 06:37:56 UTC

[GitHub] [openwhisk] upgle commented on a change in pull request #4646: Serialize `updated` value in action doc

upgle commented on a change in pull request #4646: Serialize `updated` value in action doc
URL: https://github.com/apache/openwhisk/pull/4646#discussion_r328930668
 
 

 ##########
 File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/WhiskAction.scala
 ##########
 @@ -133,7 +137,8 @@ case class WhiskAction(namespace: EntityPath,
                        limits: ActionLimits = ActionLimits(),
                        version: SemVer = SemVer(),
                        publish: Boolean = false,
-                       annotations: Parameters = Parameters())
+                       annotations: Parameters = Parameters(),
+                       override val updated: Instant = Instant.now(Clock.systemUTC()).truncatedTo(ChronoUnit.MILLIS))
 
 Review comment:
   Ok, I've added a method named `currentMillis` on WhiskEntity singleton object
   
   ```scala
   WhiskEntity.currentMillis() // it returns Instant object with a millisecond precision
   ```
   
   ```scala
   
   object WhiskEntity {
   ...
     /**
      * Get Instant object with a millisecond precision
      * timestamp of whisk entity is stored in milliseconds in the db
      */
     def currentMillis() = {
       Instant.now(Clock.systemUTC()).truncatedTo(ChronoUnit.MILLIS)
     }
   }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services