TSultanov commented on code in PR #26026:
URL: https://github.com/apache/beam/pull/26026#discussion_r1183823636
##########
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:
There is not need for this function to continue to work without
cloudfunctions, as it's not involved in the integration testing of ToB. Because
of this there is not reason for making a fallback logic and a direct call is
enough
--
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]