Skip to content

Commit

Permalink
Let Lira write the timestamp to inputs for adapters. (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
rexwangcc authored Oct 8, 2019
1 parent ff8b008 commit 5560b49
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lira/lira_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,17 @@ def compose_inputs(workflow_name, uuid, version, lira_config):
workflow_name + '.submit_url': lira_config.ingest_url,
workflow_name + '.schema_url': lira_config.schema_url,
workflow_name + '.cromwell_url': lira_config.cromwell_url,
workflow_name + '.timestamp': get_utcnow_timestamp(),
}


def get_utcnow_timestamp() -> str:
"""Get the current UTC timestamp."""
return (
datetime.utcnow().replace(tzinfo=timezone.utc).strftime('%Y-%m-%dT%H:%M:%S.%fZ')
)


def compose_caas_options(cromwell_options_file, lira_config):
""" Append options for using Cromwell-as-a-service to the default options.json file in the wdl config.
Expand Down

0 comments on commit 5560b49

Please sign in to comment.