CC-5888: Handle file deletion if the file is stored in the cloud
This commit is contained in:
parent
8e714bcb64
commit
aaee522ec6
7 changed files with 134 additions and 39 deletions
|
@ -79,10 +79,11 @@ class Application_Model_RabbitMq
|
|||
self::sendMessage($exchange, 'direct', true, $data);
|
||||
}
|
||||
|
||||
public static function SendMessageToAnalyzer($tmpFilePath, $importedStorageDirectory, $originalFilename,
|
||||
public static function SendUploadMessageToAnalyzer($tmpFilePath, $importedStorageDirectory, $originalFilename,
|
||||
$callbackUrl, $apiKey, $messageType)
|
||||
{
|
||||
$exchange = 'airtime-uploads';
|
||||
|
||||
$data['message_type'] = $messageType;
|
||||
$data['tmp_file_path'] = $tmpFilePath;
|
||||
$data['import_directory'] = $importedStorageDirectory;
|
||||
|
@ -93,4 +94,17 @@ 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');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue