damccorm commented on code in PR #26026:
URL: https://github.com/apache/beam/pull/26026#discussion_r1184123293


##########
playground/backend/internal/tasks/task.go:
##########
@@ -34,11 +34,11 @@ func New(ctx context.Context) *ScheduledTask {
        return &ScheduledTask{ctx: ctx, taskScheduler: 
chrono.NewDefaultTaskScheduler()}
 }
 
-func (st *ScheduledTask) StartRemovingExtraSnippets(cron string, dayDiff 
int32, db db.Database) error {
+func (st *ScheduledTask) StartRemovingExtraSnippets(cron string, 
externalFunction external_functions.ExternalFunctions) error {
        task, err := st.taskScheduler.ScheduleWithCron(func(ctx 
context.Context) {
                logger.Info("ScheduledTask: StartRemovingExtraSnippets() is 
running...\n")
                startDate := time.Now()
-               if err := db.DeleteUnusedSnippets(ctx, dayDiff); err != nil {
+               if err := externalFunction.CleanupSnippets(ctx); err != nil {

Review Comment:
   I think I would like for this line to be made clearer in the future, but I'm 
ok moving forward with it as is for now.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to