result : ((1361426135,), (1361426139,), (1361426142,), (1361426146,), (1361426147,), (1361426179,), (1361426181,), (1361426182,), (1361426183,), (1361426184,), (1361426185,), (1361426199,), (1361426201,), (1361426203,), (1361426204,), (1361426219,), (1361426220,), (1361426226,), (1361426232,), (1361426248,), (1361426249,), (1361426255,), (1361426258,), (1361426259,), (1361426260,), (1361426278,), (1361426281,), (1361426284,), (1361426285,), (1361426301,), (1361426313,), (1361426340,), (1361426366,), (1361426381,), (1361426390,), (1361426479,), (1361426480,), (1361426484,), (1361426491,)) 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 23400775 , 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=23400761 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 (23400775) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23400761) result : ((1361426135,), (1361426139,), (1361426142,), (1361426146,), (1361426147,), (1361426179,), (1361426181,), (1361426182,), (1361426183,), (1361426184,), (1361426185,), (1361426199,), (1361426201,), (1361426203,), (1361426204,), (1361426219,), (1361426220,), (1361426226,), (1361426232,), (1361426248,), (1361426249,), (1361426255,), (1361426258,), (1361426259,), (1361426260,), (1361426278,), (1361426281,), (1361426284,), (1361426285,), (1361426301,), (1361426313,), (1361426340,), (1361426366,), (1361426381,), (1361426390,), (1361426479,), (1361426480,), (1361426484,), (1361426491,)) 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 23400776 , 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=23400761 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='plastique' 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 (23400776) result : ((1361426388,), (1361426389,), (1361426391,), (1361426488,), (1361426489,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23400761) result : ((1361426135,), (1361426139,), (1361426142,), (1361426146,), (1361426147,), (1361426179,), (1361426181,), (1361426182,), (1361426183,), (1361426184,), (1361426185,), (1361426199,), (1361426201,), (1361426203,), (1361426204,), (1361426219,), (1361426220,), (1361426226,), (1361426232,), (1361426248,), (1361426249,), (1361426255,), (1361426258,), (1361426259,), (1361426260,), (1361426278,), (1361426281,), (1361426284,), (1361426285,), (1361426301,), (1361426313,), (1361426340,), (1361426366,), (1361426381,), (1361426390,), (1361426479,), (1361426480,), (1361426484,), (1361426491,)) 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 23400777 , 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=23400761 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 (23400777) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23400761) result : ((1361426135,), (1361426139,), (1361426142,), (1361426146,), (1361426147,), (1361426179,), (1361426181,), (1361426182,), (1361426183,), (1361426184,), (1361426185,), (1361426199,), (1361426201,), (1361426203,), (1361426204,), (1361426219,), (1361426220,), (1361426226,), (1361426232,), (1361426248,), (1361426249,), (1361426255,), (1361426258,), (1361426259,), (1361426260,), (1361426278,), (1361426281,), (1361426284,), (1361426285,), (1361426301,), (1361426313,), (1361426340,), (1361426366,), (1361426381,), (1361426390,), (1361426479,), (1361426480,), (1361426484,), (1361426491,)) 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 23400778 , 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=23400761 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 (23400778) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23400761) result : ((1361426135,), (1361426139,), (1361426142,), (1361426146,), (1361426147,), (1361426179,), (1361426181,), (1361426182,), (1361426183,), (1361426184,), (1361426185,), (1361426199,), (1361426201,), (1361426203,), (1361426204,), (1361426219,), (1361426220,), (1361426226,), (1361426232,), (1361426248,), (1361426249,), (1361426255,), (1361426258,), (1361426259,), (1361426260,), (1361426278,), (1361426281,), (1361426284,), (1361426285,), (1361426301,), (1361426313,), (1361426340,), (1361426366,), (1361426381,), (1361426390,), (1361426479,), (1361426480,), (1361426484,), (1361426491,)) 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 23400779 , 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=23400761 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 (23400779) result : ((1361426283,), (1361426490,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23400761) result : ((1361426135,), (1361426139,), (1361426142,), (1361426146,), (1361426147,), (1361426179,), (1361426181,), (1361426182,), (1361426183,), (1361426184,), (1361426185,), (1361426199,), (1361426201,), (1361426203,), (1361426204,), (1361426219,), (1361426220,), (1361426226,), (1361426232,), (1361426248,), (1361426249,), (1361426255,), (1361426258,), (1361426259,), (1361426260,), (1361426278,), (1361426281,), (1361426284,), (1361426285,), (1361426301,), (1361426313,), (1361426340,), (1361426366,), (1361426381,), (1361426390,), (1361426479,), (1361426480,), (1361426484,), (1361426491,)) 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 23400780 , 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=23400761 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='autre_refus' 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 (23400780) result : ((1361426377,), (1361426378,), (1361426483,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23400761) result : ((1361426135,), (1361426139,), (1361426142,), (1361426146,), (1361426147,), (1361426179,), (1361426181,), (1361426182,), (1361426183,), (1361426184,), (1361426185,), (1361426199,), (1361426201,), (1361426203,), (1361426204,), (1361426219,), (1361426220,), (1361426226,), (1361426232,), (1361426248,), (1361426249,), (1361426255,), (1361426258,), (1361426259,), (1361426260,), (1361426278,), (1361426281,), (1361426284,), (1361426285,), (1361426301,), (1361426313,), (1361426340,), (1361426366,), (1361426381,), (1361426390,), (1361426479,), (1361426480,), (1361426484,), (1361426491,)) 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 23400781 , 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=23400761 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 (23400781) result : ((1361426250,), (1361426251,), (1361426252,), (1361426374,), (1361426481,), (1361426482,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23400761) result : ((1361426135,), (1361426139,), (1361426142,), (1361426146,), (1361426147,), (1361426179,), (1361426181,), (1361426182,), (1361426183,), (1361426184,), (1361426185,), (1361426199,), (1361426201,), (1361426203,), (1361426204,), (1361426219,), (1361426220,), (1361426226,), (1361426232,), (1361426248,), (1361426249,), (1361426255,), (1361426258,), (1361426259,), (1361426260,), (1361426278,), (1361426281,), (1361426284,), (1361426285,), (1361426301,), (1361426313,), (1361426340,), (1361426366,), (1361426381,), (1361426390,), (1361426479,), (1361426480,), (1361426484,), (1361426491,)) 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`=23400761 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','Teint_Dans_La_Masse','plastique','environnement','papier','flou','cartonnette','metal','Carton_gris','Carton_brun','autre_refus','kraft')) 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`=23400761 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','Teint_Dans_La_Masse','plastique','environnement','papier','flou','cartonnette','metal','Carton_gris','Carton_brun','autre_refus','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_brun': {'main_port_id': 23400761, 'sub_port_id': 23400782, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15612546, 'last_updated_at': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 28, 2, 43, 30)}, 'cartonnette': {'main_port_id': 23400761, 'sub_port_id': 23400783, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15612547, 'last_updated_at': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 28, 2, 43, 30)}, 'Carton_gris': {'main_port_id': 23400761, 'sub_port_id': 23400784, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15612548, 'last_updated_at': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 28, 2, 43, 30)}, 'mal_croppe': {'main_port_id': 23400761, 'sub_port_id': 23400785, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15612549, 'last_updated_at': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 28, 2, 43, 30)}, 'environnement': {'main_port_id': 23400761, 'sub_port_id': 23400786, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15612550, 'last_updated_at': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 28, 2, 43, 30)}, 'flou': {'main_port_id': 23400761, 'sub_port_id': 23400787, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15612551, 'last_updated_at': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 28, 2, 43, 30)}, 'plastique': {'main_port_id': 23400761, 'sub_port_id': 23400788, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15612552, 'last_updated_at': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 28, 2, 43, 30)}, 'metal': {'main_port_id': 23400761, 'sub_port_id': 23400789, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15612553, 'last_updated_at': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 28, 2, 43, 30)}, 'papier': {'main_port_id': 23400761, 'sub_port_id': 23400790, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15612554, 'last_updated_at': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 28, 2, 43, 30)}, 'kraft': {'main_port_id': 23400761, 'sub_port_id': 23400791, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15612555, 'last_updated_at': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 28, 2, 43, 30)}, 'autre_refus': {'main_port_id': 23400761, 'sub_port_id': 23400792, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15612556, 'last_updated_at': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 28, 2, 43, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 28, 2, 43, 30)}, 'Teint_Dans_La_Masse': {'main_port_id': 23400761, 'sub_port_id': 23400793, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15612557, 'last_updated_at': datetime.datetime(2025, 5, 28, 2, 46, 57), 'last_updated_at_desc': datetime.datetime(2025, 5, 28, 2, 46, 57), 'last_updated_at_asc': datetime.datetime(2025, 5, 28, 2, 43, 30)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23400782,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23400770 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23400783,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23400771 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23400784,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23400772 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23400785,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23400773 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23400786,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23400774 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23400787,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23400775 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23400788,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23400776 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23400789,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23400777 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23400790,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23400778 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23400791,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23400779 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23400792,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23400780 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23400793,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23400781 lien utilise dans velours : https://www.fotonower.com/velours/23400782,23400783,23400784,23400785,23400786,23400787,23400788,23400789,23400790,23400791,23400792,23400793?tags=Carton_brun,cartonnette,Carton_gris,mal_croppe,environnement,flou,plastique,metal,papier,kraft,autre_refus,Teint_Dans_La_Masse After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23400761]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1361426491, 1361426484, 1361426480, 1361426479, 1361426390, 1361426381, 1361426366, 1361426340, 1361426313, 1361426301] map_info['map_portfolio_photo'] : {23400761: [1361426491, 1361426484, 1361426480, 1361426479, 1361426390, 1361426381, 1361426366, 1361426340, 1361426313, 1361426301, 1361426285, 1361426284, 1361426281, 1361426278, 1361426260, 1361426259, 1361426258, 1361426255, 1361426249, 1361426248, 1361426232, 1361426226, 1361426220, 1361426219, 1361426204, 1361426203, 1361426201, 1361426199, 1361426185, 1361426184, 1361426183, 1361426182, 1361426181, 1361426179, 1361426147, 1361426146, 1361426142, 1361426139, 1361426135]} final : False mtd_id 4302 list_pids : [1361426491, 1361426484, 1361426480, 1361426479, 1361426390, 1361426381, 1361426366, 1361426340, 1361426313, 1361426301] Looping around the photos to save general results len do output : 1 /23400761. 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, '2971689') ('4302', '23400761', '1361426491', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426484', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426480', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426479', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426390', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426381', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426366', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426340', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426313', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426301', None, None, None, None, None, '2971689') 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, '23400761', "{'Carton_brun': 23400770, 'cartonnette': 23400771, 'Carton_gris': 23400772, 'mal_croppe': 23400773, 'environnement': 23400774, 'flou': 23400775, 'plastique': 23400776, 'metal': 23400777, 'papier': 23400778, 'kraft': 23400779, 'autre_refus': 23400780, 'Teint_Dans_La_Masse': 23400781}", None, None, None, None, '2971689'), ('4302', '23400761', '1361426491', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426484', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426480', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426479', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426390', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426381', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426366', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426340', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426313', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426301', None, None, None, None, None, '2971689')] time used for this insertion : 0.013872861862182617 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4648828506469727 time spend to save output : 0.014213085174560547 total time spend for step 1 : 1.4790959358215332 step2:final Wed May 28 02:48:31 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 (23400761) 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 23400761 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1361426147,1361426146,1361426142,1361426139,1361426135,1361426185,1361426184,1361426183,1361426182,1361426181,1361426179,1361426204,1361426203,1361426201,1361426199,1361426232,1361426226,1361426220,1361426219,1361426260,1361426259,1361426258,1361426255,1361426249,1361426248,1361426285,1361426284,1361426281,1361426278,1361426390,1361426381,1361426366,1361426340,1361426313,1361426301,1361426491,1361426484,1361426480,1361426479); 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([23400761]) Inside saveOutput : final : False verbose : True original output for save of step final : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ('0.05029741165688222',), 1361426381: ('0.05029741165688222',), 1361426366: ('0.05029741165688222',), 1361426340: ('0.05029741165688222',), 1361426313: ('0.05029741165688222',), 1361426301: ('0.05029741165688222',)} new output for save of step final : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ('0.05029741165688222',), 1361426381: ('0.05029741165688222',), 1361426366: ('0.05029741165688222',), 1361426340: ('0.05029741165688222',), 1361426313: ('0.05029741165688222',), 1361426301: ('0.05029741165688222',)} [1361426491, 1361426484, 1361426480, 1361426479, 1361426390, 1361426381, 1361426366, 1361426340, 1361426313, 1361426301] map_info['map_portfolio_photo'] : {23400761: [1361426491, 1361426484, 1361426480, 1361426479, 1361426390, 1361426381, 1361426366, 1361426340, 1361426313, 1361426301, 1361426285, 1361426284, 1361426281, 1361426278, 1361426260, 1361426259, 1361426258, 1361426255, 1361426249, 1361426248, 1361426232, 1361426226, 1361426220, 1361426219, 1361426204, 1361426203, 1361426201, 1361426199, 1361426185, 1361426184, 1361426183, 1361426182, 1361426181, 1361426179, 1361426147, 1361426146, 1361426142, 1361426139, 1361426135]} final : False mtd_id 4302 list_pids : [1361426491, 1361426484, 1361426480, 1361426479, 1361426390, 1361426381, 1361426366, 1361426340, 1361426313, 1361426301] Looping around the photos to save general results len do output : 10 /1361426491.Didn't retrieve data . /1361426484.Didn't retrieve data . /1361426480.Didn't retrieve data . /1361426479.Didn't retrieve data . /1361426390.Didn't retrieve data . /1361426381.Didn't retrieve data . /1361426366.Didn't retrieve data . /1361426340.Didn't retrieve data . /1361426313.Didn't retrieve data . /1361426301.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, '2971689') ('4302', '23400761', '1361426491', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426484', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426480', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426479', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426390', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426381', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426366', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426340', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426313', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426301', None, None, None, None, None, '2971689') 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', '23400761', '1361426491', '0.05029741165688222', None, None, None, None, '2971689'), ('4302', '23400761', '1361426484', '0.05029741165688222', None, None, None, None, '2971689'), ('4302', '23400761', '1361426480', '0.05029741165688222', None, None, None, None, '2971689'), ('4302', '23400761', '1361426479', '0.05029741165688222', None, None, None, None, '2971689'), ('4302', '23400761', '1361426390', '0.05029741165688222', None, None, None, None, '2971689'), ('4302', '23400761', '1361426381', '0.05029741165688222', None, None, None, None, '2971689'), ('4302', '23400761', '1361426366', '0.05029741165688222', None, None, None, None, '2971689'), ('4302', '23400761', '1361426340', '0.05029741165688222', None, None, None, None, '2971689'), ('4302', '23400761', '1361426313', '0.05029741165688222', None, None, None, None, '2971689'), ('4302', '23400761', '1361426301', '0.05029741165688222', None, None, None, None, '2971689')] time used for this insertion : 0.013356447219848633 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07016539573669434 time spend to save output : 0.013871192932128906 total time spend for step 2 : 0.08403658866882324 step3:velours_tree Wed May 28 02:48:31 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 : {23400761: [{'Carton_brun': 23400770, 'cartonnette': 23400771, 'Carton_gris': 23400772, 'mal_croppe': 23400773, 'environnement': 23400774, 'flou': 23400775, 'plastique': 23400776, 'metal': 23400777, 'papier': 23400778, 'kraft': 23400779, 'autre_refus': 23400780, 'Teint_Dans_La_Masse': 23400781}]} input_args_next_step : {23400761: ()} output_args : {23400761: [{'Carton_brun': 23400770, 'cartonnette': 23400771, 'Carton_gris': 23400772, 'mal_croppe': 23400773, 'environnement': 23400774, 'flou': 23400775, 'plastique': 23400776, 'metal': 23400777, 'papier': 23400778, 'kraft': 23400779, 'autre_refus': 23400780, 'Teint_Dans_La_Masse': 23400781}]} args : 23400761 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 : ({'Carton_brun': 23400770, 'cartonnette': 23400771, 'Carton_gris': 23400772, 'mal_croppe': 23400773, 'environnement': 23400774, 'flou': 23400775, 'plastique': 23400776, 'metal': 23400777, 'papier': 23400778, 'kraft': 23400779, 'autre_refus': 23400780, 'Teint_Dans_La_Masse': 23400781},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23400761) 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([23400761]) 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.3185248374938965 time spend to save output : 7.43865966796875e-05 total time spend for step 3 : 0.31859922409057617 step4:send_mail_cod Wed May 28 02:48:31 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 : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ('0.05029741165688222',), 1361426381: ('0.05029741165688222',), 1361426366: ('0.05029741165688222',), 1361426340: ('0.05029741165688222',), 1361426313: ('0.05029741165688222',), 1361426301: ('0.05029741165688222',)} input_args_next_step : {1361426491: ()} output_args : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ('0.05029741165688222',), 1361426381: ('0.05029741165688222',), 1361426366: ('0.05029741165688222',), 1361426340: ('0.05029741165688222',), 1361426313: ('0.05029741165688222',), 1361426301: ('0.05029741165688222',)} args : 1361426491 depend.output_id : 0 input_args_next_step : {1361426491: ('0.05029741165688222',), 1361426484: ()} output_args : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ('0.05029741165688222',), 1361426381: ('0.05029741165688222',), 1361426366: ('0.05029741165688222',), 1361426340: ('0.05029741165688222',), 1361426313: ('0.05029741165688222',), 1361426301: ('0.05029741165688222',)} args : 1361426484 depend.output_id : 0 input_args_next_step : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ()} output_args : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ('0.05029741165688222',), 1361426381: ('0.05029741165688222',), 1361426366: ('0.05029741165688222',), 1361426340: ('0.05029741165688222',), 1361426313: ('0.05029741165688222',), 1361426301: ('0.05029741165688222',)} args : 1361426480 depend.output_id : 0 input_args_next_step : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ()} output_args : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ('0.05029741165688222',), 1361426381: ('0.05029741165688222',), 1361426366: ('0.05029741165688222',), 1361426340: ('0.05029741165688222',), 1361426313: ('0.05029741165688222',), 1361426301: ('0.05029741165688222',)} args : 1361426479 depend.output_id : 0 input_args_next_step : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ()} output_args : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ('0.05029741165688222',), 1361426381: ('0.05029741165688222',), 1361426366: ('0.05029741165688222',), 1361426340: ('0.05029741165688222',), 1361426313: ('0.05029741165688222',), 1361426301: ('0.05029741165688222',)} args : 1361426390 depend.output_id : 0 input_args_next_step : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ('0.05029741165688222',), 1361426381: ()} output_args : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ('0.05029741165688222',), 1361426381: ('0.05029741165688222',), 1361426366: ('0.05029741165688222',), 1361426340: ('0.05029741165688222',), 1361426313: ('0.05029741165688222',), 1361426301: ('0.05029741165688222',)} args : 1361426381 depend.output_id : 0 input_args_next_step : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ('0.05029741165688222',), 1361426381: ('0.05029741165688222',), 1361426366: ()} output_args : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ('0.05029741165688222',), 1361426381: ('0.05029741165688222',), 1361426366: ('0.05029741165688222',), 1361426340: ('0.05029741165688222',), 1361426313: ('0.05029741165688222',), 1361426301: ('0.05029741165688222',)} args : 1361426366 depend.output_id : 0 input_args_next_step : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ('0.05029741165688222',), 1361426381: ('0.05029741165688222',), 1361426366: ('0.05029741165688222',), 1361426340: ()} output_args : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ('0.05029741165688222',), 1361426381: ('0.05029741165688222',), 1361426366: ('0.05029741165688222',), 1361426340: ('0.05029741165688222',), 1361426313: ('0.05029741165688222',), 1361426301: ('0.05029741165688222',)} args : 1361426340 depend.output_id : 0 input_args_next_step : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ('0.05029741165688222',), 1361426381: ('0.05029741165688222',), 1361426366: ('0.05029741165688222',), 1361426340: ('0.05029741165688222',), 1361426313: ()} output_args : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ('0.05029741165688222',), 1361426381: ('0.05029741165688222',), 1361426366: ('0.05029741165688222',), 1361426340: ('0.05029741165688222',), 1361426313: ('0.05029741165688222',), 1361426301: ('0.05029741165688222',)} args : 1361426313 depend.output_id : 0 input_args_next_step : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ('0.05029741165688222',), 1361426381: ('0.05029741165688222',), 1361426366: ('0.05029741165688222',), 1361426340: ('0.05029741165688222',), 1361426313: ('0.05029741165688222',), 1361426301: ()} output_args : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ('0.05029741165688222',), 1361426381: ('0.05029741165688222',), 1361426366: ('0.05029741165688222',), 1361426340: ('0.05029741165688222',), 1361426313: ('0.05029741165688222',), 1361426301: ('0.05029741165688222',)} args : 1361426301 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 : {23400761: [{'Carton_brun': 23400770, 'cartonnette': 23400771, 'Carton_gris': 23400772, 'mal_croppe': 23400773, 'environnement': 23400774, 'flou': 23400775, 'plastique': 23400776, 'metal': 23400777, 'papier': 23400778, 'kraft': 23400779, 'autre_refus': 23400780, 'Teint_Dans_La_Masse': 23400781}]} input_args_next_step : {1361426491: ('0.05029741165688222',), 1361426484: ('0.05029741165688222',), 1361426480: ('0.05029741165688222',), 1361426479: ('0.05029741165688222',), 1361426390: ('0.05029741165688222',), 1361426381: ('0.05029741165688222',), 1361426366: ('0.05029741165688222',), 1361426340: ('0.05029741165688222',), 1361426313: ('0.05029741165688222',), 1361426301: ('0.05029741165688222',), 23400761: ()} output_args : {23400761: [{'Carton_brun': 23400770, 'cartonnette': 23400771, 'Carton_gris': 23400772, 'mal_croppe': 23400773, 'environnement': 23400774, 'flou': 23400775, 'plastique': 23400776, 'metal': 23400777, 'papier': 23400778, 'kraft': 23400779, 'autre_refus': 23400780, 'Teint_Dans_La_Masse': 23400781}]} args : 23400761 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.05029741165688222',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23400761) 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 (1361426491,1361426484,1361426480,1361426479,1361426390,1361426381,1361426366,1361426340,1361426313,1361426301) Found this number of photos: 10 ##### Call download_photos : nb_thread : 5 begin to download photo : 1361426301 begin to download photo : 1361426366 begin to download photo : 1361426479 begin to download photo : 1361426491 download finish for photo 1361426491 download finish for photo 1361426301 begin to download photo : 1361426313 download finish for photo 1361426479 begin to download photo : 1361426480 download finish for photo 1361426366 begin to download photo : 1361426381 download finish for photo 1361426313 begin to download photo : 1361426340 download finish for photo 1361426480 begin to download photo : 1361426484 download finish for photo 1361426381 begin to download photo : 1361426390 download finish for photo 1361426340 download finish for photo 1361426484 download finish for photo 1361426390 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_P23400761_28-05-2025_02_48_31.pdf 23400771 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=23400771 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1361426256: '1748393065_536516_1361426147_cb3bbbeeb8ca1b7d64ad6538756d05a9_rle_crop_3814640368_0.png', 1361426280: '1748393127_539154_1361426201_87868316400a05c6851f8a5d8de956c4_rle_crop_3814640503_0.png', 1361426382: '1748393187_543314_1361426183_d6386979b10d856526db8c75d0667326_rle_crop_3814641722_0.png', 1361426383: '1748393187_543314_1361426182_b9867047964cc231e505f416d02e0600_rle_crop_3814641738_0.png', 1361426384: '1748393187_543314_1361426181_1f4ba59c3831c641b94bcdf1c092a800_rle_crop_3814641754_0.png', 1361426385: '1748393187_543314_1361426179_34ae5e9ca0edd63cc24a55bd055f3a40_rle_crop_3814641767_0.png', 1361426386: '1748393187_543314_1361426179_34ae5e9ca0edd63cc24a55bd055f3a40_rle_crop_3814641769_0.png', 1361426486: '1748393246_544856_1361426220_d9b788fbdbb4de0232dfd5531214c4ae_rle_crop_3814641930_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/e04225628cce8126fe183108e8b2b6aa_76034906.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/2e01f6372d1442912d6f1188beabcee6_77034258.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/cde1203516ceedfd7f8f8579dbfb97ba_39782385.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/28f0f10a0c8d0619c26e08718559dbf1_44073784.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/5dd96144b1554561ab30d1153a69b049_14289980.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/d1846befea5b35338b2df66c17473eca_86462264.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/9a664401e146bb03069b68709e78727d_23003726.png change filename to text .imagette234007711748393311/ imagette234007711748393311/1748393246_544856_1361426220_d9b788fbdbb4de0232dfd5531214c4ae_rle_crop_3814641930_0.png.png imagette234007711748393311/1748393065_536516_1361426147_cb3bbbeeb8ca1b7d64ad6538756d05a9_rle_crop_3814640368_0.png.png imagette234007711748393311/1748393187_543314_1361426182_b9867047964cc231e505f416d02e0600_rle_crop_3814641738_0.png.png imagette234007711748393311/1748393187_543314_1361426179_34ae5e9ca0edd63cc24a55bd055f3a40_rle_crop_3814641767_0.png.png imagette234007711748393311/1748393187_543314_1361426183_d6386979b10d856526db8c75d0667326_rle_crop_3814641722_0.png.png imagette234007711748393311/1748393127_539154_1361426201_87868316400a05c6851f8a5d8de956c4_rle_crop_3814640503_0.png.png imagette234007711748393311/1748393187_543314_1361426179_34ae5e9ca0edd63cc24a55bd055f3a40_rle_crop_3814641769_0.png.png imagette234007711748393311/1748393187_543314_1361426181_1f4ba59c3831c641b94bcdf1c092a800_rle_crop_3814641754_0.png.png imagette234007731748393312/ imagette234007751748393312/ wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/715fff17fe4fbb63939a29db6119ddaa_94701766.png imagette234007711748393311 23400773 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=23400773 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette234007731748393312 23400775 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=23400775 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette234007751748393312 23400776 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=23400776 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1361426388: '1748393187_543314_1361426184_893ced54d4d373d28595fd9bc2a82fa8_rle_crop_3814641715_0.png', 1361426389: '1748393187_543314_1361426182_b9867047964cc231e505f416d02e0600_rle_crop_3814641748_0.png', 1361426391: '1748393187_543314_1361426181_1f4ba59c3831c641b94bcdf1c092a800_rle_crop_3814641762_0.png', 1361426488: '1748393246_544856_1361426260_5cc5ac3af278fcc5c3be21325c0a6397_rle_crop_3814641907_0.png', 1361426489: '1748393246_544856_1361426226_b21550dccc9daf2f6951765dd0b2a558_rle_crop_3814641926_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/3a2cf057e79b439f600c9f8cb399eac5_50353549.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/d8f684d1c71e549c246cbc086c1a1745_51975409.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/d8a39de0b542782f0df41e91f84f331b_13628445.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/7624d8ef96bb81427c68602975010020_76270377.png change filename to text .imagette234007761748393312/ imagette234007761748393312/1748393187_543314_1361426181_1f4ba59c3831c641b94bcdf1c092a800_rle_crop_3814641762_0.png.png imagette234007761748393312/1748393246_544856_1361426260_5cc5ac3af278fcc5c3be21325c0a6397_rle_crop_3814641907_0.png.png imagette234007761748393312/1748393187_543314_1361426182_b9867047964cc231e505f416d02e0600_rle_crop_3814641748_0.png.png imagette234007761748393312/1748393187_543314_1361426184_893ced54d4d373d28595fd9bc2a82fa8_rle_crop_3814641715_0.png.png imagette234007761748393312/1748393246_544856_1361426226_b21550dccc9daf2f6951765dd0b2a558_rle_crop_3814641926_0.png.png imagette234007771748393312/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/b09ae03a262980b8f751c8103e0421f3_23996091.png imagette234007761748393312 23400777 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=23400777 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette234007771748393312 23400779 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=23400779 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1361426283: '1748393127_539154_1361426201_87868316400a05c6851f8a5d8de956c4_rle_crop_3814640505_0.png', 1361426490: '1748393246_544856_1361426260_5cc5ac3af278fcc5c3be21325c0a6397_rle_crop_3814641906_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/d6ef0b8e59f96e09b78759e78689b111_23226620.png change filename to text .imagette234007791748393312/ imagette234007791748393312/1748393246_544856_1361426260_5cc5ac3af278fcc5c3be21325c0a6397_rle_crop_3814641906_0.png.png imagette234007791748393312/1748393127_539154_1361426201_87868316400a05c6851f8a5d8de956c4_rle_crop_3814640505_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/d383470d14d1736af761877d93f09f3a_9268547.png imagette234007791748393312 23400780 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=23400780 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1361426377: '1748393187_543314_1361426184_893ced54d4d373d28595fd9bc2a82fa8_rle_crop_3814641710_0.png', 1361426378: '1748393187_543314_1361426182_b9867047964cc231e505f416d02e0600_rle_crop_3814641737_0.png', 1361426483: '1748393246_544856_1361426219_ee72195e4bb6173964eeefb4f4253d11_rle_crop_3814641949_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/749f4f0c49ec7bb6608f0d7ef1f071d2_15997824.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/d3620af491903b4d9616e32eb42318b4_15017775.png change filename to text .imagette234007801748393313/ imagette234007801748393313/1748393187_543314_1361426184_893ced54d4d373d28595fd9bc2a82fa8_rle_crop_3814641710_0.png.png imagette234007801748393313/1748393246_544856_1361426219_ee72195e4bb6173964eeefb4f4253d11_rle_crop_3814641949_0.png.png imagette234007801748393313/1748393187_543314_1361426182_b9867047964cc231e505f416d02e0600_rle_crop_3814641737_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/bb9b156c0c782f4f9d9800158dae8276_18114602.png imagette234007801748393313 23400770 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=23400770 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1361426257: '1748393065_536516_1361426135_7b9320fce195b97f0b4aba985244b890_rle_crop_3814640410_0.png', 1361426282: '1748393127_539154_1361426201_87868316400a05c6851f8a5d8de956c4_rle_crop_3814640506_0.png', 1361426387: '1748393187_543314_1361426204_9013697efdf6021504ef5817bc9acfe4_rle_crop_3814641699_0.png', 1361426487: '1748393246_544856_1361426260_5cc5ac3af278fcc5c3be21325c0a6397_rle_crop_3814641910_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/9abe718f2046ec572503cbf6209677c2_81938613.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/f03e5181011fc065c92892ac28304b91_59341176.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/49091f0ba6977d839da98ce7386bbf58_16370373.png change filename to text .imagette234007701748393313/ imagette234007701748393313/1748393065_536516_1361426135_7b9320fce195b97f0b4aba985244b890_rle_crop_3814640410_0.png.png imagette234007701748393313/1748393127_539154_1361426201_87868316400a05c6851f8a5d8de956c4_rle_crop_3814640506_0.png.png imagette234007701748393313/1748393187_543314_1361426204_9013697efdf6021504ef5817bc9acfe4_rle_crop_3814641699_0.png.png imagette234007701748393313/1748393246_544856_1361426260_5cc5ac3af278fcc5c3be21325c0a6397_rle_crop_3814641910_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/1bf822e64e2519e38ba7d988c93599b5_95855440.png imagette234007701748393313 23400772 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=23400772 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1361426253: '1748393065_536516_1361426142_62b437ca55230ad074509e5ac5970f3e_rle_crop_3814640385_0.png', 1361426254: '1748393065_536516_1361426135_7b9320fce195b97f0b4aba985244b890_rle_crop_3814640406_0.png', 1361426379: '1748393187_543314_1361426184_893ced54d4d373d28595fd9bc2a82fa8_rle_crop_3814641716_0.png', 1361426380: '1748393187_543314_1361426179_34ae5e9ca0edd63cc24a55bd055f3a40_rle_crop_3814641774_0.png', 1361426485: '1748393246_544856_1361426260_5cc5ac3af278fcc5c3be21325c0a6397_rle_crop_3814641905_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/81be3db6d60be589d59738ac7521a7d8_40008304.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/4769aefd2b0ba9fd2cb2d1dc76eaef74_4440536.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/436c43f76167de1b53f7ac36a214e298_7419134.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/f32f8e6b007757caf3dddac017c7c7d4_22924971.png change filename to text .imagette234007721748393313/ imagette234007721748393313/1748393187_543314_1361426179_34ae5e9ca0edd63cc24a55bd055f3a40_rle_crop_3814641774_0.png.png imagette234007721748393313/1748393187_543314_1361426184_893ced54d4d373d28595fd9bc2a82fa8_rle_crop_3814641716_0.png.png imagette234007721748393313/1748393065_536516_1361426135_7b9320fce195b97f0b4aba985244b890_rle_crop_3814640406_0.png.png imagette234007721748393313/1748393246_544856_1361426260_5cc5ac3af278fcc5c3be21325c0a6397_rle_crop_3814641905_0.png.png imagette234007721748393313/1748393065_536516_1361426142_62b437ca55230ad074509e5ac5970f3e_rle_crop_3814640385_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/3a95ebaabc70e2c770ed648a6f8bf04d_1616227.png imagette234007721748393313 23400781 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=23400781 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1361426250: '1748393065_536516_1361426142_62b437ca55230ad074509e5ac5970f3e_rle_crop_3814640390_0.png', 1361426251: '1748393065_536516_1361426139_0d46a22b137eb29cc989e9a7615b0dab_rle_crop_3814640396_0.png', 1361426252: '1748393065_536516_1361426135_7b9320fce195b97f0b4aba985244b890_rle_crop_3814640411_0.png', 1361426374: '1748393187_543314_1361426183_d6386979b10d856526db8c75d0667326_rle_crop_3814641728_0.png', 1361426481: '1748393246_544856_1361426226_b21550dccc9daf2f6951765dd0b2a558_rle_crop_3814641920_0.png', 1361426482: '1748393246_544856_1361426220_d9b788fbdbb4de0232dfd5531214c4ae_rle_crop_3814641934_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/398e05bee4044b48b077956e50d83be8_45300521.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/1e74f1531dac22742c63dfd559c0157d_62694672.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/b1704be3adf1c016950778949d91ef83_10842596.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/b657493b59624ee20504623984b0029a_89912691.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/f4f21db1b5375d71768a47a72e1f4f78_30675214.png change filename to text .imagette234007811748393313/ imagette234007811748393313/1748393246_544856_1361426226_b21550dccc9daf2f6951765dd0b2a558_rle_crop_3814641920_0.png.png imagette234007811748393313/1748393065_536516_1361426142_62b437ca55230ad074509e5ac5970f3e_rle_crop_3814640390_0.png.png imagette234007811748393313/1748393065_536516_1361426135_7b9320fce195b97f0b4aba985244b890_rle_crop_3814640411_0.png.png imagette234007811748393313/1748393065_536516_1361426139_0d46a22b137eb29cc989e9a7615b0dab_rle_crop_3814640396_0.png.png imagette234007811748393313/1748393246_544856_1361426220_d9b788fbdbb4de0232dfd5531214c4ae_rle_crop_3814641934_0.png.png imagette234007811748393313/1748393187_543314_1361426183_d6386979b10d856526db8c75d0667326_rle_crop_3814641728_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/13593e1520beeafaeb757f92e5b2fd62_90213141.png imagette234007811748393313 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=23400761 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/23400782,23400783,23400784,23400785,23400786,23400787,23400788,23400789,23400790,23400791,23400792,23400793?tags=Carton_brun,cartonnette,Carton_gris,mal_croppe,environnement,flou,plastique,metal,papier,kraft,autre_refus,Teint_Dans_La_Masse your option no_mail is active, we will not send the real mail to your client args[1361426491] : ('0.05029741165688222',) no score found for photo 1361426491 We are sending mail with results at report@fotonower.com args[1361426484] : ('0.05029741165688222',) no score found for photo 1361426484 We are sending mail with results at report@fotonower.com args[1361426480] : ('0.05029741165688222',) no score found for photo 1361426480 We are sending mail with results at report@fotonower.com args[1361426479] : ('0.05029741165688222',) no score found for photo 1361426479 We are sending mail with results at report@fotonower.com args[1361426390] : ('0.05029741165688222',) no score found for photo 1361426390 We are sending mail with results at report@fotonower.com args[1361426381] : ('0.05029741165688222',) no score found for photo 1361426381 We are sending mail with results at report@fotonower.com args[1361426366] : ('0.05029741165688222',) no score found for photo 1361426366 We are sending mail with results at report@fotonower.com args[1361426340] : ('0.05029741165688222',) no score found for photo 1361426340 We are sending mail with results at report@fotonower.com args[1361426313] : ('0.05029741165688222',) no score found for photo 1361426313 We are sending mail with results at report@fotonower.com args[1361426301] : ('0.05029741165688222',) no score found for photo 1361426301 We are sending mail with results at report@fotonower.com refus_total : 0.05029741165688222 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=23400761 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_P23400761_28-05-2025_02_48_31.pdf results_Auto_P23400761_28-05-2025_02_48_31.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23400761_28-05-2025_02_48_31.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','23400761','results_Auto_P23400761_28-05-2025_02_48_31.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23400761_28-05-2025_02_48_31.pdf','pdf','','0.19','0.05029741165688222') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23400761]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1361426491, 1361426484, 1361426480, 1361426479, 1361426390, 1361426381, 1361426366, 1361426340, 1361426313, 1361426301] map_info['map_portfolio_photo'] : {23400761: [1361426491, 1361426484, 1361426480, 1361426479, 1361426390, 1361426381, 1361426366, 1361426340, 1361426313, 1361426301, 1361426285, 1361426284, 1361426281, 1361426278, 1361426260, 1361426259, 1361426258, 1361426255, 1361426249, 1361426248, 1361426232, 1361426226, 1361426220, 1361426219, 1361426204, 1361426203, 1361426201, 1361426199, 1361426185, 1361426184, 1361426183, 1361426182, 1361426181, 1361426179, 1361426147, 1361426146, 1361426142, 1361426139, 1361426135]} final : False mtd_id 4302 list_pids : [1361426491, 1361426484, 1361426480, 1361426479, 1361426390, 1361426381, 1361426366, 1361426340, 1361426313, 1361426301] 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, '2971689') ('4302', '23400761', '1361426491', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426484', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426480', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426479', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426390', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426381', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426366', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426340', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426313', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426301', None, None, None, None, None, '2971689') 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', '23400761', '1361426491', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426484', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426480', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426479', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426390', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426381', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426366', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426340', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426313', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426301', None, None, None, None, None, '2971689')] time used for this insertion : 0.013327836990356445 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.6793298721313477 time spend to save output : 0.013577461242675781 total time spend for step 4 : 3.6929073333740234 step5:split_time_score Wed May 28 02:48:35 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 : ['23400761'] 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 : [('23400761',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23400761) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1361426491: {'path': 'temp/1748393311_3293215_1361426491_772f4fdc5cd9fa8d26ca08ba637e02a1.jpg', 'extension': 'jpg'}, 1361426301: {'path': 'temp/1748393311_3293215_1361426301_d3a6713b418aef2db6b067c615ad2c31.jpg', 'extension': 'jpg'}, 1361426313: {'path': 'temp/1748393311_3293215_1361426313_3627eef5d861ba35cdabdfcfc9b29ed9.jpg', 'extension': 'jpg'}, 1361426340: {'path': 'temp/1748393311_3293215_1361426340_c0c1fac5ae09f73c4bdc203e6f6a0348.jpg', 'extension': 'jpg'}, 1361426479: {'path': 'temp/1748393311_3293215_1361426479_b4659a4cc17c833a5f1430f4f934cc73.jpg', 'extension': 'jpg'}, 1361426480: {'path': 'temp/1748393311_3293215_1361426480_8df429fe39ef4a528926ca9ec4864c53.jpg', 'extension': 'jpg'}, 1361426484: {'path': 'temp/1748393311_3293215_1361426484_e4a6bd60ad3b63f5ef9ba622f5948f70.jpg', 'extension': 'jpg'}, 1361426366: {'path': 'temp/1748393311_3293215_1361426366_bac90892c149210b1493560af77d116b.jpg', 'extension': 'jpg'}, 1361426381: {'path': 'temp/1748393311_3293215_1361426381_c5ff4fab5e4ad5d48af7d26a5da6a47f.jpg', 'extension': 'jpg'}, 1361426390: {'path': 'temp/1748393311_3293215_1361426390_6d0f4986ef3d83556267eda84fc34ffd.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 = 23400761; (('arc_en_ciel_jrm_live',), ('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 = 23400761 group by h (('02', 39),) 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=23400761 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 (23400761) 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 (23400761) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 28052025 23400761 Nombre de photos uploadées : 39 / 23040 (0%) 28052025 23400761 Nombre de photos taguées (types de déchets): 0 / 39 (0%) 28052025 23400761 Nombre de photos taguées (volume) : 0 / 39 (0%) [{'photo_id': 1361426147, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/cb3bbbeeb8ca1b7d64ad6538756d05a9.jpg', 'username': None, 'uploaded_at': 1748392844, 'text': 'image_28052025_02_15_04_010154m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1361426146, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/4dfb339c1d30b0127d49d4dcd81326b3.jpg', 'username': None, 'uploaded_at': 1748392844, 'text': 'image_28052025_02_15_14_010134m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1361426142, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/62b437ca55230ad074509e5ac5970f3e.jpg', 'username': None, 'uploaded_at': 1748392844, 'text': 'image_28052025_02_15_24_010133m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1361426139, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/28/0d46a22b137eb29cc989e9a7615b0dab.jpg', 'username': None, 'uploaded_at': 1748392844, 'text': 'image_28052025_02_15_34_010144m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.1920928955078125e-06 elapsed_time : order_list_meta_photo_and_scores 5.7220458984375e-06 ??????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.00262451171875 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 23400761, '2025-05-28' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1841518,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02234339714050293 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= 1841518 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1841518, 'dashboard_run_id': 1849128, 'mtr_portfolio_id': 23397772, 'dashboard_result_id': 10972346, '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_P23397772_28-05-2025_00_44_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23397774, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23397775, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23397776, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23397777, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23397778, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23397779, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23397780, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23397781, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23397782, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23397783, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23397784, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23397785, 'pht': 3726}}"}, {'dashboat_entry_day': 1841518, 'dashboard_run_id': 1849128, 'mtr_portfolio_id': 23398051, 'dashboard_result_id': 10972347, '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_P23398051_28-05-2025_00_56_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23398079, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23398080, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23398081, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23398082, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23398083, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23398084, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23398085, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23398086, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23398087, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23398088, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23398089, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23398090, 'pht': 3726}}"}, {'dashboat_entry_day': 1841518, 'dashboard_run_id': 1849128, 'mtr_portfolio_id': 23398303, 'dashboard_result_id': 10972348, '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_P23398303_28-05-2025_01_20_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23398328, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23398329, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23398330, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23398331, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23398332, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23398333, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23398334, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23398335, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23398336, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23398337, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23398338, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23398339, 'pht': 3726}}"}, {'dashboat_entry_day': 1841518, 'dashboard_run_id': 1849128, 'mtr_portfolio_id': 23399179, 'dashboard_result_id': 10972349, '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_P23399179_28-05-2025_01_42_30.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23399205, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23399206, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23399207, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23399208, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23399209, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23399210, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23399211, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23399212, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23399213, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23399214, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23399215, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23399216, 'pht': 3726}}"}, {'dashboat_entry_day': 1841518, 'dashboard_run_id': 1849128, 'mtr_portfolio_id': 23399344, 'dashboard_result_id': 10972350, '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_P23399344_28-05-2025_01_56_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23399351, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23399352, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23399353, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23399354, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23399355, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23399356, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23399357, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23399358, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23399359, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23399360, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23399361, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23399362, 'pht': 3726}}"}, {'dashboat_entry_day': 1841518, 'dashboard_run_id': 1849128, 'mtr_portfolio_id': 23399686, 'dashboard_result_id': 10972351, '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_P23399686_28-05-2025_02_12_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23399693, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23399694, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23399695, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23399696, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23399697, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23399698, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23399699, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23399700, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23399701, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23399702, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23399703, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23399704, 'pht': 3726}}"}, {'dashboat_entry_day': 1841518, 'dashboard_run_id': 1849128, 'mtr_portfolio_id': 23400106, 'dashboard_result_id': 10972352, '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_P23400106_28-05-2025_02_24_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23400113, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23400114, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23400115, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23400116, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23400117, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23400118, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23400119, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23400120, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23400121, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23400122, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23400123, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23400124, 'pht': 3726}}"}, {'dashboat_entry_day': 1841518, 'dashboard_run_id': 1849128, 'mtr_portfolio_id': 23400427, 'dashboard_result_id': 10972353, '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_P23400427_28-05-2025_02_42_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23400428, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23400429, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23400430, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23400431, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23400432, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23400433, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23400434, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23400435, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23400436, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23400437, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23400438, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23400439, 'pht': 3726}}"}, {'dashboat_entry_day': 1841518, 'dashboard_run_id': 1849128, 'mtr_portfolio_id': 23400761, 'dashboard_result_id': 10972354, '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_P23400761_28-05-2025_02_46_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23400770, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23400771, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23400772, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23400773, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23400774, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23400775, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23400776, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23400777, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23400778, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23400779, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23400780, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23400781, '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 = 23397772 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': 2971027, 'mtr_portfolio_id': 23397772, 'created_at': datetime.datetime(2025, 5, 28, 0, 44, 57), 'result': '0.06446729513318857', 'result_long': None, 'result_double': None}] Qualite : 0.06446729513318857 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23397772 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23397772_28-05-2025_00_44_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23397772 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_P23397772_28-05-2025_00_44_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23397774, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23397775, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23397776, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23397777, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23397778, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23397779, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23397780, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23397781, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23397782, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23397783, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23397784, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23397785, 'pht': 3726}}" where mtr_portfolio_id = 23397772 and dashboard_run_id = 1849128 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`=23397772 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10972346, 0.06446729513318857, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23397772_28-05-2025_00_44_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23397774, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23397775, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23397776, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23397777, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23397778, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23397779, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23397780, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23397781, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23397782, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23397783, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23397784, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23397785, '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 = 23398051 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': 2971083, 'mtr_portfolio_id': 23398051, 'created_at': datetime.datetime(2025, 5, 28, 0, 56, 58), 'result': '0.045278973666385516', 'result_long': None, 'result_double': None}] Qualite : 0.045278973666385516 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23398051 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23398051_28-05-2025_00_56_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23398051 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_P23398051_28-05-2025_00_56_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23398079, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23398080, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23398081, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23398082, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23398083, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23398084, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23398085, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23398086, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23398087, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23398088, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23398089, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23398090, 'pht': 3726}}" where mtr_portfolio_id = 23398051 and dashboard_run_id = 1849128 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`=23398051 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10972347, 0.045278973666385516, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23398051_28-05-2025_00_56_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23398079, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23398080, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23398081, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23398082, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23398083, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23398084, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23398085, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23398086, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23398087, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23398088, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23398089, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23398090, '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 = 23398303 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': 2971158, 'mtr_portfolio_id': 23398303, 'created_at': datetime.datetime(2025, 5, 28, 1, 20, 59), 'result': '0.046167851128557896', 'result_long': None, 'result_double': None}] Qualite : 0.046167851128557896 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23398303 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23398303_28-05-2025_01_20_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23398303 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_P23398303_28-05-2025_01_20_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23398328, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23398329, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23398330, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23398331, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23398332, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23398333, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23398334, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23398335, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23398336, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23398337, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23398338, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23398339, 'pht': 3726}}" where mtr_portfolio_id = 23398303 and dashboard_run_id = 1849128 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`=23398303 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10972348, 0.046167851128557896, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23398303_28-05-2025_01_20_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23398328, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23398329, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23398330, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23398331, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23398332, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23398333, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23398334, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23398335, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23398336, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23398337, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23398338, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23398339, '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 = 23399179 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': 2971297, 'mtr_portfolio_id': 23399179, 'created_at': datetime.datetime(2025, 5, 28, 1, 42, 29), 'result': '0.06182397326917539', 'result_long': None, 'result_double': None}] Qualite : 0.06182397326917539 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23399179 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23399179_28-05-2025_01_42_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23399179 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_P23399179_28-05-2025_01_42_30.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23399205, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23399206, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23399207, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23399208, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23399209, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23399210, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23399211, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23399212, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23399213, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23399214, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23399215, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23399216, 'pht': 3726}}" where mtr_portfolio_id = 23399179 and dashboard_run_id = 1849128 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`=23399179 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10972349, 0.06182397326917539, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23399179_28-05-2025_01_42_30.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23399205, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23399206, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23399207, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23399208, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23399209, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23399210, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23399211, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23399212, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23399213, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23399214, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23399215, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23399216, '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 = 23399344 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': 2971328, 'mtr_portfolio_id': 23399344, 'created_at': datetime.datetime(2025, 5, 28, 1, 56, 57), 'result': '0.039297003774858966', 'result_long': None, 'result_double': None}] Qualite : 0.039297003774858966 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23399344 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23399344_28-05-2025_01_56_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23399344 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_P23399344_28-05-2025_01_56_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23399351, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23399352, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23399353, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23399354, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23399355, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23399356, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23399357, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23399358, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23399359, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23399360, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23399361, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23399362, 'pht': 3726}}" where mtr_portfolio_id = 23399344 and dashboard_run_id = 1849128 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`=23399344 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10972350, 0.039297003774858966, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23399344_28-05-2025_01_56_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23399351, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23399352, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23399353, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23399354, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23399355, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23399356, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23399357, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23399358, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23399359, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23399360, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23399361, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23399362, '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 = 23399686 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': 2971425, 'mtr_portfolio_id': 23399686, 'created_at': datetime.datetime(2025, 5, 28, 2, 12, 58), 'result': '0.057971602056583645', 'result_long': None, 'result_double': None}] Qualite : 0.057971602056583645 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23399686 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23399686_28-05-2025_02_12_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23399686 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_P23399686_28-05-2025_02_12_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23399693, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23399694, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23399695, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23399696, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23399697, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23399698, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23399699, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23399700, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23399701, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23399702, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23399703, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23399704, 'pht': 3726}}" where mtr_portfolio_id = 23399686 and dashboard_run_id = 1849128 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`=23399686 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10972351, 0.057971602056583645, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23399686_28-05-2025_02_12_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23399693, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23399694, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23399695, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23399696, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23399697, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23399698, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23399699, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23399700, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23399701, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23399702, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23399703, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23399704, '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 = 23400106 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': 2971521, 'mtr_portfolio_id': 23400106, 'created_at': datetime.datetime(2025, 5, 28, 2, 26, 29), 'result': '0.03997929959585649', 'result_long': None, 'result_double': None}] Qualite : 0.03997929959585649 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23400106 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23400106_28-05-2025_02_26_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23400106 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_P23400106_28-05-2025_02_26_30.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23400113, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23400114, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23400115, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23400116, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23400117, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23400118, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23400119, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23400120, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23400121, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23400122, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23400123, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23400124, 'pht': 3726}}" where mtr_portfolio_id = 23400106 and dashboard_run_id = 1849128 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`=23400106 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10972352, 0.03997929959585649, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23400106_28-05-2025_02_26_30.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23400113, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23400114, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23400115, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23400116, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23400117, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23400118, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23400119, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23400120, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23400121, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23400122, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23400123, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23400124, '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 = 23400427 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': 2971617, 'mtr_portfolio_id': 23400427, 'created_at': datetime.datetime(2025, 5, 28, 2, 42, 59), 'result': '0.032842973830045995', 'result_long': None, 'result_double': None}] Qualite : 0.032842973830045995 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23400427 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23400427_28-05-2025_02_42_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23400427 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_P23400427_28-05-2025_02_42_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23400428, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23400429, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23400430, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23400431, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23400432, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23400433, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23400434, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23400435, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23400436, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23400437, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23400438, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23400439, 'pht': 3726}}" where mtr_portfolio_id = 23400427 and dashboard_run_id = 1849128 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`=23400427 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10972353, 0.032842973830045995, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23400427_28-05-2025_02_42_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23400428, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23400429, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23400430, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23400431, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23400432, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23400433, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23400434, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23400435, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23400436, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23400437, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23400438, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23400439, '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 = 23400761 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': 2971689, 'mtr_portfolio_id': 23400761, 'created_at': datetime.datetime(2025, 5, 28, 2, 48, 31), 'result': '0.05029741165688222', 'result_long': None, 'result_double': None}] Qualite : 0.05029741165688222 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23400761 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23400761_28-05-2025_02_48_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23400761 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_P23400761_28-05-2025_02_48_31.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23400770, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23400771, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23400772, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23400773, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23400774, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23400775, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23400776, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23400777, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23400778, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23400779, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23400780, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23400781, 'pht': 3726}}" where mtr_portfolio_id = 23400761 and dashboard_run_id = 1849128 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`=23400761 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10972354, 0.05029741165688222, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23400761_28-05-2025_02_48_31.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23400770, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23400771, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23400772, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23400773, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23400774, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23400775, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23400776, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23400777, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23400778, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23400779, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23400780, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23400781, '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 (23397772,23398051,23398303,23399179,23399344,23399686,23400106,23400427,23400761) result : ((1361412970,), (1361412973,), (1361412976,), (1361412978,), (1361413011,), (1361413012,), (1361413014,), (1361413016,), (1361413018,), (1361413022,), (1361413044,), (1361413046,), (1361413048,), (1361413081,), (1361413083,), (1361413086,), (1361413089,), (1361413094,), (1361413097,), (1361413115,), (1361413117,), (1361413120,), (1361413121,), (1361413124,), (1361413128,), (1361413147,), (1361413149,), (1361413151,), (1361413152,), (1361413154,), (1361413187,), (1361413195,), (1361413197,), (1361413199,), (1361413201,), (1361413203,), (1361413219,), (1361413221,), (1361413223,), (1361413225,), (1361413255,), (1361413258,), (1361413261,), (1361413264,), (1361413266,), (1361413268,), (1361413287,), (1361413291,), (1361413292,), (1361413315,), (1361413316,), (1361413317,), (1361413318,), (1361413340,), (1361413512,), (1361413509,), (1361413511,), (1361413543,), (1361413545,), (1361413546,), (1361413547,), (1361413548,), (1361413550,), (1361413572,), (1361413573,), (1361413574,), (1361413575,), (1361413576,), (1361413578,), (1361413603,), (1361413604,), (1361413605,), (1361413606,), (1361413640,), (1361413641,), (1361413642,), (1361413643,), (1361413647,), (1361413654,), (1361413678,), (1361413680,), (1361413682,), (1361413684,), (1361413686,), (1361413710,), (1361413712,), (1361413714,), (1361413716,), (1361413722,), (1361413758,), (1361413759,), (1361413760,), (1361413761,), (1361413762,), (1361413763,), (1361413786,), (1361413787,), (1361413788,), (1361413789,), (1361413818,), (1361413819,), (1361413820,), (1361413821,), (1361413822,), (1361413823,), (1361413847,), (1361413850,), (1361413852,), (1361413854,), (1361413878,), (1361413879,), (1361413880,), (1361413881,), (1361413905,), (1361413908,), (1361413909,), (1361413911,), (1361413913,), (1361413916,), (1361413937,), (1361413935,), (1361413936,), (1361413961,), (1361413962,), (1361413963,), (1361413992,), (1361413993,), (1361413994,), (1361413995,), (1361413996,), (1361414019,), (1361414020,), (1361414021,), (1361414022,), (1361414023,), (1361414032,), (1361414035,), (1361414037,), (1361419067,), (1361420894,), (1361420897,), (1361420919,), (1361420945,), (1361420966,), (1361420978,), (1361420984,), (1361420986,), (1361420987,), (1361420988,), (1361421007,), (1361421009,), (1361421012,), (1361421015,), (1361421037,), (1361421041,), (1361421044,), (1361421047,), (1361421050,), (1361421054,), (1361421081,), (1361421083,), (1361421084,), (1361421101,), (1361421105,), (1361421107,), (1361421110,), (1361421113,), (1361421115,), (1361421132,), (1361421134,), (1361421136,), (1361421138,), (1361421139,), (1361421157,), (1361421159,), (1361421161,), (1361421164,), (1361421165,), (1361421167,), (1361421183,), (1361421186,), (1361421224,), (1361421215,), (1361421217,), (1361421219,), (1361421250,), (1361421258,), (1361421260,), (1361421261,), (1361421262,), (1361421276,), (1361421279,), (1361421282,), (1361421306,), (1361421308,), (1361421331,), (1361421332,), (1361421335,), (1361421337,), (1361421338,), (1361421359,), (1361421361,), (1361421363,), (1361421365,), (1361421393,), (1361421395,), (1361421397,), (1361421400,), (1361421401,), (1361421408,), (1361421429,), (1361421431,), (1361421447,), (1361421449,), (1361421454,), (1361421460,), (1361421482,), (1361421485,), (1361421488,), (1361421492,), (1361421720,), (1361421819,), (1361421848,), (1361421874,), (1361421897,), (1361421928,), (1361422150,), (1361422175,), (1361422202,), (1361422439,), (1361422441,), (1361422443,), (1361422445,), (1361422446,), (1361422576,), (1361422603,), (1361422627,), (1361422654,), (1361422681,), (1361422750,), (1361422752,), (1361422775,), (1361422801,), (1361422827,), (1361422915,), (1361422883,), (1361422885,), (1361422887,), (1361422892,), (1361423170,), (1361423172,), (1361423174,), (1361423176,), (1361423197,), (1361423200,), (1361423203,), (1361423206,), (1361423227,), (1361423229,), (1361423231,), (1361423244,), (1361423249,), (1361423253,), (1361423255,), (1361423276,), (1361423314,), (1361423319,), (1361423322,), (1361423325,), (1361423339,), (1361423360,), (1361423407,), (1361423409,), (1361423411,), (1361423444,), (1361423446,), (1361423448,), (1361423450,), (1361423476,), (1361423479,), (1361423481,), (1361423483,), (1361423485,), (1361423503,), (1361423509,), (1361423511,), (1361423513,), (1361423527,), (1361423529,), (1361423531,), (1361423559,), (1361423563,), (1361423566,), (1361423568,), (1361423595,), (1361423588,), (1361423590,), (1361423592,), (1361423594,), (1361423615,), (1361423618,), (1361423621,), (1361423624,), (1361423626,), (1361423648,), (1361423649,), (1361423655,), (1361423682,), (1361423685,), (1361423687,), (1361423709,), (1361423711,), (1361423713,), (1361423714,), (1361423716,), (1361423718,), (1361423742,), (1361423744,), (1361423746,), (1361423748,), (1361423750,), (1361423776,), (1361423778,), (1361423780,), (1361423812,), (1361423820,), (1361423822,), (1361423824,), (1361423825,), (1361423826,), (1361424021,), (1361424048,), (1361424073,), (1361424099,), (1361424126,), (1361424149,), (1361424406,), (1361424434,), (1361424464,), (1361424494,), (1361424811,), (1361424814,), (1361424816,), (1361424818,), (1361424820,), (1361424821,), (1361424844,), (1361424861,), (1361424887,), (1361424940,), (1361425202,), (1361425204,), (1361425205,), (1361425207,), (1361425480,), (1361425510,), (1361425533,), (1361425558,), (1361425585,), (1361425646,), (1361425647,), (1361425649,), (1361425650,), (1361425653,), (1361425654,), (1361425658,), (1361425659,), (1361425662,), (1361425664,), (1361425673,), (1361425671,), (1361425697,), (1361425699,), (1361425700,), (1361425720,), (1361425727,), (1361425729,), (1361425731,), (1361425732,), (1361425734,), (1361425750,), (1361425753,), (1361425760,), (1361425761,), (1361425763,), (1361425764,), (1361425784,), (1361425786,), (1361425788,), (1361425812,), (1361425815,), (1361425817,), (1361425819,), (1361425820,), (1361425857,), (1361425860,), (1361425862,), (1361425869,), (1361425875,), (1361425877,), (1361425896,), (1361425898,), (1361425902,), (1361425908,), (1361425909,), (1361425929,), (1361425932,), (1361425935,), (1361425957,), (1361425960,), (1361425964,), (1361425968,), (1361425969,), (1361425971,), (1361425989,), (1361425991,), (1361425998,), (1361426001,), (1361426003,), (1361426026,), (1361426029,), (1361426032,), (1361426054,), (1361426057,), (1361426058,), (1361426060,), (1361426062,), (1361426063,), (1361426082,), (1361426084,), (1361426086,), (1361426088,), (1361426089,), (1361426108,), (1361426111,), (1361426113,), (1361426148,), (1361426135,), (1361426139,), (1361426142,), (1361426146,), (1361426147,), (1361426179,), (1361426181,), (1361426182,), (1361426183,), (1361426184,), (1361426185,), (1361426199,), (1361426201,), (1361426203,), (1361426204,), (1361426219,), (1361426220,), (1361426226,), (1361426232,), (1361426248,), (1361426249,), (1361426255,), (1361426258,), (1361426259,), (1361426260,), (1361426278,), (1361426281,), (1361426284,), (1361426285,), (1361426301,), (1361426313,), (1361426340,), (1361426366,), (1361426381,), (1361426390,), (1361426479,), (1361426480,), (1361426484,), (1361426491,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'28052025': {'nb_upload': 39, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23400761]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1361426491, 1361426484, 1361426480, 1361426479, 1361426390, 1361426381, 1361426366, 1361426340, 1361426313, 1361426301] map_info['map_portfolio_photo'] : {23400761: [1361426491, 1361426484, 1361426480, 1361426479, 1361426390, 1361426381, 1361426366, 1361426340, 1361426313, 1361426301, 1361426285, 1361426284, 1361426281, 1361426278, 1361426260, 1361426259, 1361426258, 1361426255, 1361426249, 1361426248, 1361426232, 1361426226, 1361426220, 1361426219, 1361426204, 1361426203, 1361426201, 1361426199, 1361426185, 1361426184, 1361426183, 1361426182, 1361426181, 1361426179, 1361426147, 1361426146, 1361426142, 1361426139, 1361426135]} final : True mtd_id 4302 list_pids : [1361426491, 1361426484, 1361426480, 1361426479, 1361426390, 1361426381, 1361426366, 1361426340, 1361426313, 1361426301] Looping around the photos to save general results len do output : 1 /23400761Didn'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, '2971689') ('4302', '23400761', '1361426491', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426484', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426480', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426479', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426390', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426381', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426366', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426340', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426313', None, None, None, None, None, '2971689') ('4302', None, None, None, None, None, None, None, '2971689') ('4302', '23400761', '1361426301', None, None, None, None, None, '2971689') 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, '23400761', 'None', None, None, None, None, '2971689'), ('4302', '23400761', '1361426491', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426484', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426480', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426479', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426390', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426381', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426366', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426340', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426313', None, None, None, None, None, '2971689'), ('4302', '23400761', '1361426301', None, None, None, None, None, '2971689')] time used for this insertion : 0.01356196403503418 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.5961816310882568 time spend to save output : 0.01377558708190918 total time spend for step 5 : 0.609957218170166 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 (2971689) 2.01user 1.68system 0:10.47elapsed 35%CPU (0avgtext+0avgdata 161332maxresident)k 120inputs+10752outputs (0major+78113minor)pagefaults 0swaps