#2571 enhancement new
convert twistd options into structured objects for testing and manipulation
|Reported by:||glyph||Owned by:|
Description (last modified by glyph)
Currently twistd converts some options into objects (app.ApplicationRunner et. al., and some options into a series of function calls (runReactorWithLogging, fixPdb, runWithProfiler, etc).
Before twistd does anything with the arguments that it's given, it should convert all of them into a set of introspectable, structured objects, which can be manipulated.
This would be helpful in two areas: testing and configurability by tac files and plugins. Testing would be easier because these objects could be mocked out, to ensure that their methods are called with the correct values in the correct order. Post-hoc or programmatic configuration would be easier because there could be defined points in the execution of the various options where certain objects could be mutated by user code. This could simplify tickets such as #638.
This might change in the course of implementation, but I believe the tasks that should be represented by objects here includes:
- IServiceMaker location
- reactor selection
- privilege management (uid, gid, euid, chroot?)
- process naming
Some or all of these things should also be integrated into the service hierarchy, but I leave it as an exercise to the implementor as to how. Depending on the amount of code that will have to be written to do this it may be wise to split it into multiple tickets.
Change History (13)
comment:5 Changed 9 years ago by glyph
- Description modified (diff)
- Owner changed from glyph to therve