diff options
author | Stuart Nelson <stuartnelson3@gmail.com> | 2018-02-10 14:38:31 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-03-26 08:10:58 +0100 |
commit | 9d81d5aa893b20ebedcbdafc7d23d651d4dbee89 (patch) | |
tree | 5796ffe5a3e904f800593c2e59a7954bd08a4e88 /app/services | |
parent | ff830bc1e17e574927893305c33c6e31955cd35a (diff) | |
download | gitlab-ce-9d81d5aa893b20ebedcbdafc7d23d651d4dbee89.tar.gz |
Use cron for sending emails
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/issues/base_service.rb | 6 | ||||
-rw-r--r-- | app/services/issues/create_service.rb | 1 | ||||
-rw-r--r-- | app/services/issues/update_service.rb | 7 |
3 files changed, 0 insertions, 14 deletions
diff --git a/app/services/issues/base_service.rb b/app/services/issues/base_service.rb index af25cf2c819..9f6cfc0f6d3 100644 --- a/app/services/issues/base_service.rb +++ b/app/services/issues/base_service.rb @@ -7,12 +7,6 @@ module Issues hook_data end - def schedule_due_date_email(issuable) - return if issuable.due_date.nil? - - IssueDueWorker.perform_at(issuable.due_date.to_time, issuable.id) - end - def reopen_service Issues::ReopenService end diff --git a/app/services/issues/create_service.rb b/app/services/issues/create_service.rb index a253020b9c3..0307634c0b6 100644 --- a/app/services/issues/create_service.rb +++ b/app/services/issues/create_service.rb @@ -27,7 +27,6 @@ module Issues todo_service.new_issue(issuable, current_user) user_agent_detail_service.create resolve_discussions_with_issue(issuable) - schedule_due_date_email(issuable) super end diff --git a/app/services/issues/update_service.rb b/app/services/issues/update_service.rb index e8fdf9901c1..d7aa7e2347e 100644 --- a/app/services/issues/update_service.rb +++ b/app/services/issues/update_service.rb @@ -13,10 +13,6 @@ module Issues spam_check(issue, current_user) end - def after_update(issue) - schedule_due_date_email(issue) - end - def handle_changes(issue, options) old_associations = options.fetch(:old_associations, {}) old_labels = old_associations.fetch(:labels, []) @@ -27,9 +23,6 @@ module Issues todo_service.mark_pending_todos_as_done(issue, current_user) end - # TODO: If due date doesn't change, don't bother updating the due date - # email worker - if issue.previous_changes.include?('title') || issue.previous_changes.include?('description') todo_service.update_issue(issue, current_user, old_mentioned_users) |