Changeset 16736
- Timestamp:
- 06/29/08 11:12:10 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/midcom.helper.replicator/exporter/staging2live.php
r16426 r16736 113 113 // FIXME: use strtotime when MidCOM stops automagically rewriting these between ISO and Unix timestamps 114 114 $schedule_action = 'ok'; 115 $schedulestart_unixtime = $object->metadata->schedulestart; 116 $scheduleend_unixtime = $object->metadata->scheduleend; 115 if (!preg_match('%[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}%', $object->metadata->schedulestart)) 116 { 117 $schedulestart_unixtime = strtotime($object->metadata->schedulestart); 118 } 119 else 120 { 121 $schedulestart_unixtime = $object->metadata->schedulestart; 122 } 123 if (!preg_match('%[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}%', $object->metadata->scheduleend)) 124 { 125 $scheduleend_unixtime = strtotime($object->metadata->scheduleend); 126 } 127 else 128 { 129 $scheduleend_unixtime = $object->metadata->scheduleend; 130 } 117 131 if ($schedulestart_unixtime) 118 132 { trunk/midcom/midcom.helper.replicator/queuemanager.php
r16430 r16736 634 634 $GLOBALS['midcom_helper_replicator_logger']->log("Saving queue for later retry.", MIDCOM_LOG_ERROR); 635 635 debug_pop(); 636 return; 636 // this is not a fatal error, return true 637 return true; 637 638 } 638 639 trunk/midcom/midcom.helper.replicator/transporter/http.php
r16087 r16736 155 155 function _real_process(&$items, $retry_count = 0) 156 156 { 157 $orig_items_count = count($items); 157 158 foreach ($items as $key => $data) 158 159 { … … 190 191 } 191 192 193 $remaining_items_count = count($items); 194 if ( !empty($remaining_items_count) 195 && $orig_items_count === $remaining_items_count) 196 { 197 // All items failed send (likely unavailable target server), return false to retry in stead of quarantine 198 debug_push_class(__CLASS__, __FUNCTION__); 199 debug_add("\$remaining_items_count(={$remaining_items_count}) is the same as \$orig_items_count(={$orig_items_count}), all keys failed, marking for retry in stead on quarantine", MIDCOM_LOG_INFO); 200 debug_pop(); 201 $this->error = 'send failed for all keys'; 202 return false; 203 } 192 204 return true; 193 205 }
