Skip to content

Commit 4357146

Browse files
chore: remove org id restriction on reaper (#834)
This change lifts the restriction that made the reaper only consider a couple of Gram organizations. It will now run for all orgs.
1 parent 79c37ee commit 4357146

File tree

3 files changed

+0
-39
lines changed

3 files changed

+0
-39
lines changed

server/internal/functions/deploy_fly.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -541,18 +541,6 @@ func (f *FlyRunner) reap(ctx context.Context, logger *slog.Logger, appsRepo *rep
541541
return fmt.Errorf("get existing app name: %w", err)
542542
}
543543

544-
enabled, err := appsRepo.IsReapingEnabledForProject(ctx, repo.IsReapingEnabledForProjectParams{
545-
ProjectID: req.ProjectID,
546-
OrganizationIds: []string{"5ad61845-b72e-4f0d-9dde-e0bdcf98e374", "5a25158b-24dc-4d49-b03d-e85acfbea59c"},
547-
})
548-
if err != nil && !errors.Is(err, sql.ErrNoRows) {
549-
return fmt.Errorf("check reaping enabled for project: %w", err)
550-
}
551-
if !enabled {
552-
logger.InfoContext(ctx, "reaping is not enabled for project")
553-
return nil
554-
}
555-
556544
logger = logger.With(
557545
attr.SlogFlyAppName(app.AppName),
558546
attr.SlogFlyOrgSlug(app.FlyOrgSlug),

server/internal/functions/queries.sql

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,3 @@ WHERE
145145
AND reaped_at IS NULL
146146
ORDER BY created_at DESC
147147
LIMIT 1;
148-
149-
-- name: IsReapingEnabledForProject :one
150-
SELECT true AS enabled
151-
FROM projects
152-
WHERE
153-
id = @project_id
154-
AND organization_id = ANY(@organization_ids);

server/internal/functions/repo/queries.sql.go

Lines changed: 0 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)