[app_dart] Create scheduler service#1087
Conversation
| // Ensure commits are sorted from newest to oldest | ||
| commits.sort((Commit a, Commit b) => a.timestamp.compareTo(b.timestamp)); |
There was a problem hiding this comment.
This is mostly for tests. I removed documentation. In the next PR, I want to switch this from a list to a single commit and will be irrelevant.
|
|
||
| // Save [Commit] to BigQuery and create [Task] in Datastore. | ||
| await _saveData(newCommits, datastore); | ||
| final List<Commit> recentCommits = await _getRecentCommits(commits, datastore, branch); |
There was a problem hiding this comment.
Move this logic to scheduler as well to save both time and space (processing RepositoryCommit directly)
There was a problem hiding this comment.
I left this code here as in the follow up PR I want to remove it completely (move to a single commit from a webhook). SG?
This reverts commit 5f3a8a5.
godofredoc
left a comment
There was a problem hiding this comment.
Given that this is new functionality should it be implemented as a separate service detached from cocoon? ideally this should be a microservice with a well defined api, implementing and then migrating later is more complicated because we need to consider backward compatibility, etc.
Refactors logic in
refresh_github_commitsinto a serviceIssues
flutter/flutter#76140
Future work