Currently, we have a loop in pipeline.py where we loop over all files in the incoming folder and we:
match them against a file type
enrich them
degrade them
write them out as cleaned
In the process of doing this we write log messages to the system saying "enriching...blah blah blah", "degrading...blah blah blah".
However, if we have a situation where none of the files in incoming can be matched, we shouldn't continue the other steps in our loop - there's nothing to enrich, nothing to degrade - as the logs that are then written are misleading. They make it appear like steps are occurring that are not actually happening.
Can we close this loop earlier (figuratively, only potentially literally) so that if all files are duds, we don't send logs about enriching/degrading/outputting?
Currently, we have a loop in pipeline.py where we loop over all files in the incoming folder and we:
In the process of doing this we write log messages to the system saying "enriching...blah blah blah", "degrading...blah blah blah".
However, if we have a situation where none of the files in incoming can be matched, we shouldn't continue the other steps in our loop - there's nothing to enrich, nothing to degrade - as the logs that are then written are misleading. They make it appear like steps are occurring that are not actually happening.
Can we close this loop earlier (figuratively, only potentially literally) so that if all files are duds, we don't send logs about enriching/degrading/outputting?