-
Task
-
Resolution: Done
-
Major
-
None
-
None
FileSystemDeploymentService.scan needs to be refactored.
It's currently handling 3 separate cases: one-off-scan during boot, normal scan, and post-boot "forced-undeploy" scan. Internally it has a lot of "if" logic to discriminate behavior between the three.
Most of the shared logic between the three is one chunk of code that deals with executing the tasks that are identified. So look into factoring that part out and then creating a separate method for the "forced-undeploy" stuff. Also check if some of the stuff in the "finally" block can move to a finally block in the oneOffScan method.