Skip to content

Commit

Permalink
Synchronously scavenge diskspace when job completed
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldgray committed Jan 22, 2024
1 parent e031c34 commit 3792017
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/app/engine/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from app.engine.rasterizers import PdfRasterizer
from app.engine.s3 import S3Client
from app.engine.serializers import DLCSBatchSerializer
from django_q.tasks import async_task

logger = logging.Logger(__name__)
http_origin = HttpOrigin()
Expand Down Expand Up @@ -37,12 +36,7 @@ def process_member(args):
except Exception as error:
__process_error(member, error)
finally:
if folder_path:
async_task(
"app.engine.tasks.cleanup_scratch",
folder_path,
task_name="Scavenger: [{0}]".format(args["id"]),
)
cleanup_scratch(folder_path)


def __fetch_origin(member, origin_uri):
Expand Down

0 comments on commit 3792017

Please sign in to comment.