main.ecal 533 B

123456789101112131415161718192021
  1. /*
  2. Modify all stored nodes which have a message with a timestamp.
  3. */
  4. sink AddNodeTimestamp
  5. kindmatch ["db.node.store", "db.node.update"]
  6. priority 0
  7. {
  8. log("Node Event: ", event)
  9. if event.state.node.message != NULL and event.state.node.ts == NULL {
  10. try {
  11. log("store node")
  12. event.state.node.ts := now()
  13. db.storeNode(event.state.part, event.state.node)
  14. } except e {
  15. error(e)
  16. } otherwise {
  17. db.raiseGraphEventHandled()
  18. }
  19. }
  20. }