Closed jchayan closed 4 years ago
This implementation could be easily upgraded to allow:
A few notes:
A quick note about the sheet model: We still don't know if there will be a pool of available sheets in the bakery. In that case we could implement an ObjectPool. Or a Singleton if there's only 1 sheet available (which I doubt). In any case, we still don't know. If we get those requirements for the client, we can design the best solution.
Ideas, feedback and criticism are welcome
I also think that we might have a problem with tests:
https://www.codewithjason.com/examples-pointless-rspec-tests/
About the CookingWorker, we must handle this with care in the future.
We don't have any thread safety issues with this code since it's only waiting for the oven timer to elapse.
But if we need to place more code there, we must be aware of making it thread-safe. A good option for this is to create a Sidekiq worker for every cookie instead, since i'ts already doing it for us
Issue: #7