CSC/ECE 517 Fall 2022 - E2273.Refactor delayed mailer.rb and scheduled task.rb: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 28: Line 28:


#[https://github.com/expertiza/expertiza Expertiza on GitHub]
#[https://github.com/expertiza/expertiza Expertiza on GitHub]
#[https://github.com/MichaelDacanay/expertiza-mailer-refactor/tree/team-E2253 GitHub Project Repository Fork]
#[https://github.com/MichaelDacanay/expertiza-mailer-refactor/tree/team-E2273 GitHub Project Repository Fork]
#[https://github.com/expertiza/expertiza/pull/2469 E2273 Pull Request]
#[https://github.com/expertiza/expertiza/pull/2477 E2273 Pull Request]
#[http://expertiza.ncsu.edu/ The live Expertiza website]
#[http://expertiza.ncsu.edu/ The live Expertiza website]

Revision as of 19:28, 9 November 2022

Background

Expertiza uses Sidekiq gem for asynchronous processing of email tasks. It has a queue system to hold and then process jobs. Sidekiq’s queue replaces DelayedMailer’s queue. The previous team that worked on this also created a method perform() to gather email IDs of all participants in an assignment and send them an email reminder. Some test cases exist for this work.

History: Previous projects

* E2253 [1]
* E2144 [2]

Problems and planned changes

We are planning to accomplish the following tasks in this project:

Problem 1: Refactor the create method in assignment_controller.rb file

* Proposed Solution: Split the whole function into multiple methods performing specific tasks. Change the name of the variables to meaningful names in the method.

Problem 2: Refactor the edit_params_setting method in assignment_controller.rb file

* Proposed Solution: Split the whole function into multiple methods performing specific tasks.

Problem 3: Increase the test coverage for sidekiq_mail_worker_spec.rb

* Proposed Solution: Add more tests to increase test coverage.

References

  1. Expertiza on GitHub
  2. GitHub Project Repository Fork
  3. E2273 Pull Request
  4. The live Expertiza website