-
Notifications
You must be signed in to change notification settings - Fork 15
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
update table references, use wrapf for errors #34
Conversation
@@ -336,13 +332,6 @@ func BuildRollupArchive(ctx context.Context, db *sqlx.DB, conf *Config, s3Client | |||
|
|||
start := time.Now() | |||
|
|||
log := logrus.WithFields(logrus.Fields{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logging is the responsibility of the parent that doesn't pass the error up.
var exitedOn *time.Time | ||
for rows.Next() { | ||
if archive.ArchiveType == MessageType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MessageType block was never entered, when we added broadcast deleting we changed to our own method.
|
||
// then add in daily archives taking into account the monthly that have been built |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DRY
const deleteRecentRuns = ` | ||
DELETE FROM flows_flowpathrecentrun | ||
WHERE run_id IN(?) | ||
` | ||
|
||
const deleteActionLogs = ` | ||
DELETE FROM flows_actionlog | ||
WHERE run_id IN(?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Table still exists but shouldn't be any runs in it.
Codecov Report
@@ Coverage Diff @@
## master #34 +/- ##
=========================================
+ Coverage 68.08% 69.8% +1.72%
=========================================
Files 3 3
Lines 943 891 -52
=========================================
- Hits 642 622 -20
+ Misses 181 156 -25
+ Partials 120 113 -7
Continue to review full report at Codecov.
|
We broke deleting of runs when we removed
run_id
from webhook_event and webhook_result.