Skip to content
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

🐛 cron/workspace-cleaner: only run task for docker environments #17168

Merged
merged 6 commits into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

import io.airbyte.config.Configs;
import io.airbyte.config.EnvConfigs;
import io.micronaut.context.annotation.Requires;
import io.micronaut.context.env.Environment;
import io.micronaut.scheduling.annotation.Scheduled;
import jakarta.inject.Singleton;
import java.io.File;
Expand All @@ -22,12 +24,15 @@

@Singleton
@Slf4j
@Requires(notEnv = Environment.KUBERNETES)
public class WorkspaceCleaner {

private final Path workspaceRoot;
private final long maxAgeFilesInDays;

WorkspaceCleaner() {
log.info("Creating workspace cleaner");

// TODO Configs should get injected through micronaut
final Configs configs = new EnvConfigs();

Expand Down
2 changes: 1 addition & 1 deletion airbyte-cron/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
micronaut:
application:
name: airbyte-workers
name: airbyte-cron
security:
intercept-url-map:
- pattern: /**
Expand Down