Changeset 13399
- Timestamp:
- 11/12/07 14:18:19 (1 year ago)
- Files:
-
- trunk/midcom/midcom.services.at/config/mgdschema.sql (modified) (1 diff)
- trunk/midcom/midcom.services.at/config/mgdschema.xml (modified) (1 diff)
- trunk/midcom/midcom.services.at/cron/check.php (modified) (2 diffs)
- trunk/midcom/midcom.services.at/entry.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/midcom.services.at/config/mgdschema.sql
r3202 r13399 18 18 KEY midcom_services_at_entry_db_start_idx(start) 19 19 ); 20 ALTER TABLE midcom_services_at_entry_db ADD COLUMN host int(11) NOT NULL default '0'; trunk/midcom/midcom.services.at/config/mgdschema.xml
r2856 r13399 4 4 <property name="id" type="integer" primaryfield="id"/> 5 5 <property name="status" type="integer"/> 6 <property name="host" type="integer" link="midgard_host:id"/> 6 7 <property name="start" type="integer"/> 7 8 <property name="component" type="string"/> trunk/midcom/midcom.services.at/cron/check.php
r3012 r13399 31 31 $qb = midcom_services_at_entry::new_query_builder(); 32 32 $qb->add_constraint('start', '<=', time()); 33 $qb->begin_group('OR'); 34 $qb->add_constraint('host', '=', $_MIDGARD['host']); 35 $qb->add_constraint('host', '=', 0); 36 $qb->end_group(); 33 37 $qb->add_constraint('status', '=', MIDCOM_SERVICES_AT_STATUS_SCHEDULED); 34 38 debug_add('Executing QB'); … … 52 56 $_MIDCOM->auth->drop_sudo(); 53 57 $_MIDCOM->componentloader->load($entry->component); 54 $interface = str_replace('.', '_', $entry->component) . '_interface';55 58 $args = $entry->arguments; 56 59 $args['midcom_services_at_entry_object'] = $entry; 57 $mret = call_user_func 58 ( 59 array 60 ( 61 $interface, 62 $entry->method 63 ), 64 $args, 65 $this 66 ); 60 $interface =& $_MIDCOM->componentloader->get_interface_class($entry->component); 61 $method =& $entry->method; 62 $mret = $interface->$method($args, $this); 67 63 if ($mret !== true) 68 64 { 69 $error = " call_user_func(array({$interface}, {$entry->method}), {$entry->arguments}) returned '{$mret}', errstr: " . mgd_errstr();65 $error = "\$interface->{$method}(\$args, \$this) returned '{$mret}', errstr: " . mgd_errstr(); 70 66 $this->print_error($error); 71 67 debug_add($error, MIDCOM_LOG_ERROR); 68 debug_add('$interface is ' . get_class($interface)); 69 debug_print_r('$args', $args); 72 70 //PONDER: Delete instead ? (There is currently nothing we do with failed entries) 73 71 $entry->status = MIDCOM_SERVICES_AT_STATUS_FAILED; trunk/midcom/midcom.services.at/entry.php
r5509 r13399 26 26 function midcom_midcom_services_at_entry_db($id = null) 27 27 { 28 $this->_use_rcs = false; 28 29 return parent::__midcom_midcom_services_at_entry_db($id); 29 30 } … … 50 51 { 51 52 $this->status = MIDCOM_SERVICES_AT_STATUS_SCHEDULED; 53 } 54 if (!$this->host) 55 { 56 $this->host = $_MIDGARD['host']; 52 57 } 53 58 $this->_serialize_arguments();
