Changeset 16735
- Timestamp:
- 06/29/08 11:10:43 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/MidCOM_2_8/midcom.helper.replicator/exporter/staging2live.php
r16425 r16735 109 109 // FIXME: use strtotime when MidCOM stops automagically rewriting these between ISO and Unix timestamps 110 110 $schedule_action = 'ok'; 111 $schedulestart_unixtime = $object->metadata->schedulestart; 112 $scheduleend_unixtime = $object->metadata->scheduleend; 111 if (!preg_match('%[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}%', $object->metadata->schedulestart)) 112 { 113 $schedulestart_unixtime = strtotime($object->metadata->schedulestart); 114 } 115 else 116 { 117 $schedulestart_unixtime = $object->metadata->schedulestart; 118 } 119 if (!preg_match('%[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}%', $object->metadata->scheduleend)) 120 { 121 $scheduleend_unixtime = strtotime($object->metadata->scheduleend); 122 } 123 else 124 { 125 $scheduleend_unixtime = $object->metadata->scheduleend; 126 } 113 127 if ($schedulestart_unixtime) 114 128 { branches/MidCOM_2_8/midcom.helper.replicator/queuemanager.php
r16429 r16735 636 636 $GLOBALS['midcom_helper_replicator_logger']->log("Saving queue for later retry.", MIDCOM_LOG_ERROR); 637 637 debug_pop(); 638 return; 638 // this is not a fatal error, return true 639 return true; 639 640 } 640 641 branches/MidCOM_2_8/midcom.helper.replicator/transporter/http.php
r16086 r16735 157 157 function _real_process(&$items, $retry_count = 0) 158 158 { 159 $orig_items_count = count($items); 159 160 foreach ($items as $key => $data) 160 161 { … … 196 197 } 197 198 199 $remaining_items_count = count($items); 200 if ( !empty($remaining_items_count) 201 && $orig_items_count === $remaining_items_count) 202 { 203 // All items failed send (likely unavailable target server), return false to retry in stead of quarantine 204 debug_push_class(__CLASS__, __FUNCTION__); 205 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); 206 debug_pop(); 207 $this->error = 'send failed for all keys'; 208 return false; 209 } 198 210 return true; 199 211 }
