Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xml-rpc api call getAllConfigInfo doesn't return all attribs, specifically: 'autorestart' #1674

Open
GonzRon opened this issue Jan 15, 2025 · 0 comments

Comments

@GonzRon
Copy link

GonzRon commented Jan 15, 2025

for gconfig in self.supervisord.options.process_group_configs:

autorestart doesn't appear to be present in the config object:

       configinfo = []
        for gconfig in self.supervisord.options.process_group_configs:
            inuse = gconfig.name in self.supervisord.process_groups
            for pconfig in gconfig.process_configs:
                d = {'autostart': pconfig.autostart,
                     'directory': pconfig.directory,
                     'uid': pconfig.uid,
                     'command': pconfig.command,
                     'exitcodes': pconfig.exitcodes,
                     'group': gconfig.name,
                     'group_prio': gconfig.priority,
                     'inuse': inuse,
                     'killasgroup': pconfig.killasgroup,
                     'name': pconfig.name,
                     'process_prio': pconfig.priority,
                     'redirect_stderr': pconfig.redirect_stderr,
                     'startretries': pconfig.startretries,
                     'startsecs': pconfig.startsecs,
                     'stdout_capture_maxbytes': pconfig.stdout_capture_maxbytes,
                     'stdout_events_enabled': pconfig.stdout_events_enabled,
                     'stdout_logfile': pconfig.stdout_logfile,
                     'stdout_logfile_backups': pconfig.stdout_logfile_backups,
                     'stdout_logfile_maxbytes': pconfig.stdout_logfile_maxbytes,
                     'stdout_syslog': pconfig.stdout_syslog,
                     'stopsignal': int(pconfig.stopsignal), # enum on py3
                     'stopwaitsecs': pconfig.stopwaitsecs,
                     'stderr_capture_maxbytes': pconfig.stderr_capture_maxbytes,
                     'stderr_events_enabled': pconfig.stderr_events_enabled,
                     'stderr_logfile': pconfig.stderr_logfile,
                     'stderr_logfile_backups': pconfig.stderr_logfile_backups,
                     'stderr_logfile_maxbytes': pconfig.stderr_logfile_maxbytes,
                     'stderr_syslog': pconfig.stderr_syslog,
                     'serverurl': pconfig.serverurl,
                    }
                # no support for these types in xml-rpc
                d.update((k, 'auto') for k, v in d.items() if v is Automatic)
                d.update((k, 'none') for k, v in d.items() if v is None)
                configinfo.append(d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant