(1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22171075 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=22171067 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='cartonnette' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22171075) result : ((1350813849,), (1350813880,), (1350813881,), (1350813882,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22171067) result : ((1350812721,), (1350812755,), (1350812775,), (1350812983,), (1350813005,), (1350813007,), (1350813256,), (1350813285,), (1350813301,), (1350813310,), (1350813336,), (1350813344,), (1350813438,), (1350813440,), (1350813459,), (1350813482,), (1350813506,), (1350813533,), (1350813719,), (1350813727,), (1350813735,), (1350813737,), (1350813741,), (1350813785,), (1350813787,), (1350813789,), (1350813805,), (1350813815,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22171076 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=22171067 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='metal' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22171076) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22171067) result : ((1350812721,), (1350812755,), (1350812775,), (1350812983,), (1350813005,), (1350813007,), (1350813256,), (1350813285,), (1350813301,), (1350813310,), (1350813336,), (1350813344,), (1350813438,), (1350813440,), (1350813459,), (1350813482,), (1350813506,), (1350813533,), (1350813719,), (1350813727,), (1350813735,), (1350813737,), (1350813741,), (1350813785,), (1350813787,), (1350813789,), (1350813805,), (1350813815,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22171077 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=22171067 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Teint_Dans_La_Masse' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22171077) result : ((1350813844,), (1350813845,), (1350813872,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22171067) result : ((1350812721,), (1350812755,), (1350812775,), (1350812983,), (1350813005,), (1350813007,), (1350813256,), (1350813285,), (1350813301,), (1350813310,), (1350813336,), (1350813344,), (1350813438,), (1350813440,), (1350813459,), (1350813482,), (1350813506,), (1350813533,), (1350813719,), (1350813727,), (1350813735,), (1350813737,), (1350813741,), (1350813785,), (1350813787,), (1350813789,), (1350813805,), (1350813815,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22171078 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=22171067 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_brun' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22171078) result : ((1350813283,), (1350813284,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22171067) result : ((1350812721,), (1350812755,), (1350812775,), (1350812983,), (1350813005,), (1350813007,), (1350813256,), (1350813285,), (1350813301,), (1350813310,), (1350813336,), (1350813344,), (1350813438,), (1350813440,), (1350813459,), (1350813482,), (1350813506,), (1350813533,), (1350813719,), (1350813727,), (1350813735,), (1350813737,), (1350813741,), (1350813785,), (1350813787,), (1350813789,), (1350813805,), (1350813815,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22171079 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=22171067 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='kraft' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22171079) result : ((1350813296,), (1350813851,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22171067) result : ((1350812721,), (1350812755,), (1350812775,), (1350812983,), (1350813005,), (1350813007,), (1350813256,), (1350813285,), (1350813301,), (1350813310,), (1350813336,), (1350813344,), (1350813438,), (1350813440,), (1350813459,), (1350813482,), (1350813506,), (1350813533,), (1350813719,), (1350813727,), (1350813735,), (1350813737,), (1350813741,), (1350813785,), (1350813787,), (1350813789,), (1350813805,), (1350813815,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22171080 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=22171067 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='flou' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22171080) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22171067) result : ((1350812721,), (1350812755,), (1350812775,), (1350812983,), (1350813005,), (1350813007,), (1350813256,), (1350813285,), (1350813301,), (1350813310,), (1350813336,), (1350813344,), (1350813438,), (1350813440,), (1350813459,), (1350813482,), (1350813506,), (1350813533,), (1350813719,), (1350813727,), (1350813735,), (1350813737,), (1350813741,), (1350813785,), (1350813787,), (1350813789,), (1350813805,), (1350813815,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22171081 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=22171067 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='papier' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22171081) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22171067) result : ((1350812721,), (1350812755,), (1350812775,), (1350812983,), (1350813005,), (1350813007,), (1350813256,), (1350813285,), (1350813301,), (1350813310,), (1350813336,), (1350813344,), (1350813438,), (1350813440,), (1350813459,), (1350813482,), (1350813506,), (1350813533,), (1350813719,), (1350813727,), (1350813735,), (1350813737,), (1350813741,), (1350813785,), (1350813787,), (1350813789,), (1350813805,), (1350813815,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22171067 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','Carton_brun','Carton_gris','Teint_Dans_La_Masse','flou','mal_croppe','metal','kraft','cartonnette','plastique','papier','autre_refus')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22171067 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','Carton_brun','Carton_gris','Teint_Dans_La_Masse','flou','mal_croppe','metal','kraft','cartonnette','plastique','papier','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'autre_refus': {'main_port_id': 22171067, 'sub_port_id': 22171082, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14646693, 'last_updated_at': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 17, 21)}, 'environnement': {'main_port_id': 22171067, 'sub_port_id': 22171083, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14646694, 'last_updated_at': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 17, 21)}, 'mal_croppe': {'main_port_id': 22171067, 'sub_port_id': 22171084, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14646695, 'last_updated_at': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 17, 21)}, 'plastique': {'main_port_id': 22171067, 'sub_port_id': 22171085, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14646696, 'last_updated_at': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 17, 21)}, 'Carton_gris': {'main_port_id': 22171067, 'sub_port_id': 22171086, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14646697, 'last_updated_at': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 17, 21)}, 'cartonnette': {'main_port_id': 22171067, 'sub_port_id': 22171087, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14646698, 'last_updated_at': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 17, 21)}, 'metal': {'main_port_id': 22171067, 'sub_port_id': 22171088, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14646699, 'last_updated_at': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 17, 21)}, 'Teint_Dans_La_Masse': {'main_port_id': 22171067, 'sub_port_id': 22171089, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14646700, 'last_updated_at': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 17, 21)}, 'Carton_brun': {'main_port_id': 22171067, 'sub_port_id': 22171090, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14646701, 'last_updated_at': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 17, 21)}, 'kraft': {'main_port_id': 22171067, 'sub_port_id': 22171091, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14646702, 'last_updated_at': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 17, 21)}, 'flou': {'main_port_id': 22171067, 'sub_port_id': 22171092, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14646703, 'last_updated_at': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 17, 21)}, 'papier': {'main_port_id': 22171067, 'sub_port_id': 22171093, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14646704, 'last_updated_at': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 17, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 17, 21)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22171082,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22171070 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22171083,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22171071 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22171084,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22171072 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22171085,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22171073 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22171086,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22171074 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22171087,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22171075 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22171088,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22171076 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22171089,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22171077 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22171090,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22171078 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22171091,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22171079 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22171092,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22171080 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22171093,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22171081 lien utilise dans velours : https://www.fotonower.com/velours/22171082,22171083,22171084,22171085,22171086,22171087,22171088,22171089,22171090,22171091,22171092,22171093?tags=autre_refus,environnement,mal_croppe,plastique,Carton_gris,cartonnette,metal,Teint_Dans_La_Masse,Carton_brun,kraft,flou,papier After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22171067]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1350813815, 1350813805, 1350813789, 1350813787, 1350813785, 1350813741, 1350813737, 1350813735, 1350813727, 1350813719] map_info['map_portfolio_photo'] : {22171067: [1350813815, 1350813805, 1350813789, 1350813787, 1350813785, 1350813741, 1350813737, 1350813735, 1350813727, 1350813719, 1350813533, 1350813506, 1350813482, 1350813459, 1350813440, 1350813438, 1350813344, 1350813336, 1350813310, 1350813301, 1350813285, 1350813256, 1350813007, 1350813005, 1350812983, 1350812775, 1350812755, 1350812721]} final : False mtd_id 4302 list_pids : [1350813815, 1350813805, 1350813789, 1350813787, 1350813785, 1350813741, 1350813737, 1350813735, 1350813727, 1350813719] Looping around the photos to save general results len do output : 1 /22171067. before output type Here is an output not treated by saveGeneral : Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813815', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813805', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813789', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813787', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813785', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813741', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813737', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813735', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813727', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813719', None, None, None, None, None, '2735440') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22171067', "{'autre_refus': 22171070, 'environnement': 22171071, 'mal_croppe': 22171072, 'plastique': 22171073, 'Carton_gris': 22171074, 'cartonnette': 22171075, 'metal': 22171076, 'Teint_Dans_La_Masse': 22171077, 'Carton_brun': 22171078, 'kraft': 22171079, 'flou': 22171080, 'papier': 22171081}", None, None, None, None, '2735440'), ('4302', '22171067', '1350813815', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813805', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813789', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813787', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813785', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813741', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813737', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813735', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813727', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813719', None, None, None, None, None, '2735440')] time used for this insertion : 0.01897740364074707 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5282373428344727 time spend to save output : 0.019277095794677734 total time spend for step 1 : 1.5475144386291504 step2:final Wed Apr 9 17:22:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22171067) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} Beginning of datou step final ! query to retrieve results for portfolio 22171067 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1350812775,1350812755,1350812721,1350813007,1350813005,1350812983,1350813344,1350813336,1350813310,1350813301,1350813285,1350813256,1350813533,1350813506,1350813482,1350813459,1350813440,1350813438,1350813741,1350813737,1350813735,1350813727,1350813719,1350813815,1350813805,1350813789,1350813787,1350813785); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22171067]) Inside saveOutput : final : False verbose : True original output for save of step final : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ('0.03308658172615063',), 1350813741: ('0.03308658172615063',), 1350813737: ('0.03308658172615063',), 1350813735: ('0.03308658172615063',), 1350813727: ('0.03308658172615063',), 1350813719: ('0.03308658172615063',)} new output for save of step final : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ('0.03308658172615063',), 1350813741: ('0.03308658172615063',), 1350813737: ('0.03308658172615063',), 1350813735: ('0.03308658172615063',), 1350813727: ('0.03308658172615063',), 1350813719: ('0.03308658172615063',)} [1350813815, 1350813805, 1350813789, 1350813787, 1350813785, 1350813741, 1350813737, 1350813735, 1350813727, 1350813719] map_info['map_portfolio_photo'] : {22171067: [1350813815, 1350813805, 1350813789, 1350813787, 1350813785, 1350813741, 1350813737, 1350813735, 1350813727, 1350813719, 1350813533, 1350813506, 1350813482, 1350813459, 1350813440, 1350813438, 1350813344, 1350813336, 1350813310, 1350813301, 1350813285, 1350813256, 1350813007, 1350813005, 1350812983, 1350812775, 1350812755, 1350812721]} final : False mtd_id 4302 list_pids : [1350813815, 1350813805, 1350813789, 1350813787, 1350813785, 1350813741, 1350813737, 1350813735, 1350813727, 1350813719] Looping around the photos to save general results len do output : 10 /1350813815.Didn't retrieve data . /1350813805.Didn't retrieve data . /1350813789.Didn't retrieve data . /1350813787.Didn't retrieve data . /1350813785.Didn't retrieve data . /1350813741.Didn't retrieve data . /1350813737.Didn't retrieve data . /1350813735.Didn't retrieve data . /1350813727.Didn't retrieve data . /1350813719.Didn't retrieve data . before output type Used above Used above Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813815', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813805', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813789', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813787', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813785', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813741', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813737', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813735', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813727', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813719', None, None, None, None, None, '2735440') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 30 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22171067', '1350813815', '0.03308658172615063', None, None, None, None, '2735440'), ('4302', '22171067', '1350813805', '0.03308658172615063', None, None, None, None, '2735440'), ('4302', '22171067', '1350813789', '0.03308658172615063', None, None, None, None, '2735440'), ('4302', '22171067', '1350813787', '0.03308658172615063', None, None, None, None, '2735440'), ('4302', '22171067', '1350813785', '0.03308658172615063', None, None, None, None, '2735440'), ('4302', '22171067', '1350813741', '0.03308658172615063', None, None, None, None, '2735440'), ('4302', '22171067', '1350813737', '0.03308658172615063', None, None, None, None, '2735440'), ('4302', '22171067', '1350813735', '0.03308658172615063', None, None, None, None, '2735440'), ('4302', '22171067', '1350813727', '0.03308658172615063', None, None, None, None, '2735440'), ('4302', '22171067', '1350813719', '0.03308658172615063', None, None, None, None, '2735440')] time used for this insertion : 0.013589859008789062 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07030844688415527 time spend to save output : 0.01414179801940918 total time spend for step 2 : 0.08445024490356445 step3:velours_tree Wed Apr 9 17:22:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {22171067: [{'autre_refus': 22171070, 'environnement': 22171071, 'mal_croppe': 22171072, 'plastique': 22171073, 'Carton_gris': 22171074, 'cartonnette': 22171075, 'metal': 22171076, 'Teint_Dans_La_Masse': 22171077, 'Carton_brun': 22171078, 'kraft': 22171079, 'flou': 22171080, 'papier': 22171081}]} input_args_next_step : {22171067: ()} output_args : {22171067: [{'autre_refus': 22171070, 'environnement': 22171071, 'mal_croppe': 22171072, 'plastique': 22171073, 'Carton_gris': 22171074, 'cartonnette': 22171075, 'metal': 22171076, 'Teint_Dans_La_Masse': 22171077, 'Carton_brun': 22171078, 'kraft': 22171079, 'flou': 22171080, 'papier': 22171081}]} args : 22171067 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'autre_refus': 22171070, 'environnement': 22171071, 'mal_croppe': 22171072, 'plastique': 22171073, 'Carton_gris': 22171074, 'cartonnette': 22171075, 'metal': 22171076, 'Teint_Dans_La_Masse': 22171077, 'Carton_brun': 22171078, 'kraft': 22171079, 'flou': 22171080, 'papier': 22171081},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22171067) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} can't find the photo_desc_type After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22171067]) Inside saveOutput : final : False verbose : True ouput is None No outpout to save, returning out of save general time spend for datou_step_exec : 0.3628079891204834 time spend to save output : 0.00010275840759277344 total time spend for step 3 : 0.36291074752807617 step4:send_mail_cod Wed Apr 9 17:22:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ('0.03308658172615063',), 1350813741: ('0.03308658172615063',), 1350813737: ('0.03308658172615063',), 1350813735: ('0.03308658172615063',), 1350813727: ('0.03308658172615063',), 1350813719: ('0.03308658172615063',)} input_args_next_step : {1350813815: ()} output_args : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ('0.03308658172615063',), 1350813741: ('0.03308658172615063',), 1350813737: ('0.03308658172615063',), 1350813735: ('0.03308658172615063',), 1350813727: ('0.03308658172615063',), 1350813719: ('0.03308658172615063',)} args : 1350813815 depend.output_id : 0 input_args_next_step : {1350813815: ('0.03308658172615063',), 1350813805: ()} output_args : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ('0.03308658172615063',), 1350813741: ('0.03308658172615063',), 1350813737: ('0.03308658172615063',), 1350813735: ('0.03308658172615063',), 1350813727: ('0.03308658172615063',), 1350813719: ('0.03308658172615063',)} args : 1350813805 depend.output_id : 0 input_args_next_step : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ()} output_args : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ('0.03308658172615063',), 1350813741: ('0.03308658172615063',), 1350813737: ('0.03308658172615063',), 1350813735: ('0.03308658172615063',), 1350813727: ('0.03308658172615063',), 1350813719: ('0.03308658172615063',)} args : 1350813789 depend.output_id : 0 input_args_next_step : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ()} output_args : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ('0.03308658172615063',), 1350813741: ('0.03308658172615063',), 1350813737: ('0.03308658172615063',), 1350813735: ('0.03308658172615063',), 1350813727: ('0.03308658172615063',), 1350813719: ('0.03308658172615063',)} args : 1350813787 depend.output_id : 0 input_args_next_step : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ()} output_args : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ('0.03308658172615063',), 1350813741: ('0.03308658172615063',), 1350813737: ('0.03308658172615063',), 1350813735: ('0.03308658172615063',), 1350813727: ('0.03308658172615063',), 1350813719: ('0.03308658172615063',)} args : 1350813785 depend.output_id : 0 input_args_next_step : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ('0.03308658172615063',), 1350813741: ()} output_args : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ('0.03308658172615063',), 1350813741: ('0.03308658172615063',), 1350813737: ('0.03308658172615063',), 1350813735: ('0.03308658172615063',), 1350813727: ('0.03308658172615063',), 1350813719: ('0.03308658172615063',)} args : 1350813741 depend.output_id : 0 input_args_next_step : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ('0.03308658172615063',), 1350813741: ('0.03308658172615063',), 1350813737: ()} output_args : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ('0.03308658172615063',), 1350813741: ('0.03308658172615063',), 1350813737: ('0.03308658172615063',), 1350813735: ('0.03308658172615063',), 1350813727: ('0.03308658172615063',), 1350813719: ('0.03308658172615063',)} args : 1350813737 depend.output_id : 0 input_args_next_step : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ('0.03308658172615063',), 1350813741: ('0.03308658172615063',), 1350813737: ('0.03308658172615063',), 1350813735: ()} output_args : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ('0.03308658172615063',), 1350813741: ('0.03308658172615063',), 1350813737: ('0.03308658172615063',), 1350813735: ('0.03308658172615063',), 1350813727: ('0.03308658172615063',), 1350813719: ('0.03308658172615063',)} args : 1350813735 depend.output_id : 0 input_args_next_step : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ('0.03308658172615063',), 1350813741: ('0.03308658172615063',), 1350813737: ('0.03308658172615063',), 1350813735: ('0.03308658172615063',), 1350813727: ()} output_args : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ('0.03308658172615063',), 1350813741: ('0.03308658172615063',), 1350813737: ('0.03308658172615063',), 1350813735: ('0.03308658172615063',), 1350813727: ('0.03308658172615063',), 1350813719: ('0.03308658172615063',)} args : 1350813727 depend.output_id : 0 input_args_next_step : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ('0.03308658172615063',), 1350813741: ('0.03308658172615063',), 1350813737: ('0.03308658172615063',), 1350813735: ('0.03308658172615063',), 1350813727: ('0.03308658172615063',), 1350813719: ()} output_args : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ('0.03308658172615063',), 1350813741: ('0.03308658172615063',), 1350813737: ('0.03308658172615063',), 1350813735: ('0.03308658172615063',), 1350813727: ('0.03308658172615063',), 1350813719: ('0.03308658172615063',)} args : 1350813719 depend.output_id : 0 Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 3 : {22171067: [{'autre_refus': 22171070, 'environnement': 22171071, 'mal_croppe': 22171072, 'plastique': 22171073, 'Carton_gris': 22171074, 'cartonnette': 22171075, 'metal': 22171076, 'Teint_Dans_La_Masse': 22171077, 'Carton_brun': 22171078, 'kraft': 22171079, 'flou': 22171080, 'papier': 22171081}]} input_args_next_step : {1350813815: ('0.03308658172615063',), 1350813805: ('0.03308658172615063',), 1350813789: ('0.03308658172615063',), 1350813787: ('0.03308658172615063',), 1350813785: ('0.03308658172615063',), 1350813741: ('0.03308658172615063',), 1350813737: ('0.03308658172615063',), 1350813735: ('0.03308658172615063',), 1350813727: ('0.03308658172615063',), 1350813719: ('0.03308658172615063',), 22171067: ()} output_args : {22171067: [{'autre_refus': 22171070, 'environnement': 22171071, 'mal_croppe': 22171072, 'plastique': 22171073, 'Carton_gris': 22171074, 'cartonnette': 22171075, 'metal': 22171076, 'Teint_Dans_La_Masse': 22171077, 'Carton_brun': 22171078, 'kraft': 22171079, 'flou': 22171080, 'papier': 22171081}]} args : 22171067 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :11, first value : ('0.03308658172615063',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22171067) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1350813815,1350813805,1350813789,1350813787,1350813785,1350813741,1350813737,1350813735,1350813727,1350813719) Found this number of photos: 10 ##### Call download_photos : nb_thread : 5 begin to download photo : 1350813719 begin to download photo : 1350813737 begin to download photo : 1350813787 begin to download photo : 1350813815 download finish for photo 1350813787 begin to download photo : 1350813789 download finish for photo 1350813815 download finish for photo 1350813737 begin to download photo : 1350813741 download finish for photo 1350813719 begin to download photo : 1350813727 download finish for photo 1350813789 begin to download photo : 1350813805 download finish for photo 1350813741 begin to download photo : 1350813785 download finish for photo 1350813727 begin to download photo : 1350813735 download finish for photo 1350813805 download finish for photo 1350813785 download finish for photo 1350813735 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 10 ; length of list_pids : 10 ; length of list_args : 10 results_Auto_P22171067_09-04-2025_17_22_58.pdf 22171070 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22171070 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350813494: '1744211952_2932209_1350813005_258ddf3cc5450a4b0f7157f233c2450d_rle_crop_3751757898_0.png'} change filename to text .imagette221710701744212178/ imagette221710701744212178/1744211952_2932209_1350813005_258ddf3cc5450a4b0f7157f233c2450d_rle_crop_3751757898_0.png.png imagette221710721744212178/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/d067a8965d3280d3bfe6914ceefd59a1_50694570.png imagette221710701744212178 22171072 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22171072 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221710721744212178 22171073 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22171073 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350813291: '1744211834_2930474_1350812775_6bfca40d339956d5e110374ff9766300_rle_crop_3751755884_0.png', 1350813850: '1744212086_2573158_1350813438_230d05709a3278ef01eb3483159bb19a_rle_crop_3751760720_0.png', 1350813884: '1744212092_2933749_1350813533_7448667caacdd871e824ceee274a9fd1_rle_crop_3751761509_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/8df1f4b28d65dab224ccc067a91af9c0_42651733.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/bdf3369dcaa09a6b3b19ac595742d9ce_14843934.png change filename to text .imagette221710731744212178/ imagette221710731744212178/1744212086_2573158_1350813438_230d05709a3278ef01eb3483159bb19a_rle_crop_3751760720_0.png.png imagette221710731744212178/1744212092_2933749_1350813533_7448667caacdd871e824ceee274a9fd1_rle_crop_3751761509_0.png.png imagette221710731744212178/1744211834_2930474_1350812775_6bfca40d339956d5e110374ff9766300_rle_crop_3751755884_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/0b66dd3847688b3a19695d38433e5122_98515907.png imagette221710731744212178 22171075 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22171075 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350813849: '1744212086_2573158_1350813506_7be14baa25e3a9360e55e6dfdea944c3_rle_crop_3751760519_0.png', 1350813880: '1744212092_2933749_1350813533_7448667caacdd871e824ceee274a9fd1_rle_crop_3751761506_0.png', 1350813881: '1744212092_2933749_1350813256_c4528923bef15afe7d14b935ab8bfc97_rle_crop_3751761572_0.png', 1350813882: '1744212092_2933749_1350813256_c4528923bef15afe7d14b935ab8bfc97_rle_crop_3751761574_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/6a7d34e320b075cea27c8abf6bd5b580_29115077.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/97520eabb9e4e2251650b9dd4297c3f3_43323343.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/e5c51b94a1a20e5612c82c4314a30008_92440990.png change filename to text .imagette221710751744212178/ imagette221710751744212178/1744212092_2933749_1350813256_c4528923bef15afe7d14b935ab8bfc97_rle_crop_3751761574_0.png.png imagette221710751744212178/1744212086_2573158_1350813506_7be14baa25e3a9360e55e6dfdea944c3_rle_crop_3751760519_0.png.png imagette221710751744212178/1744212092_2933749_1350813533_7448667caacdd871e824ceee274a9fd1_rle_crop_3751761506_0.png.png imagette221710751744212178/1744212092_2933749_1350813256_c4528923bef15afe7d14b935ab8bfc97_rle_crop_3751761572_0.png.png imagette221710761744212179/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/fbbf9a9497d68bea8cba238f973e53d8_66485439.png imagette221710751744212178 22171076 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22171076 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221710761744212179 22171079 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22171079 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350813296: '1744211834_2930474_1350812721_972d3f46ebc9c0ca87193f38f0386e8e_rle_crop_3751756119_0.png', 1350813851: '1744212086_2573158_1350813459_0898474a27ab3db7e30079e5c42ac715_rle_crop_3751760683_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/e364e10d5e80511fed17301fdfe1b8d7_57761556.png change filename to text .imagette221710791744212179/ imagette221710791744212179/1744212086_2573158_1350813459_0898474a27ab3db7e30079e5c42ac715_rle_crop_3751760683_0.png.png imagette221710791744212179/1744211834_2930474_1350812721_972d3f46ebc9c0ca87193f38f0386e8e_rle_crop_3751756119_0.png.png imagette221710801744212179/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/bf81b253f4cb3b2cdb8504d551d523d8_27753521.png imagette221710791744212179 22171080 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22171080 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221710801744212179 22171074 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22171074 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350813259: '1744211834_2930474_1350812775_6bfca40d339956d5e110374ff9766300_rle_crop_3751755885_0.png', 1350813500: '1744211952_2932209_1350813005_258ddf3cc5450a4b0f7157f233c2450d_rle_crop_3751757895_0.png', 1350813874: '1744212092_2933749_1350813310_7b6abbde1977a78a9f275f11782a1a75_rle_crop_3751761530_0.png', 1350813875: '1744212092_2933749_1350813301_509e057fea7d0e122f1ae6234cdc5bbc_rle_crop_3751761543_0.png', 1350813876: '1744212092_2933749_1350813285_9f35148147d6956cd79c341307254d88_rle_crop_3751761554_0.png', 1350813877: '1744212092_2933749_1350813256_c4528923bef15afe7d14b935ab8bfc97_rle_crop_3751761573_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/f82e5d0b1d5c5284648fbdb11b01f1a8_76582828.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/c9d0b73f4d68f84a7287e6a72e990060_39857916.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/3022c4cc796cb6d85e2ff2dbde5da119_2892290.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/b55c99e424e3b6ebfc5e35e60114388d_32372842.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/9f3f7213d1cbdee7aaa2de2d21fbd689_57410534.png change filename to text .imagette221710741744212179/ imagette221710741744212179/1744211834_2930474_1350812775_6bfca40d339956d5e110374ff9766300_rle_crop_3751755885_0.png.png imagette221710741744212179/1744212092_2933749_1350813256_c4528923bef15afe7d14b935ab8bfc97_rle_crop_3751761573_0.png.png imagette221710741744212179/1744211952_2932209_1350813005_258ddf3cc5450a4b0f7157f233c2450d_rle_crop_3751757895_0.png.png imagette221710741744212179/1744212092_2933749_1350813310_7b6abbde1977a78a9f275f11782a1a75_rle_crop_3751761530_0.png.png imagette221710741744212179/1744212092_2933749_1350813285_9f35148147d6956cd79c341307254d88_rle_crop_3751761554_0.png.png imagette221710741744212179/1744212092_2933749_1350813301_509e057fea7d0e122f1ae6234cdc5bbc_rle_crop_3751761543_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/77d58e03cc4a3f4c99f997c0df1a4d8c_63283510.png imagette221710741744212179 22171077 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22171077 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350813844: '1744212086_2573158_1350813459_0898474a27ab3db7e30079e5c42ac715_rle_crop_3751760688_0.png', 1350813845: '1744212086_2573158_1350813438_230d05709a3278ef01eb3483159bb19a_rle_crop_3751760718_0.png', 1350813872: '1744212092_2933749_1350813310_7b6abbde1977a78a9f275f11782a1a75_rle_crop_3751761533_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/f2a64ed0228560f3e8fe81f4a062f5c3_43837297.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/3d52302e02e7c08e94956e6821680ca0_91463059.png change filename to text .imagette221710771744212179/ imagette221710771744212179/1744212086_2573158_1350813459_0898474a27ab3db7e30079e5c42ac715_rle_crop_3751760688_0.png.png imagette221710771744212179/1744212092_2933749_1350813310_7b6abbde1977a78a9f275f11782a1a75_rle_crop_3751761533_0.png.png imagette221710771744212179/1744212086_2573158_1350813438_230d05709a3278ef01eb3483159bb19a_rle_crop_3751760718_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/8001578192114855fcccc0e004c19721_90154076.png imagette221710771744212179 22171078 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22171078 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350813283: '1744211834_2930474_1350812775_6bfca40d339956d5e110374ff9766300_rle_crop_3751755889_0.png', 1350813284: '1744211834_2930474_1350812755_523086926dc263cf977c4becb7e317ba_rle_crop_3751755918_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/0d400bea3a98efd2dce0e2edc3a11fe5_55985044.png change filename to text .imagette221710781744212179/ imagette221710781744212179/1744211834_2930474_1350812755_523086926dc263cf977c4becb7e317ba_rle_crop_3751755918_0.png.png imagette221710781744212179/1744211834_2930474_1350812775_6bfca40d339956d5e110374ff9766300_rle_crop_3751755889_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/d17a3ae6c8e7094cdd4dda9181fb8814_63014477.png imagette221710781744212179 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22171067 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22171082,22171083,22171084,22171085,22171086,22171087,22171088,22171089,22171090,22171091,22171092,22171093?tags=autre_refus,environnement,mal_croppe,plastique,Carton_gris,cartonnette,metal,Teint_Dans_La_Masse,Carton_brun,kraft,flou,papier your option no_mail is active, we will not send the real mail to your client args[1350813815] : ('0.03308658172615063',) no score found for photo 1350813815 We are sending mail with results at report@fotonower.com args[1350813805] : ('0.03308658172615063',) no score found for photo 1350813805 We are sending mail with results at report@fotonower.com args[1350813789] : ('0.03308658172615063',) no score found for photo 1350813789 We are sending mail with results at report@fotonower.com args[1350813787] : ('0.03308658172615063',) no score found for photo 1350813787 We are sending mail with results at report@fotonower.com args[1350813785] : ('0.03308658172615063',) no score found for photo 1350813785 We are sending mail with results at report@fotonower.com args[1350813741] : ('0.03308658172615063',) no score found for photo 1350813741 We are sending mail with results at report@fotonower.com args[1350813737] : ('0.03308658172615063',) no score found for photo 1350813737 We are sending mail with results at report@fotonower.com args[1350813735] : ('0.03308658172615063',) no score found for photo 1350813735 We are sending mail with results at report@fotonower.com args[1350813727] : ('0.03308658172615063',) no score found for photo 1350813727 We are sending mail with results at report@fotonower.com args[1350813719] : ('0.03308658172615063',) no score found for photo 1350813719 We are sending mail with results at report@fotonower.com refus_total : 0.03308658172615063 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22171067 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 1000 start upload file to ovh https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22171067_09-04-2025_17_22_58.pdf results_Auto_P22171067_09-04-2025_17_22_58.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22171067_09-04-2025_17_22_58.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','22171067','results_Auto_P22171067_09-04-2025_17_22_58.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22171067_09-04-2025_17_22_58.pdf','pdf','','0.15','0.03308658172615063') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22171067]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1350813815, 1350813805, 1350813789, 1350813787, 1350813785, 1350813741, 1350813737, 1350813735, 1350813727, 1350813719] map_info['map_portfolio_photo'] : {22171067: [1350813815, 1350813805, 1350813789, 1350813787, 1350813785, 1350813741, 1350813737, 1350813735, 1350813727, 1350813719, 1350813533, 1350813506, 1350813482, 1350813459, 1350813440, 1350813438, 1350813344, 1350813336, 1350813310, 1350813301, 1350813285, 1350813256, 1350813007, 1350813005, 1350812983, 1350812775, 1350812755, 1350812721]} final : False mtd_id 4302 list_pids : [1350813815, 1350813805, 1350813789, 1350813787, 1350813785, 1350813741, 1350813737, 1350813735, 1350813727, 1350813719] Looping around the photos to save general results len do output : 0 before output type Used above Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813815', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813805', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813789', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813787', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813785', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813741', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813737', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813735', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813727', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813719', None, None, None, None, None, '2735440') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22171067', '1350813815', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813805', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813789', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813787', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813785', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813741', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813737', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813735', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813727', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813719', None, None, None, None, None, '2735440')] time used for this insertion : 0.013588190078735352 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.0730671882629395 time spend to save output : 0.013769865036010742 total time spend for step 4 : 3.08683705329895 step5:split_time_score Wed Apr 9 17:23:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['22171067'] We expect there is only one output and this part is used while all output are not tuple or array Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 1 : VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : [('22171067',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22171067) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1350813815: {'path': 'temp/1744212178_2091690_1350813815_32310ab7bff2bcf45109fbd991461ca7.jpg', 'extension': 'jpg'}, 1350813787: {'path': 'temp/1744212178_2091690_1350813787_3758f5536f69e59c9550154ede28c6db.jpg', 'extension': 'jpg'}, 1350813789: {'path': 'temp/1744212178_2091690_1350813789_175985c16d8cab0e2627161f1cab33cf.jpg', 'extension': 'jpg'}, 1350813805: {'path': 'temp/1744212178_2091690_1350813805_45b2382767b3c06a96ec26d0985a9ed3.jpg', 'extension': 'jpg'}, 1350813737: {'path': 'temp/1744212178_2091690_1350813737_5a2501e82e65062879bb60c08a8b1d4d.jpg', 'extension': 'jpg'}, 1350813741: {'path': 'temp/1744212178_2091690_1350813741_cc7f4fde875b378565abcc891412b606.jpg', 'extension': 'jpg'}, 1350813785: {'path': 'temp/1744212178_2091690_1350813785_b92b4dff6699d5c09aa5da16dbee1b54.jpg', 'extension': 'jpg'}, 1350813719: {'path': 'temp/1744212178_2091690_1350813719_0ca3590c8f7d42240606114f9526ae3c.jpg', 'extension': 'jpg'}, 1350813727: {'path': 'temp/1744212178_2091690_1350813727_2efdbd267f28cc95de12795af0776663.jpg', 'extension': 'jpg'}, 1350813735: {'path': 'temp/1744212178_2091690_1350813735_eae684d3119a20cdd33512868ec6a013.jpg', 'extension': 'jpg'}} map_subphoto_mainphoto : {} begin split time score SELECT app_name, token FROM MTRUser.mtr_app_api_token WHERE mtr_user_id=979 AND app_name="token_split_time_score" AND expire_at > NOW() select distinct dp.name from MTRPhoto.dashboard_entry_day ded, MTRPhoto.dashboard_places dp, MTRPhoto.dashboard_results dr where ded.dashboard_place_id = dp.id and ded.last_run_id = dr.dashboard_run_id and dp.id = ded.dashboard_place_id and dr.mtr_portfolio_id = 22171067; (('arc_en_ciel_jrm',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 22171067 group by h (('17', 28),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22171067 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 100000 SELECT cps.photo_id, cps.score, h.hashtag, cps.hashtag_id, mpp1.mtr_portfolio_id FROM MTRPhoto.class_photo_score cps, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp1 where mpp1.mtr_photo_id=cps.photo_id AND h.hashtag_id=cps.hashtag_id AND mpp1.hide_status=0 AND mpp1.mtr_portfolio_id in (22171067) AND cps.thcl in (861) order by cps.score desc LIMIT 0, 100000 SELECT cps.photo_id, cps.score, h.hashtag, cps.hashtag_id, mpp1.mtr_portfolio_id FROM MTRPhoto.class_photo_score cps, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp1 where mpp1.mtr_photo_id=cps.photo_id AND h.hashtag_id=cps.hashtag_id AND mpp1.hide_status=0 AND mpp1.mtr_portfolio_id in (22171067) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 09042025 22171067 Nombre de photos uploadées : 28 / 23040 (0%) 09042025 22171067 Nombre de photos taguées (types de déchets): 0 / 28 (0%) 09042025 22171067 Nombre de photos taguées (volume) : 0 / 28 (0%) [{'photo_id': 1350812775, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/6bfca40d339956d5e110374ff9766300.jpg', 'username': None, 'uploaded_at': 1744211768, 'text': 'image_09042025_17_15_14_10140.jpg'}, {'photo_id': 1350812755, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/523086926dc263cf977c4becb7e317ba.jpg', 'username': None, 'uploaded_at': 1744211768, 'text': 'image_09042025_17_15_34_10134.jpg'}, {'photo_id': 1350812721, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/972d3f46ebc9c0ca87193f38f0386e8e.jpg', 'username': None, 'uploaded_at': 1744211768, 'text': 'image_09042025_17_15_44_10138.jpg'}, {'photo_id': 1350813007, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/39bb8286ecdf50e744c1df79310ae1e2.jpg', 'username': None, 'uploaded_at': 1744211827, 'text': 'image_09042025_17_15_54_10136.jpg'}] 0 [] elapsed_time : load_data_split_time_score 4.5299530029296875e-06 elapsed_time : order_list_meta_photo_and_scores 1.1444091796875e-05 ???????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0009028911590576172 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22171067, '2025-04-09' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1725367,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02988910675048828 We will return after consolidate but for now we need the day, how to get it, for now depending on the previous heavy steps SELECT dri.dashboard_entry_day, dr.dashboard_run_id, dr.mtr_portfolio_id, dr.id, dr.hashtag, dr.completion_json FROM MTRPhoto.dashboard_results dr, MTRPhoto.dashboard_run_ids dri, MTRPhoto.dashboard_entry_day ded WHERE ded.id= 1725367 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1725367, 'dashboard_run_id': 1734441, 'mtr_portfolio_id': 22169145, 'dashboard_result_id': 9949823, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22169145_09-04-2025_16_47_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22169148, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22169149, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22169150, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22169151, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22169152, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22169153, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22169154, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22169155, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22169156, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22169157, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22169158, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22169159, 'pht': 3726}}"}, {'dashboat_entry_day': 1725367, 'dashboard_run_id': 1734441, 'mtr_portfolio_id': 22169729, 'dashboard_result_id': 9949824, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22169729_09-04-2025_17_03_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22169731, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22169732, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22169733, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22169734, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22169735, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22169736, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22169737, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22169738, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22169739, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22169740, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22169741, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22169742, 'pht': 3726}}"}, {'dashboat_entry_day': 1725367, 'dashboard_run_id': 1734441, 'mtr_portfolio_id': 22170261, 'dashboard_result_id': 9949825, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22170261_09-04-2025_17_16_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22170265, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22170266, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22170267, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22170268, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22170269, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22170270, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22170271, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22170272, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22170273, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22170274, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22170275, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22170276, 'pht': 3726}}"}, {'dashboat_entry_day': 1725367, 'dashboard_run_id': 1734441, 'mtr_portfolio_id': 22171067, 'dashboard_result_id': 9949826, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22171067_09-04-2025_17_21_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22171070, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22171071, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22171072, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22171073, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22171074, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22171075, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22171076, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22171077, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22171078, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22171079, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22171080, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22171081, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22169145 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 2735109, 'mtr_portfolio_id': 22169145, 'created_at': datetime.datetime(2025, 4, 9, 16, 46, 59), 'result': '0.055186380128222544', 'result_long': None, 'result_double': None}] Qualite : 0.055186380128222544 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22169145 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22169145_09-04-2025_16_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22169145 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22169145_09-04-2025_16_47_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22169148, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22169149, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22169150, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22169151, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22169152, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22169153, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22169154, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22169155, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22169156, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22169157, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22169158, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22169159, 'pht': 3726}}" where mtr_portfolio_id = 22169145 and dashboard_run_id = 1734441 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22169145 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9949823, 0.055186380128222544, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22169145_09-04-2025_16_47_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22169148, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22169149, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22169150, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22169151, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22169152, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22169153, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22169154, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22169155, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22169156, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22169157, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22169158, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22169159, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22169729 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 2735157, 'mtr_portfolio_id': 22169729, 'created_at': datetime.datetime(2025, 4, 9, 17, 3, 1), 'result': '0.0316658460851503', 'result_long': None, 'result_double': None}] Qualite : 0.0316658460851503 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22169729 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22169729_09-04-2025_17_03_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22169729 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22169729_09-04-2025_17_03_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22169731, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22169732, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22169733, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22169734, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22169735, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22169736, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22169737, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22169738, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22169739, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22169740, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22169741, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22169742, 'pht': 3726}}" where mtr_portfolio_id = 22169729 and dashboard_run_id = 1734441 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22169729 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9949824, 0.0316658460851503, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22169729_09-04-2025_17_03_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22169731, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22169732, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22169733, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22169734, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22169735, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22169736, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22169737, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22169738, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22169739, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22169740, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22169741, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22169742, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22170261 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 2735384, 'mtr_portfolio_id': 22170261, 'created_at': datetime.datetime(2025, 4, 9, 17, 16, 57), 'result': '0.04335095824096905', 'result_long': None, 'result_double': None}] Qualite : 0.04335095824096905 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22170261 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22170261_09-04-2025_17_16_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22170261 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22170261_09-04-2025_17_16_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22170265, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22170266, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22170267, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22170268, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22170269, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22170270, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22170271, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22170272, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22170273, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22170274, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22170275, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22170276, 'pht': 3726}}" where mtr_portfolio_id = 22170261 and dashboard_run_id = 1734441 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22170261 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9949825, 0.04335095824096905, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22170261_09-04-2025_17_16_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22170265, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22170266, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22170267, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22170268, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22170269, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22170270, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22170271, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22170272, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22170273, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22170274, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22170275, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22170276, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22171067 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 2735440, 'mtr_portfolio_id': 22171067, 'created_at': datetime.datetime(2025, 4, 9, 17, 22, 57), 'result': '0.03308658172615063', 'result_long': None, 'result_double': None}] Qualite : 0.03308658172615063 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22171067 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22171067_09-04-2025_17_22_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22171067 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22171067_09-04-2025_17_22_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22171070, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22171071, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22171072, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22171073, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22171074, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22171075, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22171076, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22171077, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22171078, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22171079, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22171080, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22171081, 'pht': 3726}}" where mtr_portfolio_id = 22171067 and dashboard_run_id = 1734441 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22171067 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9949826, 0.03308658172615063, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22171067_09-04-2025_17_22_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22171070, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22171071, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22171072, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22171073, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22171074, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22171075, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22171076, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22171077, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22171078, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22171079, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22171080, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22171081, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22169145,22169729,22170261,22171067) result : ((1350803133,), (1350803136,), (1350803141,), (1350803144,), (1350803218,), (1350803221,), (1350803224,), (1350803227,), (1350803233,), (1350803268,), (1350803273,), (1350803276,), (1350803281,), (1350803287,), (1350803293,), (1350803336,), (1350803729,), (1350803731,), (1350804031,), (1350804036,), (1350804039,), (1350804041,), (1350804044,), (1350804049,), (1350804203,), (1350804206,), (1350804210,), (1350804213,), (1350804226,), (1350804317,), (1350804321,), (1350804331,), (1350804392,), (1350804395,), (1350804398,), (1350804400,), (1350804405,), (1350804411,), (1350804440,), (1350804448,), (1350804460,), (1350804471,), (1350804480,), (1350804923,), (1350804841,), (1350804855,), (1350805347,), (1350805350,), (1350805353,), (1350805383,), (1350805432,), (1350805452,), (1350805569,), (1350805575,), (1350805580,), (1350805597,), (1350805609,), (1350805673,), (1350805678,), (1350805693,), (1350805694,), (1350805758,), (1350805763,), (1350805766,), (1350805792,), (1350805795,), (1350805827,), (1350805837,), (1350805875,), (1350805909,), (1350806005,), (1350806034,), (1350806292,), (1350806333,), (1350806360,), (1350806391,), (1350806575,), (1350806581,), (1350806583,), (1350806588,), (1350806591,), (1350806623,), (1350806627,), (1350806633,), (1350806640,), (1350806683,), (1350806688,), (1350806692,), (1350806698,), (1350806702,), (1350806706,), (1350806793,), (1350806806,), (1350806819,), (1350806831,), (1350806950,), (1350806958,), (1350806997,), (1350807028,), (1350807148,), (1350807149,), (1350807177,), (1350807178,), (1350807207,), (1350807218,), (1350807259,), (1350807389,), (1350807529,), (1350807500,), (1350807913,), (1350807945,), (1350807985,), (1350808029,), (1350808061,), (1350808615,), (1350808682,), (1350808804,), (1350808862,), (1350809370,), (1350809441,), (1350809480,), (1350809904,), (1350809935,), (1350809961,), (1350809986,), (1350810328,), (1350810401,), (1350810459,), (1350810503,), (1350810745,), (1350810781,), (1350810809,), (1350810832,), (1350810860,), (1350811014,), (1350811054,), (1350811106,), (1350811481,), (1350811504,), (1350811530,), (1350811566,), (1350811606,), (1350811634,), (1350811797,), (1350811807,), (1350811818,), (1350811863,), (1350812100,), (1350812104,), (1350812107,), (1350812111,), (1350812216,), (1350812232,), (1350812240,), (1350812243,), (1350812248,), (1350812470,), (1350812473,), (1350812515,), (1350812535,), (1350812538,), (1350812576,), (1350812580,), (1350812585,), (1350812645,), (1350812647,), (1350812649,), (1350812652,), (1350812657,), (1350812668,), (1350812802,), (1350812721,), (1350812755,), (1350812775,), (1350812983,), (1350813005,), (1350813007,), (1350813256,), (1350813285,), (1350813301,), (1350813310,), (1350813336,), (1350813344,), (1350813438,), (1350813440,), (1350813459,), (1350813482,), (1350813506,), (1350813533,), (1350813719,), (1350813727,), (1350813735,), (1350813737,), (1350813741,), (1350813785,), (1350813787,), (1350813789,), (1350813805,), (1350813815,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'09042025': {'nb_upload': 28, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22171067]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1350813815, 1350813805, 1350813789, 1350813787, 1350813785, 1350813741, 1350813737, 1350813735, 1350813727, 1350813719] map_info['map_portfolio_photo'] : {22171067: [1350813815, 1350813805, 1350813789, 1350813787, 1350813785, 1350813741, 1350813737, 1350813735, 1350813727, 1350813719, 1350813533, 1350813506, 1350813482, 1350813459, 1350813440, 1350813438, 1350813344, 1350813336, 1350813310, 1350813301, 1350813285, 1350813256, 1350813007, 1350813005, 1350812983, 1350812775, 1350812755, 1350812721]} final : True mtd_id 4302 list_pids : [1350813815, 1350813805, 1350813789, 1350813787, 1350813785, 1350813741, 1350813737, 1350813735, 1350813727, 1350813719] Looping around the photos to save general results len do output : 1 /22171067Didn't retrieve data . before output type Here is an output not treated by saveGeneral : Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813815', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813805', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813789', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813787', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813785', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813741', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813737', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813735', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813727', None, None, None, None, None, '2735440') ('4302', None, None, None, None, None, None, None, '2735440') ('4302', '22171067', '1350813719', None, None, None, None, None, '2735440') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22171067', 'None', None, None, None, None, '2735440'), ('4302', '22171067', '1350813815', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813805', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813789', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813787', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813785', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813741', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813737', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813735', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813727', None, None, None, None, None, '2735440'), ('4302', '22171067', '1350813719', None, None, None, None, None, '2735440')] time used for this insertion : 0.014178991317749023 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.44341015815734863 time spend to save output : 0.014433145523071289 total time spend for step 5 : 0.4578433036804199 caffe_path_current : About to save ! 2 After save, about to update current ! ret : 2 len(input) + len(total_photo_id_missing) : 1 set_done_treatment DELETE from MTRPhoto.mtr_datou_current where id in (2735440) 2.28user 2.23system 0:09.76elapsed 46%CPU (0avgtext+0avgdata 159604maxresident)k 1672inputs+7688outputs (31major+74639minor)pagefaults 0swaps