SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22974976) result : ((1358284050,), (1358284054,), (1358284058,), (1358285769,), (1358285770,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22974968) result : ((1358282961,), (1358283164,), (1358283168,), (1358283195,), (1358283207,), (1358283210,), (1358283213,), (1358283353,), (1358283357,), (1358283396,), (1358283401,), (1358283405,), (1358283409,), (1358283414,), (1358283589,), (1358283619,), (1358283650,), (1358284160,), (1358284212,), (1358284270,), (1358284322,), (1358284379,), (1358285011,), (1358285086,), (1358285138,)) 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 22974977 , 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=22974968 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 (22974977) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22974968) result : ((1358282961,), (1358283164,), (1358283168,), (1358283195,), (1358283207,), (1358283210,), (1358283213,), (1358283353,), (1358283357,), (1358283396,), (1358283401,), (1358283405,), (1358283409,), (1358283414,), (1358283589,), (1358283619,), (1358283650,), (1358284160,), (1358284212,), (1358284270,), (1358284322,), (1358284379,), (1358285011,), (1358285086,), (1358285138,)) 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 22974978 , 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=22974968 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 (22974978) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22974968) result : ((1358282961,), (1358283164,), (1358283168,), (1358283195,), (1358283207,), (1358283210,), (1358283213,), (1358283353,), (1358283357,), (1358283396,), (1358283401,), (1358283405,), (1358283409,), (1358283414,), (1358283589,), (1358283619,), (1358283650,), (1358284160,), (1358284212,), (1358284270,), (1358284322,), (1358284379,), (1358285011,), (1358285086,), (1358285138,)) 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 22974979 , 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=22974968 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 (22974979) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22974968) result : ((1358282961,), (1358283164,), (1358283168,), (1358283195,), (1358283207,), (1358283210,), (1358283213,), (1358283353,), (1358283357,), (1358283396,), (1358283401,), (1358283405,), (1358283409,), (1358283414,), (1358283589,), (1358283619,), (1358283650,), (1358284160,), (1358284212,), (1358284270,), (1358284322,), (1358284379,), (1358285011,), (1358285086,), (1358285138,)) 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 22974980 , 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=22974968 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 (22974980) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22974968) result : ((1358282961,), (1358283164,), (1358283168,), (1358283195,), (1358283207,), (1358283210,), (1358283213,), (1358283353,), (1358283357,), (1358283396,), (1358283401,), (1358283405,), (1358283409,), (1358283414,), (1358283589,), (1358283619,), (1358283650,), (1358284160,), (1358284212,), (1358284270,), (1358284322,), (1358284379,), (1358285011,), (1358285086,), (1358285138,)) 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 22974981 , 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=22974968 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 (22974981) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22974968) result : ((1358282961,), (1358283164,), (1358283168,), (1358283195,), (1358283207,), (1358283210,), (1358283213,), (1358283353,), (1358283357,), (1358283396,), (1358283401,), (1358283405,), (1358283409,), (1358283414,), (1358283589,), (1358283619,), (1358283650,), (1358284160,), (1358284212,), (1358284270,), (1358284322,), (1358284379,), (1358285011,), (1358285086,), (1358285138,)) 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 22974982 , 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=22974968 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_brun' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22974982) result : ((1358284126,), (1358284129,), (1358285776,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22974968) result : ((1358282961,), (1358283164,), (1358283168,), (1358283195,), (1358283207,), (1358283210,), (1358283213,), (1358283353,), (1358283357,), (1358283396,), (1358283401,), (1358283405,), (1358283409,), (1358283414,), (1358283589,), (1358283619,), (1358283650,), (1358284160,), (1358284212,), (1358284270,), (1358284322,), (1358284379,), (1358285011,), (1358285086,), (1358285138,)) 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 22974983 , 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=22974968 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 (22974983) result : ((1358284112,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22974968) result : ((1358282961,), (1358283164,), (1358283168,), (1358283195,), (1358283207,), (1358283210,), (1358283213,), (1358283353,), (1358283357,), (1358283396,), (1358283401,), (1358283405,), (1358283409,), (1358283414,), (1358283589,), (1358283619,), (1358283650,), (1358284160,), (1358284212,), (1358284270,), (1358284322,), (1358284379,), (1358285011,), (1358285086,), (1358285138,)) 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 22974984 , 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=22974968 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 (22974984) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22974968) result : ((1358282961,), (1358283164,), (1358283168,), (1358283195,), (1358283207,), (1358283210,), (1358283213,), (1358283353,), (1358283357,), (1358283396,), (1358283401,), (1358283405,), (1358283409,), (1358283414,), (1358283589,), (1358283619,), (1358283650,), (1358284160,), (1358284212,), (1358284270,), (1358284322,), (1358284379,), (1358285011,), (1358285086,), (1358285138,)) 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 22974985 , 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=22974968 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 (22974985) result : ((1358284156,), (1358284159,), (1358284163,), (1358284166,), (1358284169,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22974968) result : ((1358282961,), (1358283164,), (1358283168,), (1358283195,), (1358283207,), (1358283210,), (1358283213,), (1358283353,), (1358283357,), (1358283396,), (1358283401,), (1358283405,), (1358283409,), (1358283414,), (1358283589,), (1358283619,), (1358283650,), (1358284160,), (1358284212,), (1358284270,), (1358284322,), (1358284379,), (1358285011,), (1358285086,), (1358285138,)) 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 22974986 , 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=22974968 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 (22974986) result : ((1358284078,), (1358285773,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22974968) result : ((1358282961,), (1358283164,), (1358283168,), (1358283195,), (1358283207,), (1358283210,), (1358283213,), (1358283353,), (1358283357,), (1358283396,), (1358283401,), (1358283405,), (1358283409,), (1358283414,), (1358283589,), (1358283619,), (1358283650,), (1358284160,), (1358284212,), (1358284270,), (1358284322,), (1358284379,), (1358285011,), (1358285086,), (1358285138,)) 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 22974987 , 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=22974968 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 (22974987) result : ((1358284098,), (1358285775,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22974968) result : ((1358282961,), (1358283164,), (1358283168,), (1358283195,), (1358283207,), (1358283210,), (1358283213,), (1358283353,), (1358283357,), (1358283396,), (1358283401,), (1358283405,), (1358283409,), (1358283414,), (1358283589,), (1358283619,), (1358283650,), (1358284160,), (1358284212,), (1358284270,), (1358284322,), (1358284379,), (1358285011,), (1358285086,), (1358285138,)) 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`=22974968 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','mal_croppe','Teint_Dans_La_Masse','autre_refus','flou','metal','kraft','plastique','papier','cartonnette','Carton_brun','environnement')) 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`=22974968 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','mal_croppe','Teint_Dans_La_Masse','autre_refus','flou','metal','kraft','plastique','papier','cartonnette','Carton_brun','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 22974968, 'sub_port_id': 22974988, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15338571, 'last_updated_at': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 14, 18, 34, 59)}, 'flou': {'main_port_id': 22974968, 'sub_port_id': 22974989, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15338572, 'last_updated_at': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 14, 18, 34, 59)}, 'environnement': {'main_port_id': 22974968, 'sub_port_id': 22974990, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15338573, 'last_updated_at': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 14, 18, 34, 59)}, 'metal': {'main_port_id': 22974968, 'sub_port_id': 22974991, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15338574, 'last_updated_at': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 14, 18, 34, 59)}, 'papier': {'main_port_id': 22974968, 'sub_port_id': 22974992, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15338575, 'last_updated_at': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 14, 18, 34, 59)}, 'mal_croppe': {'main_port_id': 22974968, 'sub_port_id': 22974993, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15338576, 'last_updated_at': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 14, 18, 34, 59)}, 'Carton_brun': {'main_port_id': 22974968, 'sub_port_id': 22974994, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15338577, 'last_updated_at': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 14, 18, 34, 59)}, 'cartonnette': {'main_port_id': 22974968, 'sub_port_id': 22974995, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15338578, 'last_updated_at': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 14, 18, 34, 59)}, 'kraft': {'main_port_id': 22974968, 'sub_port_id': 22974996, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15338579, 'last_updated_at': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 14, 18, 34, 59)}, 'plastique': {'main_port_id': 22974968, 'sub_port_id': 22974997, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15338580, 'last_updated_at': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 14, 18, 34, 59)}, 'autre_refus': {'main_port_id': 22974968, 'sub_port_id': 22974998, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15338581, 'last_updated_at': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 14, 18, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 14, 18, 34, 59)}, 'Carton_gris': {'main_port_id': 22974968, 'sub_port_id': 22974999, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15338582, 'last_updated_at': datetime.datetime(2025, 5, 14, 18, 36, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 14, 18, 36, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 14, 18, 34, 59)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22974988,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22974976 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22974989,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22974977 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22974990,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22974978 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22974991,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22974979 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22974992,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22974980 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22974993,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22974981 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22974994,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22974982 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22974995,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22974983 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22974996,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22974984 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22974997,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22974985 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22974998,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22974986 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22974999,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22974987 lien utilise dans velours : https://www.fotonower.com/velours/22974988,22974989,22974990,22974991,22974992,22974993,22974994,22974995,22974996,22974997,22974998,22974999?tags=Teint_Dans_La_Masse,flou,environnement,metal,papier,mal_croppe,Carton_brun,cartonnette,kraft,plastique,autre_refus,Carton_gris After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22974968]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1358285138, 1358285086, 1358285011] map_info['map_portfolio_photo'] : {22974968: [1358285138, 1358285086, 1358285011, 1358284379, 1358284322, 1358284270, 1358284212, 1358284160, 1358283650, 1358283619, 1358283589, 1358283414, 1358283409, 1358283405, 1358283401, 1358283396, 1358283357, 1358283353, 1358283213, 1358283210, 1358283207, 1358283195, 1358283168, 1358283164, 1358282961]} final : False mtd_id 4302 list_pids : [1358285138, 1358285086, 1358285011] Looping around the photos to save general results len do output : 1 /22974968. 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, '2852534') ('4302', '22974968', '1358285138', None, None, None, None, None, '2852534') ('4302', None, None, None, None, None, None, None, '2852534') ('4302', '22974968', '1358285086', None, None, None, None, None, '2852534') ('4302', None, None, None, None, None, None, None, '2852534') ('4302', '22974968', '1358285011', None, None, None, None, None, '2852534') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 4 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, '22974968', "{'Teint_Dans_La_Masse': 22974976, 'flou': 22974977, 'environnement': 22974978, 'metal': 22974979, 'papier': 22974980, 'mal_croppe': 22974981, 'Carton_brun': 22974982, 'cartonnette': 22974983, 'kraft': 22974984, 'plastique': 22974985, 'autre_refus': 22974986, 'Carton_gris': 22974987}", None, None, None, None, '2852534'), ('4302', '22974968', '1358285138', None, None, None, None, None, '2852534'), ('4302', '22974968', '1358285086', None, None, None, None, None, '2852534'), ('4302', '22974968', '1358285011', None, None, None, None, None, '2852534')] time used for this insertion : 0.012867212295532227 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4168610572814941 time spend to save output : 0.01315617561340332 total time spend for step 1 : 1.4300172328948975 step2:final Wed May 14 18:39:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 (22974968) 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 22974968 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1358282961,1358283213,1358283210,1358283207,1358283195,1358283168,1358283164,1358283357,1358283353,1358283414,1358283409,1358283405,1358283401,1358283396,1358283650,1358283619,1358283589,1358284379,1358284322,1358284270,1358284212,1358284160,1358285138,1358285086,1358285011); 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([22974968]) Inside saveOutput : final : False verbose : True original output for save of step final : {1358285138: ('0.07229771466754387',), 1358285086: ('0.07229771466754387',), 1358285011: ('0.07229771466754387',)} new output for save of step final : {1358285138: ('0.07229771466754387',), 1358285086: ('0.07229771466754387',), 1358285011: ('0.07229771466754387',)} [1358285138, 1358285086, 1358285011] map_info['map_portfolio_photo'] : {22974968: [1358285138, 1358285086, 1358285011, 1358284379, 1358284322, 1358284270, 1358284212, 1358284160, 1358283650, 1358283619, 1358283589, 1358283414, 1358283409, 1358283405, 1358283401, 1358283396, 1358283357, 1358283353, 1358283213, 1358283210, 1358283207, 1358283195, 1358283168, 1358283164, 1358282961]} final : False mtd_id 4302 list_pids : [1358285138, 1358285086, 1358285011] Looping around the photos to save general results len do output : 3 /1358285138.Didn't retrieve data . /1358285086.Didn't retrieve data . /1358285011.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, '2852534') ('4302', '22974968', '1358285138', None, None, None, None, None, '2852534') ('4302', None, None, None, None, None, None, None, '2852534') ('4302', '22974968', '1358285086', None, None, None, None, None, '2852534') ('4302', None, None, None, None, None, None, None, '2852534') ('4302', '22974968', '1358285011', None, None, None, None, None, '2852534') 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', '22974968', '1358285138', '0.07229771466754387', None, None, None, None, '2852534'), ('4302', '22974968', '1358285086', '0.07229771466754387', None, None, None, None, '2852534'), ('4302', '22974968', '1358285011', '0.07229771466754387', None, None, None, None, '2852534')] time used for this insertion : 0.015356063842773438 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07245516777038574 time spend to save output : 0.015673160552978516 total time spend for step 2 : 0.08812832832336426 step3:velours_tree Wed May 14 18:39:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {22974968: [{'Teint_Dans_La_Masse': 22974976, 'flou': 22974977, 'environnement': 22974978, 'metal': 22974979, 'papier': 22974980, 'mal_croppe': 22974981, 'Carton_brun': 22974982, 'cartonnette': 22974983, 'kraft': 22974984, 'plastique': 22974985, 'autre_refus': 22974986, 'Carton_gris': 22974987}]} input_args_next_step : {22974968: ()} output_args : {22974968: [{'Teint_Dans_La_Masse': 22974976, 'flou': 22974977, 'environnement': 22974978, 'metal': 22974979, 'papier': 22974980, 'mal_croppe': 22974981, 'Carton_brun': 22974982, 'cartonnette': 22974983, 'kraft': 22974984, 'plastique': 22974985, 'autre_refus': 22974986, 'Carton_gris': 22974987}]} args : 22974968 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 : ({'Teint_Dans_La_Masse': 22974976, 'flou': 22974977, 'environnement': 22974978, 'metal': 22974979, 'papier': 22974980, 'mal_croppe': 22974981, 'Carton_brun': 22974982, 'cartonnette': 22974983, 'kraft': 22974984, 'plastique': 22974985, 'autre_refus': 22974986, 'Carton_gris': 22974987},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22974968) 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([22974968]) 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.5192534923553467 time spend to save output : 9.870529174804688e-05 total time spend for step 3 : 0.5193521976470947 step4:send_mail_cod Wed May 14 18:39:02 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 : {1358285138: ('0.07229771466754387',), 1358285086: ('0.07229771466754387',), 1358285011: ('0.07229771466754387',)} input_args_next_step : {1358285138: ()} output_args : {1358285138: ('0.07229771466754387',), 1358285086: ('0.07229771466754387',), 1358285011: ('0.07229771466754387',)} args : 1358285138 depend.output_id : 0 input_args_next_step : {1358285138: ('0.07229771466754387',), 1358285086: ()} output_args : {1358285138: ('0.07229771466754387',), 1358285086: ('0.07229771466754387',), 1358285011: ('0.07229771466754387',)} args : 1358285086 depend.output_id : 0 input_args_next_step : {1358285138: ('0.07229771466754387',), 1358285086: ('0.07229771466754387',), 1358285011: ()} output_args : {1358285138: ('0.07229771466754387',), 1358285086: ('0.07229771466754387',), 1358285011: ('0.07229771466754387',)} args : 1358285011 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 : {22974968: [{'Teint_Dans_La_Masse': 22974976, 'flou': 22974977, 'environnement': 22974978, 'metal': 22974979, 'papier': 22974980, 'mal_croppe': 22974981, 'Carton_brun': 22974982, 'cartonnette': 22974983, 'kraft': 22974984, 'plastique': 22974985, 'autre_refus': 22974986, 'Carton_gris': 22974987}]} input_args_next_step : {1358285138: ('0.07229771466754387',), 1358285086: ('0.07229771466754387',), 1358285011: ('0.07229771466754387',), 22974968: ()} output_args : {22974968: [{'Teint_Dans_La_Masse': 22974976, 'flou': 22974977, 'environnement': 22974978, 'metal': 22974979, 'papier': 22974980, 'mal_croppe': 22974981, 'Carton_brun': 22974982, 'cartonnette': 22974983, 'kraft': 22974984, 'plastique': 22974985, 'autre_refus': 22974986, 'Carton_gris': 22974987}]} args : 22974968 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 :4, first value : ('0.07229771466754387',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22974968) 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 (1358285138,1358285086,1358285011) Found this number of photos: 3 ##### Call download_photos : nb_thread : 5 begin to download photo : 1358285011 begin to download photo : 1358285086 begin to download photo : 1358285138 download finish for photo 1358285086 download finish for photo 1358285138 download finish for photo 1358285011 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette229749771747240742/ imagette229749791747240742/ imagette229749811747240742/ length of list_filenames : 3 ; length of list_pids : 3 ; length of list_args : 3 results_Auto_P22974968_14-05-2025_18_39_02.pdf 22974977 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=22974977 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette229749771747240742 22974979 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=22974979 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette229749791747240742 22974981 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=22974981 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette229749811747240742 22974983 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=22974983 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1358284112: '1747240527_158094_1358283357_82097a274444f0f97262181d673eafb6_rle_crop_3797642699_0.png'} change filename to text .imagette229749831747240742/ imagette229749831747240742/1747240527_158094_1358283357_82097a274444f0f97262181d673eafb6_rle_crop_3797642699_0.png.png imagette229749841747240742/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/7801de63fe314d1b386fb6dfa795a5c7_72595439.png imagette229749831747240742 22974984 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=22974984 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette229749841747240742 22974985 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=22974985 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1358284156: '1747240527_158094_1358283357_82097a274444f0f97262181d673eafb6_rle_crop_3797642697_0.png', 1358284159: '1747240527_158094_1358283357_82097a274444f0f97262181d673eafb6_rle_crop_3797642708_0.png', 1358284163: '1747240527_158094_1358283357_82097a274444f0f97262181d673eafb6_rle_crop_3797642703_0.png', 1358284166: '1747240527_158094_1358283164_bc73e01427f87e614a3ee9074ae03268_rle_crop_3797642831_0.png', 1358284169: '1747240527_158094_1358283164_bc73e01427f87e614a3ee9074ae03268_rle_crop_3797642828_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/baf3dc849c37101fedbfc65f8a66ab73_6652226.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/dd1f04f8f01bdf30d707b4446791ac51_43809566.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/b328e693de31f36f8c280448b392c469_1650346.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/7be55158e395042305fe09421d1055cf_7982946.png change filename to text .imagette229749851747240742/ imagette229749851747240742/1747240527_158094_1358283357_82097a274444f0f97262181d673eafb6_rle_crop_3797642697_0.png.png imagette229749851747240742/1747240527_158094_1358283357_82097a274444f0f97262181d673eafb6_rle_crop_3797642703_0.png.png imagette229749851747240742/1747240527_158094_1358283164_bc73e01427f87e614a3ee9074ae03268_rle_crop_3797642831_0.png.png imagette229749851747240742/1747240527_158094_1358283164_bc73e01427f87e614a3ee9074ae03268_rle_crop_3797642828_0.png.png imagette229749851747240742/1747240527_158094_1358283357_82097a274444f0f97262181d673eafb6_rle_crop_3797642708_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/346c1cf6ef692aa0ef2fcfe7a028708f_19142059.png imagette229749851747240742 22974986 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=22974986 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1358284078: '1747240527_158094_1358283168_a9f0fbef3ba210aec065dfa2939fbbce_rle_crop_3797642796_0.png', 1358285773: '1747240647_162706_1358284270_a72eb50f6abb030578504cc71d458eb0_rle_crop_3797649668_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/f299c30345fce00f747af35e140bf65d_99517451.png change filename to text .imagette229749861747240743/ imagette229749861747240743/1747240527_158094_1358283168_a9f0fbef3ba210aec065dfa2939fbbce_rle_crop_3797642796_0.png.png imagette229749861747240743/1747240647_162706_1358284270_a72eb50f6abb030578504cc71d458eb0_rle_crop_3797649668_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/4851a06a735dd7447025351abd69c95b_64551412.png imagette229749861747240743 22974976 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=22974976 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1358284050: '1747240527_158094_1358283357_82097a274444f0f97262181d673eafb6_rle_crop_3797642701_0.png', 1358284054: '1747240527_158094_1358283357_82097a274444f0f97262181d673eafb6_rle_crop_3797642700_0.png', 1358284058: '1747240527_158094_1358283164_bc73e01427f87e614a3ee9074ae03268_rle_crop_3797642823_0.png', 1358285769: '1747240647_162706_1358284212_1ab12437822173e432768306c36195d4_rle_crop_3797649680_0.png', 1358285770: '1747240647_162706_1358284160_5450e2e2a63231c55acbc967cd7a35b1_rle_crop_3797649690_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/61e2e8c970dd644492e1734cb9427e50_17347729.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/265c7ffefc785523766fa3fd842f278c_44592052.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/6839810901d753b5e505e083c2996d20_38788033.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/aea6c2afb58d61e485c67d7b3b0bf7cf_33311792.png change filename to text .imagette229749761747240743/ imagette229749761747240743/1747240527_158094_1358283357_82097a274444f0f97262181d673eafb6_rle_crop_3797642700_0.png.png imagette229749761747240743/1747240647_162706_1358284160_5450e2e2a63231c55acbc967cd7a35b1_rle_crop_3797649690_0.png.png imagette229749761747240743/1747240527_158094_1358283164_bc73e01427f87e614a3ee9074ae03268_rle_crop_3797642823_0.png.png imagette229749761747240743/1747240647_162706_1358284212_1ab12437822173e432768306c36195d4_rle_crop_3797649680_0.png.png imagette229749761747240743/1747240527_158094_1358283357_82097a274444f0f97262181d673eafb6_rle_crop_3797642701_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/d323cfc75b7f8773b18124d75c72a163_76076557.png imagette229749761747240743 22974982 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=22974982 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1358284126: '1747240527_158094_1358283207_901f768850dfd9f33f3d947723aec743_rle_crop_3797642772_0.png', 1358284129: '1747240527_158094_1358283195_bc8eff28527fca307d3955a036083890_rle_crop_3797642788_0.png', 1358285776: '1747240647_162706_1358284160_5450e2e2a63231c55acbc967cd7a35b1_rle_crop_3797649692_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/e42eb01400350a23a63a27d9b799be6d_5860391.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/9ce1c1e5decfa6857f358cb5ef1b0248_36251928.png change filename to text .imagette229749821747240743/ imagette229749821747240743/1747240527_158094_1358283207_901f768850dfd9f33f3d947723aec743_rle_crop_3797642772_0.png.png imagette229749821747240743/1747240647_162706_1358284160_5450e2e2a63231c55acbc967cd7a35b1_rle_crop_3797649692_0.png.png imagette229749821747240743/1747240527_158094_1358283195_bc8eff28527fca307d3955a036083890_rle_crop_3797642788_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/2f99295f04afb22c074152d2f3a514eb_98229042.png imagette229749821747240743 22974987 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=22974987 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1358284098: '1747240527_158094_1358283164_bc73e01427f87e614a3ee9074ae03268_rle_crop_3797642817_0.png', 1358285775: '1747240647_162706_1358284212_1ab12437822173e432768306c36195d4_rle_crop_3797649679_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/93f658e86c86cd7e862318be2aed6932_74109627.png change filename to text .imagette229749871747240743/ imagette229749871747240743/1747240527_158094_1358283164_bc73e01427f87e614a3ee9074ae03268_rle_crop_3797642817_0.png.png imagette229749871747240743/1747240647_162706_1358284212_1ab12437822173e432768306c36195d4_rle_crop_3797649679_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/26f7f41a50e30ed18de2d4a1cb86bd30_42255966.png imagette229749871747240743 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22974968 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22974988,22974989,22974990,22974991,22974992,22974993,22974994,22974995,22974996,22974997,22974998,22974999?tags=Teint_Dans_La_Masse,flou,environnement,metal,papier,mal_croppe,Carton_brun,cartonnette,kraft,plastique,autre_refus,Carton_gris your option no_mail is active, we will not send the real mail to your client args[1358285138] : ('0.07229771466754387',) no score found for photo 1358285138 We are sending mail with results at report@fotonower.com args[1358285086] : ('0.07229771466754387',) no score found for photo 1358285086 We are sending mail with results at report@fotonower.com args[1358285011] : ('0.07229771466754387',) no score found for photo 1358285011 We are sending mail with results at report@fotonower.com refus_total : 0.07229771466754387 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=22974968 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_P22974968_14-05-2025_18_39_02.pdf results_Auto_P22974968_14-05-2025_18_39_02.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22974968_14-05-2025_18_39_02.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','22974968','results_Auto_P22974968_14-05-2025_18_39_02.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22974968_14-05-2025_18_39_02.pdf','pdf','','0.12','0.07229771466754387') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22974968]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1358285138, 1358285086, 1358285011] map_info['map_portfolio_photo'] : {22974968: [1358285138, 1358285086, 1358285011, 1358284379, 1358284322, 1358284270, 1358284212, 1358284160, 1358283650, 1358283619, 1358283589, 1358283414, 1358283409, 1358283405, 1358283401, 1358283396, 1358283357, 1358283353, 1358283213, 1358283210, 1358283207, 1358283195, 1358283168, 1358283164, 1358282961]} final : False mtd_id 4302 list_pids : [1358285138, 1358285086, 1358285011] 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, '2852534') ('4302', '22974968', '1358285138', None, None, None, None, None, '2852534') ('4302', None, None, None, None, None, None, None, '2852534') ('4302', '22974968', '1358285086', None, None, None, None, None, '2852534') ('4302', None, None, None, None, None, None, None, '2852534') ('4302', '22974968', '1358285011', None, None, None, None, None, '2852534') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 3 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', '22974968', '1358285138', None, None, None, None, None, '2852534'), ('4302', '22974968', '1358285086', None, None, None, None, None, '2852534'), ('4302', '22974968', '1358285011', None, None, None, None, None, '2852534')] time used for this insertion : 0.014717578887939453 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.2114663124084473 time spend to save output : 0.015002727508544922 total time spend for step 4 : 2.226469039916992 step5:split_time_score Wed May 14 18:39:04 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 : ['22974968'] 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 : [('22974968',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22974968) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1358285086: {'path': 'temp/1747240742_3913882_1358285086_f47d30660378423a6294d38b111a5cc6.jpg', 'extension': 'jpg'}, 1358285138: {'path': 'temp/1747240742_3913882_1358285138_f2b2237131db6dc53447aeeb025b1e2f.jpg', 'extension': 'jpg'}, 1358285011: {'path': 'temp/1747240742_3913882_1358285011_59758ee015e207f00d8a7e2e4a57a9d6.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 = 22974968; (('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 = 22974968 group by h (('18', 25),) 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=22974968 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 (22974968) 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 (22974968) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 14052025 22974968 Nombre de photos uploadées : 25 / 23040 (0%) 14052025 22974968 Nombre de photos taguées (types de déchets): 0 / 25 (0%) 14052025 22974968 Nombre de photos taguées (volume) : 0 / 25 (0%) [{'photo_id': 1358282961, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/2330d20912b2ade63e30b9ca24c9f35f.jpg', 'username': None, 'uploaded_at': 1747240267, 'text': 'image_14052025_18_30_24_10138.jpg'}, {'photo_id': 1358283213, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/49c1b2b5d706f17e0246b3b9e0d5a59a.jpg', 'username': None, 'uploaded_at': 1747240327, 'text': 'image_14052025_18_30_34_10133.jpg'}, {'photo_id': 1358283210, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/8f1621c50aefbd62f58a5bf949a54c3f.jpg', 'username': None, 'uploaded_at': 1747240327, 'text': 'image_14052025_18_31_04_010142m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1358283207, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/14/901f768850dfd9f33f3d947723aec743.jpg', 'username': None, 'uploaded_at': 1747240327, 'text': 'image_14052025_18_31_14_010134m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 3.0994415283203125e-06 elapsed_time : order_list_meta_photo_and_scores 8.106231689453125e-06 ????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0014796257019042969 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22974968, '2025-05-14' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1803731,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02873086929321289 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= 1803731 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1803731, 'dashboard_run_id': 1813982, 'mtr_portfolio_id': 22973918, 'dashboard_result_id': 10563305, '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_P22973918_14-05-2025_18_17_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22973925, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22973927, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22973928, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22973929, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22973930, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22973931, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22973932, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22973933, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22973934, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22973935, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22973936, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22973937, 'pht': 3726}}"}, {'dashboat_entry_day': 1803731, 'dashboard_run_id': 1813982, 'mtr_portfolio_id': 22974546, 'dashboard_result_id': 10563306, '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_P22974546_14-05-2025_18_32_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22974556, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22974557, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22974558, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22974559, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22974560, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22974561, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22974562, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22974563, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22974564, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22974565, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22974566, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22974567, 'pht': 3726}}"}, {'dashboat_entry_day': 1803731, 'dashboard_run_id': 1813982, 'mtr_portfolio_id': 22974968, 'dashboard_result_id': 10563307, '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_P22974968_14-05-2025_18_37_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22974976, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22974977, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22974978, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22974979, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22974980, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22974981, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22974982, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22974983, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22974984, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22974985, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22974986, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22974987, '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 = 22973918 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': 2852315, 'mtr_portfolio_id': 22973918, 'created_at': datetime.datetime(2025, 5, 14, 18, 16, 59), 'result': '0.05333375845187493', 'result_long': None, 'result_double': None}] Qualite : 0.05333375845187493 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22973918 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22973918_14-05-2025_18_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22973918 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_P22973918_14-05-2025_18_17_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22973925, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22973927, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22973928, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22973929, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22973930, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22973931, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22973932, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22973933, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22973934, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22973935, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22973936, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22973937, 'pht': 3726}}" where mtr_portfolio_id = 22973918 and dashboard_run_id = 1813983 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`=22973918 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10563305, 0.05333375845187493, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22973918_14-05-2025_18_17_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22973925, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22973927, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22973928, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22973929, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22973930, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22973931, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22973932, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22973933, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22973934, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22973935, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22973936, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22973937, '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 = 22974546 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 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 = 22974546 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 22974546 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22974546 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22974546 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22974546 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22974546_14-05-2025_18_32_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22974546 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_P22974546_14-05-2025_18_32_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22974556, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22974557, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22974558, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22974559, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22974560, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22974561, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22974562, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22974563, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22974564, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22974565, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22974566, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22974567, 'pht': 3726}}" where mtr_portfolio_id = 22974546 and dashboard_run_id = 1813983 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 = 22974968 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': 2852534, 'mtr_portfolio_id': 22974968, 'created_at': datetime.datetime(2025, 5, 14, 18, 39, 1), 'result': '0.07229771466754387', 'result_long': None, 'result_double': None}] Qualite : 0.07229771466754387 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22974968 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22974968_14-05-2025_18_39_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22974968 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_P22974968_14-05-2025_18_39_02.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22974976, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22974977, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22974978, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22974979, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22974980, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22974981, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22974982, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22974983, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22974984, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22974985, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22974986, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22974987, 'pht': 3726}}" where mtr_portfolio_id = 22974968 and dashboard_run_id = 1813983 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`=22974968 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10563307, 0.07229771466754387, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22974968_14-05-2025_18_39_02.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22974976, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22974977, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22974978, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22974979, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22974980, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22974981, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22974982, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22974983, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22974984, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22974985, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22974986, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22974987, '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 (22973918,22974546,22974968) result : ((1358275226,), (1358275243,), (1358275246,), (1358275248,), (1358275284,), (1358275287,), (1358275290,), (1358275292,), (1358275296,), (1358275327,), (1358275330,), (1358275564,), (1358275577,), (1358275611,), (1358275641,), (1358275671,), (1358276023,), (1358276050,), (1358276077,), (1358276110,), (1358276139,), (1358276634,), (1358276708,), (1358276750,), (1358276779,), (1358276826,), (1358277124,), (1358277161,), (1358277209,), (1358277259,), (1358277273,), (1358277426,), (1358277442,), (1358277444,), (1358277445,), (1358277584,), (1358277641,), (1358277678,), (1358277705,), (1358277750,), (1358278012,), (1358278090,), (1358278102,), (1358278127,), (1358278131,), (1358278156,), (1358278199,), (1358278203,), (1358278206,), (1358278208,), (1358278211,), (1358278319,), (1358278330,), (1358278344,), (1358278433,), (1358278436,), (1358278437,), (1358278439,), (1358278441,), (1358278482,), (1358278479,), (1358279504,), (1358282968,), (1358282961,), (1358283164,), (1358283168,), (1358283195,), (1358283207,), (1358283210,), (1358283213,), (1358283353,), (1358283357,), (1358283396,), (1358283401,), (1358283405,), (1358283409,), (1358283414,), (1358283589,), (1358283619,), (1358283650,), (1358284160,), (1358284212,), (1358284270,), (1358284322,), (1358284379,), (1358285011,), (1358285086,), (1358285138,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'14052025': {'nb_upload': 25, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22974968]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1358285138, 1358285086, 1358285011] map_info['map_portfolio_photo'] : {22974968: [1358285138, 1358285086, 1358285011, 1358284379, 1358284322, 1358284270, 1358284212, 1358284160, 1358283650, 1358283619, 1358283589, 1358283414, 1358283409, 1358283405, 1358283401, 1358283396, 1358283357, 1358283353, 1358283213, 1358283210, 1358283207, 1358283195, 1358283168, 1358283164, 1358282961]} final : True mtd_id 4302 list_pids : [1358285138, 1358285086, 1358285011] Looping around the photos to save general results len do output : 1 /22974968Didn'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, '2852534') ('4302', '22974968', '1358285138', None, None, None, None, None, '2852534') ('4302', None, None, None, None, None, None, None, '2852534') ('4302', '22974968', '1358285086', None, None, None, None, None, '2852534') ('4302', None, None, None, None, None, None, None, '2852534') ('4302', '22974968', '1358285011', None, None, None, None, None, '2852534') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 4 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, '22974968', 'None', None, None, None, None, '2852534'), ('4302', '22974968', '1358285138', None, None, None, None, None, '2852534'), ('4302', '22974968', '1358285086', None, None, None, None, None, '2852534'), ('4302', '22974968', '1358285011', None, None, None, None, None, '2852534')] time used for this insertion : 0.013240814208984375 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.2854139804840088 time spend to save output : 0.0134429931640625 total time spend for step 5 : 0.2988569736480713 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 (2852534) 2.02user 2.32system 0:08.73elapsed 49%CPU (0avgtext+0avgdata 157784maxresident)k 42904inputs+5608outputs (211major+64082minor)pagefaults 0swaps