Delete exported content only when the last one finished exporting

Yossi, you don’t solve it as long as your condition is according to count($unClosedAssets), you should check the convert-profile job status instead.

T.

From: yossipapi [mailto:notifications@github.com]
Sent: Tuesday, July 1, 2014 4:44 PM
To: kaltura/server
Cc: Jonathan Kanarek
Subject: Re: [server] Delete exported content only when the last one finished exporting (#1392)


In alpha/apps/kaltura/lib/batch2/kFlowHelper.php:

>       {

> -            if(self::isAssetExportFinished($fileSync, $asset))

> +            $unClosedStatuses = array (

> +                    asset::ASSET_STATUS_QUEUED,

> +                    asset::ASSET_STATUS_CONVERTING,

> +                    asset::ASSET_STATUS_WAIT_FOR_CONVERT,

> +                    asset::ASSET_STATUS_EXPORTING

> +            );

> +

> +            $unClosedAssets = assetPeer::retrieveReadyByEntryId($asset->getEntryId(), null, $unClosedStatuses);

@tan-tan-kanarek<https://github.com/tan-tan-kanarek> Added handling in case of convert profile as well.
BTW doing the query so I count on un-closed assets status makes sure that once this condition is false than the convert profile is also closed.

—
Reply to this email directly or view it on GitHub<https://github.com/kaltura/server/pull/1392/files#r14404079>.