Skip to content

Commit

Permalink
Remove Optional annotation from 'days' parameter in cleanup_jwds func…
Browse files Browse the repository at this point in the history
…tion

Fixes a type error where Optional[int] caused incompatibility with datetime.timedelta(days=...). Removed the Optional annotation from the days parameter since it always defaults to 5, ensuring days is consistently treated as an integer and avoiding MyPy complaints.
  • Loading branch information
sanjaysrikakulam committed Nov 18, 2024
1 parent 42d1e3d commit 429cddc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/galaxy/celery/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ def dispatch_pending_notifications(notification_manager: NotificationManager):


@galaxy_task(action="clean up job working directories")
def cleanup_jwds(sa_session: galaxy_scoped_session, object_store: BaseObjectStore, days: Optional[float] = 5):
def cleanup_jwds(sa_session: galaxy_scoped_session, object_store: BaseObjectStore, days: int = 5):
"""Cleanup job working directories for failed jobs that are older than X days"""

def get_failed_jobs():
Expand Down

0 comments on commit 429cddc

Please sign in to comment.