Running Drupal 6.17 on Windows server 2003 IIS
PHP 5.2.11

Feeds is configured to retrieve from HTTP. A "Feeds" directory was created in the sites\site.com\files\ folder, however it is empty.

In sites\site.com\files, there are a lot of files such as "feedsFeedsHTTPBatch_3bbf1025c7a300c7c9ab6e4fa6f66564_1278958504". Generally, two per cron run.

Shouldn't these get cleaned up? Is there a flag I didn't set to have them be deleted after processing?

CommentFileSizeAuthor
#3 852062-3_delete_file_after_import.patch2.24 KBalex_b

Comments

meatbag’s picture

+1
It seems that Feeds create one file for each feed that you have.
So, if you have 15 feeds, you will get 15 extra files per cron run.

alex_b’s picture

So, if you have 15 feeds, you will get 15 extra files per cron run.

Exactly.

alex_b’s picture

Version: 6.x-1.0-beta2 » 6.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new2.24 KB

This patch could just do the trick. Completely untested. Please review and adjust.

meatbag’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed. No more files.

meatbag’s picture

Status: Reviewed & tested by the community » Needs work

No more files by pshb-disabled importers.
But I am still getting extra files generated by pshb-enabled importers.

michellezeedru’s picture

Subscribing. I don't know the difference between the types of files mentioned by meatbag, but I applied the patch, and am still getting files like feedsFeedsHTTPBatch_022bb7177f5ec91466903787934530ee_1282599902 saved in sites/default/files.

meatbag’s picture

Status: Needs work » Active
michellezeedru’s picture

Status: Active » Needs work

Hold on, it does appear to be working now. I reapplied the patch - apparently I didn't do something right the first time. And so far, all files are getting deleted after the import. Sorry for the premature feedback - thanks!

Setting back to "needs work", the status before I filed my feedback.

alex_b’s picture

#5: that's right, the afterImport() implementation should be on the FeedsImportBatch level. We should also declare $file_path in FeedsImportBatch.

beregon87’s picture

This patch doesn't work for me.

geerlingguy’s picture

Doesn't seem to work for me either. I have a folder that's grown to 88 MB in about one week... on a relatively constrained site (only a few GB for the account... so after a year or two, feeds could chew up that disk space).

ben.hamelin’s picture

Applied this patch on a test site running 6.x-1.0-beta4

Worked fine on a CSV formatted HTTP Fetch node processor.

Thanks!

bh

David_Rothstein’s picture

This issue has a lot in common with #1143280: Provide an option to delete the uploaded file after import is done (including sharing some of the code). Does it make sense to merge them?

twistor’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)