1313from cryptography .hazmat .primitives import serialization
1414from django .conf import settings
1515from django .core import files
16- from django .db import transaction
1716from django .db .transaction import on_commit
1817from django .utils .timezone import now
1918from lambda_tasks .decorators import lambda_task
@@ -180,13 +179,6 @@ def unlink_algorithm(*, pk):
180179 )
181180
182181
183- @acks_late_micro_short_task (name = f"{ __name__ } .cleanup_expired_tokens" )
184- @transaction .atomic
185- def cleanup_expired_tokens_celery (** kwargs ):
186- # TODO: 4408 Remove, this is still here to handle existing tasks on SQS
187- return cleanup_expired_tokens (** kwargs )
188-
189-
190182@lambda_task
191183def cleanup_expired_tokens ():
192184 from grandchallenge .github .models import GitHubUserToken
@@ -196,12 +188,6 @@ def cleanup_expired_tokens():
196188 ).delete ()
197189
198190
199- @acks_late_micro_short_task (name = f"{ __name__ } .refresh_user_token" )
200- def refresh_user_token_celery (** kwargs ):
201- # TODO: 4408 Remove, this is still here to handle existing tasks on SQS
202- return refresh_user_token (** kwargs )
203-
204-
205191@lambda_task
206192def refresh_user_token (* , pk : int ):
207193 from grandchallenge .github .models import GitHubUserToken
@@ -217,12 +203,6 @@ def refresh_user_token(*, pk: int):
217203 token .save ()
218204
219205
220- @acks_late_micro_short_task (name = f"{ __name__ } .refresh_expiring_user_tokens" )
221- def refresh_expiring_user_tokens_celery (** kwargs ):
222- # TODO: 4408 Remove, this is still here to handle existing tasks on SQS
223- return refresh_expiring_user_tokens (** kwargs )
224-
225-
226206@lambda_task
227207def refresh_expiring_user_tokens ():
228208 """Refresh user tokens expiring in the next 1 to 28 days"""
0 commit comments