Closed yedhink closed 1 year ago
I wanted to ask whether I should first work on paper trail suggestion or should I start writing the code for version3 as almost all the reviews I have completed working on except test cases and paper trail suggestion.
@nancy-binani You can set aside the paper trail part and start working on this issue. We need to finish V3 on time.
Monday 26 Dec - EOD
My sidekiq server is not running.Can you help me with it?
Please ignore my comment.The error is resolved.
https://www.loom.com/share/d032553d1fbd41d3901f45505133514d ->publish/unpublish later
https://www.loom.com/share/9a50a121af704b5ba3a9b6897cd3fc1e -> version history
https://www.loom.com/share/a278d706a4884d78a028d5bbab259763 -> cancel schedule
https://www.loom.com/share/8ff5c8590ddb4960bb468ec95f3af922 -> delete article/edit category & backend code
https://www.loom.com/share/20382edb2e6849c39b1441d677fb751b -> delete the category to which an article belonged to and move the article into a new category
Please review the code.Actually there were 3 reviews of version 2 which I thought I can work after completing version 3 but I did not get time at all to work on them. Code cleaning and few review changes are left and I did not want to extend the deadline for version 3. I have written the code for version 3 and would be working on code cleaning and those few reviews.
https://www.loom.com/share/d032553d1fbd41d3901f45505133514d ->publish/unpublish later
After you schedule a publish or unpublish action, then the user should not be forced to refresh the page in order to get the latest data. Rather you should fetch latest data once the schedule is created.
Why are you using and
over &&
? Please research and point out the difference between the two. Also please read about safe navigation and presence
method in Rails: https://github.com/bigbinary/bb-academy-web/issues/2329
[x] I want you to carefully go through https://www.bigbinary.com/books/learn-rubyonrails-book/handling-idempotency-when-sending-emails-using-sidekiq and point out to me how the following logic constitutes to a single point of failure and what can be done to fix the issue:
[x] It's an overkill to have two different workers handling very closely related code. Rather have a single worker called ArticleSchedulerWorker
and handle both publish and unpublish logic conditionally within it.
https://github.com/nancy-binani/scribble-by-nancy-binani/blob/135bca70a4827c459596ec6e667397c1d13823a2/app/workers/article_publish_later_worker.rb#L3-L21
[x] I only see a categories controller in the public
namespace, which most probably suggests to me that you are sending all the categories and articles and their corresponding details in one single API call. That's actually not a good way to create APIs. You should also have a article controller in the public namespace to send the detail of a particular article based on the slug. The categories controller should simply send the bare minimum details of the article like say the title of the article. This API division is required so to ensure that the APIs are performant.
https://github.com/nancy-binani/scribble-by-nancy-binani/blob/135bca70a4827c459596ec6e667397c1d13823a2/app/controllers/api/public/categories_controller.rb#L5
@nancy-binani Start with this from tomorrow.
https://public.3.basecamp.com/p/ZcDNj5fhtocuzhLtkLookBFd
Also, when submitting V3 again, ensure you take into consideration the following too:
unpublish later
because the article would already be in the draft state after this operation.Few separate videos required(or combined - whichever is sensible):