Skip to content
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

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

moustachu
Copy link
Member

@moustachu moustachu commented Jan 17, 2024

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 :

  • add (again) .DS_Store files to .gitignore
  • fix a missing space with erblint

Copy link

codecov bot commented Jan 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6c7442a) 89.34% compared to head (5a73662) 89.34%.

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.
📢 Have feedback on the report? Share it here.

@moustachu moustachu marked this pull request as ready for review January 17, 2024 09:38
Copy link
Contributor

@Quentinchampenois Quentinchampenois left a 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"
Copy link
Contributor

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

Copy link
Member Author

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

@Quentinchampenois Quentinchampenois self-requested a review January 17, 2024 12:56
@Quentinchampenois Quentinchampenois merged commit b6776e0 into develop Jan 17, 2024
16 checks passed
@Quentinchampenois Quentinchampenois deleted the fix/add-initiatives-rake-tasks branch January 17, 2024 12:57
@moustachu moustachu restored the fix/add-initiatives-rake-tasks branch January 17, 2024 13:58
@Quentinchampenois Quentinchampenois deleted the fix/add-initiatives-rake-tasks branch June 21, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants