Repository navigation
update startup/shutdown cleanup - #7
Conversation
| private String cfCleanOnStartup; | ||
|
|
||
| @Value("${recceiver.cf.delete-on-shutdown:true}") | ||
| private String cfDeleteOnShutdown; |
There was a problem hiding this comment.
Are all these options mutually exclusive? Maybe it's better to have a config which is a list of enums.
There was a problem hiding this comment.
These are not mutually exclusive...kind off...
I think listing them might be too many states.... it might make it even more confusing than what it is
delete-on-startup
mark-inactive-on-startup
do-nothing-on-startup
delete-on-shutdown
mark-unknown-on-shutdown
do-nothing-on-shutdown
I think I like the current:
one flag for startup, one for shutdown, and one which describes if channels should be deleted
There was a problem hiding this comment.
Indeed, I would prefer to keep the 3 parameters.
| } | ||
| Map<String, ChannelFinderChannel> filtered = new LinkedHashMap<>(); | ||
| for (Map.Entry<String, ChannelFinderChannel> channelEntry : channels.entrySet()) { | ||
| String status = channelEntry.getValue().property(PV_STATUS_PROPERTY); |
There was a problem hiding this comment.
Don't you want the filter for receiver id?
There was a problem hiding this comment.
either the startup or the destroy will do that search with the recciever id...line 203 or 619
There was a problem hiding this comment.
Indeed, as @shroffk mentioned, the search by recceiverId is already in place.
https://github.com/ControlSystemStudio/phoebus-codeathon/tree/master/projects#services-recsync-003-recceiver-lifecyclestate-cleanup
Should fix:
Reworks how recceiver cleans up its channels in ChannelFinder:
delete-on-cleanchooses how channels are cleaned, andclean-on-startup/clean-on-shutdownchoose when startup and shutdown cleanup happens.Settings
recceiver.cf.delete-on-cleanfalsetrue: delete channels.false: keep them and updatepvStatus. Applies to every cleanup below.recceiver.cf.clean-on-startupfalseInactive, or delete them.false: startup doesn't touch ChannelFinder.recceiver.cf.clean-on-shutdown(new)trueUnknown, or delete them.false: shutdown doesn't touch ChannelFinder.recceiver.cf.delete-on-shutdownclean-on-shutdowntogether withdelete-on-clean.IOC disconnects are always cleaned, as before: their channels are marked
Inactive, or deleted whendelete-on-clean=true.