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

Queue adhoc tasks by duration #181

Closed
djarran opened this issue Nov 13, 2024 · 0 comments
Closed

Queue adhoc tasks by duration #181

djarran opened this issue Nov 13, 2024 · 0 comments

Comments

@djarran
Copy link
Contributor

djarran commented Nov 13, 2024

Description:
Reengagement modules are added to the queue by their ID in ascending order. It can take hours to process hundreds an entire queue.

$reengagementssql = "SELECT cm.id as id, cm.id as cmid, cm.availability, r.id as rid, r.course as courseid,
                            r.duration, r.emaildelay
                      FROM {reengagement} r
                INNER JOIN {course_modules} cm on cm.instance = r.id
                      JOIN {modules} m on m.id = cm.module
                     WHERE m.name = 'reengagement' AND cm.deletioninprogress = 0
                  ORDER BY r.id ASC";

It may be better to queue them based on their duration so that if we require an email to be sent 5 minutes after reengagement completion, this is performed earlier than one with a duration of 1 month.

djarran added a commit that referenced this issue Nov 20, 2024
djarran added a commit that referenced this issue Nov 20, 2024
djarran added a commit that referenced this issue Nov 20, 2024
danmarsden added a commit that referenced this issue Nov 26, 2024
…duration

 Fix #181: Queue adhoc tasks by duration
danmarsden added a commit that referenced this issue Nov 26, 2024
…duration

Fix #181: Queue adhoc tasks by duration
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

No branches or pull requests

1 participant