Skip to content

Commit

Permalink
Update azure/job.py
Browse files Browse the repository at this point in the history
Co-authored-by: Nate McIntosh <[email protected]>
  • Loading branch information
zsusswein and natemcintosh authored Dec 16, 2024
1 parent 2803413 commit 960dd5a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions azure/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,11 @@
blob_service_client = BlobServiceClient(blob_url, credential_v2)
container_client = blob_service_client.get_container_client(container=config_container)
two_mins_ago = datetime.datetime.now(datetime.UTC) - datetime.timedelta(minutes=2)
task_configs = []
blobs = container_client.list_blobs()

for blob in blobs:
if blob.creation_time > two_mins_ago:
task_configs.append(blob.name)
task_configs: list[str] = [
b.name
for b in container_client.list_blobs()
if b.creation_time > two_mins_ago
]
if len(task_configs) == 0:
raise ValueError("No tasks found")
else:
Expand Down

0 comments on commit 960dd5a

Please sign in to comment.