/**
  * @param $publishedFile
  * @param $orgId
  * @return bool
  */
 protected function publishToRegistryForBulk($publishedFile, $orgId)
 {
     $settings = $this->settingsManager->getSettings($orgId);
     $api_url = config('filesystems.iati_registry_api_base_url');
     $apiCall = new CkanClient($api_url, $settings['registry_info'][0]['api_id']);
     try {
         $data = $this->generateJson($publishedFile);
         if ($publishedFile['published_to_register'] == 0) {
             $apiCall->package_create($data);
             $this->activityManager->updatePublishToRegister($publishedFile->id);
         } elseif ($publishedFile['published_to_register'] == 1) {
             $apiCall->package_update($data);
         }
         $this->loggerInterface->info('Successfully published selected activity files', ['payload' => $data, 'by_user' => auth()->user()->name]);
         return true;
     } catch (\Exception $e) {
         $this->loggerInterface->error($e);
         return false;
     }
 }