Instead of waiting for periodic tasks to upload scores to the LMS, start the process of uploading as soon as we receive a score.
Note that there is a lot more involved here than at first glance.
Uploads to Canvas can be slow, so we cannot wait for the upload to complete before reporting to the student. (Uploads must be in the background.)
What if the upload fails? If a course has no scheduled tasks for score uploading, what will happen?
Uploading a score also involves computing late scores. When using the "late days" policy, this is very complicated. Normally, all assignments are scored in-order to properly allocate (or reallocate) late days. This breaks if we are only looking at one assignment.
Instead of waiting for periodic tasks to upload scores to the LMS, start the process of uploading as soon as we receive a score. Note that there is a lot more involved here than at first glance.