Skip to content

Commit

Permalink
Remove resource from tmp archive
Browse files Browse the repository at this point in the history
  • Loading branch information
blagojabozinovski committed May 16, 2024
1 parent 424fbc4 commit b828fa0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ckanext/archiver/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,10 @@ def archive_resource(context, resource, log, result=None, url_timeout=30):
else:
# cache_url for uploaded resource is the same as download url
cache_url = resource['url']

# delete the file from archive storage
if os.path.isfile(saved_file):
os.remove(saved_file)

else:
shutil.move(result['saved_file'], saved_file)
Expand Down

0 comments on commit b828fa0

Please sign in to comment.