Skip to content

Update all listeners to GCN-Kafka - #74

Open
jessiethw wants to merge 27 commits into
masterfrom
kafka_listeners
Open

jessiethw wants to merge 27 commits into
masterfrom
kafka_listeners

Conversation

@jessiethw

Copy link
Copy Markdown
Collaborator

LVK has switched over to Kafka listeners completely, and most other stuff is migrating away from Classic now. This PR is an overhaul of the listeners to move everything to Kafka streams.

Changes:

  • listeners/gw_gcn_listener.py uses LVK's Kafka stream and updates all parameter names to match
  • listeners/gcn_listener.py listens to classic over Kakfa for IceCube alerts
  • pygcn is removed as a requirement, as classic listeners are no longer used
  • listeners/combine_results_classic.py is removed (outdated and no longer used)
  • slack_poster/logging_util.py is added to improve logging and continuously log to a file in addition to stout

scripts/combine_results_kafka.py will be updated in a future PR.

@jessiethw jessiethw self-assigned this Sep 30, 2026

@jessiethw jessiethw left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments on the gcn_listener.py, thanks a lot @physics-png for all the work!

'gcn.classic.voevent.ICECUBE_CASCADE'])

def process_gcn(payload, root):
def process_gcn(record): #payload,root

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest dropping the commented out stuff here

logger.info('\nRunning {} --skymap={} --time={} --alert_id={} --suffix={}'.format(
command, skymap, str(event_mjd), run_id+':'+event_id, suffix))

print(params)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need this print statement here?

logger.warning('Failed to push to private webpage')
logger.warning(e)

def post_error(errMsg=None):

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this be added as a general utility to slack_posters/slack.py? then it can be used in other listeners/scripts


if not args.test_cascade:
print("Running on sample track . . . ")
post_error("Cannot find path to sample skymaps")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you want a posted error if testing? I think this won't really be helpful, I recommend just a logger error here, since the user will be running in testing mode to hit the else statement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants