Removed cloud file deletion from Airtime Analyzer. Deletion is done from PHP now.
This commit is contained in:
parent
879e776c8d
commit
ca62086e16
4 changed files with 10 additions and 48 deletions
|
@ -79,12 +79,11 @@ class Application_Model_RabbitMq
|
|||
self::sendMessage($exchange, 'direct', true, $data);
|
||||
}
|
||||
|
||||
public static function SendUploadMessageToAnalyzer($tmpFilePath, $importedStorageDirectory, $originalFilename,
|
||||
$callbackUrl, $apiKey, $messageType)
|
||||
public static function SendMessageToAnalyzer($tmpFilePath, $importedStorageDirectory, $originalFilename,
|
||||
$callbackUrl, $apiKey)
|
||||
{
|
||||
$exchange = 'airtime-uploads';
|
||||
|
||||
$data['message_type'] = $messageType;
|
||||
$data['tmp_file_path'] = $tmpFilePath;
|
||||
$data['import_directory'] = $importedStorageDirectory;
|
||||
$data['original_filename'] = $originalFilename;
|
||||
|
@ -94,17 +93,4 @@ class Application_Model_RabbitMq
|
|||
$jsonData = json_encode($data);
|
||||
self::sendMessage($exchange, 'topic', false, $jsonData, 'airtime-uploads');
|
||||
}
|
||||
|
||||
public static function SendDeleteMessageToAnalyzer($callbackUrl, $objectName, $apiKey, $messageType)
|
||||
{
|
||||
$exchange = 'airtime-uploads';
|
||||
|
||||
$data['message_type'] = $messageType;
|
||||
$data['api_key'] = $apiKey;
|
||||
$data['object_name'] = $objectName;
|
||||
$data['callback_url'] = $callbackUrl;
|
||||
|
||||
$jsonData = json_encode($data);
|
||||
self::sendMessage($exchange, 'topic', false, $jsonData, 'airtime-uploads');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -463,9 +463,9 @@ class Rest_MediaController extends Zend_Rest_Controller
|
|||
|
||||
//Dispatch a message to airtime_analyzer through RabbitMQ,
|
||||
//notifying it that there's a new upload to process!
|
||||
Application_Model_RabbitMq::SendUploadMessageToAnalyzer($newTempFilePath,
|
||||
Application_Model_RabbitMq::SendMessageToAnalyzer($newTempFilePath,
|
||||
$importedStorageDirectory, basename($originalFilename),
|
||||
$callbackUrl, $apiKey, 'upload');
|
||||
$callbackUrl, $apiKey);
|
||||
}
|
||||
|
||||
private function getOwnerId()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue