Skip to content

Conversation

ivukotic
Copy link
Member

This cleans both S3 and the database.

else:
use_https = strtobool(os.environ['MINIO_ENCRYPT'])
if 'S3_ENCRYPT' in os.environ:
if isinstance(os.environ['S3_ENCRYPT'], bool):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this ever be bool? shouldn't os.environ only ever have strings?

datasets = self.get_datasets()
self.logger.info('datasets in servicex db', extra={"datasets": len(datasets)})

# delete datasets not used recently
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a possible race condition here? (between lookup of datasets and deletion, a job starts and requests the dataset that is about to be cleaned?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants