akeneo / magento2-connector-community

Akeneo Connector for Magento 2
Open Software License 3.0
85 stars 89 forks source link

Job Code not found #632

Open agghanim opened 1 year ago

agghanim commented 1 year ago

I've installed the Akeneo connector on 2 instances, one instance is an existing Magento installation 2.4.3-p1 with existing products and extensions. The second instance is a new installation without any content. The second installation works perfectly. In the first installation I can not perform any jobs.

Magento 2.4.3-p1 Akeneo Connector 103.3.1 Akeneo CE 6.0

All configurable options for the connector are the same on both installations.

php bin/magento akeneo_connector:import --code=category
Job code not found
php bin/magento akeneo_connector:import -v
Options:
--code

Available codes:

akeneoimport

The TABEL: AKENEO_CONNECTOR_JOB is empty

agghanim commented 1 year ago

Dirty fix, would love to find a proper explanation why this is. But I noticed the table AKENEO_CONNECTOR_JOB was empty. I exported the table structure&data from my working instance to my failing instance and this solved the issue.

SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';

DROP TABLE IF EXISTS `akeneo_connector_job`;
CREATE TABLE `akeneo_connector_job` (
  `entity_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Job ID',
  `code` varchar(255) NOT NULL COMMENT 'Code',
  `status` varchar(255) NOT NULL DEFAULT 'PENDING' COMMENT 'Status',
  `scheduled_at` datetime DEFAULT NULL COMMENT 'Date scheduled to launch the job',
  `last_executed_date` datetime DEFAULT NULL COMMENT 'Last executed date',
  `last_success_date` datetime DEFAULT NULL COMMENT 'Last date the job was executed correctly',
  `job_class` varchar(255) NOT NULL COMMENT 'Job import class',
  `name` varchar(255) NOT NULL COMMENT 'Job import name',
  `position` int(11) NOT NULL COMMENT 'Job position to priorize launch',
  `last_success_executed_date` datetime DEFAULT NULL COMMENT 'Last executed success date',
  PRIMARY KEY (`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Akeneo Connector Job';

INSERT INTO `akeneo_connector_job` (`entity_id`, `code`, `status`, `scheduled_at`, `last_executed_date`, `last_success_date`, `job_class`, `name`, `position`, `last_success_executed_date`) VALUES
(1, 'category', '1',    '2023-03-18 14:35:12',  '2023-03-18 14:36:03',  '2023-03-18 14:36:14',  'Akeneo\\Connector\\Job\\Category', 'Category', 0,  '2023-03-18 14:36:03'),
(2, 'family',   '1',    '2023-03-18 15:21:46',  '2023-03-18 15:22:02',  '2023-03-18 15:22:07',  'Akeneo\\Connector\\Job\\Family',   'Family',   1,  '2023-03-18 15:22:02'),
(3, 'attribute',    '1',    '2023-03-18 15:22:58',  '2023-03-18 15:23:02',  '2023-03-18 15:23:07',  'Akeneo\\Connector\\Job\\Attribute',    'Attribute',    2,  '2023-03-18 15:23:02'),
(4, 'option',   '1',    '2023-03-18 15:23:15',  '2023-03-18 15:24:02',  '2023-03-18 15:24:09',  'Akeneo\\Connector\\Job\\Option',   'Option',   3,  '2023-03-18 15:24:02'),
(5, 'product',  '1',    '2023-03-18 15:24:34',  '2023-03-18 15:25:03',  '2023-03-17 02:40:46',  'Akeneo\\Connector\\Job\\Product',  'Product',  4,  '2023-03-16 23:00:04');