scancode.io
scancode.io copied to clipboard
purldb scan worker: have worker thread send scan results back to purldb
When using the purldb scan worker command, the main worker loop gets the next job from purldb and creates a scan project for it. It then polls the project until it is complete and then sends the results back to purldb. It would be better for the main worker loop to just collect new download urls from purldb and whenever we create a new scan project, we append a pipeline at the end of the list of pipelines to be run that sends the results back to purldb. This way, the main worker loop does not need to poll and see if the scan project is done. It would also behoove us to implement some scan counter to ensure we do not have more than a few package scans running at the same time.