Skip to content

Commit 4f19a0d

Browse files
committed
flux-resource: fix eventlog --follow
Problem: Commit 852ac6d updated the `flux resource eventlog` command to use the ResourceJournalConsumer class, but this dropped support for the `-F, --follow` option, which is now ignored. Suppress the journal sentinel event with `-F, --follow`, which prevents the command from exiting after historical events have been processed. Fixes #6634
1 parent 24df7a5 commit 4f19a0d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cmd/flux-resource.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,9 @@ def eventlog(args):
734734
evf = EventLogFormatter(
735735
format=args.format, timestamp_format=args.time_format, color=args.color
736736
)
737-
consumer = ResourceJournalConsumer(h, include_sentinel=True).start()
737+
# The sentinel event is only used if we're not following the eventlog:
738+
sentinel = not args.follow
739+
consumer = ResourceJournalConsumer(h, include_sentinel=sentinel).start()
738740
while True:
739741
event = consumer.poll()
740742
if event is None or event.is_empty():

0 commit comments

Comments
 (0)