Commit 49d8205f authored by Penny Leach's avatar Penny Leach
Browse files

removing import function I didn't end up using

parent 8b27a8d6
......@@ -116,44 +116,6 @@ abstract class Importer {
return $this->{$field};
}
public static function process_queue() {
if (!$ready = get_records_array('import_queue',
'ready', 1, null, null, null, null,
'*,' . db_format_tsfield('expirytime', 'ex'))) {
return true;
}
$now = time();
$processed = array();
foreach ($ready as $item) {
if ($item->ex < $now) {
log_debug('deleting expired import record', $item);
$processed[] = $item->id;
continue;
}
$importer = Importer::create_importer($item->id, $item);
try {
$importer->prepare();
$importer->process();
$processed[] = $item->id;
}
catch (Exception $e) {
$importer->cleanup();
}
}
if (empty($processed)) {
return true;
}
delete_records_select(
'incoming_queue',
'id IN ( ' . implode(',', db_array_to_ph($processed)) . ')',
$processed
);
}
public static function class_from_format($format) {
switch (trim($format)) {
case 'file':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment