Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TomHodson committed Jan 30, 2024
1 parent 21566ed commit 223b3d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
13 changes: 7 additions & 6 deletions src/ionbeam/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
handlers = [RichHandler(markup=True, rich_tracebacks=True)]
if args.logfile:
handlers.append(logging.FileHandler(args.logfile))


# Set the log level, default is warnings, -v gives info, -vv for debug
logging.basicConfig(
Expand Down Expand Up @@ -120,11 +119,13 @@
logger.info(f" Data Path: {globals.globals.data_path}")
logger.info(f" Offline: {globals.globals.offline}")
logger.info(f" Overwrite: {globals.globals.overwrite}")
logger.info(f" Ingestion Time Constants:")
logger.info(f" Query Timespan: {tuple(d.isoformat() for d in globals.globals.ingestion_time_constants.query_timespan)}")
logger.info(f" Emit After (Hours): {globals.globals.ingestion_time_constants.emit_after_hours}")
logger.info(f" Granularity: {globals.globals.ingestion_time_constants.granularity}")

if globals.globals.ingestion_time_constants is not None:
logger.info(f" Ingestion Time Constants:")
logger.info(
f" Query Timespan: {tuple(d.isoformat() for d in globals.globals.ingestion_time_constants.query_timespan)}"
)
logger.info(f" Emit After (Hours): {globals.globals.ingestion_time_constants.emit_after_hours}")
logger.info(f" Granularity: {globals.globals.ingestion_time_constants.granularity}")

logger.info("Sources")
for i, a in enumerate(sources):
Expand Down
6 changes: 3 additions & 3 deletions src/ionbeam/writers/mars_client_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def process(self, message: FileMessage | FinishMessage) -> Iterable[Message]:
if isinstance(message, FinishMessage):
return

assert message.metadata.mars_keys is not None
assert message.metadata.mars_request is not None
assert message.metadata.filepath is not None

mars_request = message.metadata.mars_request.as_strings()
Expand All @@ -114,8 +114,8 @@ def process(self, message: FileMessage | FinishMessage) -> Iterable[Message]:
# logger.debug("Aviso respose {response}")

# TODO: the explicit mars_keys should not be necessary here.
metadata = self.generate_metadata(message, mars_keys=message.metadata.mars_keys)
metadata = self.generate_metadata(message, mars_request=message.metadata.mars_request)
output_msg = FileMessage(metadata=metadata)

assert output_msg.metadata.mars_keys is not None
assert output_msg.metadata.mars_request is not None
yield self.tag_message(output_msg, message)

0 comments on commit 223b3d2

Please sign in to comment.