I've attached a patch that applies various updates to media_mover_api.module that we had to make to get files processing appropriately leveraging the drupal_queue module.
This one should definitely be reviewed -- as some of the changes may be workarounds for bugs in other areas that I haven't found. In particular, the two changes in media_mover_api_file_worker and media_mover_api_harvest_worker have to do with adjustments to the steps.
With this latest patch and the others I've posted, we have a complete workflow running via cron/drupal_queue:
Harvest from CCK filefield field_om_show_original
Convert to MPEG2 via ffmpeg_wrapper
Save to CCK filefield field_om_show_mpeg2
Harvest from CCK filefield field_om_show_mpeg2
Convert to Flash (FLV) via ffmpeg_wrapper
Save to CCK filefield field_om_show_flash
Harvest from CCK filefield field_om_show_mpeg2
Convert to Thumbnail via ffmpeg_wrapper
Save to CCK imagefield field_om_show_thumbnail
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | drupal_queue_update_fix.patch | 799 bytes | civicpixel |
| drupal_queue_updates.patch | 2.13 KB | civicpixel |
Comments
Comment #1
arthurf commentedI've applied the patch. The one thing that I'm thinking is to make drupal queue a dependency and refactoring all processing to be done in queues. This would help breakup large configuration processing, file deletion, etc. Any thoughts?
Oh, and thank you for kicking ass on getting these patches in. I haven't had time to do development work for a few months, so it's awesome to see this.
Comment #2
civicpixel commentedNo problem, I'm excited to finally have some time to contribute back to this since we're using it so heavily. If you get a chance to look at the other patches in the queue/apply, that would be awesome (I'm starting to have difficulty keeping track of what has been applied, vs what hasn't). Alternatively, if you get tired of patches and want me to commit them myself just let me know.
After testing this latest patch on a fresh install, had to make one minor tweak. Patch attached.
Comment #3
civicpixel commentedOh, and in regard to making drupal queue a dependency -- I personally feel that would be a good move. I feel like MM2x should be future-forward and the release of 7 will make that 'dependency' a non-issue. It's so nice to be able to break out tasks to workers / separate cron processes, I feel like the structure lends itself to a lot of improvements. I wouldn't be pushing so hard for us to move to the 2x series if it wasn't for leveraging the queue.
Comment #4
arthurf commentedLatest commits now make drupal_queue a dependency. This is a big win for file deletion. This is a large refactor that I'm still tweaking, but I think it's a major improvement
Comment #5
civicpixel commentedTested on our development and live servers for a week, marking as fixed.