-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing jobs for initiatives rake tasks #474
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #474 +/- ##
========================================
Coverage 89.34% 89.34%
========================================
Files 65 65
Lines 1595 1595
========================================
Hits 1425 1425
Misses 170 170 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't invoke a system command but Objects directly, it allows to implement tests on the job
|
||
class CheckPublishedInitiatives < ApplicationJob | ||
def perform | ||
system "rake decidim_initiatives:check_published" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer to call directly objects as the rake task rather than invoking a system command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the point but in that case these tasks already have tests
https://github.com/decidim/decidim/tree/release/0.27-stable/decidim-initiatives/spec/lib/tasks
Besides we might want to call directly these tasks instead of copy the code in them in case this code changes in the future release
This will scheduled daily these 3 rake tasks :
decidim_initiatives:check_validating
decidim_initiatives:check_published
decidim_initiatives:notify_progress
see : https://github.com/decidim/decidim/tree/release/0.27-stable/decidim-initiatives#rake-tasks
+ 2 stowaway :
.DS_Store
files to.gitignore