There is checking of mmf.date in function mm_node_harvest_mm_files():

	$harvest_conditions = ' AND mmf.date > '. $job->last_start_time;

Problem is that file is maybe not processed to status which we want to harvest from.

For example if I want to harvest file from 'complete', and file is still processing, it will not get right file.
There should be different SQL conditions which are dependent on if harvested file is currently at status we want to harvest, so in this case if 'complete_file' is not empty and not on 'mmf.date'.

Comments

anantagati’s picture

Status: Active » Needs review
StatusFileSize
new1.55 KB
anantagati’s picture

Title: Harvesting from another configuration doesn't work properly » Harvesting from another mm config is not checking if file is already processed
StatusFileSize
new1.61 KB

Fixed query.

anantagati’s picture

StatusFileSize
new1.61 KB

Now it should be ok. :)

arthurf’s picture

Status: Needs review » Fixed

Thanks for the patch! Applied and committed.

anantagati’s picture

Status: Fixed » Active

Patch was not applied completely.

Problem is in this part of query:

NOT IN (SELECT mmf1.'. $file_type .' FROM {media_mover_files} mmf1 WHERE mmf1.cid = %d AND mmf1.nid = mmf.nid)

It should be:

NOT IN (SELECT mmf1.harvest_file FROM {media_mover_files} mmf1 WHERE mmf1.cid = %d AND mmf1.nid = mmf.nid)