Merge branch 'develop' of https://github.com/tainacan/tainacan into develop

This commit is contained in:
weryques 2018-06-20 16:26:34 -03:00
commit 6c25f30785
2 changed files with 13 additions and 4 deletions

View File

@ -218,9 +218,18 @@ abstract class Background_Process extends \WP_Background_Process {
*/
protected function handle() {
$this->lock_process();
//error_log('new request');
// while we are debugging performance
$newRequest = true;
do {
$batch = $this->get_batch();
if ($newRequest) {
$this->write_log($batch->key, ['New Request']);
$newRequest = false;
}
// TODO: find a way to catch and log PHP errors as
try {

View File

@ -529,7 +529,7 @@ abstract class Importer {
*/
public function get_progress_label() {
$current_step = $this->get_current_step();
$steps = $this->get_current_step();
$steps = $this->get_steps();
$label = '';
if ( isset($steps[$current_step]) ) {
$step = $steps[$current_step];
@ -571,13 +571,13 @@ abstract class Importer {
*/
public function get_progress_value() {
$current_step = $this->get_current_step();
$steps = $this->get_current_step();
$steps = $this->get_steps();
$value = -1;
if ( isset($steps[$current_step]) ) {
$step = $steps[$current_step];
if ($step['callback'] == 'process_items') {
if ($step['callback'] == 'process_collections') {
$totalItems = 0;
$currentItem = $this->get_current_collection_item();