Skip to content

DM-983: Timestamp as start time

Afonso Mukai requested to merge DM-983_timestamp_as_start_time into master

Created by: mattclarke

Description of work

This is a replay of the changes done in https://github.com/ess-dmsc/kafka-to-nexus/pull/243. @michele-brambilla did all the original work. I decided to redo the changes on a new branch as the old one was so far behind master that merging it became a real pain.

If the timestamp is not specified in the command uses the timestamp of the Kafka message. KafkaW::Msg has now a new time() method that returns the timestamp of the message.

Issue

DM-983

Acceptance Criteria

  • Events must be written from and until the specified times
  • If no time is specified start time must be the Kafka message timestamp
  • If the Kafka message timestamp is empty start time must be the time at with the message has been received
  • If no stop time is specified the file must be closed as the message arrives

Unit Tests

Make sure that start and stop command use the values defined in the command.

Other

N/A


Code Review (To be filled in by the reviewer only)

  • Is the code of an acceptable quality?
  • Do the changes function as described and is it robust?

Nominate for Group Code Review (Anyone can nominate it)

Indicate if you think the code should be reviewed in a Thursday code review session.

  • Recommend for group code review

Also, nominate it on the code_review Slack channel (does someone want to automate this?).

Merge request reports