SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22883957) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22883946) result : ((1357644694,), (1357644697,), (1357644698,), (1357644700,), (1357644749,), (1357644751,), (1357644754,), (1357644757,), (1357644760,), (1357644762,)) 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 (1357644700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22883958 , 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=22883946 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 (22883958) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22883946) result : ((1357644694,), (1357644697,), (1357644698,), (1357644700,), (1357644749,), (1357644751,), (1357644754,), (1357644757,), (1357644760,), (1357644762,)) 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 (1357644700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22883960 , 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=22883946 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 (22883960) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22883946) result : ((1357644694,), (1357644697,), (1357644698,), (1357644700,), (1357644749,), (1357644751,), (1357644754,), (1357644757,), (1357644760,), (1357644762,)) 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 (1357644700) and cspi.crop_hashtag_id = chi.id; 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`=22883946 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','papier','Carton_brun','cartonnette','mal_croppe','environnement','plastique','autre_refus','metal','Carton_gris','kraft','Teint_Dans_La_Masse')) 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`=22883946 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','papier','Carton_brun','cartonnette','mal_croppe','environnement','plastique','autre_refus','metal','Carton_gris','kraft','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12052025_14_45_04_010147_4417_flou_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12052025_14_45_04_010147_4417_papier_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12052025_14_45_04_010147_4417_Carton_brun_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12052025_14_45_04_010147_4417_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12052025_14_45_04_010147_4417_mal_croppe_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12052025_14_45_04_010147_4417_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12052025_14_45_04_010147_4417_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12052025_14_45_04_010147_4417_autre_refus_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12052025_14_45_04_010147_4417_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12052025_14_45_04_010147_4417_Carton_gris_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12052025_14_45_04_010147_4417_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12052025_14_45_04_010147_4417_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[22883946, 22883965, 4417, 0.5, 492777938, 979], [22883946, 22883966, 4417, 0.5, 492668766, 979], [22883946, 22883968, 4417, 0.5, 2107753024, 979], [22883946, 22883969, 4417, 0.5, 702398920, 979], [22883946, 22883970, 4417, 0.5, 2107755527, 979], [22883946, 22883971, 4417, 0.5, 493012381, 979], [22883946, 22883973, 4417, 0.5, 492725882, 979], [22883946, 22883974, 4417, 0.5, 2107752406, 979], [22883946, 22883975, 4417, 0.5, 492628673, 979], [22883946, 22883976, 4417, 0.5, 2107753020, 979], [22883946, 22883978, 4417, 0.5, 493202403, 979], [22883946, 22883979, 4417, 0.5, 2107752385, 979]] 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`=22883946 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','papier','Carton_brun','cartonnette','mal_croppe','environnement','plastique','autre_refus','metal','Carton_gris','kraft','Teint_Dans_La_Masse')) 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`=22883946 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','papier','Carton_brun','cartonnette','mal_croppe','environnement','plastique','autre_refus','metal','Carton_gris','kraft','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 22883946, 'sub_port_id': 22883965, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15275232, 'last_updated_at': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 14, 49, 28)}, 'papier': {'main_port_id': 22883946, 'sub_port_id': 22883966, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15275233, 'last_updated_at': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 14, 49, 28)}, 'Carton_brun': {'main_port_id': 22883946, 'sub_port_id': 22883968, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15275234, 'last_updated_at': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 14, 49, 28)}, 'cartonnette': {'main_port_id': 22883946, 'sub_port_id': 22883969, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15275235, 'last_updated_at': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 14, 49, 28)}, 'mal_croppe': {'main_port_id': 22883946, 'sub_port_id': 22883970, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15275236, 'last_updated_at': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 14, 49, 28)}, 'environnement': {'main_port_id': 22883946, 'sub_port_id': 22883971, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15275237, 'last_updated_at': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 14, 49, 28)}, 'plastique': {'main_port_id': 22883946, 'sub_port_id': 22883973, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15275238, 'last_updated_at': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 14, 49, 28)}, 'autre_refus': {'main_port_id': 22883946, 'sub_port_id': 22883974, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15275239, 'last_updated_at': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 14, 49, 28)}, 'metal': {'main_port_id': 22883946, 'sub_port_id': 22883975, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15275240, 'last_updated_at': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 14, 49, 28)}, 'Carton_gris': {'main_port_id': 22883946, 'sub_port_id': 22883976, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15275241, 'last_updated_at': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 14, 49, 28)}, 'kraft': {'main_port_id': 22883946, 'sub_port_id': 22883978, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15275242, 'last_updated_at': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 14, 49, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 22883946, 'sub_port_id': 22883979, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15275243, 'last_updated_at': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 14, 49, 28), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 14, 49, 28)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22883965,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22883947 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22883966,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22883948 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22883968,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22883949 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22883969,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22883950 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22883970,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22883951 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22883971,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22883952 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22883973,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22883953 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22883974,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22883955 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22883975,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22883956 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22883976,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22883957 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22883978,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22883958 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22883979,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22883960 lien utilise dans velours : https://www.fotonower.com/velours/22883965,22883966,22883968,22883969,22883970,22883971,22883973,22883974,22883975,22883976,22883978,22883979?tags=flou,papier,Carton_brun,cartonnette,mal_croppe,environnement,plastique,autre_refus,metal,Carton_gris,kraft,Teint_Dans_La_Masse After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22883946]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1357644762, 1357644760, 1357644757, 1357644754, 1357644751, 1357644749, 1357644700, 1357644698, 1357644697, 1357644694] map_info['map_portfolio_photo'] : {22883946: [1357644762, 1357644760, 1357644757, 1357644754, 1357644751, 1357644749, 1357644700, 1357644698, 1357644697, 1357644694]} final : False mtd_id 4302 list_pids : [1357644762, 1357644760, 1357644757, 1357644754, 1357644751, 1357644749, 1357644700, 1357644698, 1357644697, 1357644694] Looping around the photos to save general results len do output : 1 /22883946. 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, '2825193') ('4302', '22883946', '1357644762', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644760', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644757', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644754', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644751', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644749', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644700', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644698', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644697', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644694', None, None, None, None, None, '2825193') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22883946', "{'flou': 22883947, 'papier': 22883948, 'Carton_brun': 22883949, 'cartonnette': 22883950, 'mal_croppe': 22883951, 'environnement': 22883952, 'plastique': 22883953, 'autre_refus': 22883955, 'metal': 22883956, 'Carton_gris': 22883957, 'kraft': 22883958, 'Teint_Dans_La_Masse': 22883960}", None, None, None, None, '2825193'), ('4302', '22883946', '1357644762', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644760', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644757', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644754', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644751', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644749', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644700', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644698', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644697', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644694', None, None, None, None, None, '2825193')] time used for this insertion : 0.013531684875488281 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.9614489078521729 time spend to save output : 0.013949871063232422 total time spend for step 1 : 0.9753987789154053 step2:final Mon May 12 14:49:28 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 (22883946) 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 22883946 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1357644700,1357644698,1357644697,1357644694,1357644762,1357644760,1357644757,1357644754,1357644751,1357644749); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22883946]) Inside saveOutput : final : False verbose : True original output for save of step final : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ('0.0',), 1357644749: ('0.0',), 1357644700: ('0.0',), 1357644698: ('0.0',), 1357644697: ('0.0',), 1357644694: ('0.0',)} new output for save of step final : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ('0.0',), 1357644749: ('0.0',), 1357644700: ('0.0',), 1357644698: ('0.0',), 1357644697: ('0.0',), 1357644694: ('0.0',)} [1357644762, 1357644760, 1357644757, 1357644754, 1357644751, 1357644749, 1357644700, 1357644698, 1357644697, 1357644694] map_info['map_portfolio_photo'] : {22883946: [1357644762, 1357644760, 1357644757, 1357644754, 1357644751, 1357644749, 1357644700, 1357644698, 1357644697, 1357644694]} final : False mtd_id 4302 list_pids : [1357644762, 1357644760, 1357644757, 1357644754, 1357644751, 1357644749, 1357644700, 1357644698, 1357644697, 1357644694] Looping around the photos to save general results len do output : 10 /1357644762.Didn't retrieve data . /1357644760.Didn't retrieve data . /1357644757.Didn't retrieve data . /1357644754.Didn't retrieve data . /1357644751.Didn't retrieve data . /1357644749.Didn't retrieve data . /1357644700.Didn't retrieve data . /1357644698.Didn't retrieve data . /1357644697.Didn't retrieve data . /1357644694.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, '2825193') ('4302', '22883946', '1357644762', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644760', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644757', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644754', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644751', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644749', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644700', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644698', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644697', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644694', None, None, None, None, None, '2825193') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 30 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22883946', '1357644762', '0.0', None, None, None, None, '2825193'), ('4302', '22883946', '1357644760', '0.0', None, None, None, None, '2825193'), ('4302', '22883946', '1357644757', '0.0', None, None, None, None, '2825193'), ('4302', '22883946', '1357644754', '0.0', None, None, None, None, '2825193'), ('4302', '22883946', '1357644751', '0.0', None, None, None, None, '2825193'), ('4302', '22883946', '1357644749', '0.0', None, None, None, None, '2825193'), ('4302', '22883946', '1357644700', '0.0', None, None, None, None, '2825193'), ('4302', '22883946', '1357644698', '0.0', None, None, None, None, '2825193'), ('4302', '22883946', '1357644697', '0.0', None, None, None, None, '2825193'), ('4302', '22883946', '1357644694', '0.0', None, None, None, None, '2825193')] time used for this insertion : 0.01305079460144043 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.014064788818359375 time spend to save output : 0.01360774040222168 total time spend for step 2 : 0.027672529220581055 step3:velours_tree Mon May 12 14:49:28 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 : {22883946: [{'flou': 22883947, 'papier': 22883948, 'Carton_brun': 22883949, 'cartonnette': 22883950, 'mal_croppe': 22883951, 'environnement': 22883952, 'plastique': 22883953, 'autre_refus': 22883955, 'metal': 22883956, 'Carton_gris': 22883957, 'kraft': 22883958, 'Teint_Dans_La_Masse': 22883960}]} input_args_next_step : {22883946: ()} output_args : {22883946: [{'flou': 22883947, 'papier': 22883948, 'Carton_brun': 22883949, 'cartonnette': 22883950, 'mal_croppe': 22883951, 'environnement': 22883952, 'plastique': 22883953, 'autre_refus': 22883955, 'metal': 22883956, 'Carton_gris': 22883957, 'kraft': 22883958, 'Teint_Dans_La_Masse': 22883960}]} args : 22883946 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 : ({'flou': 22883947, 'papier': 22883948, 'Carton_brun': 22883949, 'cartonnette': 22883950, 'mal_croppe': 22883951, 'environnement': 22883952, 'plastique': 22883953, 'autre_refus': 22883955, 'metal': 22883956, 'Carton_gris': 22883957, 'kraft': 22883958, 'Teint_Dans_La_Masse': 22883960},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22883946) 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([22883946]) 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.2844061851501465 time spend to save output : 4.863739013671875e-05 total time spend for step 3 : 0.2844548225402832 step4:send_mail_cod Mon May 12 14:49:29 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 : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ('0.0',), 1357644749: ('0.0',), 1357644700: ('0.0',), 1357644698: ('0.0',), 1357644697: ('0.0',), 1357644694: ('0.0',)} input_args_next_step : {1357644762: ()} output_args : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ('0.0',), 1357644749: ('0.0',), 1357644700: ('0.0',), 1357644698: ('0.0',), 1357644697: ('0.0',), 1357644694: ('0.0',)} args : 1357644762 depend.output_id : 0 input_args_next_step : {1357644762: ('0.0',), 1357644760: ()} output_args : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ('0.0',), 1357644749: ('0.0',), 1357644700: ('0.0',), 1357644698: ('0.0',), 1357644697: ('0.0',), 1357644694: ('0.0',)} args : 1357644760 depend.output_id : 0 input_args_next_step : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ()} output_args : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ('0.0',), 1357644749: ('0.0',), 1357644700: ('0.0',), 1357644698: ('0.0',), 1357644697: ('0.0',), 1357644694: ('0.0',)} args : 1357644757 depend.output_id : 0 input_args_next_step : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ()} output_args : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ('0.0',), 1357644749: ('0.0',), 1357644700: ('0.0',), 1357644698: ('0.0',), 1357644697: ('0.0',), 1357644694: ('0.0',)} args : 1357644754 depend.output_id : 0 input_args_next_step : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ()} output_args : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ('0.0',), 1357644749: ('0.0',), 1357644700: ('0.0',), 1357644698: ('0.0',), 1357644697: ('0.0',), 1357644694: ('0.0',)} args : 1357644751 depend.output_id : 0 input_args_next_step : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ('0.0',), 1357644749: ()} output_args : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ('0.0',), 1357644749: ('0.0',), 1357644700: ('0.0',), 1357644698: ('0.0',), 1357644697: ('0.0',), 1357644694: ('0.0',)} args : 1357644749 depend.output_id : 0 input_args_next_step : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ('0.0',), 1357644749: ('0.0',), 1357644700: ()} output_args : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ('0.0',), 1357644749: ('0.0',), 1357644700: ('0.0',), 1357644698: ('0.0',), 1357644697: ('0.0',), 1357644694: ('0.0',)} args : 1357644700 depend.output_id : 0 input_args_next_step : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ('0.0',), 1357644749: ('0.0',), 1357644700: ('0.0',), 1357644698: ()} output_args : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ('0.0',), 1357644749: ('0.0',), 1357644700: ('0.0',), 1357644698: ('0.0',), 1357644697: ('0.0',), 1357644694: ('0.0',)} args : 1357644698 depend.output_id : 0 input_args_next_step : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ('0.0',), 1357644749: ('0.0',), 1357644700: ('0.0',), 1357644698: ('0.0',), 1357644697: ()} output_args : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ('0.0',), 1357644749: ('0.0',), 1357644700: ('0.0',), 1357644698: ('0.0',), 1357644697: ('0.0',), 1357644694: ('0.0',)} args : 1357644697 depend.output_id : 0 input_args_next_step : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ('0.0',), 1357644749: ('0.0',), 1357644700: ('0.0',), 1357644698: ('0.0',), 1357644697: ('0.0',), 1357644694: ()} output_args : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ('0.0',), 1357644749: ('0.0',), 1357644700: ('0.0',), 1357644698: ('0.0',), 1357644697: ('0.0',), 1357644694: ('0.0',)} args : 1357644694 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 : {22883946: [{'flou': 22883947, 'papier': 22883948, 'Carton_brun': 22883949, 'cartonnette': 22883950, 'mal_croppe': 22883951, 'environnement': 22883952, 'plastique': 22883953, 'autre_refus': 22883955, 'metal': 22883956, 'Carton_gris': 22883957, 'kraft': 22883958, 'Teint_Dans_La_Masse': 22883960}]} input_args_next_step : {1357644762: ('0.0',), 1357644760: ('0.0',), 1357644757: ('0.0',), 1357644754: ('0.0',), 1357644751: ('0.0',), 1357644749: ('0.0',), 1357644700: ('0.0',), 1357644698: ('0.0',), 1357644697: ('0.0',), 1357644694: ('0.0',), 22883946: ()} output_args : {22883946: [{'flou': 22883947, 'papier': 22883948, 'Carton_brun': 22883949, 'cartonnette': 22883950, 'mal_croppe': 22883951, 'environnement': 22883952, 'plastique': 22883953, 'autre_refus': 22883955, 'metal': 22883956, 'Carton_gris': 22883957, 'kraft': 22883958, 'Teint_Dans_La_Masse': 22883960}]} args : 22883946 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :11, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22883946) 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 (1357644762,1357644760,1357644757,1357644754,1357644751,1357644749,1357644700,1357644698,1357644697,1357644694) Found this number of photos: 10 ##### Call download_photos : nb_thread : 5 begin to download photo : 1357644694 begin to download photo : 1357644700 begin to download photo : 1357644754 begin to download photo : 1357644762 download finish for photo 1357644762 download finish for photo 1357644694 begin to download photo : 1357644697 download finish for photo 1357644700 begin to download photo : 1357644749 download finish for photo 1357644754 begin to download photo : 1357644757 download finish for photo 1357644697 begin to download photo : 1357644698 download finish for photo 1357644749 begin to download photo : 1357644751 download finish for photo 1357644757 begin to download photo : 1357644760 download finish for photo 1357644698 download finish for photo 1357644751 download finish for photo 1357644760 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette228839471747054169/ imagette228839501747054169/ imagette228839511747054169/ imagette228839531747054169/ imagette228839551747054169/ imagette228839561747054169/ imagette228839581747054169/ imagette228839491747054169/ imagette228839571747054169/ imagette228839601747054169/ length of list_filenames : 10 ; length of list_pids : 10 ; length of list_args : 10 results_Auto_P22883946_12-05-2025_14_49_29.pdf 22883947 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=22883947 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette228839471747054169 22883950 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=22883950 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette228839501747054169 22883951 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=22883951 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette228839511747054169 22883953 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=22883953 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette228839531747054169 22883955 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=22883955 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette228839551747054169 22883956 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=22883956 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette228839561747054169 22883958 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=22883958 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette228839581747054169 22883949 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=22883949 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette228839491747054169 22883957 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=22883957 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette228839571747054169 22883960 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=22883960 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette228839601747054169 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22883946 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22883965,22883966,22883968,22883969,22883970,22883971,22883973,22883974,22883975,22883976,22883978,22883979?tags=flou,papier,Carton_brun,cartonnette,mal_croppe,environnement,plastique,autre_refus,metal,Carton_gris,kraft,Teint_Dans_La_Masse your option no_mail is active, we will not send the real mail to your client args[1357644762] : ('0.0',) no score found for photo 1357644762 We are sending mail with results at report@fotonower.com args[1357644760] : ('0.0',) no score found for photo 1357644760 We are sending mail with results at report@fotonower.com args[1357644757] : ('0.0',) no score found for photo 1357644757 We are sending mail with results at report@fotonower.com args[1357644754] : ('0.0',) no score found for photo 1357644754 We are sending mail with results at report@fotonower.com args[1357644751] : ('0.0',) no score found for photo 1357644751 We are sending mail with results at report@fotonower.com args[1357644749] : ('0.0',) no score found for photo 1357644749 We are sending mail with results at report@fotonower.com args[1357644700] : ('0.0',) no score found for photo 1357644700 We are sending mail with results at report@fotonower.com args[1357644698] : ('0.0',) no score found for photo 1357644698 We are sending mail with results at report@fotonower.com args[1357644697] : ('0.0',) no score found for photo 1357644697 We are sending mail with results at report@fotonower.com args[1357644694] : ('0.0',) no score found for photo 1357644694 We are sending mail with results at report@fotonower.com refus_total : 0.0 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=22883946 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_P22883946_12-05-2025_14_49_29.pdf results_Auto_P22883946_12-05-2025_14_49_29.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22883946_12-05-2025_14_49_29.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','22883946','results_Auto_P22883946_12-05-2025_14_49_29.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22883946_12-05-2025_14_49_29.pdf','pdf','','0.1','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22883946]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1357644762, 1357644760, 1357644757, 1357644754, 1357644751, 1357644749, 1357644700, 1357644698, 1357644697, 1357644694] map_info['map_portfolio_photo'] : {22883946: [1357644762, 1357644760, 1357644757, 1357644754, 1357644751, 1357644749, 1357644700, 1357644698, 1357644697, 1357644694]} final : False mtd_id 4302 list_pids : [1357644762, 1357644760, 1357644757, 1357644754, 1357644751, 1357644749, 1357644700, 1357644698, 1357644697, 1357644694] 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, '2825193') ('4302', '22883946', '1357644762', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644760', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644757', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644754', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644751', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644749', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644700', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644698', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644697', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644694', None, None, None, None, None, '2825193') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22883946', '1357644762', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644760', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644757', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644754', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644751', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644749', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644700', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644698', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644697', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644694', None, None, None, None, None, '2825193')] time used for this insertion : 0.013852596282958984 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5170915126800537 time spend to save output : 0.0141143798828125 total time spend for step 4 : 1.5312058925628662 step5:split_time_score Mon May 12 14:49:30 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 : ['22883946'] 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 : [('22883946',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22883946) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1357644762: {'path': 'temp/1747054169_2555192_1357644762_99a146e2f01462dba8dfd080a59edf85.jpg', 'extension': 'jpg'}, 1357644694: {'path': 'temp/1747054169_2555192_1357644694_5f71087aba0db07c7e84c945d5e721c0.jpg', 'extension': 'jpg'}, 1357644697: {'path': 'temp/1747054169_2555192_1357644697_f0cd9b441c189e751fd6fc7020e56ddb.jpg', 'extension': 'jpg'}, 1357644698: {'path': 'temp/1747054169_2555192_1357644698_33373af1c6991771020bc37ae5712cfb.jpg', 'extension': 'jpg'}, 1357644700: {'path': 'temp/1747054169_2555192_1357644700_7a20434b0fe199c3c5701f424073c883.jpg', 'extension': 'jpg'}, 1357644749: {'path': 'temp/1747054169_2555192_1357644749_52361862b3d78245df8c2a3dd14e2fcf.jpg', 'extension': 'jpg'}, 1357644751: {'path': 'temp/1747054169_2555192_1357644751_5a74af7692dad3a6d75995d4a2d08332.jpg', 'extension': 'jpg'}, 1357644754: {'path': 'temp/1747054169_2555192_1357644754_456459e021e61a546fd1871902f5085a.jpg', 'extension': 'jpg'}, 1357644757: {'path': 'temp/1747054169_2555192_1357644757_0403a96f83419bd1c244a5344cdfdf0d.jpg', 'extension': 'jpg'}, 1357644760: {'path': 'temp/1747054169_2555192_1357644760_f180a12296a273b3fa0edbf6d6b167a6.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 = 22883946; (('arc_en_ciel_jrm_live',),) 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 = 22883946 group by h (('14', 10),) 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=22883946 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 (22883946) 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 (22883946) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 12052025 22883946 Nombre de photos uploadées : 10 / 23040 (0%) 12052025 22883946 Nombre de photos taguées (types de déchets): 0 / 10 (0%) 12052025 22883946 Nombre de photos taguées (volume) : 0 / 10 (0%) [{'photo_id': 1357644700, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/7a20434b0fe199c3c5701f424073c883.jpg', 'username': None, 'uploaded_at': 1747053967, 'text': 'image_12052025_14_45_04_10147.jpg'}, {'photo_id': 1357644698, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/33373af1c6991771020bc37ae5712cfb.jpg', 'username': None, 'uploaded_at': 1747053967, 'text': 'image_12052025_14_45_14_10136.jpg'}, {'photo_id': 1357644697, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/f0cd9b441c189e751fd6fc7020e56ddb.jpg', 'username': None, 'uploaded_at': 1747053967, 'text': 'image_12052025_14_45_34_10134.jpg'}, {'photo_id': 1357644694, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/5f71087aba0db07c7e84c945d5e721c0.jpg', 'username': None, 'uploaded_at': 1747053967, 'text': 'image_12052025_14_45_44_10134.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 5.245208740234375e-06 ?????????? elapsed_time : fill_and_build_computed_from_old_data 0.0004932880401611328 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 22883946, '2025-05-12' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1796685,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.023535966873168945 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= 1796685 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1796685, 'dashboard_run_id': 1805676, 'mtr_portfolio_id': 22882836, 'dashboard_result_id': 10491888, '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_P22882836_12-05-2025_14_01_03.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22882875, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22882876, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22882877, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22882878, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22882879, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22882880, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22882881, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22882882, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22882883, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22882884, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22882885, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22882886, 'pht': 3726}}"}, {'dashboat_entry_day': 1796685, 'dashboard_run_id': 1805676, 'mtr_portfolio_id': 22883004, 'dashboard_result_id': 10491889, '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_P22883004_12-05-2025_14_18_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22883008, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22883009, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22883010, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22883011, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22883012, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22883013, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22883014, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22883015, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22883016, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22883017, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22883018, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22883019, 'pht': 3726}}"}, {'dashboat_entry_day': 1796685, 'dashboard_run_id': 1805676, 'mtr_portfolio_id': 22883261, 'dashboard_result_id': 10491890, '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_P22883261_12-05-2025_14_32_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22883275, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22883276, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22883277, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22883278, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22883279, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22883280, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22883281, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22883282, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22883283, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22883284, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22883285, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22883286, 'pht': 3726}}"}, {'dashboat_entry_day': 1796685, 'dashboard_run_id': 1805676, 'mtr_portfolio_id': 22883587, 'dashboard_result_id': 10491891, '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_P22883587_12-05-2025_14_48_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22883603, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22883604, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22883605, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22883606, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22883607, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22883608, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22883609, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22883610, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22883611, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22883612, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22883613, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22883614, 'pht': 3726}}"}, {'dashboat_entry_day': 1796685, 'dashboard_run_id': 1805676, 'mtr_portfolio_id': 22883946, 'dashboard_result_id': 10491892, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0}"}] 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 = 22882836 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 = 22882836 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 = 22882836 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22882836 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 = 22882836 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 = 22882836 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22882836_12-05-2025_14_01_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22882836 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_P22882836_12-05-2025_14_01_03.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22882875, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22882876, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22882877, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22882878, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22882879, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22882880, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22882881, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22882882, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22882883, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22882884, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22882885, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22882886, 'pht': 3726}}" where mtr_portfolio_id = 22882836 and dashboard_run_id = 1805676 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 = 22883004 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': 2824864, 'mtr_portfolio_id': 22883004, 'created_at': datetime.datetime(2025, 5, 12, 14, 18, 57), 'result': '0.06550490032695334', 'result_long': None, 'result_double': None}] Qualite : 0.06550490032695334 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22883004 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22883004_12-05-2025_14_18_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22883004 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_P22883004_12-05-2025_14_18_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22883008, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22883009, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22883010, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22883011, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22883012, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22883013, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22883014, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22883015, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22883016, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22883017, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22883018, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22883019, 'pht': 3726}}" where mtr_portfolio_id = 22883004 and dashboard_run_id = 1805676 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`=22883004 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10491889, 0.06550490032695334, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22883004_12-05-2025_14_18_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22883008, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22883009, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22883010, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22883011, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22883012, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22883013, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22883014, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22883015, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22883016, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22883017, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22883018, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22883019, '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 = 22883261 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': 2824936, 'mtr_portfolio_id': 22883261, 'created_at': datetime.datetime(2025, 5, 12, 14, 32, 58), 'result': '0.039049451747735935', 'result_long': None, 'result_double': None}] Qualite : 0.039049451747735935 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22883261 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22883261_12-05-2025_14_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22883261 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_P22883261_12-05-2025_14_32_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22883275, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22883276, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22883277, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22883278, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22883279, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22883280, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22883281, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22883282, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22883283, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22883284, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22883285, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22883286, 'pht': 3726}}" where mtr_portfolio_id = 22883261 and dashboard_run_id = 1805676 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`=22883261 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10491890, 0.039049451747735935, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22883261_12-05-2025_14_32_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22883275, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22883276, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22883277, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22883278, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22883279, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22883280, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22883281, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22883282, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22883283, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22883284, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22883285, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22883286, '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 = 22883587 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': 2825059, 'mtr_portfolio_id': 22883587, 'created_at': datetime.datetime(2025, 5, 12, 14, 48, 59), 'result': '0.03713663264093579', 'result_long': None, 'result_double': None}] Qualite : 0.03713663264093579 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22883587 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22883587_12-05-2025_14_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22883587 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_P22883587_12-05-2025_14_48_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22883603, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22883604, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22883605, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22883606, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22883607, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22883608, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22883609, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22883610, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22883611, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22883612, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22883613, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22883614, 'pht': 3726}}" where mtr_portfolio_id = 22883587 and dashboard_run_id = 1805676 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`=22883587 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10491891, 0.03713663264093579, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22883587_12-05-2025_14_48_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22883603, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22883604, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22883605, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22883606, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22883607, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22883608, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22883609, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22883610, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22883611, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22883612, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22883613, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22883614, '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 = 22883946 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 = 22883946 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 = 22883946 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22883946 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 = 22883946 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 = 22883946 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22883946_12-05-2025_14_49_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22883946 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_P22883946_12-05-2025_14_49_29.pdf'}" where mtr_portfolio_id = 22883946 and dashboard_run_id = 1805676 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22882836,22883004,22883261,22883587,22883946) result : ((1357632727,), (1357636418,), (1357637218,), (1357637267,), (1357637272,), (1357637276,), (1357637279,), (1357637387,), (1357637430,), (1357637458,), (1357637509,), (1357637539,), (1357637848,), (1357637880,), (1357637910,), (1357637942,), (1357637996,), (1357638002,), (1357638005,), (1357638010,), (1357638017,), (1357638021,), (1357638421,), (1357638450,), (1357638498,), (1357638552,), (1357638607,), (1357638634,), (1357638873,), (1357638900,), (1357638992,), (1357639007,), (1357639011,), (1357639019,), (1357639050,), (1357639418,), (1357639441,), (1357639448,), (1357639615,), (1357639684,), (1357639751,), (1357639806,), (1357639861,), (1357639928,), (1357640536,), (1357640595,), (1357640650,), (1357640684,), (1357640854,), (1357640889,), (1357640916,), (1357640924,), (1357640927,), (1357640931,), (1357640965,), (1357640969,), (1357640972,), (1357640975,), (1357640979,), (1357641037,), (1357641015,), (1357641020,), (1357641023,), (1357641027,), (1357641032,), (1357641091,), (1357641102,), (1357641108,), (1357641113,), (1357641203,), (1357641230,), (1357641257,), (1357641279,), (1357641284,), (1357641321,), (1357641323,), (1357641326,), (1357641330,), (1357641334,), (1357641379,), (1357641384,), (1357641389,), (1357641452,), (1357641457,), (1357641461,), (1357641465,), (1357641612,), (1357641617,), (1357641620,), (1357641640,), (1357641666,), (1357641759,), (1357641763,), (1357641767,), (1357641813,), (1357641817,), (1357641819,), (1357641821,), (1357641824,), (1357641827,), (1357641860,), (1357641865,), (1357641883,), (1357641887,), (1357641954,), (1357641957,), (1357641959,), (1357641962,), (1357642058,), (1357642085,), (1357642089,), (1357642093,), (1357642099,), (1357642108,), (1357642145,), (1357642151,), (1357642157,), (1357642164,), (1357642237,), (1357642239,), (1357642242,), (1357642245,), (1357642247,), (1357642250,), (1357642287,), (1357642292,), (1357642295,), (1357642298,), (1357642376,), (1357642365,), (1357642368,), (1357642371,), (1357642374,), (1357642420,), (1357642423,), (1357642426,), (1357642428,), (1357642430,), (1357642475,), (1357642477,), (1357642479,), (1357642482,), (1357642485,), (1357642523,), (1357642526,), (1357642528,), (1357642598,), (1357642613,), (1357642617,), (1357642623,), (1357642651,), (1357642657,), (1357642694,), (1357642701,), (1357642704,), (1357642708,), (1357642746,), (1357642750,), (1357642754,), (1357642757,), (1357642761,), (1357642766,), (1357642804,), (1357642809,), (1357642810,), (1357642811,), (1357642878,), (1357642881,), (1357642885,), (1357642889,), (1357642892,), (1357642929,), (1357642932,), (1357642934,), (1357642937,), (1357643025,), (1357643551,), (1357643606,), (1357643631,), (1357643665,), (1357643693,), (1357644005,), (1357644052,), (1357644077,), (1357644101,), (1357644104,), (1357644258,), (1357644262,), (1357644265,), (1357644268,), (1357644272,), (1357644290,), (1357644416,), (1357644418,), (1357644419,), (1357644420,), (1357644644,), (1357644657,), (1357644661,), (1357644666,), (1357644670,), (1357644673,), (1357644702,), (1357644694,), (1357644697,), (1357644698,), (1357644700,), (1357644749,), (1357644751,), (1357644754,), (1357644757,), (1357644760,), (1357644762,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'12052025': {'nb_upload': 10, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22883946]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1357644762, 1357644760, 1357644757, 1357644754, 1357644751, 1357644749, 1357644700, 1357644698, 1357644697, 1357644694] map_info['map_portfolio_photo'] : {22883946: [1357644762, 1357644760, 1357644757, 1357644754, 1357644751, 1357644749, 1357644700, 1357644698, 1357644697, 1357644694]} final : True mtd_id 4302 list_pids : [1357644762, 1357644760, 1357644757, 1357644754, 1357644751, 1357644749, 1357644700, 1357644698, 1357644697, 1357644694] Looping around the photos to save general results len do output : 1 /22883946Didn'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, '2825193') ('4302', '22883946', '1357644762', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644760', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644757', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644754', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644751', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644749', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644700', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644698', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644697', None, None, None, None, None, '2825193') ('4302', None, None, None, None, None, None, None, '2825193') ('4302', '22883946', '1357644694', None, None, None, None, None, '2825193') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22883946', 'None', None, None, None, None, '2825193'), ('4302', '22883946', '1357644762', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644760', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644757', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644754', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644751', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644749', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644700', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644698', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644697', None, None, None, None, None, '2825193'), ('4302', '22883946', '1357644694', None, None, None, None, None, '2825193')] time used for this insertion : 0.013168811798095703 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3456399440765381 time spend to save output : 0.013409614562988281 total time spend for step 5 : 0.35904955863952637 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 (2825193) 1.96user 2.48system 0:05.36elapsed 82%CPU (0avgtext+0avgdata 159228maxresident)k 360inputs+5488outputs (0major+64494minor)pagefaults 0swaps