Open olivierobert opened 8 months ago
Answer for end
variable and the loop, I'm planning to refactor this process.
The main idea is to limit each queue consumer to process only up to five keywords at a time. Previously, all processes, like generating reports and scraping, were handled by the consumer.
Now, I've changed it so that the report is generated first. After that, the consumer's role is solely to update the results in the report.
I have added a comment to the already-merged PR.
Issue
The current implementation does not prevent the processing of more than 100 keywords:
https://github.com/rtp-atw/nimble-interview/blob/d49c56f1eb5ebf5a2ed6aa4036044b29c250c275/backend/pkg/keywords/upload.go#L38-L40
However it is a requirement:
Expected
To improve the UX, the content of the CSV should be processed and validated before starting any scraping. The UI must display an error if a user uploads more than 100 keywords.