SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23433180) result : ((1361579036,), (1361579038,), (1361579040,), (1361579042,), (1361579044,), (1361579062,), (1361579063,), (1361579064,), (1361579066,), (1361579106,), (1361579109,), (1361579112,), (1361579114,), (1361579134,), (1361579135,), (1361579136,), (1361579138,), (1361579151,), (1361579157,), (1361579160,), (1361579164,), (1361579184,), (1361579186,), (1361579190,), (1361579210,), (1361579213,), (1361579215,), (1361579217,), (1361579220,)) 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 23433206 , 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=23433180 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 (23433206) result : ((1361579148,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23433180) result : ((1361579036,), (1361579038,), (1361579040,), (1361579042,), (1361579044,), (1361579062,), (1361579063,), (1361579064,), (1361579066,), (1361579106,), (1361579109,), (1361579112,), (1361579114,), (1361579134,), (1361579135,), (1361579136,), (1361579138,), (1361579151,), (1361579157,), (1361579160,), (1361579164,), (1361579184,), (1361579186,), (1361579190,), (1361579210,), (1361579213,), (1361579215,), (1361579217,), (1361579220,)) 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 23433207 , 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=23433180 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 (23433207) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23433180) result : ((1361579036,), (1361579038,), (1361579040,), (1361579042,), (1361579044,), (1361579062,), (1361579063,), (1361579064,), (1361579066,), (1361579106,), (1361579109,), (1361579112,), (1361579114,), (1361579134,), (1361579135,), (1361579136,), (1361579138,), (1361579151,), (1361579157,), (1361579160,), (1361579164,), (1361579184,), (1361579186,), (1361579190,), (1361579210,), (1361579213,), (1361579215,), (1361579217,), (1361579220,)) 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 23433208 , 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=23433180 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='environnement' 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 (23433208) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23433180) result : ((1361579036,), (1361579038,), (1361579040,), (1361579042,), (1361579044,), (1361579062,), (1361579063,), (1361579064,), (1361579066,), (1361579106,), (1361579109,), (1361579112,), (1361579114,), (1361579134,), (1361579135,), (1361579136,), (1361579138,), (1361579151,), (1361579157,), (1361579160,), (1361579164,), (1361579184,), (1361579186,), (1361579190,), (1361579210,), (1361579213,), (1361579215,), (1361579217,), (1361579220,)) 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 23433209 , 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=23433180 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='mal_croppe' 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 (23433209) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23433180) result : ((1361579036,), (1361579038,), (1361579040,), (1361579042,), (1361579044,), (1361579062,), (1361579063,), (1361579064,), (1361579066,), (1361579106,), (1361579109,), (1361579112,), (1361579114,), (1361579134,), (1361579135,), (1361579136,), (1361579138,), (1361579151,), (1361579157,), (1361579160,), (1361579164,), (1361579184,), (1361579186,), (1361579190,), (1361579210,), (1361579213,), (1361579215,), (1361579217,), (1361579220,)) 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 23433210 , 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=23433180 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 (23433210) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23433180) result : ((1361579036,), (1361579038,), (1361579040,), (1361579042,), (1361579044,), (1361579062,), (1361579063,), (1361579064,), (1361579066,), (1361579106,), (1361579109,), (1361579112,), (1361579114,), (1361579134,), (1361579135,), (1361579136,), (1361579138,), (1361579151,), (1361579157,), (1361579160,), (1361579164,), (1361579184,), (1361579186,), (1361579190,), (1361579210,), (1361579213,), (1361579215,), (1361579217,), (1361579220,)) 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 23433211 , 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=23433180 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 (23433211) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23433180) result : ((1361579036,), (1361579038,), (1361579040,), (1361579042,), (1361579044,), (1361579062,), (1361579063,), (1361579064,), (1361579066,), (1361579106,), (1361579109,), (1361579112,), (1361579114,), (1361579134,), (1361579135,), (1361579136,), (1361579138,), (1361579151,), (1361579157,), (1361579160,), (1361579164,), (1361579184,), (1361579186,), (1361579190,), (1361579210,), (1361579213,), (1361579215,), (1361579217,), (1361579220,)) 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 23433212 , 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=23433180 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 (23433212) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23433180) result : ((1361579036,), (1361579038,), (1361579040,), (1361579042,), (1361579044,), (1361579062,), (1361579063,), (1361579064,), (1361579066,), (1361579106,), (1361579109,), (1361579112,), (1361579114,), (1361579134,), (1361579135,), (1361579136,), (1361579138,), (1361579151,), (1361579157,), (1361579160,), (1361579164,), (1361579184,), (1361579186,), (1361579190,), (1361579210,), (1361579213,), (1361579215,), (1361579217,), (1361579220,)) 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 23433213 , 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=23433180 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_gris' 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 (23433213) result : ((1361579149,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23433180) result : ((1361579036,), (1361579038,), (1361579040,), (1361579042,), (1361579044,), (1361579062,), (1361579063,), (1361579064,), (1361579066,), (1361579106,), (1361579109,), (1361579112,), (1361579114,), (1361579134,), (1361579135,), (1361579136,), (1361579138,), (1361579151,), (1361579157,), (1361579160,), (1361579164,), (1361579184,), (1361579186,), (1361579190,), (1361579210,), (1361579213,), (1361579215,), (1361579217,), (1361579220,)) 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 23433214 , 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=23433180 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 (23433214) result : ((1361579156,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23433180) result : ((1361579036,), (1361579038,), (1361579040,), (1361579042,), (1361579044,), (1361579062,), (1361579063,), (1361579064,), (1361579066,), (1361579106,), (1361579109,), (1361579112,), (1361579114,), (1361579134,), (1361579135,), (1361579136,), (1361579138,), (1361579151,), (1361579157,), (1361579160,), (1361579164,), (1361579184,), (1361579186,), (1361579190,), (1361579210,), (1361579213,), (1361579215,), (1361579217,), (1361579220,)) 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 23433215 , 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=23433180 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 (23433215) result : ((1361579146,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23433180) result : ((1361579036,), (1361579038,), (1361579040,), (1361579042,), (1361579044,), (1361579062,), (1361579063,), (1361579064,), (1361579066,), (1361579106,), (1361579109,), (1361579112,), (1361579114,), (1361579134,), (1361579135,), (1361579136,), (1361579138,), (1361579151,), (1361579157,), (1361579160,), (1361579164,), (1361579184,), (1361579186,), (1361579190,), (1361579210,), (1361579213,), (1361579215,), (1361579217,), (1361579220,)) 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 23433216 , 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=23433180 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='cartonnette' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23433216) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23433180) result : ((1361579036,), (1361579038,), (1361579040,), (1361579042,), (1361579044,), (1361579062,), (1361579063,), (1361579064,), (1361579066,), (1361579106,), (1361579109,), (1361579112,), (1361579114,), (1361579134,), (1361579135,), (1361579136,), (1361579138,), (1361579151,), (1361579157,), (1361579160,), (1361579164,), (1361579184,), (1361579186,), (1361579190,), (1361579210,), (1361579213,), (1361579215,), (1361579217,), (1361579220,)) 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`=23433180 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','kraft','plastique','flou','cartonnette','environnement','Carton_brun','metal','Carton_gris','autre_refus','mal_croppe','papier')) 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`=23433180 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','kraft','plastique','flou','cartonnette','environnement','Carton_brun','metal','Carton_gris','autre_refus','mal_croppe','papier')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_brun': {'main_port_id': 23433180, 'sub_port_id': 23433217, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15635853, 'last_updated_at': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 29, 2, 58)}, 'autre_refus': {'main_port_id': 23433180, 'sub_port_id': 23433218, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15635854, 'last_updated_at': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 29, 2, 58)}, 'papier': {'main_port_id': 23433180, 'sub_port_id': 23433219, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15635855, 'last_updated_at': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 29, 2, 58)}, 'environnement': {'main_port_id': 23433180, 'sub_port_id': 23433220, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15635856, 'last_updated_at': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 29, 2, 58)}, 'mal_croppe': {'main_port_id': 23433180, 'sub_port_id': 23433221, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15635857, 'last_updated_at': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 29, 2, 58)}, 'flou': {'main_port_id': 23433180, 'sub_port_id': 23433222, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15635858, 'last_updated_at': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 29, 2, 58)}, 'metal': {'main_port_id': 23433180, 'sub_port_id': 23433223, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15635859, 'last_updated_at': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 29, 2, 58)}, 'kraft': {'main_port_id': 23433180, 'sub_port_id': 23433224, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15635860, 'last_updated_at': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 29, 2, 58)}, 'Carton_gris': {'main_port_id': 23433180, 'sub_port_id': 23433225, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15635861, 'last_updated_at': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 29, 2, 58)}, 'plastique': {'main_port_id': 23433180, 'sub_port_id': 23433226, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15635862, 'last_updated_at': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 29, 2, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 23433180, 'sub_port_id': 23433227, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15635863, 'last_updated_at': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 29, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 29, 2, 58)}, 'cartonnette': {'main_port_id': 23433180, 'sub_port_id': 23433228, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15635864, 'last_updated_at': datetime.datetime(2025, 5, 29, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 5, 29, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 5, 29, 2, 58)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23433217,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23433205 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23433218,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23433206 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23433219,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23433207 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23433220,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23433208 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23433221,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23433209 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23433222,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23433210 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23433223,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23433211 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23433224,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23433212 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23433225,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23433213 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23433226,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23433214 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23433227,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23433215 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23433228,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23433216 lien utilise dans velours : https://www.fotonower.com/velours/23433217,23433218,23433219,23433220,23433221,23433222,23433223,23433224,23433225,23433226,23433227,23433228?tags=Carton_brun,autre_refus,papier,environnement,mal_croppe,flou,metal,kraft,Carton_gris,plastique,Teint_Dans_La_Masse,cartonnette After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23433180]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1361579220, 1361579217, 1361579215, 1361579213, 1361579210, 1361579190, 1361579186, 1361579184] map_info['map_portfolio_photo'] : {23433180: [1361579220, 1361579217, 1361579215, 1361579213, 1361579210, 1361579190, 1361579186, 1361579184, 1361579164, 1361579160, 1361579157, 1361579151, 1361579138, 1361579136, 1361579135, 1361579134, 1361579114, 1361579112, 1361579109, 1361579106, 1361579066, 1361579064, 1361579063, 1361579062, 1361579044, 1361579042, 1361579040, 1361579038, 1361579036]} final : False mtd_id 4302 list_pids : [1361579220, 1361579217, 1361579215, 1361579213, 1361579210, 1361579190, 1361579186, 1361579184] Looping around the photos to save general results len do output : 1 /23433180. 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, '2981429') ('4302', '23433180', '1361579220', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579217', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579215', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579213', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579210', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579190', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579186', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579184', None, None, None, None, None, '2981429') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 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, '23433180', "{'Carton_brun': 23433205, 'autre_refus': 23433206, 'papier': 23433207, 'environnement': 23433208, 'mal_croppe': 23433209, 'flou': 23433210, 'metal': 23433211, 'kraft': 23433212, 'Carton_gris': 23433213, 'plastique': 23433214, 'Teint_Dans_La_Masse': 23433215, 'cartonnette': 23433216}", None, None, None, None, '2981429'), ('4302', '23433180', '1361579220', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579217', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579215', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579213', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579210', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579190', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579186', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579184', None, None, None, None, None, '2981429')] time used for this insertion : 0.013448238372802734 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.344557285308838 time spend to save output : 0.013777017593383789 total time spend for step 1 : 1.3583343029022217 step2:final Thu May 29 03:02: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 (23433180) 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 23433180 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1361579044,1361579042,1361579040,1361579038,1361579036,1361579066,1361579064,1361579063,1361579062,1361579114,1361579112,1361579109,1361579106,1361579138,1361579136,1361579135,1361579134,1361579164,1361579160,1361579157,1361579151,1361579190,1361579186,1361579184,1361579220,1361579217,1361579215,1361579213,1361579210); 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([23433180]) Inside saveOutput : final : False verbose : True original output for save of step final : {1361579220: ('0.05251919739952667',), 1361579217: ('0.05251919739952667',), 1361579215: ('0.05251919739952667',), 1361579213: ('0.05251919739952667',), 1361579210: ('0.05251919739952667',), 1361579190: ('0.05251919739952667',), 1361579186: ('0.05251919739952667',), 1361579184: ('0.05251919739952667',)} new output for save of step final : {1361579220: ('0.05251919739952667',), 1361579217: ('0.05251919739952667',), 1361579215: ('0.05251919739952667',), 1361579213: ('0.05251919739952667',), 1361579210: ('0.05251919739952667',), 1361579190: ('0.05251919739952667',), 1361579186: ('0.05251919739952667',), 1361579184: ('0.05251919739952667',)} [1361579220, 1361579217, 1361579215, 1361579213, 1361579210, 1361579190, 1361579186, 1361579184] map_info['map_portfolio_photo'] : {23433180: [1361579220, 1361579217, 1361579215, 1361579213, 1361579210, 1361579190, 1361579186, 1361579184, 1361579164, 1361579160, 1361579157, 1361579151, 1361579138, 1361579136, 1361579135, 1361579134, 1361579114, 1361579112, 1361579109, 1361579106, 1361579066, 1361579064, 1361579063, 1361579062, 1361579044, 1361579042, 1361579040, 1361579038, 1361579036]} final : False mtd_id 4302 list_pids : [1361579220, 1361579217, 1361579215, 1361579213, 1361579210, 1361579190, 1361579186, 1361579184] Looping around the photos to save general results len do output : 8 /1361579220.Didn't retrieve data . /1361579217.Didn't retrieve data . /1361579215.Didn't retrieve data . /1361579213.Didn't retrieve data . /1361579210.Didn't retrieve data . /1361579190.Didn't retrieve data . /1361579186.Didn't retrieve data . /1361579184.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, '2981429') ('4302', '23433180', '1361579220', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579217', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579215', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579213', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579210', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579190', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579186', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579184', None, None, None, None, None, '2981429') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 24 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', '23433180', '1361579220', '0.05251919739952667', None, None, None, None, '2981429'), ('4302', '23433180', '1361579217', '0.05251919739952667', None, None, None, None, '2981429'), ('4302', '23433180', '1361579215', '0.05251919739952667', None, None, None, None, '2981429'), ('4302', '23433180', '1361579213', '0.05251919739952667', None, None, None, None, '2981429'), ('4302', '23433180', '1361579210', '0.05251919739952667', None, None, None, None, '2981429'), ('4302', '23433180', '1361579190', '0.05251919739952667', None, None, None, None, '2981429'), ('4302', '23433180', '1361579186', '0.05251919739952667', None, None, None, None, '2981429'), ('4302', '23433180', '1361579184', '0.05251919739952667', None, None, None, None, '2981429')] time used for this insertion : 0.013051271438598633 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.059711456298828125 time spend to save output : 0.013519287109375 total time spend for step 2 : 0.07323074340820312 step3:velours_tree Thu May 29 03:02: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 : {23433180: [{'Carton_brun': 23433205, 'autre_refus': 23433206, 'papier': 23433207, 'environnement': 23433208, 'mal_croppe': 23433209, 'flou': 23433210, 'metal': 23433211, 'kraft': 23433212, 'Carton_gris': 23433213, 'plastique': 23433214, 'Teint_Dans_La_Masse': 23433215, 'cartonnette': 23433216}]} input_args_next_step : {23433180: ()} output_args : {23433180: [{'Carton_brun': 23433205, 'autre_refus': 23433206, 'papier': 23433207, 'environnement': 23433208, 'mal_croppe': 23433209, 'flou': 23433210, 'metal': 23433211, 'kraft': 23433212, 'Carton_gris': 23433213, 'plastique': 23433214, 'Teint_Dans_La_Masse': 23433215, 'cartonnette': 23433216}]} args : 23433180 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': 23433205, 'autre_refus': 23433206, 'papier': 23433207, 'environnement': 23433208, 'mal_croppe': 23433209, 'flou': 23433210, 'metal': 23433211, 'kraft': 23433212, 'Carton_gris': 23433213, 'plastique': 23433214, 'Teint_Dans_La_Masse': 23433215, 'cartonnette': 23433216},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23433180) 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([23433180]) 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.4992544651031494 time spend to save output : 6.866455078125e-05 total time spend for step 3 : 0.49932312965393066 step4:send_mail_cod Thu May 29 03:02:32 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 : {1361579220: ('0.05251919739952667',), 1361579217: ('0.05251919739952667',), 1361579215: ('0.05251919739952667',), 1361579213: ('0.05251919739952667',), 1361579210: ('0.05251919739952667',), 1361579190: ('0.05251919739952667',), 1361579186: ('0.05251919739952667',), 1361579184: ('0.05251919739952667',)} input_args_next_step : {1361579220: ()} output_args : {1361579220: ('0.05251919739952667',), 1361579217: ('0.05251919739952667',), 1361579215: ('0.05251919739952667',), 1361579213: ('0.05251919739952667',), 1361579210: ('0.05251919739952667',), 1361579190: ('0.05251919739952667',), 1361579186: ('0.05251919739952667',), 1361579184: ('0.05251919739952667',)} args : 1361579220 depend.output_id : 0 input_args_next_step : {1361579220: ('0.05251919739952667',), 1361579217: ()} output_args : {1361579220: ('0.05251919739952667',), 1361579217: ('0.05251919739952667',), 1361579215: ('0.05251919739952667',), 1361579213: ('0.05251919739952667',), 1361579210: ('0.05251919739952667',), 1361579190: ('0.05251919739952667',), 1361579186: ('0.05251919739952667',), 1361579184: ('0.05251919739952667',)} args : 1361579217 depend.output_id : 0 input_args_next_step : {1361579220: ('0.05251919739952667',), 1361579217: ('0.05251919739952667',), 1361579215: ()} output_args : {1361579220: ('0.05251919739952667',), 1361579217: ('0.05251919739952667',), 1361579215: ('0.05251919739952667',), 1361579213: ('0.05251919739952667',), 1361579210: ('0.05251919739952667',), 1361579190: ('0.05251919739952667',), 1361579186: ('0.05251919739952667',), 1361579184: ('0.05251919739952667',)} args : 1361579215 depend.output_id : 0 input_args_next_step : {1361579220: ('0.05251919739952667',), 1361579217: ('0.05251919739952667',), 1361579215: ('0.05251919739952667',), 1361579213: ()} output_args : {1361579220: ('0.05251919739952667',), 1361579217: ('0.05251919739952667',), 1361579215: ('0.05251919739952667',), 1361579213: ('0.05251919739952667',), 1361579210: ('0.05251919739952667',), 1361579190: ('0.05251919739952667',), 1361579186: ('0.05251919739952667',), 1361579184: ('0.05251919739952667',)} args : 1361579213 depend.output_id : 0 input_args_next_step : {1361579220: ('0.05251919739952667',), 1361579217: ('0.05251919739952667',), 1361579215: ('0.05251919739952667',), 1361579213: ('0.05251919739952667',), 1361579210: ()} output_args : {1361579220: ('0.05251919739952667',), 1361579217: ('0.05251919739952667',), 1361579215: ('0.05251919739952667',), 1361579213: ('0.05251919739952667',), 1361579210: ('0.05251919739952667',), 1361579190: ('0.05251919739952667',), 1361579186: ('0.05251919739952667',), 1361579184: ('0.05251919739952667',)} args : 1361579210 depend.output_id : 0 input_args_next_step : {1361579220: ('0.05251919739952667',), 1361579217: ('0.05251919739952667',), 1361579215: ('0.05251919739952667',), 1361579213: ('0.05251919739952667',), 1361579210: ('0.05251919739952667',), 1361579190: ()} output_args : {1361579220: ('0.05251919739952667',), 1361579217: ('0.05251919739952667',), 1361579215: ('0.05251919739952667',), 1361579213: ('0.05251919739952667',), 1361579210: ('0.05251919739952667',), 1361579190: ('0.05251919739952667',), 1361579186: ('0.05251919739952667',), 1361579184: ('0.05251919739952667',)} args : 1361579190 depend.output_id : 0 input_args_next_step : {1361579220: ('0.05251919739952667',), 1361579217: ('0.05251919739952667',), 1361579215: ('0.05251919739952667',), 1361579213: ('0.05251919739952667',), 1361579210: ('0.05251919739952667',), 1361579190: ('0.05251919739952667',), 1361579186: ()} output_args : {1361579220: ('0.05251919739952667',), 1361579217: ('0.05251919739952667',), 1361579215: ('0.05251919739952667',), 1361579213: ('0.05251919739952667',), 1361579210: ('0.05251919739952667',), 1361579190: ('0.05251919739952667',), 1361579186: ('0.05251919739952667',), 1361579184: ('0.05251919739952667',)} args : 1361579186 depend.output_id : 0 input_args_next_step : {1361579220: ('0.05251919739952667',), 1361579217: ('0.05251919739952667',), 1361579215: ('0.05251919739952667',), 1361579213: ('0.05251919739952667',), 1361579210: ('0.05251919739952667',), 1361579190: ('0.05251919739952667',), 1361579186: ('0.05251919739952667',), 1361579184: ()} output_args : {1361579220: ('0.05251919739952667',), 1361579217: ('0.05251919739952667',), 1361579215: ('0.05251919739952667',), 1361579213: ('0.05251919739952667',), 1361579210: ('0.05251919739952667',), 1361579190: ('0.05251919739952667',), 1361579186: ('0.05251919739952667',), 1361579184: ('0.05251919739952667',)} args : 1361579184 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 : {23433180: [{'Carton_brun': 23433205, 'autre_refus': 23433206, 'papier': 23433207, 'environnement': 23433208, 'mal_croppe': 23433209, 'flou': 23433210, 'metal': 23433211, 'kraft': 23433212, 'Carton_gris': 23433213, 'plastique': 23433214, 'Teint_Dans_La_Masse': 23433215, 'cartonnette': 23433216}]} input_args_next_step : {1361579220: ('0.05251919739952667',), 1361579217: ('0.05251919739952667',), 1361579215: ('0.05251919739952667',), 1361579213: ('0.05251919739952667',), 1361579210: ('0.05251919739952667',), 1361579190: ('0.05251919739952667',), 1361579186: ('0.05251919739952667',), 1361579184: ('0.05251919739952667',), 23433180: ()} output_args : {23433180: [{'Carton_brun': 23433205, 'autre_refus': 23433206, 'papier': 23433207, 'environnement': 23433208, 'mal_croppe': 23433209, 'flou': 23433210, 'metal': 23433211, 'kraft': 23433212, 'Carton_gris': 23433213, 'plastique': 23433214, 'Teint_Dans_La_Masse': 23433215, 'cartonnette': 23433216}]} args : 23433180 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 :9, first value : ('0.05251919739952667',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23433180) 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 (1361579220,1361579217,1361579215,1361579213,1361579210,1361579190,1361579186,1361579184) Found this number of photos: 8 ##### Call download_photos : nb_thread : 5 begin to download photo : 1361579184 begin to download photo : 1361579190 begin to download photo : 1361579213 begin to download photo : 1361579217 download finish for photo 1361579217 begin to download photo : 1361579220 download finish for photo 1361579184 begin to download photo : 1361579186 download finish for photo 1361579190 begin to download photo : 1361579210 download finish for photo 1361579213 begin to download photo : 1361579215 download finish for photo 1361579220 download finish for photo 1361579210 download finish for photo 1361579186 download finish for photo 1361579215 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 : 8 ; length of list_pids : 8 ; length of list_args : 8 results_Auto_P23433180_29-05-2025_03_02_32.pdf 23433206 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=23433206 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1361579148: '1748480367_2731127_1361579063_cf01a22d759a69d626581b232b1c25c7_rle_crop_3814998331_0.png'} change filename to text .imagette234332061748480552/ imagette234332061748480552/1748480367_2731127_1361579063_cf01a22d759a69d626581b232b1c25c7_rle_crop_3814998331_0.png.png imagette234332091748480552/ imagette234332101748480552/ imagette234332111748480552/ imagette234332121748480552/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/29/58892f2af901839b2075ba99b42e9ccb_6125062.png imagette234332061748480552 23433209 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=23433209 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette234332091748480552 23433210 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=23433210 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette234332101748480552 23433211 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=23433211 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette234332111748480552 23433212 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=23433212 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette234332121748480552 23433214 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=23433214 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1361579156: '1748480367_2731127_1361579063_cf01a22d759a69d626581b232b1c25c7_rle_crop_3814998330_0.png'} change filename to text .imagette234332141748480552/ imagette234332141748480552/1748480367_2731127_1361579063_cf01a22d759a69d626581b232b1c25c7_rle_crop_3814998330_0.png.png imagette234332161748480552/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/29/17163201c30f997619852d3b493f20d6_24569612.png imagette234332141748480552 23433216 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=23433216 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette234332161748480552 23433205 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=23433205 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1361579152: '1748480367_2731127_1361579064_5051ae61683e084339f0f1ee555d8e3c_rle_crop_3814998314_0.png', 1361579153: '1748480367_2731127_1361579063_cf01a22d759a69d626581b232b1c25c7_rle_crop_3814998334_0.png', 1361579155: '1748480367_2731127_1361579063_cf01a22d759a69d626581b232b1c25c7_rle_crop_3814998335_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/29/805ed6bbfa6dff65a80158b3e7f34573_77469486.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/29/8a086ce3c3edab1970bd3eb586a31f93_92289886.png change filename to text .imagette234332051748480552/ imagette234332051748480552/1748480367_2731127_1361579063_cf01a22d759a69d626581b232b1c25c7_rle_crop_3814998334_0.png.png imagette234332051748480552/1748480367_2731127_1361579064_5051ae61683e084339f0f1ee555d8e3c_rle_crop_3814998314_0.png.png imagette234332051748480552/1748480367_2731127_1361579063_cf01a22d759a69d626581b232b1c25c7_rle_crop_3814998335_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/29/c148e06aec2b3f1a7b99cbdc9152a309_13495291.png imagette234332051748480552 23433213 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=23433213 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1361579149: '1748480367_2731127_1361579063_cf01a22d759a69d626581b232b1c25c7_rle_crop_3814998333_0.png'} change filename to text .imagette234332131748480552/ imagette234332131748480552/1748480367_2731127_1361579063_cf01a22d759a69d626581b232b1c25c7_rle_crop_3814998333_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/29/5b57cca87388a95a79a8d2022c1511d1_79819231.png imagette234332131748480552 23433215 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=23433215 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1361579146: '1748480367_2731127_1361579064_5051ae61683e084339f0f1ee555d8e3c_rle_crop_3814998319_0.png'} change filename to text .imagette234332151748480552/ imagette234332151748480552/1748480367_2731127_1361579064_5051ae61683e084339f0f1ee555d8e3c_rle_crop_3814998319_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/29/f124c325f720f0c8bcebada813d4175c_26347733.png imagette234332151748480552 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=23433180 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/23433217,23433218,23433219,23433220,23433221,23433222,23433223,23433224,23433225,23433226,23433227,23433228?tags=Carton_brun,autre_refus,papier,environnement,mal_croppe,flou,metal,kraft,Carton_gris,plastique,Teint_Dans_La_Masse,cartonnette your option no_mail is active, we will not send the real mail to your client args[1361579220] : ('0.05251919739952667',) no score found for photo 1361579220 We are sending mail with results at report@fotonower.com args[1361579217] : ('0.05251919739952667',) no score found for photo 1361579217 We are sending mail with results at report@fotonower.com args[1361579215] : ('0.05251919739952667',) no score found for photo 1361579215 We are sending mail with results at report@fotonower.com args[1361579213] : ('0.05251919739952667',) no score found for photo 1361579213 We are sending mail with results at report@fotonower.com args[1361579210] : ('0.05251919739952667',) no score found for photo 1361579210 We are sending mail with results at report@fotonower.com args[1361579190] : ('0.05251919739952667',) no score found for photo 1361579190 We are sending mail with results at report@fotonower.com args[1361579186] : ('0.05251919739952667',) no score found for photo 1361579186 We are sending mail with results at report@fotonower.com args[1361579184] : ('0.05251919739952667',) no score found for photo 1361579184 We are sending mail with results at report@fotonower.com refus_total : 0.05251919739952667 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=23433180 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_P23433180_29-05-2025_03_02_32.pdf results_Auto_P23433180_29-05-2025_03_02_32.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23433180_29-05-2025_03_02_32.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','23433180','results_Auto_P23433180_29-05-2025_03_02_32.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23433180_29-05-2025_03_02_32.pdf','pdf','','0.1','0.05251919739952667') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23433180]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1361579220, 1361579217, 1361579215, 1361579213, 1361579210, 1361579190, 1361579186, 1361579184] map_info['map_portfolio_photo'] : {23433180: [1361579220, 1361579217, 1361579215, 1361579213, 1361579210, 1361579190, 1361579186, 1361579184, 1361579164, 1361579160, 1361579157, 1361579151, 1361579138, 1361579136, 1361579135, 1361579134, 1361579114, 1361579112, 1361579109, 1361579106, 1361579066, 1361579064, 1361579063, 1361579062, 1361579044, 1361579042, 1361579040, 1361579038, 1361579036]} final : False mtd_id 4302 list_pids : [1361579220, 1361579217, 1361579215, 1361579213, 1361579210, 1361579190, 1361579186, 1361579184] 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, '2981429') ('4302', '23433180', '1361579220', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579217', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579215', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579213', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579210', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579190', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579186', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579184', None, None, None, None, None, '2981429') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 8 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', '23433180', '1361579220', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579217', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579215', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579213', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579210', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579190', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579186', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579184', None, None, None, None, None, '2981429')] time used for this insertion : 0.01304936408996582 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.783203125 time spend to save output : 0.013291597366333008 total time spend for step 4 : 1.796494722366333 step5:split_time_score Thu May 29 03:02:34 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 : ['23433180'] 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 : [('23433180',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23433180) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1361579217: {'path': 'temp/1748480552_131321_1361579217_b650c8e562e4e32d5ea030c1232c59bd.jpg', 'extension': 'jpg'}, 1361579220: {'path': 'temp/1748480552_131321_1361579220_c4db17bd57d8ccecf7f1e7437ca563e0.jpg', 'extension': 'jpg'}, 1361579190: {'path': 'temp/1748480552_131321_1361579190_f0733569b7c45edcf84a1d1b82512948.jpg', 'extension': 'jpg'}, 1361579210: {'path': 'temp/1748480552_131321_1361579210_784eda5470bca48cd65544c6fd909698.jpg', 'extension': 'jpg'}, 1361579184: {'path': 'temp/1748480552_131321_1361579184_92f20b4ac97286fae2e665a1a4326a3a.jpg', 'extension': 'jpg'}, 1361579186: {'path': 'temp/1748480552_131321_1361579186_12eafcc6df11dc768afd1e13a4136d18.jpg', 'extension': 'jpg'}, 1361579213: {'path': 'temp/1748480552_131321_1361579213_232cad393ffb817ba1e6ac990562e730.jpg', 'extension': 'jpg'}, 1361579215: {'path': 'temp/1748480552_131321_1361579215_a1c670ea2271ff84c01c8d0f4d92811d.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 = 23433180; (('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 = 23433180 group by h (('02', 29),) 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=23433180 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 (23433180) 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 (23433180) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 29052025 23433180 Nombre de photos uploadées : 29 / 23040 (0%) 29052025 23433180 Nombre de photos taguées (types de déchets): 0 / 29 (0%) 29052025 23433180 Nombre de photos taguées (volume) : 0 / 29 (0%) [{'photo_id': 1361579044, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/29/fb1d68e1453bcde606d3967955dda534.jpg', 'username': None, 'uploaded_at': 1748480147, 'text': 'image_29052025_02_30_04_10137.jpg'}, {'photo_id': 1361579042, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/29/af4d4799b1f83e7c712fd8a3821cace0.jpg', 'username': None, 'uploaded_at': 1748480147, 'text': 'image_29052025_02_30_14_9128.jpg'}, {'photo_id': 1361579040, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/29/14dcd2193b80f6f3d705c914f479767f.jpg', 'username': None, 'uploaded_at': 1748480147, 'text': 'image_29052025_02_30_24_10136.jpg'}, {'photo_id': 1361579038, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/29/7a5d4f50d1d82dd4219029a2f31c3ac4.jpg', 'username': None, 'uploaded_at': 1748480147, 'text': 'image_29052025_02_30_34_10136.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.814697265625e-06 elapsed_time : order_list_meta_photo_and_scores 1.049041748046875e-05 ????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.001361846923828125 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 23433180, '2025-05-29' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1844847,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02254319190979004 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= 1844847 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1844847, 'dashboard_run_id': 1852498, 'mtr_portfolio_id': 23430334, 'dashboard_result_id': 11024153, '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_P23430334_29-05-2025_00_43_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23430347, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23430348, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23430349, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23430350, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23430351, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23430352, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23430353, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23430354, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23430355, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23430356, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23430357, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23430358, 'pht': 3726}}"}, {'dashboat_entry_day': 1844847, 'dashboard_run_id': 1852498, 'mtr_portfolio_id': 23430497, 'dashboard_result_id': 11024154, '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_P23430497_29-05-2025_00_56_57.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 23430498, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23430499, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23430500, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23430501, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23430502, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23430503, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23430504, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23430505, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23430506, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23430507, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23430508, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23430509, 'pht': 3726}}"}, {'dashboat_entry_day': 1844847, 'dashboard_run_id': 1852498, 'mtr_portfolio_id': 23430732, 'dashboard_result_id': 11024155, '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_P23430732_29-05-2025_02_24_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23430745, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23430746, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23430747, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23430748, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23430749, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23430750, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23430751, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23430752, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23430753, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23430754, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23430755, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23430756, 'pht': 3726}}"}, {'dashboat_entry_day': 1844847, 'dashboard_run_id': 1852498, 'mtr_portfolio_id': 23431384, 'dashboard_result_id': 11024156, '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_P23431384_29-05-2025_01_42_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23431386, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23431387, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23431388, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23431389, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23431390, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23431391, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23431392, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23431393, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23431394, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23431395, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23431396, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23431397, 'pht': 3726}}"}, {'dashboat_entry_day': 1844847, 'dashboard_run_id': 1852498, 'mtr_portfolio_id': 23431503, 'dashboard_result_id': 11024157, '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_P23431503_29-05-2025_01_56_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23431511, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23431512, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23431513, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23431514, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23431515, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23431516, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23431517, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23431518, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23431519, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23431520, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23431521, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23431522, 'pht': 3726}}"}, {'dashboat_entry_day': 1844847, 'dashboard_run_id': 1852498, 'mtr_portfolio_id': 23431787, 'dashboard_result_id': 11024158, '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_P23431787_29-05-2025_02_12_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23431813, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23431814, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23431815, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23431816, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23431817, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23431818, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23431819, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23431820, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23431821, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23431822, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23431823, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23431824, 'pht': 3726}}"}, {'dashboat_entry_day': 1844847, 'dashboard_run_id': 1852498, 'mtr_portfolio_id': 23432187, 'dashboard_result_id': 11024159, '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_P23432187_29-05-2025_02_25_28.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23432193, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23432194, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23432195, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23432196, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23432197, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23432198, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23432199, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23432200, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23432201, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23432202, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23432203, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23432204, 'pht': 3726}}"}, {'dashboat_entry_day': 1844847, 'dashboard_run_id': 1852498, 'mtr_portfolio_id': 23432833, 'dashboard_result_id': 11024160, '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_P23432833_29-05-2025_02_57_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23432848, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23432849, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23432850, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23432851, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23432852, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23432853, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23432854, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23432855, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23432856, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23432857, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23432858, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23432859, 'pht': 3726}}"}, {'dashboat_entry_day': 1844847, 'dashboard_run_id': 1852498, 'mtr_portfolio_id': 23433180, 'dashboard_result_id': 11024161, '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_P23433180_29-05-2025_03_01_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23433205, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23433206, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23433207, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23433208, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23433209, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23433210, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23433211, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23433212, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23433213, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23433214, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23433215, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23433216, '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 = 23430334 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': 2980549, 'mtr_portfolio_id': 23430334, 'created_at': datetime.datetime(2025, 5, 29, 0, 42, 59), 'result': '0.06281961672603695', 'result_long': None, 'result_double': None}] Qualite : 0.06281961672603695 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23430334 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23430334_29-05-2025_00_43_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23430334 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_P23430334_29-05-2025_00_43_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23430347, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23430348, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23430349, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23430350, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23430351, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23430352, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23430353, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23430354, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23430355, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23430356, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23430357, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23430358, 'pht': 3726}}" where mtr_portfolio_id = 23430334 and dashboard_run_id = 1852498 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`=23430334 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11024153, 0.06281961672603695, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23430334_29-05-2025_00_43_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23430347, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23430348, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23430349, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23430350, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23430351, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23430352, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23430353, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23430354, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23430355, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23430356, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23430357, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23430358, '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 = 23430497 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': 2980605, 'mtr_portfolio_id': 23430497, 'created_at': datetime.datetime(2025, 5, 29, 0, 56, 57), 'result': '0.038425853468165426', 'result_long': None, 'result_double': None}] Qualite : 0.038425853468165426 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23430497 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23430497_29-05-2025_00_56_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23430497 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_P23430497_29-05-2025_00_56_57.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 23430498, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23430499, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23430500, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23430501, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23430502, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23430503, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23430504, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23430505, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23430506, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23430507, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23430508, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23430509, 'pht': 3726}}" where mtr_portfolio_id = 23430497 and dashboard_run_id = 1852498 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`=23430497 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11024154, 0.038425853468165426, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23430497_29-05-2025_00_56_57.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 23430498, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23430499, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23430500, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23430501, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23430502, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23430503, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23430504, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23430505, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23430506, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23430507, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23430508, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23430509, '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 = 23430732 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': 2980704, 'mtr_portfolio_id': 23430732, 'created_at': datetime.datetime(2025, 5, 29, 2, 24, 58), 'result': '0.07494602642588992', 'result_long': None, 'result_double': None}] Qualite : 0.07494602642588992 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23430732 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23430732_29-05-2025_02_24_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23430732 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_P23430732_29-05-2025_02_24_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23430745, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23430746, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23430747, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23430748, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23430749, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23430750, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23430751, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23430752, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23430753, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23430754, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23430755, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23430756, 'pht': 3726}}" where mtr_portfolio_id = 23430732 and dashboard_run_id = 1852498 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`=23430732 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11024155, 0.07494602642588992, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23430732_29-05-2025_02_24_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23430745, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23430746, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23430747, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23430748, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23430749, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23430750, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23430751, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23430752, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23430753, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23430754, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23430755, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23430756, '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 = 23431384 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': 2980905, 'mtr_portfolio_id': 23431384, 'created_at': datetime.datetime(2025, 5, 29, 1, 42, 59), 'result': '0.0702023931698506', 'result_long': None, 'result_double': None}] Qualite : 0.0702023931698506 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23431384 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23431384_29-05-2025_01_42_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23431384 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_P23431384_29-05-2025_01_42_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23431386, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23431387, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23431388, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23431389, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23431390, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23431391, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23431392, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23431393, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23431394, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23431395, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23431396, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23431397, 'pht': 3726}}" where mtr_portfolio_id = 23431384 and dashboard_run_id = 1852498 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`=23431384 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11024156, 0.0702023931698506, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23431384_29-05-2025_01_42_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23431386, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23431387, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23431388, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23431389, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23431390, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23431391, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23431392, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23431393, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23431394, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23431395, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23431396, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23431397, '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 = 23431503 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': 2980946, 'mtr_portfolio_id': 23431503, 'created_at': datetime.datetime(2025, 5, 29, 1, 56, 57), 'result': '0.05205324032251061', 'result_long': None, 'result_double': None}] Qualite : 0.05205324032251061 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23431503 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23431503_29-05-2025_01_56_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23431503 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_P23431503_29-05-2025_01_56_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23431511, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23431512, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23431513, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23431514, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23431515, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23431516, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23431517, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23431518, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23431519, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23431520, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23431521, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23431522, 'pht': 3726}}" where mtr_portfolio_id = 23431503 and dashboard_run_id = 1852498 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`=23431503 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11024157, 0.05205324032251061, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23431503_29-05-2025_01_56_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23431511, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23431512, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23431513, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23431514, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23431515, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23431516, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23431517, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23431518, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23431519, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23431520, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23431521, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23431522, '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 = 23431787 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': 2981043, 'mtr_portfolio_id': 23431787, 'created_at': datetime.datetime(2025, 5, 29, 2, 12, 58), 'result': '0.06384799585236277', 'result_long': None, 'result_double': None}] Qualite : 0.06384799585236277 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23431787 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23431787_29-05-2025_02_12_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23431787 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_P23431787_29-05-2025_02_12_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23431813, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23431814, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23431815, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23431816, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23431817, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23431818, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23431819, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23431820, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23431821, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23431822, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23431823, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23431824, 'pht': 3726}}" where mtr_portfolio_id = 23431787 and dashboard_run_id = 1852498 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`=23431787 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11024158, 0.06384799585236277, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23431787_29-05-2025_02_12_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23431813, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23431814, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23431815, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23431816, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23431817, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23431818, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23431819, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23431820, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23431821, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23431822, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23431823, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23431824, '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 = 23432187 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': 2981135, 'mtr_portfolio_id': 23432187, 'created_at': datetime.datetime(2025, 5, 29, 2, 26, 57), 'result': '0.07074534612159114', 'result_long': None, 'result_double': None}] Qualite : 0.07074534612159114 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23432187 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23432187_29-05-2025_02_26_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23432187 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_P23432187_29-05-2025_02_26_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23432193, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23432194, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23432195, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23432196, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23432197, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23432198, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23432199, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23432200, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23432201, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23432202, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23432203, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23432204, 'pht': 3726}}" where mtr_portfolio_id = 23432187 and dashboard_run_id = 1852498 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`=23432187 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11024159, 0.07074534612159114, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23432187_29-05-2025_02_26_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23432193, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23432194, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23432195, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23432196, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23432197, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23432198, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23432199, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23432200, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23432201, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23432202, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23432203, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23432204, '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 = 23432833 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': 2981326, 'mtr_portfolio_id': 23432833, 'created_at': datetime.datetime(2025, 5, 29, 2, 57), 'result': '0.04320043959672224', 'result_long': None, 'result_double': None}] Qualite : 0.04320043959672224 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23432833 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23432833_29-05-2025_02_57_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23432833 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_P23432833_29-05-2025_02_57_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23432848, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23432849, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23432850, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23432851, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23432852, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23432853, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23432854, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23432855, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23432856, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23432857, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23432858, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23432859, 'pht': 3726}}" where mtr_portfolio_id = 23432833 and dashboard_run_id = 1852498 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`=23432833 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11024160, 0.04320043959672224, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23432833_29-05-2025_02_57_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23432848, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23432849, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23432850, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23432851, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23432852, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23432853, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23432854, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23432855, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23432856, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23432857, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23432858, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23432859, '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 = 23433180 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': 2981429, 'mtr_portfolio_id': 23433180, 'created_at': datetime.datetime(2025, 5, 29, 3, 2, 31), 'result': '0.05251919739952667', 'result_long': None, 'result_double': None}] Qualite : 0.05251919739952667 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23433180 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23433180_29-05-2025_03_02_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23433180 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_P23433180_29-05-2025_03_02_32.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23433205, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23433206, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23433207, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23433208, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23433209, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23433210, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23433211, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23433212, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23433213, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23433214, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23433215, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23433216, 'pht': 3726}}" where mtr_portfolio_id = 23433180 and dashboard_run_id = 1852498 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`=23433180 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11024161, 0.05251919739952667, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23433180_29-05-2025_03_02_32.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23433205, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23433206, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23433207, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23433208, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23433209, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23433210, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23433211, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23433212, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23433213, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23433214, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23433215, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23433216, '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 (23430334,23430497,23430732,23431384,23431503,23431787,23432187,23432833,23433180) result : ((1361574231,), (1361574233,), (1361574235,), (1361574238,), (1361574257,), (1361574259,), (1361574261,), (1361574264,), (1361574267,), (1361574281,), (1361574283,), (1361574285,), (1361574287,), (1361574303,), (1361574307,), (1361574311,), (1361574315,), (1361574323,), (1361574334,), (1361574368,), (1361574371,), (1361574393,), (1361574461,), (1361574464,), (1361574467,), (1361574473,), (1361574478,), (1361574480,), (1361574499,), (1361574501,), (1361574503,), (1361574506,), (1361574530,), (1361574535,), (1361574538,), (1361574541,), (1361574545,), (1361574557,), (1361574560,), (1361574562,), (1361574564,), (1361574589,), (1361574590,), (1361574591,), (1361574593,), (1361574594,), (1361574617,), (1361574619,), (1361574646,), (1361574648,), (1361574649,), (1361574656,), (1361574661,), (1361574664,), (1361574684,), (1361574686,), (1361574688,), (1361574690,), (1361574712,), (1361574713,), (1361574715,), (1361574750,), (1361574751,), (1361574752,), (1361574753,), (1361574754,), (1361574780,), (1361574774,), (1361574808,), (1361574809,), (1361574810,), (1361574811,), (1361574812,), (1361574830,), (1361574831,), (1361574832,), (1361574856,), (1361574858,), (1361574860,), (1361574863,), (1361574864,), (1361574866,), (1361574892,), (1361574897,), (1361574898,), (1361574900,), (1361574902,), (1361574927,), (1361574930,), (1361574934,), (1361574936,), (1361574939,), (1361574941,), (1361574959,), (1361574962,), (1361574992,), (1361574993,), (1361574994,), (1361574996,), (1361574998,), (1361575001,), (1361575023,), (1361575025,), (1361575029,), (1361575056,), (1361575058,), (1361575061,), (1361575064,), (1361575068,), (1361575071,), (1361575091,), (1361575094,), (1361575096,), (1361575098,), (1361575101,), (1361575124,), (1361575125,), (1361575161,), (1361575163,), (1361575183,), (1361575184,), (1361575208,), (1361575209,), (1361575210,), (1361575212,), (1361575247,), (1361575236,), (1361575238,), (1361575241,), (1361575243,), (1361575245,), (1361575268,), (1361575269,), (1361575270,), (1361575298,), (1361575300,), (1361575302,), (1361575304,), (1361575305,), (1361575328,), (1361575329,), (1361575330,), (1361575331,), (1361575333,), (1361575335,), (1361575340,), (1361575341,), (1361575342,), (1361575475,), (1361575478,), (1361576285,), (1361576280,), (1361576283,), (1361576313,), (1361576316,), (1361576320,), (1361576322,), (1361576324,), (1361576325,), (1361576347,), (1361576350,), (1361576352,), (1361576376,), (1361576379,), (1361576382,), (1361576385,), (1361576406,), (1361576412,), (1361576417,), (1361576419,), (1361576420,), (1361576435,), (1361576437,), (1361576439,), (1361576442,), (1361576444,), (1361576446,), (1361576464,), (1361576494,), (1361576496,), (1361576498,), (1361576501,), (1361576528,), (1361576531,), (1361576536,), (1361576541,), (1361576546,), (1361576592,), (1361576594,), (1361576596,), (1361576600,), (1361576603,), (1361576644,), (1361576632,), (1361576636,), (1361576639,), (1361576642,), (1361576659,), (1361576664,), (1361576668,), (1361576671,), (1361576700,), (1361576702,), (1361576704,), (1361576706,), (1361576730,), (1361576734,), (1361576738,), (1361576742,), (1361576768,), (1361576771,), (1361576812,), (1361576815,), (1361576818,), (1361576892,), (1361576895,), (1361576923,), (1361576925,), (1361576927,), (1361576929,), (1361576931,), (1361576961,), (1361576963,), (1361576966,), (1361576969,), (1361576973,), (1361576975,), (1361576996,), (1361577000,), (1361577003,), (1361577032,), (1361577036,), (1361577040,), (1361577043,), (1361577044,), (1361577063,), (1361577068,), (1361577076,), (1361577082,), (1361577085,), (1361577087,), (1361577107,), (1361577110,), (1361577113,), (1361577117,), (1361577119,), (1361577138,), (1361577140,), (1361577142,), (1361577146,), (1361577184,), (1361577173,), (1361577176,), (1361577179,), (1361577182,), (1361577206,), (1361577214,), (1361577218,), (1361577222,), (1361577224,), (1361577253,), (1361577256,), (1361577271,), (1361577277,), (1361577298,), (1361577300,), (1361577303,), (1361577305,), (1361577307,), (1361577311,), (1361577312,), (1361577313,), (1361577320,), (1361577322,), (1361577348,), (1361577353,), (1361577358,), (1361577384,), (1361577387,), (1361577389,), (1361577392,), (1361577394,), (1361577395,), (1361577420,), (1361577423,), (1361577426,), (1361577429,), (1361577445,), (1361577447,), (1361577449,), (1361577451,), (1361577468,), (1361577471,), (1361577474,), (1361577480,), (1361577506,), (1361577532,), (1361577535,), (1361577538,), (1361577564,), (1361577569,), (1361577576,), (1361577580,), (1361577584,), (1361577605,), (1361577609,), (1361577615,), (1361577641,), (1361577643,), (1361577646,), (1361577648,), (1361577650,), (1361577652,), (1361577677,), (1361577669,), (1361577671,), (1361577673,), (1361577675,), (1361577676,), (1361577698,), (1361577701,), (1361577714,), (1361577726,), (1361577742,), (1361577745,), (1361577748,), (1361577750,), (1361577752,), (1361577765,), (1361577767,), (1361577768,), (1361577769,), (1361577770,), (1361577771,), (1361577787,), (1361577789,), (1361577790,), (1361577809,), (1361577812,), (1361577814,), (1361577816,), (1361577818,), (1361577835,), (1361577840,), (1361577844,), (1361577853,), (1361577854,), (1361577855,), (1361577871,), (1361577873,), (1361577874,), (1361577895,), (1361577897,), (1361577899,), (1361577900,), (1361577915,), (1361577917,), (1361577924,), (1361577928,), (1361577938,), (1361577947,), (1361577982,), (1361577984,), (1361577989,), (1361577994,), (1361577996,), (1361578013,), (1361578014,), (1361578015,), (1361578016,), (1361578042,), (1361578044,), (1361578046,), (1361578049,), (1361578050,), (1361578051,), (1361578083,), (1361578084,), (1361578085,), (1361578086,), (1361578087,), (1361578089,), (1361578094,), (1361578097,), (1361578101,), (1361578119,), (1361578597,), (1361578602,), (1361578608,), (1361578609,), (1361578611,), (1361578633,), (1361578636,), (1361578639,), (1361578660,), (1361578661,), (1361578662,), (1361578663,), (1361578666,), (1361578668,), (1361578682,), (1361578684,), (1361578689,), (1361578721,), (1361578726,), (1361578728,), (1361578730,), (1361578732,), (1361578750,), (1361578752,), (1361578754,), (1361578756,), (1361578759,), (1361578761,), (1361578780,), (1361578786,), (1361578793,), (1361578821,), (1361578825,), (1361578827,), (1361578829,), (1361578831,), (1361578832,), (1361578848,), (1361578855,), (1361578860,), (1361578861,), (1361578882,), (1361578884,), (1361578886,), (1361578888,), (1361578890,), (1361578891,), (1361578905,), (1361578907,), (1361578908,), (1361578910,), (1361578912,), (1361578931,), (1361578934,), (1361578936,), (1361578943,), (1361578945,), (1361578963,), (1361578967,), (1361578968,), (1361578970,), (1361578972,), (1361578987,), (1361578989,), (1361578991,), (1361578993,), (1361578996,), (1361579015,), (1361579016,), (1361579017,), (1361579019,), (1361579020,), (1361579045,), (1361579036,), (1361579038,), (1361579040,), (1361579042,), (1361579044,), (1361579062,), (1361579063,), (1361579064,), (1361579066,), (1361579106,), (1361579109,), (1361579112,), (1361579114,), (1361579134,), (1361579135,), (1361579136,), (1361579138,), (1361579151,), (1361579157,), (1361579160,), (1361579164,), (1361579184,), (1361579186,), (1361579190,), (1361579210,), (1361579213,), (1361579215,), (1361579217,), (1361579220,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'29052025': {'nb_upload': 29, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23433180]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1361579220, 1361579217, 1361579215, 1361579213, 1361579210, 1361579190, 1361579186, 1361579184] map_info['map_portfolio_photo'] : {23433180: [1361579220, 1361579217, 1361579215, 1361579213, 1361579210, 1361579190, 1361579186, 1361579184, 1361579164, 1361579160, 1361579157, 1361579151, 1361579138, 1361579136, 1361579135, 1361579134, 1361579114, 1361579112, 1361579109, 1361579106, 1361579066, 1361579064, 1361579063, 1361579062, 1361579044, 1361579042, 1361579040, 1361579038, 1361579036]} final : True mtd_id 4302 list_pids : [1361579220, 1361579217, 1361579215, 1361579213, 1361579210, 1361579190, 1361579186, 1361579184] Looping around the photos to save general results len do output : 1 /23433180Didn'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, '2981429') ('4302', '23433180', '1361579220', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579217', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579215', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579213', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579210', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579190', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579186', None, None, None, None, None, '2981429') ('4302', None, None, None, None, None, None, None, '2981429') ('4302', '23433180', '1361579184', None, None, None, None, None, '2981429') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 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, '23433180', 'None', None, None, None, None, '2981429'), ('4302', '23433180', '1361579220', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579217', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579215', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579213', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579210', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579190', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579186', None, None, None, None, None, '2981429'), ('4302', '23433180', '1361579184', None, None, None, None, None, '2981429')] time used for this insertion : 0.013217687606811523 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.6223821640014648 time spend to save output : 0.013474464416503906 total time spend for step 5 : 0.6358566284179688 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 (2981429) 2.38user 1.63system 0:09.25elapsed 43%CPU (0avgtext+0avgdata 161156maxresident)k 46568inputs+5176outputs (228major+75584minor)pagefaults 0swaps