On 7/14/2011 12:37 PM, David E. Wheeler wrote:
> On Jul 14, 2011, at 5:41 AM, Nick Legg wrote:
>
>> I've re-published and re-expired a few stories to test this. Upon ordering a story to deactivate, an Expire job is created. The 'expire' field is true for this job. This Expire job splits into n Distribute jobs (one for each of my Output Channels, but that's beside the point). The Distribute jobs actually execute and deliver the file to the destination server. The 'expire' field is false for these jobs. Once this is complete, each Distribute job births a child Expire job (again, one for each OC). The 'expire' field is true for these jobs. This is where the actual deletion of the file from the server happens.
> Ah, it sounds like it needs to create a Distribution job as an expire job, rather than a Publish job as an expire job. Would you file a bug report for this (with the above details)?
Upon investigating Burner.pm, I've found something a bit odd. See line
1314:
https://github.com/bricoleurs/bricolage/blob/master/lib/Bric/Util/Burner.pm#L1314. This if case is false when I deactivate something, so the Burner goes
head and creates a Distribute job. Then look down at line 1375:
https://github.com/bricoleurs/bricolage/blob/master/lib/Bric/Util/Burner.pm#L1375. This is where the Expire job gets set up, because the expire date is set
on an asset by the deactivate function.
Is there a reason to Distribute the asset, or can I fix that if case on
line 1314 to catch deactivate() calls without any trouble?
>
>> It seems odd to me that Bricolage distributes the file(s) immediately before expiring them when deactivating an asset; on the other hand, when a scheduled expire job eventually transpires it does not pre-distribute the file prior to expiring it (I see failed expires occasionally due to this behavior, where it cannot delete the file because the file does not exist on the destination server).
> Hrm. Maybe that shouldn't fail…
Dunno. It fails with a Net::SSH2 error for me: Error deleting
'/usr/local/htdocs/example.html' on 'preview.denison.edu': 2
SSH_FX_NO_SUCH_FILE