python /home/admin/mtr/script_for_cron.py -j datou_current3 -m 20 -a ' -a 4302 -v ' -s datou_current_4302 -M 0 -S 0 -U 95,95,120 import MySQLdb succeeded Import error (python version) ['/Users/moilerat/Documents/Fotonower/install/caffe/distribute/python', '/home/admin/workarea/git/Velours/python/prod', '/home/admin/workarea/install/caffe_cuda8_python3/python', '/home/admin/workarea/install/darknet', '/home/admin/workarea/git/Velours/python', '/home/admin/workarea/install/caffe_frcnn_python3/py-faster-rcnn/caffe-fast-rcnn/python', '/home/admin/mtr/.credentials', '/home/admin/workarea/install/caffe/python', '/home/admin/workarea/install/caffe_frcnn/py-faster-rcnn/tools', '/home/admin/workarea/git/fotonowerpip', '/home/admin/workarea/install/segment-anything', '/home/admin/workarea/git/pyfvs', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/admin/.local/lib/python3.8/site-packages', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages'] Namespace(auto=False, cert_args='/home/fotonower/https/cert.pem', contextDataFile='', custom_size=0, database='', datou_id='4302', datou_id_excluded='', fifo=False, host='', is_cpu_mode=False, job='batch_current', json_args='', key_args='/home/fotonower/https/vision.fotonower.com.key', limit=1000, list_photo_ids='', local='', mtr_current_id=0, mtr_portfolio_ids='', nb_thread=1, no_current=False, offset=0, only_client=False, output_file='', password='', port=5100, rand=0, save=2, use_client=False, user_id=440, username='', verbose=True) process id : 2811674 load datou : 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 ! Unexpected type seems boolean for variable list_input_json ERROR or WARNING : can't parse json string Expecting value: line 1 column 1 (char 0) Tried to parse : None was removed should we ? donnée sous forme de texte was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? id de la photo (peut être local ou global) was removed should we ? donnée sous forme de texte was removed should we ? donnée sous forme de texte was removed should we ? donnée sous forme de texte was removed should we ? None was removed should we ? donnée sous forme de nombre was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? donnée sous forme de texte was removed should we ? None was removed should we ? donnée sous forme de texte was removed should we ? [ptf_id0,ptf_id1...] was removed should we ? load thcls load pdts Running datou job : batch_current 4302 [] TODO datou_current to load to do maybe to take outside batchDatouExec SELECT * from MTRPhoto.mtr_datou_current where state = 0 AND mtr_portfolio_id is not NULL AND mtd_id = 4302 order by created_at desc LIMIT 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4232915) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4232915) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29457104 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4232915'] with mtr_portfolio_ids : ['29457104'] and first list_photo_ids : [] new path : /proc/2811674/ Name: python3 Umask: 0002 State: R (running) Tgid: 2811674 Ngid: 0 Pid: 2811674 PPid: 2811673 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2811674 NSpid: 2811674 NSpgid: 2811377 NSsid: 2811377 VmPeak: 1113376 kB VmSize: 1113376 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 105252 kB VmRSS: 105252 kB RssAnon: 66316 kB RssFile: 38936 kB RssShmem: 0 kB VmData: 872104 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130476 kB VmPTE: 616 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 54 nonvoluntary_ctxt_switches: 92 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2811674', 'Ngid': '0', 'Pid': '2811674', 'PPid': '2811673', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2811674', 'NSpid': '2811674', 'NSpgid': '2811377', 'NSsid': '2811377', 'VmPeak': '1113376 kB', 'VmSize': '1113376 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '105252 kB', 'VmRSS': '105252 kB', 'RssAnon': '66316 kB', 'RssFile': '38936 kB', 'RssShmem': '0 kB', 'VmData': '872104 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130476 kB', 'VmPTE': '616 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '54', 'nonvoluntary_ctxt_switches': '92'} ('datou_batch_current', '2811674', '1113376', '0', '1113376', '872104', '105252', b'', 'marlene', '4232915') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou 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 List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (29457104) and hide_status = 0 ) AND ph.photo_id not in (SELECT mtr_photo_id from MTRPhoto.mtr_datou_result_search where mtr_current_id in (4232915 ) ) ORDER BY ph.photo_id DESC LIMIT 0, 200 We have 1 , {} SELECT mtr_photo_id, mtr_portfolio_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (29457104) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1399589592, 'portfolio_id': 29457104}, {'photo_id': 1399589589, 'portfolio_id': 29457104}, {'photo_id': 1399589586, 'portfolio_id': 29457104}, {'photo_id': 1399589585, 'portfolio_id': 29457104}, {'photo_id': 1399589584, 'portfolio_id': 29457104}, {'photo_id': 1399589583, 'portfolio_id': 29457104}, {'photo_id': 1399589550, 'portfolio_id': 29457104}, {'photo_id': 1399589546, 'portfolio_id': 29457104}, {'photo_id': 1399589542, 'portfolio_id': 29457104}, {'photo_id': 1399589540, 'portfolio_id': 29457104}, {'photo_id': 1399589538, 'portfolio_id': 29457104}, {'photo_id': 1399589528, 'portfolio_id': 29457104}, {'photo_id': 1399589525, 'portfolio_id': 29457104}, {'photo_id': 1399589524, 'portfolio_id': 29457104}, {'photo_id': 1399589523, 'portfolio_id': 29457104}, {'photo_id': 1399589522, 'portfolio_id': 29457104}, {'photo_id': 1399589505, 'portfolio_id': 29457104}, {'photo_id': 1399589504, 'portfolio_id': 29457104}, {'photo_id': 1399589503, 'portfolio_id': 29457104}, {'photo_id': 1399589502, 'portfolio_id': 29457104}, {'photo_id': 1399589476, 'portfolio_id': 29457104}, {'photo_id': 1399589475, 'portfolio_id': 29457104}, {'photo_id': 1399589474, 'portfolio_id': 29457104}, {'photo_id': 1399589473, 'portfolio_id': 29457104}, {'photo_id': 1399589455, 'portfolio_id': 29457104}, {'photo_id': 1399589452, 'portfolio_id': 29457104}, {'photo_id': 1399589451, 'portfolio_id': 29457104}, {'photo_id': 1399589450, 'portfolio_id': 29457104}, {'photo_id': 1399589449, 'portfolio_id': 29457104}, {'photo_id': 1399589420, 'portfolio_id': 29457104}, {'photo_id': 1399589419, 'portfolio_id': 29457104}, {'photo_id': 1399589418, 'portfolio_id': 29457104}, {'photo_id': 1399589417, 'portfolio_id': 29457104}, {'photo_id': 1399589392, 'portfolio_id': 29457104}, {'photo_id': 1399589389, 'portfolio_id': 29457104}, {'photo_id': 1399589388, 'portfolio_id': 29457104}, {'photo_id': 1399589387, 'portfolio_id': 29457104}, {'photo_id': 1399589386, 'portfolio_id': 29457104}, {'photo_id': 1399589374, 'portfolio_id': 29457104}, {'photo_id': 1399589371, 'portfolio_id': 29457104}, {'photo_id': 1399589368, 'portfolio_id': 29457104}, {'photo_id': 1399589367, 'portfolio_id': 29457104}, {'photo_id': 1399589366, 'portfolio_id': 29457104}, {'photo_id': 1399589365, 'portfolio_id': 29457104}, {'photo_id': 1399589347, 'portfolio_id': 29457104}, {'photo_id': 1399589346, 'portfolio_id': 29457104}, {'photo_id': 1399589345, 'portfolio_id': 29457104}, {'photo_id': 1399589324, 'portfolio_id': 29457104}, {'photo_id': 1399589321, 'portfolio_id': 29457104}, {'photo_id': 1399589318, 'portfolio_id': 29457104}, {'photo_id': 1399589317, 'portfolio_id': 29457104}, {'photo_id': 1399589316, 'portfolio_id': 29457104}, {'photo_id': 1399589315, 'portfolio_id': 29457104}, {'photo_id': 1399589298, 'portfolio_id': 29457104}, {'photo_id': 1399589295, 'portfolio_id': 29457104}, {'photo_id': 1399589292, 'portfolio_id': 29457104}, {'photo_id': 1399589291, 'portfolio_id': 29457104}, {'photo_id': 1399589289, 'portfolio_id': 29457104}, {'photo_id': 1399589288, 'portfolio_id': 29457104}, {'photo_id': 1399589270, 'portfolio_id': 29457104}, {'photo_id': 1399589269, 'portfolio_id': 29457104}] map_portfolio_id_photo_id: {29457104: [1399589592, 1399589589, 1399589586, 1399589585, 1399589584, 1399589583, 1399589550, 1399589546, 1399589542, 1399589540, 1399589538, 1399589528, 1399589525, 1399589524, 1399589523, 1399589522, 1399589505, 1399589504, 1399589503, 1399589502, 1399589476, 1399589475, 1399589474, 1399589473, 1399589455, 1399589452, 1399589451, 1399589450, 1399589449, 1399589420, 1399589419, 1399589418, 1399589417, 1399589392, 1399589389, 1399589388, 1399589387, 1399589386, 1399589374, 1399589371, 1399589368, 1399589367, 1399589366, 1399589365, 1399589347, 1399589346, 1399589345, 1399589324, 1399589321, 1399589318, 1399589317, 1399589316, 1399589315, 1399589298, 1399589295, 1399589292, 1399589291, 1399589289, 1399589288, 1399589270, 1399589269]} ##### Call download_photos : nb_thread : 1 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos ##### After load_data_input time to download the photos : 0.019948959350585938 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Tue Dec 16 03:59:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29457104) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} beginning of datou step ventilate_hashtags_in_portfolio : To implement ! To do loadFromThcl(), then load ParamDescType : thcl2725 get_desc_type_from_thcl : type of cat SELECT id, mtr_user_id, name, pb_hashtag_id, hashtag_id_list, button_legend_list, portfolio_id_lists, photo_hashtag_type, photo_desc_type, svm_limit, limit_tagging, is_public, live, created_at, updated_at, type_classification FROM MTRDatou.classification_theme WHERE `id` IN (2725) thcls : [{'id': 2725, 'mtr_user_id': 31, 'name': 'learn_qualipapia_rle_210302_2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Carton_brun,Carton_gris,Teint_Dans_La_Masse,autre_refus,cartonnette,environnement,kraft,metal,papier,plastique', 'svm_portfolios_learning': '3460440,3460441,3460446,3460434,3460439,3467416,3460442,3460443,3486028,3460445', 'photo_hashtag_type': 3410, 'photo_desc_type': 5186, 'type_classification': 'caffe', 'hashtag_id_list': '2107753024,2107753020,2107752385,2107752406,702398920,493012381,493202403,492628673,492668766,492725882'}] thcl {'id': 2725, 'mtr_user_id': 31, 'name': 'learn_qualipapia_rle_210302_2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Carton_brun,Carton_gris,Teint_Dans_La_Masse,autre_refus,cartonnette,environnement,kraft,metal,papier,plastique', 'svm_portfolios_learning': '3460440,3460441,3460446,3460434,3460439,3467416,3460442,3460443,3486028,3460445', 'photo_hashtag_type': 3410, 'photo_desc_type': 5186, 'type_classification': 'caffe', 'hashtag_id_list': '2107753024,2107753020,2107752385,2107752406,702398920,493012381,493202403,492628673,492668766,492725882'} Update svm_hashtag_type_desc : 5186 remove imagettes from duplicated photo Iterating over portfolio : 29457104 get user id for portfolio 29457104 get sub ptf for main ptf 29457104, type 3726 and hashtags ['plastique', 'autre_refus', 'environnement', 'cartonnette', 'Carton_brun', 'Carton_gris', 'papier', 'mal_croppe', 'metal', 'kraft', 'flou', 'Teint_Dans_La_Masse'] 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`=29457104 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','environnement','cartonnette','Carton_brun','Carton_gris','papier','mal_croppe','metal','kraft','flou','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`=29457104 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','environnement','cartonnette','Carton_brun','Carton_gris','papier','mal_croppe','metal','kraft','flou','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 29457104, 'sub_port_id': 29457144, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079120, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 28)}, 'autre_refus': {'main_port_id': 29457104, 'sub_port_id': 29457145, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079121, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 28)}, 'mal_croppe': {'main_port_id': 29457104, 'sub_port_id': 29457146, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079122, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 28)}, 'papier': {'main_port_id': 29457104, 'sub_port_id': 29457147, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079123, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 28)}, 'metal': {'main_port_id': 29457104, 'sub_port_id': 29457148, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079124, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 28)}, 'plastique': {'main_port_id': 29457104, 'sub_port_id': 29457149, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079125, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 28)}, 'cartonnette': {'main_port_id': 29457104, 'sub_port_id': 29457150, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079126, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 29457104, 'sub_port_id': 29457151, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079127, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 28)}, 'Carton_brun': {'main_port_id': 29457104, 'sub_port_id': 29457152, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079128, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 28)}, 'environnement': {'main_port_id': 29457104, 'sub_port_id': 29457153, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079129, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 28)}, 'Carton_gris': {'main_port_id': 29457104, 'sub_port_id': 29457155, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079130, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 28)}, 'flou': {'main_port_id': 29457104, 'sub_port_id': 29457156, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079131, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29457144 , 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=29457104 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 (29457144) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457104) result : ((1399589269,), (1399589270,), (1399589288,), (1399589289,), (1399589291,), (1399589292,), (1399589295,), (1399589298,), (1399589315,), (1399589316,), (1399589317,), (1399589318,), (1399589321,), (1399589324,), (1399589345,), (1399589346,), (1399589347,), (1399589365,), (1399589366,), (1399589367,), (1399589368,), (1399589371,), (1399589374,), (1399589386,), (1399589387,), (1399589388,), (1399589389,), (1399589392,), (1399589417,), (1399589418,), (1399589419,), (1399589420,), (1399589449,), (1399589450,), (1399589451,), (1399589452,), (1399589455,), (1399589473,), (1399589474,), (1399589475,), (1399589476,), (1399589502,), (1399589503,), (1399589504,), (1399589505,), (1399589522,), (1399589523,), (1399589524,), (1399589525,), (1399589528,), (1399589538,), (1399589540,), (1399589542,), (1399589546,), (1399589550,), (1399589583,), (1399589584,), (1399589585,), (1399589586,), (1399589589,), (1399589592,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29457145 , 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=29457104 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='autre_refus' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457145) result : ((1399589515,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457104) result : ((1399589269,), (1399589270,), (1399589288,), (1399589289,), (1399589291,), (1399589292,), (1399589295,), (1399589298,), (1399589315,), (1399589316,), (1399589317,), (1399589318,), (1399589321,), (1399589324,), (1399589345,), (1399589346,), (1399589347,), (1399589365,), (1399589366,), (1399589367,), (1399589368,), (1399589371,), (1399589374,), (1399589386,), (1399589387,), (1399589388,), (1399589389,), (1399589392,), (1399589417,), (1399589418,), (1399589419,), (1399589420,), (1399589449,), (1399589450,), (1399589451,), (1399589452,), (1399589455,), (1399589473,), (1399589474,), (1399589475,), (1399589476,), (1399589502,), (1399589503,), (1399589504,), (1399589505,), (1399589522,), (1399589523,), (1399589524,), (1399589525,), (1399589528,), (1399589538,), (1399589540,), (1399589542,), (1399589546,), (1399589550,), (1399589583,), (1399589584,), (1399589585,), (1399589586,), (1399589589,), (1399589592,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29457146 , 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=29457104 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='mal_croppe' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457146) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457104) result : ((1399589269,), (1399589270,), (1399589288,), (1399589289,), (1399589291,), (1399589292,), (1399589295,), (1399589298,), (1399589315,), (1399589316,), (1399589317,), (1399589318,), (1399589321,), (1399589324,), (1399589345,), (1399589346,), (1399589347,), (1399589365,), (1399589366,), (1399589367,), (1399589368,), (1399589371,), (1399589374,), (1399589386,), (1399589387,), (1399589388,), (1399589389,), (1399589392,), (1399589417,), (1399589418,), (1399589419,), (1399589420,), (1399589449,), (1399589450,), (1399589451,), (1399589452,), (1399589455,), (1399589473,), (1399589474,), (1399589475,), (1399589476,), (1399589502,), (1399589503,), (1399589504,), (1399589505,), (1399589522,), (1399589523,), (1399589524,), (1399589525,), (1399589528,), (1399589538,), (1399589540,), (1399589542,), (1399589546,), (1399589550,), (1399589583,), (1399589584,), (1399589585,), (1399589586,), (1399589589,), (1399589592,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29457147 , 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=29457104 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='papier' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457147) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457104) result : ((1399589269,), (1399589270,), (1399589288,), (1399589289,), (1399589291,), (1399589292,), (1399589295,), (1399589298,), (1399589315,), (1399589316,), (1399589317,), (1399589318,), (1399589321,), (1399589324,), (1399589345,), (1399589346,), (1399589347,), (1399589365,), (1399589366,), (1399589367,), (1399589368,), (1399589371,), (1399589374,), (1399589386,), (1399589387,), (1399589388,), (1399589389,), (1399589392,), (1399589417,), (1399589418,), (1399589419,), (1399589420,), (1399589449,), (1399589450,), (1399589451,), (1399589452,), (1399589455,), (1399589473,), (1399589474,), (1399589475,), (1399589476,), (1399589502,), (1399589503,), (1399589504,), (1399589505,), (1399589522,), (1399589523,), (1399589524,), (1399589525,), (1399589528,), (1399589538,), (1399589540,), (1399589542,), (1399589546,), (1399589550,), (1399589583,), (1399589584,), (1399589585,), (1399589586,), (1399589589,), (1399589592,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29457148 , 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=29457104 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='metal' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457148) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457104) result : ((1399589269,), (1399589270,), (1399589288,), (1399589289,), (1399589291,), (1399589292,), (1399589295,), (1399589298,), (1399589315,), (1399589316,), (1399589317,), (1399589318,), (1399589321,), (1399589324,), (1399589345,), (1399589346,), (1399589347,), (1399589365,), (1399589366,), (1399589367,), (1399589368,), (1399589371,), (1399589374,), (1399589386,), (1399589387,), (1399589388,), (1399589389,), (1399589392,), (1399589417,), (1399589418,), (1399589419,), (1399589420,), (1399589449,), (1399589450,), (1399589451,), (1399589452,), (1399589455,), (1399589473,), (1399589474,), (1399589475,), (1399589476,), (1399589502,), (1399589503,), (1399589504,), (1399589505,), (1399589522,), (1399589523,), (1399589524,), (1399589525,), (1399589528,), (1399589538,), (1399589540,), (1399589542,), (1399589546,), (1399589550,), (1399589583,), (1399589584,), (1399589585,), (1399589586,), (1399589589,), (1399589592,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29457149 , 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=29457104 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='plastique' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457149) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457104) result : ((1399589269,), (1399589270,), (1399589288,), (1399589289,), (1399589291,), (1399589292,), (1399589295,), (1399589298,), (1399589315,), (1399589316,), (1399589317,), (1399589318,), (1399589321,), (1399589324,), (1399589345,), (1399589346,), (1399589347,), (1399589365,), (1399589366,), (1399589367,), (1399589368,), (1399589371,), (1399589374,), (1399589386,), (1399589387,), (1399589388,), (1399589389,), (1399589392,), (1399589417,), (1399589418,), (1399589419,), (1399589420,), (1399589449,), (1399589450,), (1399589451,), (1399589452,), (1399589455,), (1399589473,), (1399589474,), (1399589475,), (1399589476,), (1399589502,), (1399589503,), (1399589504,), (1399589505,), (1399589522,), (1399589523,), (1399589524,), (1399589525,), (1399589528,), (1399589538,), (1399589540,), (1399589542,), (1399589546,), (1399589550,), (1399589583,), (1399589584,), (1399589585,), (1399589586,), (1399589589,), (1399589592,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29457150 , 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=29457104 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='cartonnette' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457150) result : ((1399589518,), (1399589556,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457104) result : ((1399589269,), (1399589270,), (1399589288,), (1399589289,), (1399589291,), (1399589292,), (1399589295,), (1399589298,), (1399589315,), (1399589316,), (1399589317,), (1399589318,), (1399589321,), (1399589324,), (1399589345,), (1399589346,), (1399589347,), (1399589365,), (1399589366,), (1399589367,), (1399589368,), (1399589371,), (1399589374,), (1399589386,), (1399589387,), (1399589388,), (1399589389,), (1399589392,), (1399589417,), (1399589418,), (1399589419,), (1399589420,), (1399589449,), (1399589450,), (1399589451,), (1399589452,), (1399589455,), (1399589473,), (1399589474,), (1399589475,), (1399589476,), (1399589502,), (1399589503,), (1399589504,), (1399589505,), (1399589522,), (1399589523,), (1399589524,), (1399589525,), (1399589528,), (1399589538,), (1399589540,), (1399589542,), (1399589546,), (1399589550,), (1399589583,), (1399589584,), (1399589585,), (1399589586,), (1399589589,), (1399589592,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29457151 , 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=29457104 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 (29457151) result : ((1399589435,), (1399589436,), (1399589437,), (1399589438,), (1399589514,), (1399589555,), (1399589571,), (1399589572,), (1399589573,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457104) result : ((1399589269,), (1399589270,), (1399589288,), (1399589289,), (1399589291,), (1399589292,), (1399589295,), (1399589298,), (1399589315,), (1399589316,), (1399589317,), (1399589318,), (1399589321,), (1399589324,), (1399589345,), (1399589346,), (1399589347,), (1399589365,), (1399589366,), (1399589367,), (1399589368,), (1399589371,), (1399589374,), (1399589386,), (1399589387,), (1399589388,), (1399589389,), (1399589392,), (1399589417,), (1399589418,), (1399589419,), (1399589420,), (1399589449,), (1399589450,), (1399589451,), (1399589452,), (1399589455,), (1399589473,), (1399589474,), (1399589475,), (1399589476,), (1399589502,), (1399589503,), (1399589504,), (1399589505,), (1399589522,), (1399589523,), (1399589524,), (1399589525,), (1399589528,), (1399589538,), (1399589540,), (1399589542,), (1399589546,), (1399589550,), (1399589583,), (1399589584,), (1399589585,), (1399589586,), (1399589589,), (1399589592,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29457152 , 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=29457104 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_brun' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457152) result : ((1399589446,), (1399589520,), (1399589521,), (1399589558,), (1399589560,), (1399589578,), (1399589579,), (1399589580,), (1399589581,), (1399589582,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457104) result : ((1399589269,), (1399589270,), (1399589288,), (1399589289,), (1399589291,), (1399589292,), (1399589295,), (1399589298,), (1399589315,), (1399589316,), (1399589317,), (1399589318,), (1399589321,), (1399589324,), (1399589345,), (1399589346,), (1399589347,), (1399589365,), (1399589366,), (1399589367,), (1399589368,), (1399589371,), (1399589374,), (1399589386,), (1399589387,), (1399589388,), (1399589389,), (1399589392,), (1399589417,), (1399589418,), (1399589419,), (1399589420,), (1399589449,), (1399589450,), (1399589451,), (1399589452,), (1399589455,), (1399589473,), (1399589474,), (1399589475,), (1399589476,), (1399589502,), (1399589503,), (1399589504,), (1399589505,), (1399589522,), (1399589523,), (1399589524,), (1399589525,), (1399589528,), (1399589538,), (1399589540,), (1399589542,), (1399589546,), (1399589550,), (1399589583,), (1399589584,), (1399589585,), (1399589586,), (1399589589,), (1399589592,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29457153 , 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=29457104 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='environnement' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457153) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457104) result : ((1399589269,), (1399589270,), (1399589288,), (1399589289,), (1399589291,), (1399589292,), (1399589295,), (1399589298,), (1399589315,), (1399589316,), (1399589317,), (1399589318,), (1399589321,), (1399589324,), (1399589345,), (1399589346,), (1399589347,), (1399589365,), (1399589366,), (1399589367,), (1399589368,), (1399589371,), (1399589374,), (1399589386,), (1399589387,), (1399589388,), (1399589389,), (1399589392,), (1399589417,), (1399589418,), (1399589419,), (1399589420,), (1399589449,), (1399589450,), (1399589451,), (1399589452,), (1399589455,), (1399589473,), (1399589474,), (1399589475,), (1399589476,), (1399589502,), (1399589503,), (1399589504,), (1399589505,), (1399589522,), (1399589523,), (1399589524,), (1399589525,), (1399589528,), (1399589538,), (1399589540,), (1399589542,), (1399589546,), (1399589550,), (1399589583,), (1399589584,), (1399589585,), (1399589586,), (1399589589,), (1399589592,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29457155 , 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=29457104 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_gris' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457155) result : ((1399589440,), (1399589442,), (1399589443,), (1399589444,), (1399589445,), (1399589487,), (1399589516,), (1399589517,), (1399589574,), (1399589575,), (1399589576,), (1399589577,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457104) result : ((1399589269,), (1399589270,), (1399589288,), (1399589289,), (1399589291,), (1399589292,), (1399589295,), (1399589298,), (1399589315,), (1399589316,), (1399589317,), (1399589318,), (1399589321,), (1399589324,), (1399589345,), (1399589346,), (1399589347,), (1399589365,), (1399589366,), (1399589367,), (1399589368,), (1399589371,), (1399589374,), (1399589386,), (1399589387,), (1399589388,), (1399589389,), (1399589392,), (1399589417,), (1399589418,), (1399589419,), (1399589420,), (1399589449,), (1399589450,), (1399589451,), (1399589452,), (1399589455,), (1399589473,), (1399589474,), (1399589475,), (1399589476,), (1399589502,), (1399589503,), (1399589504,), (1399589505,), (1399589522,), (1399589523,), (1399589524,), (1399589525,), (1399589528,), (1399589538,), (1399589540,), (1399589542,), (1399589546,), (1399589550,), (1399589583,), (1399589584,), (1399589585,), (1399589586,), (1399589589,), (1399589592,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29457156 , 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=29457104 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='flou' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457156) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29457104) result : ((1399589269,), (1399589270,), (1399589288,), (1399589289,), (1399589291,), (1399589292,), (1399589295,), (1399589298,), (1399589315,), (1399589316,), (1399589317,), (1399589318,), (1399589321,), (1399589324,), (1399589345,), (1399589346,), (1399589347,), (1399589365,), (1399589366,), (1399589367,), (1399589368,), (1399589371,), (1399589374,), (1399589386,), (1399589387,), (1399589388,), (1399589389,), (1399589392,), (1399589417,), (1399589418,), (1399589419,), (1399589420,), (1399589449,), (1399589450,), (1399589451,), (1399589452,), (1399589455,), (1399589473,), (1399589474,), (1399589475,), (1399589476,), (1399589502,), (1399589503,), (1399589504,), (1399589505,), (1399589522,), (1399589523,), (1399589524,), (1399589525,), (1399589528,), (1399589538,), (1399589540,), (1399589542,), (1399589546,), (1399589550,), (1399589583,), (1399589584,), (1399589585,), (1399589586,), (1399589589,), (1399589592,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29457104 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','environnement','cartonnette','Carton_brun','Carton_gris','papier','mal_croppe','metal','kraft','flou','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`=29457104 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','environnement','cartonnette','Carton_brun','Carton_gris','papier','mal_croppe','metal','kraft','flou','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 29457104, 'sub_port_id': 29457158, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079132, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 29)}, 'autre_refus': {'main_port_id': 29457104, 'sub_port_id': 29457159, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079133, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 29)}, 'mal_croppe': {'main_port_id': 29457104, 'sub_port_id': 29457160, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079134, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 29)}, 'papier': {'main_port_id': 29457104, 'sub_port_id': 29457161, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079135, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 29)}, 'metal': {'main_port_id': 29457104, 'sub_port_id': 29457162, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079136, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 29)}, 'plastique': {'main_port_id': 29457104, 'sub_port_id': 29457163, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079137, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 29)}, 'cartonnette': {'main_port_id': 29457104, 'sub_port_id': 29457164, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079138, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 29457104, 'sub_port_id': 29457165, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079139, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 29)}, 'Carton_brun': {'main_port_id': 29457104, 'sub_port_id': 29457166, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079140, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 29)}, 'environnement': {'main_port_id': 29457104, 'sub_port_id': 29457167, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079141, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 29)}, 'Carton_gris': {'main_port_id': 29457104, 'sub_port_id': 29457168, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079142, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 29)}, 'flou': {'main_port_id': 29457104, 'sub_port_id': 29457169, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20079143, 'last_updated_at': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_desc': datetime.datetime(2025, 12, 16, 3, 59, 1), 'last_updated_at_asc': datetime.datetime(2025, 12, 16, 3, 47, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29457158,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29457144 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29457159,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29457145 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29457160,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29457146 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29457161,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29457147 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29457162,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29457148 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29457163,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29457149 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29457164,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29457150 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29457165,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29457151 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29457166,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29457152 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29457167,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29457153 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29457168,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29457155 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29457169,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29457156 lien utilise dans velours : https://marlene.fotonower.com/velours/29457158,29457159,29457160,29457161,29457162,29457163,29457164,29457165,29457166,29457167,29457168,29457169?tags=kraft,autre_refus,mal_croppe,papier,metal,plastique,cartonnette,Teint_Dans_La_Masse,Carton_brun,environnement,Carton_gris,flou After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29457104]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1399589592, 1399589589, 1399589586, 1399589585, 1399589584, 1399589583] map_info['map_portfolio_photo'] : {29457104: [1399589592, 1399589589, 1399589586, 1399589585, 1399589584, 1399589583, 1399589550, 1399589546, 1399589542, 1399589540, 1399589538, 1399589528, 1399589525, 1399589524, 1399589523, 1399589522, 1399589505, 1399589504, 1399589503, 1399589502, 1399589476, 1399589475, 1399589474, 1399589473, 1399589455, 1399589452, 1399589451, 1399589450, 1399589449, 1399589420, 1399589419, 1399589418, 1399589417, 1399589392, 1399589389, 1399589388, 1399589387, 1399589386, 1399589374, 1399589371, 1399589368, 1399589367, 1399589366, 1399589365, 1399589347, 1399589346, 1399589345, 1399589324, 1399589321, 1399589318, 1399589317, 1399589316, 1399589315, 1399589298, 1399589295, 1399589292, 1399589291, 1399589289, 1399589288, 1399589270, 1399589269]} final : False mtd_id 4302 list_pids : [1399589592, 1399589589, 1399589586, 1399589585, 1399589584, 1399589583] Looping around the photos to save general results len do output : 1 /29457104. 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, '4232915') ('4302', '29457104', '1399589592', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589589', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589586', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589585', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589584', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589583', None, None, None, None, None, '4232915') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 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, '29457104', "{'kraft': 29457144, 'autre_refus': 29457145, 'mal_croppe': 29457146, 'papier': 29457147, 'metal': 29457148, 'plastique': 29457149, 'cartonnette': 29457150, 'Teint_Dans_La_Masse': 29457151, 'Carton_brun': 29457152, 'environnement': 29457153, 'Carton_gris': 29457155, 'flou': 29457156}", None, None, None, None, '4232915'), ('4302', '29457104', '1399589592', None, None, None, None, None, '4232915'), ('4302', '29457104', '1399589589', None, None, None, None, None, '4232915'), ('4302', '29457104', '1399589586', None, None, None, None, None, '4232915'), ('4302', '29457104', '1399589585', None, None, None, None, None, '4232915'), ('4302', '29457104', '1399589584', None, None, None, None, None, '4232915'), ('4302', '29457104', '1399589583', None, None, None, None, None, '4232915')] time used for this insertion : 0.023504257202148438 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.717958688735962 time spend to save output : 0.023752689361572266 total time spend for step 1 : 1.7417113780975342 step2:final Tue Dec 16 04:00:00 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 (29457104) 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 29457104 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1399589270,1399589269,1399589298,1399589295,1399589292,1399589291,1399589289,1399589288,1399589324,1399589321,1399589318,1399589317,1399589316,1399589315,1399589347,1399589346,1399589345,1399589374,1399589371,1399589368,1399589367,1399589366,1399589365,1399589392,1399589389,1399589388,1399589387,1399589386,1399589420,1399589419,1399589418,1399589417,1399589455,1399589452,1399589451,1399589450,1399589449,1399589476,1399589475,1399589474,1399589473,1399589505,1399589504,1399589503,1399589502,1399589528,1399589525,1399589524,1399589523,1399589522,1399589550,1399589546,1399589542,1399589540,1399589538,1399589592,1399589589,1399589586,1399589585,1399589584,1399589583); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29457104]) Inside saveOutput : final : False verbose : True original output for save of step final : {1399589592: ('0.03950916739136533',), 1399589589: ('0.03950916739136533',), 1399589586: ('0.03950916739136533',), 1399589585: ('0.03950916739136533',), 1399589584: ('0.03950916739136533',), 1399589583: ('0.03950916739136533',)} new output for save of step final : {1399589592: ('0.03950916739136533',), 1399589589: ('0.03950916739136533',), 1399589586: ('0.03950916739136533',), 1399589585: ('0.03950916739136533',), 1399589584: ('0.03950916739136533',), 1399589583: ('0.03950916739136533',)} [1399589592, 1399589589, 1399589586, 1399589585, 1399589584, 1399589583] map_info['map_portfolio_photo'] : {29457104: [1399589592, 1399589589, 1399589586, 1399589585, 1399589584, 1399589583, 1399589550, 1399589546, 1399589542, 1399589540, 1399589538, 1399589528, 1399589525, 1399589524, 1399589523, 1399589522, 1399589505, 1399589504, 1399589503, 1399589502, 1399589476, 1399589475, 1399589474, 1399589473, 1399589455, 1399589452, 1399589451, 1399589450, 1399589449, 1399589420, 1399589419, 1399589418, 1399589417, 1399589392, 1399589389, 1399589388, 1399589387, 1399589386, 1399589374, 1399589371, 1399589368, 1399589367, 1399589366, 1399589365, 1399589347, 1399589346, 1399589345, 1399589324, 1399589321, 1399589318, 1399589317, 1399589316, 1399589315, 1399589298, 1399589295, 1399589292, 1399589291, 1399589289, 1399589288, 1399589270, 1399589269]} final : False mtd_id 4302 list_pids : [1399589592, 1399589589, 1399589586, 1399589585, 1399589584, 1399589583] Looping around the photos to save general results len do output : 6 /1399589592.Didn't retrieve data . /1399589589.Didn't retrieve data . /1399589586.Didn't retrieve data . /1399589585.Didn't retrieve data . /1399589584.Didn't retrieve data . /1399589583.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, '4232915') ('4302', '29457104', '1399589592', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589589', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589586', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589585', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589584', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589583', None, None, None, None, None, '4232915') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 18 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', '29457104', '1399589592', '0.03950916739136533', None, None, None, None, '4232915'), ('4302', '29457104', '1399589589', '0.03950916739136533', None, None, None, None, '4232915'), ('4302', '29457104', '1399589586', '0.03950916739136533', None, None, None, None, '4232915'), ('4302', '29457104', '1399589585', '0.03950916739136533', None, None, None, None, '4232915'), ('4302', '29457104', '1399589584', '0.03950916739136533', None, None, None, None, '4232915'), ('4302', '29457104', '1399589583', '0.03950916739136533', None, None, None, None, '4232915')] time used for this insertion : 0.015244722366333008 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.08130145072937012 time spend to save output : 0.015827417373657227 total time spend for step 2 : 0.09712886810302734 step3:velours_tree Tue Dec 16 04:00:00 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 : {29457104: [{'kraft': 29457144, 'autre_refus': 29457145, 'mal_croppe': 29457146, 'papier': 29457147, 'metal': 29457148, 'plastique': 29457149, 'cartonnette': 29457150, 'Teint_Dans_La_Masse': 29457151, 'Carton_brun': 29457152, 'environnement': 29457153, 'Carton_gris': 29457155, 'flou': 29457156}]} input_args_next_step : {29457104: ()} output_args : {29457104: [{'kraft': 29457144, 'autre_refus': 29457145, 'mal_croppe': 29457146, 'papier': 29457147, 'metal': 29457148, 'plastique': 29457149, 'cartonnette': 29457150, 'Teint_Dans_La_Masse': 29457151, 'Carton_brun': 29457152, 'environnement': 29457153, 'Carton_gris': 29457155, 'flou': 29457156}]} args : 29457104 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 : ({'kraft': 29457144, 'autre_refus': 29457145, 'mal_croppe': 29457146, 'papier': 29457147, 'metal': 29457148, 'plastique': 29457149, 'cartonnette': 29457150, 'Teint_Dans_La_Masse': 29457151, 'Carton_brun': 29457152, 'environnement': 29457153, 'Carton_gris': 29457155, 'flou': 29457156},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29457104) 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([29457104]) 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.5393764972686768 time spend to save output : 0.00010323524475097656 total time spend for step 3 : 0.5394797325134277 step4:send_mail_cod Tue Dec 16 04:00:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1399589592: ('0.03950916739136533',), 1399589589: ('0.03950916739136533',), 1399589586: ('0.03950916739136533',), 1399589585: ('0.03950916739136533',), 1399589584: ('0.03950916739136533',), 1399589583: ('0.03950916739136533',)} input_args_next_step : {1399589592: ()} output_args : {1399589592: ('0.03950916739136533',), 1399589589: ('0.03950916739136533',), 1399589586: ('0.03950916739136533',), 1399589585: ('0.03950916739136533',), 1399589584: ('0.03950916739136533',), 1399589583: ('0.03950916739136533',)} args : 1399589592 depend.output_id : 0 input_args_next_step : {1399589592: ('0.03950916739136533',), 1399589589: ()} output_args : {1399589592: ('0.03950916739136533',), 1399589589: ('0.03950916739136533',), 1399589586: ('0.03950916739136533',), 1399589585: ('0.03950916739136533',), 1399589584: ('0.03950916739136533',), 1399589583: ('0.03950916739136533',)} args : 1399589589 depend.output_id : 0 input_args_next_step : {1399589592: ('0.03950916739136533',), 1399589589: ('0.03950916739136533',), 1399589586: ()} output_args : {1399589592: ('0.03950916739136533',), 1399589589: ('0.03950916739136533',), 1399589586: ('0.03950916739136533',), 1399589585: ('0.03950916739136533',), 1399589584: ('0.03950916739136533',), 1399589583: ('0.03950916739136533',)} args : 1399589586 depend.output_id : 0 input_args_next_step : {1399589592: ('0.03950916739136533',), 1399589589: ('0.03950916739136533',), 1399589586: ('0.03950916739136533',), 1399589585: ()} output_args : {1399589592: ('0.03950916739136533',), 1399589589: ('0.03950916739136533',), 1399589586: ('0.03950916739136533',), 1399589585: ('0.03950916739136533',), 1399589584: ('0.03950916739136533',), 1399589583: ('0.03950916739136533',)} args : 1399589585 depend.output_id : 0 input_args_next_step : {1399589592: ('0.03950916739136533',), 1399589589: ('0.03950916739136533',), 1399589586: ('0.03950916739136533',), 1399589585: ('0.03950916739136533',), 1399589584: ()} output_args : {1399589592: ('0.03950916739136533',), 1399589589: ('0.03950916739136533',), 1399589586: ('0.03950916739136533',), 1399589585: ('0.03950916739136533',), 1399589584: ('0.03950916739136533',), 1399589583: ('0.03950916739136533',)} args : 1399589584 depend.output_id : 0 input_args_next_step : {1399589592: ('0.03950916739136533',), 1399589589: ('0.03950916739136533',), 1399589586: ('0.03950916739136533',), 1399589585: ('0.03950916739136533',), 1399589584: ('0.03950916739136533',), 1399589583: ()} output_args : {1399589592: ('0.03950916739136533',), 1399589589: ('0.03950916739136533',), 1399589586: ('0.03950916739136533',), 1399589585: ('0.03950916739136533',), 1399589584: ('0.03950916739136533',), 1399589583: ('0.03950916739136533',)} args : 1399589583 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 : {29457104: [{'kraft': 29457144, 'autre_refus': 29457145, 'mal_croppe': 29457146, 'papier': 29457147, 'metal': 29457148, 'plastique': 29457149, 'cartonnette': 29457150, 'Teint_Dans_La_Masse': 29457151, 'Carton_brun': 29457152, 'environnement': 29457153, 'Carton_gris': 29457155, 'flou': 29457156}]} input_args_next_step : {1399589592: ('0.03950916739136533',), 1399589589: ('0.03950916739136533',), 1399589586: ('0.03950916739136533',), 1399589585: ('0.03950916739136533',), 1399589584: ('0.03950916739136533',), 1399589583: ('0.03950916739136533',), 29457104: ()} output_args : {29457104: [{'kraft': 29457144, 'autre_refus': 29457145, 'mal_croppe': 29457146, 'papier': 29457147, 'metal': 29457148, 'plastique': 29457149, 'cartonnette': 29457150, 'Teint_Dans_La_Masse': 29457151, 'Carton_brun': 29457152, 'environnement': 29457153, 'Carton_gris': 29457155, 'flou': 29457156}]} args : 29457104 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 :7, first value : ('0.03950916739136533',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29457104) 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_view ph WHERE photo_id IN (1399589592,1399589589,1399589586,1399589585,1399589584,1399589583) Found this number of photos: 6 ##### Call download_photos : nb_thread : 5 begin to download photo : 1399589583 begin to download photo : 1399589585 begin to download photo : 1399589589 download finish for photo 1399589583 begin to download photo : 1399589584 download finish for photo 1399589585 begin to download photo : 1399589586 download finish for photo 1399589589 begin to download photo : 1399589592 download finish for photo 1399589592 download finish for photo 1399589586 download finish for photo 1399589584 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette294571441765854001/ length of list_filenames : 6 ; length of list_pids : 6 ; length of list_args : 6 results_Auto_P29457104_16-12-2025_04_00_01.pdf 29457144 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29457144 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette294571441765854001 29457145 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29457145 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1399589515: '1765853706_3538736_1399589318_82309550ab035a75325f92441c8bfa3b_rle_crop_4071520600_0.png'} change filename to text .imagette294571451765854001/ imagette294571451765854001/1765853706_3538736_1399589318_82309550ab035a75325f92441c8bfa3b_rle_crop_4071520600_0.png.png imagette294571461765854001/ imagette294571481765854001/ imagette294571491765854001/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/0fd475169108b36e4041e00e265dda1a_95612000.png imagette294571451765854001 29457146 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29457146 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette294571461765854001 29457148 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29457148 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette294571481765854001 29457149 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29457149 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette294571491765854001 29457150 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29457150 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1399589518: '1765853706_3538736_1399589318_82309550ab035a75325f92441c8bfa3b_rle_crop_4071520593_0.png', 1399589556: '1765853826_3543637_1399589389_cc03e191b3761fc7e7fda8e41516c541_rle_crop_4071520831_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/44f9696aee6b1602b33d7409f0377bfd_74053722.png change filename to text .imagette294571501765854001/ imagette294571501765854001/1765853826_3543637_1399589389_cc03e191b3761fc7e7fda8e41516c541_rle_crop_4071520831_0.png.png imagette294571501765854001/1765853706_3538736_1399589318_82309550ab035a75325f92441c8bfa3b_rle_crop_4071520593_0.png.png imagette294571561765854001/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/be94ba5e55413bd114a709c777320662_37870258.png imagette294571501765854001 29457156 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29457156 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette294571561765854001 29457151 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29457151 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1399589435: '1765853545_3529505_1399589292_9f8a126caa452805c3c7ebe9897cd55c_rle_crop_4071520299_0.png', 1399589436: '1765853545_3529505_1399589291_3d454057b44297c6186d35018f04a823_rle_crop_4071520316_0.png', 1399589437: '1765853545_3529505_1399589291_3d454057b44297c6186d35018f04a823_rle_crop_4071520320_0.png', 1399589438: '1765853545_3529505_1399589289_e4e98988cd66f9f7e3f3f47f878f01aa_rle_crop_4071520339_0.png', 1399589514: '1765853706_3538736_1399589315_b9a97ceb26128784d0258437977b3da8_rle_crop_4071520640_0.png', 1399589555: '1765853826_3543637_1399589388_ae1c8424f191ea3dbde42696eab70ae0_rle_crop_4071520851_0.png', 1399589571: '1765853846_3545887_1399589371_44d0ea0a0c626cf698764e16bc3e6d86_rle_crop_4071521087_0.png', 1399589572: '1765853846_3545887_1399589366_c0ab49a1e74fb272186b91dc663feb4e_rle_crop_4071521131_0.png', 1399589573: '1765853846_3545887_1399589365_175499922b01045abe7d75ec342d2c59_rle_crop_4071521147_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/261e958fba9285ccdd20b42900b8ff36_89187444.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/40ac6f9bd3b66558c931ea782fe1ceed_4891714.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/e600ee887c0216ea2ede69dfd90fda28_39894086.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/07067d1391badeb8b7c5a5442309a7db_78465971.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/16173282674f8d6961bc1f19d21801d2_64613200.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/449374be85fe5f028bc21d5a6ff52b0e_45958579.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/b5fed8bf8ca31700df8e1fa926783ac5_85615566.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/e3762d50c565a0517a8a9ebe27cd04c0_80809660.png change filename to text .imagette294571511765854001/ imagette294571511765854001/1765853846_3545887_1399589366_c0ab49a1e74fb272186b91dc663feb4e_rle_crop_4071521131_0.png.png imagette294571511765854001/1765853545_3529505_1399589289_e4e98988cd66f9f7e3f3f47f878f01aa_rle_crop_4071520339_0.png.png imagette294571511765854001/1765853545_3529505_1399589291_3d454057b44297c6186d35018f04a823_rle_crop_4071520320_0.png.png imagette294571511765854001/1765853706_3538736_1399589315_b9a97ceb26128784d0258437977b3da8_rle_crop_4071520640_0.png.png imagette294571511765854001/1765853826_3543637_1399589388_ae1c8424f191ea3dbde42696eab70ae0_rle_crop_4071520851_0.png.png imagette294571511765854001/1765853545_3529505_1399589291_3d454057b44297c6186d35018f04a823_rle_crop_4071520316_0.png.png imagette294571511765854001/1765853545_3529505_1399589292_9f8a126caa452805c3c7ebe9897cd55c_rle_crop_4071520299_0.png.png imagette294571511765854001/1765853846_3545887_1399589371_44d0ea0a0c626cf698764e16bc3e6d86_rle_crop_4071521087_0.png.png imagette294571511765854001/1765853846_3545887_1399589365_175499922b01045abe7d75ec342d2c59_rle_crop_4071521147_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/18229a697f359dcbaac2de3b0a255b56_55273534.png imagette294571511765854001 29457152 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29457152 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1399589446: '1765853545_3529505_1399589289_e4e98988cd66f9f7e3f3f47f878f01aa_rle_crop_4071520335_0.png', 1399589520: '1765853706_3538736_1399589347_0246ed36d0ebcc54a177d6a77cd45c7e_rle_crop_4071520577_0.png', 1399589521: '1765853706_3538736_1399589316_c6290a24fad63606c3fdee2fb5568b11_rle_crop_4071520623_0.png', 1399589558: '1765853826_3543637_1399589388_ae1c8424f191ea3dbde42696eab70ae0_rle_crop_4071520853_0.png', 1399589560: '1765853826_3543637_1399589388_ae1c8424f191ea3dbde42696eab70ae0_rle_crop_4071520855_0.png', 1399589578: '1765853846_3545887_1399589392_21186c6c96c077d9d6fcb2f0918852af_rle_crop_4071521072_0.png', 1399589579: '1765853846_3545887_1399589392_21186c6c96c077d9d6fcb2f0918852af_rle_crop_4071521075_0.png', 1399589580: '1765853846_3545887_1399589367_79bf9ea8a22f2cae24d28a2b2942b292_rle_crop_4071521118_0.png', 1399589581: '1765853846_3545887_1399589367_79bf9ea8a22f2cae24d28a2b2942b292_rle_crop_4071521117_0.png', 1399589582: '1765853846_3545887_1399589366_c0ab49a1e74fb272186b91dc663feb4e_rle_crop_4071521132_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/a16d815a6a746d04209da2fbceaf8c99_50830993.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/a793340d5b7f79b3e89042c6d6222f84_28484946.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/9514feee83b088fc41604db76a95634e_74956160.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/f8b6679461e8ea68b37c0d32f375fd30_21870589.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/8529c670811d8d5aaf400ff3ad033939_53162304.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/5f4677daf8dd9ea8ddab7e2ceb202323_31738757.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/aebd2668d59d25f14e72e5357446f20f_35007079.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/8ebfb513d646e5b80e19063b7317b57f_78749635.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/aa3f0875bdcf185a7c4d983debdc3f78_72895036.png change filename to text .imagette294571521765854002/ imagette294571521765854002/1765853706_3538736_1399589347_0246ed36d0ebcc54a177d6a77cd45c7e_rle_crop_4071520577_0.png.png imagette294571521765854002/1765853846_3545887_1399589367_79bf9ea8a22f2cae24d28a2b2942b292_rle_crop_4071521117_0.png.png imagette294571521765854002/1765853545_3529505_1399589289_e4e98988cd66f9f7e3f3f47f878f01aa_rle_crop_4071520335_0.png.png imagette294571521765854002/1765853706_3538736_1399589316_c6290a24fad63606c3fdee2fb5568b11_rle_crop_4071520623_0.png.png imagette294571521765854002/1765853846_3545887_1399589366_c0ab49a1e74fb272186b91dc663feb4e_rle_crop_4071521132_0.png.png imagette294571521765854002/1765853826_3543637_1399589388_ae1c8424f191ea3dbde42696eab70ae0_rle_crop_4071520855_0.png.png imagette294571521765854002/1765853846_3545887_1399589392_21186c6c96c077d9d6fcb2f0918852af_rle_crop_4071521075_0.png.png imagette294571521765854002/1765853826_3543637_1399589388_ae1c8424f191ea3dbde42696eab70ae0_rle_crop_4071520853_0.png.png imagette294571521765854002/1765853846_3545887_1399589392_21186c6c96c077d9d6fcb2f0918852af_rle_crop_4071521072_0.png.png imagette294571521765854002/1765853846_3545887_1399589367_79bf9ea8a22f2cae24d28a2b2942b292_rle_crop_4071521118_0.png.png wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/8d5758b0d401dec2505f7ed454b6b0a2_20689358.png imagette294571521765854002 29457155 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29457155 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1399589440: '1765853545_3529505_1399589291_3d454057b44297c6186d35018f04a823_rle_crop_4071520318_0.png', 1399589442: '1765853545_3529505_1399589291_3d454057b44297c6186d35018f04a823_rle_crop_4071520311_0.png', 1399589443: '1765853545_3529505_1399589289_e4e98988cd66f9f7e3f3f47f878f01aa_rle_crop_4071520332_0.png', 1399589444: '1765853545_3529505_1399589288_236fb0eb9e17558f71132f2e81e86f83_rle_crop_4071520346_0.png', 1399589445: '1765853545_3529505_1399589288_236fb0eb9e17558f71132f2e81e86f83_rle_crop_4071520348_0.png', 1399589487: '1765853666_3537217_1399589345_c67cea7285ce6507716d48280f6e130f_rle_crop_4071520433_0.png', 1399589516: '1765853706_3538736_1399589317_f3d1608bf0e093f714b108f937bcf379_rle_crop_4071520611_0.png', 1399589517: '1765853706_3538736_1399589316_c6290a24fad63606c3fdee2fb5568b11_rle_crop_4071520622_0.png', 1399589574: '1765853846_3545887_1399589392_21186c6c96c077d9d6fcb2f0918852af_rle_crop_4071521078_0.png', 1399589575: '1765853846_3545887_1399589392_21186c6c96c077d9d6fcb2f0918852af_rle_crop_4071521070_0.png', 1399589576: '1765853846_3545887_1399589371_44d0ea0a0c626cf698764e16bc3e6d86_rle_crop_4071521084_0.png', 1399589577: '1765853846_3545887_1399589368_a89fada19961fe69ec4b4f408e045ccc_rle_crop_4071521098_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/c618131047efc63b692c1dc87a14d6ff_92213320.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/0a86120e0fa425d1e4b55115141a327b_5877176.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/37108e8d329b9aa344dffce461965b4e_51074383.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/23be44217a227066d3b85a88f9f5ee92_54060272.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/09f227c78607be50bb86dad7c45cac56_31582476.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/cb74faef713f7ab07fb0f5845c29bdb7_74539803.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/983c80d3ba954f9366e2355bab2ed39b_32632225.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/80ae97032c68214fdfa29af1f564e35a_24264483.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/7abb68abf395fb376cc6b8da5b3bed67_70974781.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/1c60a6c0ce94b4d34b288bf7d6196bde_44381013.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/7164c4d52fad147a54740804c9c3c269_63062310.png change filename to text .imagette294571551765854002/ imagette294571551765854002/1765853706_3538736_1399589316_c6290a24fad63606c3fdee2fb5568b11_rle_crop_4071520622_0.png.png imagette294571551765854002/1765853846_3545887_1399589368_a89fada19961fe69ec4b4f408e045ccc_rle_crop_4071521098_0.png.png imagette294571551765854002/1765853545_3529505_1399589288_236fb0eb9e17558f71132f2e81e86f83_rle_crop_4071520346_0.png.png imagette294571551765854002/1765853545_3529505_1399589288_236fb0eb9e17558f71132f2e81e86f83_rle_crop_4071520348_0.png.png imagette294571551765854002/1765853545_3529505_1399589289_e4e98988cd66f9f7e3f3f47f878f01aa_rle_crop_4071520332_0.png.png imagette294571551765854002/1765853846_3545887_1399589392_21186c6c96c077d9d6fcb2f0918852af_rle_crop_4071521078_0.png.png imagette294571551765854002/1765853545_3529505_1399589291_3d454057b44297c6186d35018f04a823_rle_crop_4071520318_0.png.png imagette294571551765854002/1765853846_3545887_1399589392_21186c6c96c077d9d6fcb2f0918852af_rle_crop_4071521070_0.png.png imagette294571551765854002/1765853666_3537217_1399589345_c67cea7285ce6507716d48280f6e130f_rle_crop_4071520433_0.png.png imagette294571551765854002/1765853545_3529505_1399589291_3d454057b44297c6186d35018f04a823_rle_crop_4071520311_0.png.png imagette294571551765854002/1765853846_3545887_1399589371_44d0ea0a0c626cf698764e16bc3e6d86_rle_crop_4071521084_0.png.png imagette294571551765854002/1765853706_3538736_1399589317_f3d1608bf0e093f714b108f937bcf379_rle_crop_4071520611_0.png.png wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/07cf6a77ab2c112bb8aade324415c596_59308081.png imagette294571551765854002 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=29457104 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/29457158,29457159,29457160,29457161,29457162,29457163,29457164,29457165,29457166,29457167,29457168,29457169?tags=kraft,autre_refus,mal_croppe,papier,metal,plastique,cartonnette,Teint_Dans_La_Masse,Carton_brun,environnement,Carton_gris,flou your option no_mail is active, we will not send the real mail to your client args[1399589592] : ('0.03950916739136533',) no score found for photo 1399589592 We are sending mail with results at report@fotonower.com args[1399589589] : ('0.03950916739136533',) no score found for photo 1399589589 We are sending mail with results at report@fotonower.com args[1399589586] : ('0.03950916739136533',) no score found for photo 1399589586 We are sending mail with results at report@fotonower.com args[1399589585] : ('0.03950916739136533',) no score found for photo 1399589585 We are sending mail with results at report@fotonower.com args[1399589584] : ('0.03950916739136533',) no score found for photo 1399589584 We are sending mail with results at report@fotonower.com args[1399589583] : ('0.03950916739136533',) no score found for photo 1399589583 We are sending mail with results at report@fotonower.com refus_total : 0.03950916739136533 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29457104 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_P29457104_16-12-2025_04_00_01.pdf results_Auto_P29457104_16-12-2025_04_00_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29457104_16-12-2025_04_00_01.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','29457104','results_Auto_P29457104_16-12-2025_04_00_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29457104_16-12-2025_04_00_01.pdf','pdf','','0.17','0.03950916739136533') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29457104]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1399589592, 1399589589, 1399589586, 1399589585, 1399589584, 1399589583] map_info['map_portfolio_photo'] : {29457104: [1399589592, 1399589589, 1399589586, 1399589585, 1399589584, 1399589583, 1399589550, 1399589546, 1399589542, 1399589540, 1399589538, 1399589528, 1399589525, 1399589524, 1399589523, 1399589522, 1399589505, 1399589504, 1399589503, 1399589502, 1399589476, 1399589475, 1399589474, 1399589473, 1399589455, 1399589452, 1399589451, 1399589450, 1399589449, 1399589420, 1399589419, 1399589418, 1399589417, 1399589392, 1399589389, 1399589388, 1399589387, 1399589386, 1399589374, 1399589371, 1399589368, 1399589367, 1399589366, 1399589365, 1399589347, 1399589346, 1399589345, 1399589324, 1399589321, 1399589318, 1399589317, 1399589316, 1399589315, 1399589298, 1399589295, 1399589292, 1399589291, 1399589289, 1399589288, 1399589270, 1399589269]} final : False mtd_id 4302 list_pids : [1399589592, 1399589589, 1399589586, 1399589585, 1399589584, 1399589583] 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, '4232915') ('4302', '29457104', '1399589592', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589589', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589586', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589585', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589584', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589583', None, None, None, None, None, '4232915') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 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', '29457104', '1399589592', None, None, None, None, None, '4232915'), ('4302', '29457104', '1399589589', None, None, None, None, None, '4232915'), ('4302', '29457104', '1399589586', None, None, None, None, None, '4232915'), ('4302', '29457104', '1399589585', None, None, None, None, None, '4232915'), ('4302', '29457104', '1399589584', None, None, None, None, None, '4232915'), ('4302', '29457104', '1399589583', None, None, None, None, None, '4232915')] time used for this insertion : 0.01454925537109375 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.402470111846924 time spend to save output : 0.014757156372070312 total time spend for step 4 : 4.417227268218994 step5:split_time_score Tue Dec 16 04:00:05 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 : ['29457104'] 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 : [('29457104',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29457104) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1399589589: {'path': 'temp/1765854001_2811674_1399589589_3a82a9e1bb64e0b91511a3fa4742353e.jpg', 'extension': 'jpg'}, 1399589592: {'path': 'temp/1765854001_2811674_1399589592_0c7ba90637163e39be24389ab5dfd8d0.jpg', 'extension': 'jpg'}, 1399589585: {'path': 'temp/1765854001_2811674_1399589585_81bee37e45ad1d9a9bc5622293428fa4.jpg', 'extension': 'jpg'}, 1399589586: {'path': 'temp/1765854001_2811674_1399589586_c42b2d5b3bf81d1ae36063d6ec68a3e9.jpg', 'extension': 'jpg'}, 1399589583: {'path': 'temp/1765854001_2811674_1399589583_03657400b433dd94aa6588f7bc40397c.jpg', 'extension': 'jpg'}, 1399589584: {'path': 'temp/1765854001_2811674_1399589584_08bccd700d7286d256463f47b552af08.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 = 29457104; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm_bis',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 29457104 group by h (('03', 61),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29457104 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 (29457104) 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 (29457104) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 16122025 29457104 Nombre de photos uploadées : 61 / 23040 (0%) 16122025 29457104 Nombre de photos taguées (types de déchets): 0 / 61 (0%) 16122025 29457104 Nombre de photos taguées (volume) : 0 / 61 (0%) [{'photo_id': 1399589270, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/eb2228dfd9d0857f530515d0122b683f.jpg', 'username': None, 'uploaded_at': 1765853168, 'text': 'image_16122025_03_45_04_010143m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1399589269, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/f2976cbf7d2218e9bb01c08ad32adfc4.jpg', 'username': None, 'uploaded_at': 1765853168, 'text': 'image_16122025_03_45_44_010135m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1399589298, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/b8ded9dbb2acae376c018ecd831d8e75.jpg', 'username': None, 'uploaded_at': 1765853227, 'text': 'image_16122025_03_45_54_010138m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1399589295, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/16/c771d0ad6af54f2fbbb9a9f186652110.jpg', 'username': None, 'uploaded_at': 1765853227, 'text': 'image_16122025_03_46_04_10157.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.0994415283203125e-06 elapsed_time : order_list_meta_photo_and_scores 8.344650268554688e-06 ????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0028531551361083984 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 29457104, '2025-12-16' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-12-16' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2742047,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.2589375972747803 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= 2742047 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749540, 'mtr_portfolio_id': 29450388, 'dashboard_result_id': 18405759, '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_P29450388_16-12-2025_00_19_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29450390, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29450391, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29450392, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29450393, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29450394, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29450395, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29450396, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29450397, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29450398, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29450399, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29450400, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29450401, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749540, 'mtr_portfolio_id': 29450996, 'dashboard_result_id': 18405760, '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_P29450996_16-12-2025_00_33_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29451038, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29451039, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29451040, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29451041, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29451042, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29451043, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29451044, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29451045, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29451046, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29451047, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29451048, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29451049, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749540, 'mtr_portfolio_id': 29451566, 'dashboard_result_id': 18405761, '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_P29451566_16-12-2025_00_46_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29451574, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29451575, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29451576, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29451577, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29451578, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29451579, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29451580, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29451581, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29451582, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29451583, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29451584, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29451585, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749540, 'mtr_portfolio_id': 29452103, 'dashboard_result_id': 18405762, '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_P29452103_16-12-2025_01_32_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29452135, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29452136, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29452137, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29452138, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29452139, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29452140, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29452141, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29452142, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29452143, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29452144, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29452146, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29452149, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749540, 'mtr_portfolio_id': 29453332, 'dashboard_result_id': 18405763, '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_P29453332_16-12-2025_01_49_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29453334, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29453335, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29453336, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29453337, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29453338, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29453339, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29453340, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29453341, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29453342, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29453343, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29453344, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29453345, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749540, 'mtr_portfolio_id': 29453728, 'dashboard_result_id': 18405764, '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_P29453728_16-12-2025_02_02_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29453735, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29453736, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29453737, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29453738, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29453739, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29453740, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29453741, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29453742, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29453743, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29453744, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29453745, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29453746, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749540, 'mtr_portfolio_id': 29454116, 'dashboard_result_id': 18405765, '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_P29454116_16-12-2025_02_19_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29454123, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29454124, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29454125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29454126, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29454127, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29454128, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29454129, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29454130, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29454131, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29454132, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29454133, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29454134, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749540, 'mtr_portfolio_id': 29454690, 'dashboard_result_id': 18405766, '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_P29454690_16-12-2025_02_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29454698, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29454699, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29454700, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29454701, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29454702, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29454703, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29454704, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29454705, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29454706, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29454707, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29454708, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29454709, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749540, 'mtr_portfolio_id': 29455111, 'dashboard_result_id': 18405767, '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_P29455111_16-12-2025_02_47_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29455144, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29455145, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29455146, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29455147, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29455148, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29455149, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29455150, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29455151, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29455152, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29455153, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29455154, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29455155, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749540, 'mtr_portfolio_id': 29455589, 'dashboard_result_id': 18405768, '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_P29455589_16-12-2025_03_03_27.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29455597, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29455598, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29455599, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29455600, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29455601, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29455602, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29455603, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29455604, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29455605, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29455606, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29455607, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29455608, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749540, 'mtr_portfolio_id': 29455995, 'dashboard_result_id': 18405769, '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_P29455995_16-12-2025_03_16_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29455996, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29455997, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29455998, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29455999, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29456000, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29456001, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29456002, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29456003, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29456004, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29456005, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29456006, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29456007, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749540, 'mtr_portfolio_id': 29456570, 'dashboard_result_id': 18405770, '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_P29456570_16-12-2025_03_32_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29456578, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29456579, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29456580, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29456581, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29456582, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29456584, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29456585, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29456586, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29456587, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29456588, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29456589, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29456590, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749540, 'mtr_portfolio_id': 29456741, 'dashboard_result_id': 18405771, '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_P29456741_16-12-2025_03_46_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29456756, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29456757, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29456758, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29456759, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29456760, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29456761, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29456762, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29456763, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29456764, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29456765, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29456766, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29456767, 'pht': 3726}}"}, {'dashboat_entry_day': 2742047, 'dashboard_run_id': 2749540, 'mtr_portfolio_id': 29457104, 'dashboard_result_id': 18405772, '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_P29457104_16-12-2025_03_59_02.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29457144, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29457145, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29457146, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29457147, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29457148, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29457149, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29457150, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29457151, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29457152, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29457153, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29457155, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29457156, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29450388 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': 4231841, 'mtr_portfolio_id': 29450388, 'created_at': datetime.datetime(2025, 12, 16, 0, 19, 1), 'result': '0.05849226565291721', 'result_long': None, 'result_double': None}] Qualite : 0.05849226565291721 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29450388 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29450388_16-12-2025_00_19_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29450388 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_P29450388_16-12-2025_00_19_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29450390, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29450391, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29450392, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29450393, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29450394, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29450395, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29450396, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29450397, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29450398, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29450399, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29450400, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29450401, 'pht': 3726}}" where mtr_portfolio_id = 29450388 and dashboard_run_id = 2749546 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`=29450388 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18405759, 0.05849226565291721, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29450388_16-12-2025_00_19_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29450390, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29450391, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29450392, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29450393, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29450394, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29450395, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29450396, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29450397, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29450398, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29450399, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29450400, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29450401, '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 = 29450996 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': 4231891, 'mtr_portfolio_id': 29450996, 'created_at': datetime.datetime(2025, 12, 16, 0, 33), 'result': '0.05860023724292723', 'result_long': None, 'result_double': None}] Qualite : 0.05860023724292723 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29450996 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29450996_16-12-2025_00_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29450996 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_P29450996_16-12-2025_00_33_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29451038, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29451039, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29451040, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29451041, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29451042, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29451043, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29451044, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29451045, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29451046, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29451047, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29451048, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29451049, 'pht': 3726}}" where mtr_portfolio_id = 29450996 and dashboard_run_id = 2749546 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`=29450996 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18405760, 0.05860023724292723, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29450996_16-12-2025_00_33_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29451038, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29451039, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29451040, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29451041, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29451042, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29451043, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29451044, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29451045, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29451046, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29451047, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29451048, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29451049, '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 = 29451566 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': 4231947, 'mtr_portfolio_id': 29451566, 'created_at': datetime.datetime(2025, 12, 16, 0, 46, 57), 'result': '0.04760964518372767', 'result_long': None, 'result_double': None}] Qualite : 0.04760964518372767 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29451566 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29451566_16-12-2025_00_46_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29451566 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_P29451566_16-12-2025_00_46_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29451574, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29451575, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29451576, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29451577, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29451578, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29451579, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29451580, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29451581, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29451582, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29451583, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29451584, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29451585, 'pht': 3726}}" where mtr_portfolio_id = 29451566 and dashboard_run_id = 2749546 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`=29451566 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18405761, 0.04760964518372767, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29451566_16-12-2025_00_46_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29451574, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29451575, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29451576, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29451577, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29451578, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29451579, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29451580, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29451581, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29451582, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29451583, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29451584, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29451585, '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 = 29452103 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': 4232011, 'mtr_portfolio_id': 29452103, 'created_at': datetime.datetime(2025, 12, 16, 1, 32, 58), 'result': '0.04210042514862066', 'result_long': None, 'result_double': None}] Qualite : 0.04210042514862066 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29452103 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29452103_16-12-2025_01_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29452103 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_P29452103_16-12-2025_01_32_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29452135, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29452136, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29452137, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29452138, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29452139, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29452140, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29452141, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29452142, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29452143, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29452144, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29452146, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29452149, 'pht': 3726}}" where mtr_portfolio_id = 29452103 and dashboard_run_id = 2749546 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`=29452103 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18405762, 0.04210042514862066, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29452103_16-12-2025_01_32_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29452135, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29452136, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29452137, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29452138, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29452139, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29452140, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29452141, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29452142, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29452143, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29452144, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29452146, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29452149, '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 = 29453332 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': 4232138, 'mtr_portfolio_id': 29453332, 'created_at': datetime.datetime(2025, 12, 16, 1, 48, 59), 'result': '0.029333104092729448', 'result_long': None, 'result_double': None}] Qualite : 0.029333104092729448 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29453332 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29453332_16-12-2025_01_49_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29453332 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_P29453332_16-12-2025_01_49_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29453334, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29453335, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29453336, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29453337, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29453338, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29453339, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29453340, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29453341, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29453342, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29453343, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29453344, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29453345, 'pht': 3726}}" where mtr_portfolio_id = 29453332 and dashboard_run_id = 2749546 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`=29453332 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18405763, 0.029333104092729448, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29453332_16-12-2025_01_49_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29453334, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29453335, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29453336, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29453337, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29453338, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29453339, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29453340, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29453341, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29453342, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29453343, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29453344, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29453345, '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 = 29453728 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': 4232191, 'mtr_portfolio_id': 29453728, 'created_at': datetime.datetime(2025, 12, 16, 2, 2, 58), 'result': '0.04331540313387708', 'result_long': None, 'result_double': None}] Qualite : 0.04331540313387708 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29453728 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29453728_16-12-2025_02_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29453728 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_P29453728_16-12-2025_02_02_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29453735, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29453736, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29453737, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29453738, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29453739, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29453740, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29453741, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29453742, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29453743, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29453744, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29453745, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29453746, 'pht': 3726}}" where mtr_portfolio_id = 29453728 and dashboard_run_id = 2749546 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`=29453728 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18405764, 0.04331540313387708, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29453728_16-12-2025_02_02_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29453735, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29453736, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29453737, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29453738, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29453739, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29453740, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29453741, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29453742, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29453743, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29453744, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29453745, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29453746, '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 = 29454116 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': 4232286, 'mtr_portfolio_id': 29454116, 'created_at': datetime.datetime(2025, 12, 16, 2, 19), 'result': '0.04807568087582184', 'result_long': None, 'result_double': None}] Qualite : 0.04807568087582184 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29454116 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29454116_16-12-2025_02_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29454116 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_P29454116_16-12-2025_02_19_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29454123, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29454124, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29454125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29454126, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29454127, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29454128, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29454129, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29454130, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29454131, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29454132, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29454133, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29454134, 'pht': 3726}}" where mtr_portfolio_id = 29454116 and dashboard_run_id = 2749546 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`=29454116 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18405765, 0.04807568087582184, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29454116_16-12-2025_02_19_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29454123, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29454124, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29454125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29454126, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29454127, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29454128, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29454129, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29454130, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29454131, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29454132, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29454133, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29454134, '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 = 29454690 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': 4232349, 'mtr_portfolio_id': 29454690, 'created_at': datetime.datetime(2025, 12, 16, 2, 32, 59), 'result': '0.04511154696265637', 'result_long': None, 'result_double': None}] Qualite : 0.04511154696265637 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29454690 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29454690_16-12-2025_02_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29454690 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_P29454690_16-12-2025_02_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29454698, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29454699, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29454700, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29454701, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29454702, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29454703, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29454704, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29454705, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29454706, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29454707, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29454708, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29454709, 'pht': 3726}}" where mtr_portfolio_id = 29454690 and dashboard_run_id = 2749546 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`=29454690 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18405766, 0.04511154696265637, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29454690_16-12-2025_02_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29454698, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29454699, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29454700, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29454701, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29454702, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29454703, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29454704, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29454705, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29454706, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29454707, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29454708, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29454709, '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 = 29455111 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': 4232414, 'mtr_portfolio_id': 29455111, 'created_at': datetime.datetime(2025, 12, 16, 2, 47), 'result': '0.051224888726139145', 'result_long': None, 'result_double': None}] Qualite : 0.051224888726139145 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29455111 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29455111_16-12-2025_02_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29455111 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_P29455111_16-12-2025_02_47_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29455144, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29455145, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29455146, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29455147, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29455148, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29455149, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29455150, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29455151, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29455152, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29455153, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29455154, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29455155, 'pht': 3726}}" where mtr_portfolio_id = 29455111 and dashboard_run_id = 2749546 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`=29455111 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18405767, 0.051224888726139145, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29455111_16-12-2025_02_47_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29455144, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29455145, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29455146, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29455147, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29455148, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29455149, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29455150, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29455151, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29455152, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29455153, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29455154, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29455155, '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 = 29455589 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': 4232475, 'mtr_portfolio_id': 29455589, 'created_at': datetime.datetime(2025, 12, 16, 3, 3, 27), 'result': '0.04496166246567756', 'result_long': None, 'result_double': None}] Qualite : 0.04496166246567756 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29455589 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29455589_16-12-2025_03_03_27.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29455589 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_P29455589_16-12-2025_03_03_27.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29455597, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29455598, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29455599, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29455600, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29455601, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29455602, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29455603, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29455604, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29455605, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29455606, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29455607, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29455608, 'pht': 3726}}" where mtr_portfolio_id = 29455589 and dashboard_run_id = 2749546 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`=29455589 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18405768, 0.04496166246567756, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29455589_16-12-2025_03_03_27.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29455597, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29455598, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29455599, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29455600, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29455601, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29455602, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29455603, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29455604, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29455605, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29455606, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29455607, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29455608, '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 = 29455995 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': 4232550, 'mtr_portfolio_id': 29455995, 'created_at': datetime.datetime(2025, 12, 16, 3, 16, 58), 'result': '0.03987484468013755', 'result_long': None, 'result_double': None}] Qualite : 0.03987484468013755 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29455995 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29455995_16-12-2025_03_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29455995 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_P29455995_16-12-2025_03_16_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29455996, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29455997, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29455998, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29455999, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29456000, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29456001, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29456002, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29456003, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29456004, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29456005, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29456006, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29456007, 'pht': 3726}}" where mtr_portfolio_id = 29455995 and dashboard_run_id = 2749546 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`=29455995 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18405769, 0.03987484468013755, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29455995_16-12-2025_03_16_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29455996, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29455997, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29455998, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29455999, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29456000, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29456001, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29456002, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29456003, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29456004, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29456005, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29456006, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29456007, '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 = 29456570 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 = 29456570 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 = 29456570 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29456570 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 = 29456570 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 = 29456570 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29456570_16-12-2025_03_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29456570 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_P29456570_16-12-2025_03_32_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29456578, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29456579, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29456580, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29456581, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29456582, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29456584, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29456585, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29456586, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29456587, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29456588, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29456589, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29456590, 'pht': 3726}}" where mtr_portfolio_id = 29456570 and dashboard_run_id = 2749546 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 = 29456741 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': 4232733, 'mtr_portfolio_id': 29456741, 'created_at': datetime.datetime(2025, 12, 16, 3, 46, 59), 'result': '0.04569203002957828', 'result_long': None, 'result_double': None}] Qualite : 0.04569203002957828 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29456741 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29456741_16-12-2025_03_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29456741 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_P29456741_16-12-2025_03_46_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29456756, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29456757, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29456758, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29456759, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29456760, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29456761, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29456762, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29456763, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29456764, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29456765, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29456766, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29456767, 'pht': 3726}}" where mtr_portfolio_id = 29456741 and dashboard_run_id = 2749546 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`=29456741 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18405771, 0.04569203002957828, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29456741_16-12-2025_03_46_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29456756, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29456757, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29456758, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29456759, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29456760, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29456761, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29456762, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29456763, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29456764, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29456765, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29456766, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29456767, '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 = 29457104 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': 4232915, 'mtr_portfolio_id': 29457104, 'created_at': datetime.datetime(2025, 12, 16, 4, 0), 'result': '0.03950916739136533', 'result_long': None, 'result_double': None}] Qualite : 0.03950916739136533 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29457104 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29457104_16-12-2025_04_00_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29457104 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_P29457104_16-12-2025_04_00_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29457144, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29457145, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29457146, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29457147, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29457148, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29457149, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29457150, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29457151, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29457152, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29457153, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29457155, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29457156, 'pht': 3726}}" where mtr_portfolio_id = 29457104 and dashboard_run_id = 2749546 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`=29457104 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18405772, 0.03950916739136533, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29457104_16-12-2025_04_00_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29457144, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29457145, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29457146, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29457147, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29457148, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29457149, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29457150, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29457151, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29457152, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29457153, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29457155, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29457156, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29450388,29450996,29451566,29452103,29453332,29453728,29454116,29454690,29455111,29455589,29455995,29456570,29456741,29457104) result : ((1399569775,), (1399569840,), (1399569914,), (1399569963,), (1399570004,), (1399570079,), (1399570082,), (1399570115,), (1399570158,), (1399570440,), (1399570473,), (1399570509,), (1399570540,), (1399570781,), (1399570794,), (1399570799,), (1399570816,), (1399570840,), (1399570850,), (1399570857,), (1399570858,), (1399570859,), (1399570860,), (1399570863,), (1399570873,), (1399570874,), (1399570875,), (1399570876,), (1399570879,), (1399571005,), (1399571039,), (1399571074,), (1399571109,), (1399571144,), (1399571180,), (1399571473,), (1399571474,), (1399571475,), (1399571476,), (1399571629,), (1399571630,), (1399571631,), (1399571632,), (1399571634,), (1399571636,), (1399571669,), (1399571670,), (1399571671,), (1399571701,), (1399571758,), (1399571822,), (1399571881,), (1399571945,), (1399572326,), (1399572363,), (1399572393,), (1399572424,), (1399572457,), (1399572701,), (1399572702,), (1399572703,), (1399572792,), (1399572827,), (1399572856,), (1399572888,), (1399572921,), (1399573118,), (1399573152,), (1399573155,), (1399573156,), (1399573186,), (1399573180,), (1399573181,), (1399573182,), (1399573183,), (1399573195,), (1399573196,), (1399573197,), (1399573198,), (1399573234,), (1399573235,), (1399573236,), (1399573237,), (1399573239,), (1399573242,), (1399573262,), (1399573263,), (1399573264,), (1399573265,), (1399573268,), (1399573286,), (1399573288,), (1399573289,), (1399573290,), (1399573292,), (1399573304,), (1399573305,), (1399573306,), (1399573307,), (1399573310,), (1399573313,), (1399573339,), (1399573340,), (1399573341,), (1399573355,), (1399573356,), (1399573357,), (1399573358,), (1399573389,), (1399573390,), (1399573393,), (1399573394,), (1399573396,), (1399573398,), (1399573411,), (1399573412,), (1399573413,), (1399573445,), (1399573446,), (1399573447,), (1399573448,), (1399573451,), (1399573460,), (1399573461,), (1399573462,), (1399573463,), (1399573487,), (1399573488,), (1399573489,), (1399573490,), (1399573492,), (1399573494,), (1399573505,), (1399573507,), (1399573509,), (1399573510,), (1399573512,), (1399573514,), (1399573528,), (1399573530,), (1399573531,), (1399573532,), (1399573558,), (1399573560,), (1399573571,), (1399573572,), (1399573576,), (1399573550,), (1399573551,), (1399573552,), (1399573555,), (1399573580,), (1399573582,), (1399573583,), (1399573585,), (1399573834,), (1399573858,), (1399573860,), (1399573873,), (1399573929,), (1399573930,), (1399573931,), (1399573932,), (1399573935,), (1399573938,), (1399573952,), (1399573953,), (1399573954,), (1399573978,), (1399573979,), (1399573980,), (1399573981,), (1399573984,), (1399573987,), (1399573997,), (1399573998,), (1399573999,), (1399574000,), (1399574022,), (1399574023,), (1399574024,), (1399574025,), (1399574028,), (1399574031,), (1399574044,), (1399574045,), (1399574046,), (1399574047,), (1399574049,), (1399574091,), (1399574095,), (1399574125,), (1399574156,), (1399574535,), (1399574565,), (1399574597,), (1399574839,), (1399574840,), (1399574841,), (1399574842,), (1399574949,), (1399574950,), (1399574951,), (1399574953,), (1399574956,), (1399574958,), (1399574967,), (1399574969,), (1399574983,), (1399574984,), (1399574985,), (1399574986,), (1399575012,), (1399575013,), (1399575015,), (1399575037,), (1399575450,), (1399575433,), (1399575444,), (1399575446,), (1399575447,), (1399575608,), (1399575643,), (1399575646,), (1399575649,), (1399575652,), (1399575655,), (1399575677,), (1399575679,), (1399575681,), (1399575695,), (1399575696,), (1399575697,), (1399575698,), (1399575701,), (1399575728,), (1399575729,), (1399575757,), (1399575788,), (1399575827,), (1399576183,), (1399576216,), (1399576249,), (1399576628,), (1399576629,), (1399576630,), (1399576631,), (1399576634,), (1399576637,), (1399576852,), (1399576860,), (1399576861,), (1399576983,), (1399576984,), (1399577593,), (1399579074,), (1399579221,), (1399579223,), (1399579264,), (1399581480,), (1399581479,), (1399581490,), (1399581491,), (1399581492,), (1399581493,), (1399581504,), (1399581505,), (1399581506,), (1399581509,), (1399581514,), (1399581528,), (1399581543,), (1399581544,), (1399581545,), (1399581559,), (1399581560,), (1399581561,), (1399581562,), (1399581578,), (1399581579,), (1399581580,), (1399581581,), (1399581584,), (1399581596,), (1399581597,), (1399581598,), (1399581599,), (1399581619,), (1399581620,), (1399581621,), (1399581622,), (1399581625,), (1399581633,), (1399581634,), (1399581635,), (1399581636,), (1399581638,), (1399581670,), (1399581671,), (1399581672,), (1399581673,), (1399581691,), (1399581692,), (1399581693,), (1399581694,), (1399581695,), (1399581714,), (1399581715,), (1399581716,), (1399581727,), (1399581728,), (1399581729,), (1399581730,), (1399581733,), (1399581735,), (1399581748,), (1399581749,), (1399581750,), (1399581751,), (1399581753,), (1399581756,), (1399581766,), (1399581767,), (1399581768,), (1399581807,), (1399581801,), (1399581802,), (1399581803,), (1399581804,), (1399581818,), (1399581819,), (1399581820,), (1399581821,), (1399581844,), (1399581845,), (1399581846,), (1399581847,), (1399581860,), (1399581862,), (1399581864,), (1399581868,), (1399581890,), (1399581891,), (1399581892,), (1399581893,), (1399581903,), (1399581904,), (1399581905,), (1399581906,), (1399581930,), (1399581931,), (1399581932,), (1399581933,), (1399581935,), (1399581953,), (1399581954,), (1399581955,), (1399581956,), (1399581958,), (1399581961,), (1399581971,), (1399581972,), (1399581973,), (1399581974,), (1399581987,), (1399581989,), (1399581991,), (1399581996,), (1399581999,), (1399582008,), (1399582009,), (1399582010,), (1399582011,), (1399582014,), (1399582029,), (1399582034,), (1399582035,), (1399582036,), (1399582095,), (1399582126,), (1399582160,), (1399582825,), (1399582829,), (1399582832,), (1399582835,), (1399582838,), (1399582861,), (1399582860,), (1399582882,), (1399582906,), (1399582938,), (1399582971,), (1399583005,), (1399583041,), (1399583356,), (1399583390,), (1399583423,), (1399583457,), (1399583492,), (1399583527,), (1399583718,), (1399583719,), (1399583949,), (1399583950,), (1399583964,), (1399583997,), (1399584007,), (1399584020,), (1399584075,), (1399584076,), (1399584077,), (1399584078,), (1399584081,), (1399584365,), (1399584399,), (1399584433,), (1399584466,), (1399584504,), (1399584541,), (1399584677,), (1399584714,), (1399584874,), (1399584907,), (1399584947,), (1399584985,), (1399585026,), (1399585184,), (1399585200,), (1399585214,), (1399585229,), (1399585235,), (1399585238,), (1399585245,), (1399585246,), (1399585247,), (1399585267,), (1399585277,), (1399585278,), (1399585279,), (1399585282,), (1399585306,), (1399585308,), (1399585309,), (1399585310,), (1399585334,), (1399585335,), (1399585336,), (1399585337,), (1399585351,), (1399585353,), (1399585355,), (1399585359,), (1399585397,), (1399585388,), (1399585390,), (1399585392,), (1399585394,), (1399585413,), (1399585414,), (1399585415,), (1399585416,), (1399585418,), (1399585451,), (1399585452,), (1399585453,), (1399585454,), (1399585473,), (1399585474,), (1399585475,), (1399585505,), (1399585506,), (1399585507,), (1399585526,), (1399585527,), (1399585528,), (1399585529,), (1399585532,), (1399585567,), (1399585568,), (1399585569,), (1399585570,), (1399585572,), (1399585585,), (1399585700,), (1399585701,), (1399585702,), (1399585703,), (1399585738,), (1399585739,), (1399585756,), (1399585758,), (1399585786,), (1399585787,), (1399585789,), (1399585790,), (1399585817,), (1399585813,), (1399585815,), (1399585816,), (1399585846,), (1399585847,), (1399585848,), (1399585849,), (1399585868,), (1399585869,), (1399585870,), (1399585899,), (1399585900,), (1399585901,), (1399585902,), (1399585905,), (1399585918,), (1399585919,), (1399585920,), (1399585921,), (1399585953,), (1399585954,), (1399585955,), (1399585956,), (1399585971,), (1399585972,), (1399585976,), (1399585980,), (1399585990,), (1399585991,), (1399586011,), (1399586012,), (1399586013,), (1399586036,), (1399586037,), (1399586038,), (1399586039,), (1399586042,), (1399586061,), (1399586063,), (1399586065,), (1399586069,), (1399586073,), (1399586095,), (1399586096,), (1399586097,), (1399586113,), (1399586114,), (1399586115,), (1399586116,), (1399586137,), (1399586138,), (1399586139,), (1399586140,), (1399586142,), (1399586144,), (1399586160,), (1399586163,), (1399586165,), (1399586202,), (1399586198,), (1399586199,), (1399586200,), (1399586201,), (1399586214,), (1399586216,), (1399586218,), (1399586222,), (1399586226,), (1399586229,), (1399586237,), (1399586238,), (1399586239,), (1399586240,), (1399586243,), (1399586246,), (1399586264,), (1399586265,), (1399586266,), (1399586300,), (1399586301,), (1399586302,), (1399586303,), (1399586305,), (1399586307,), (1399586324,), (1399586325,), (1399586326,), (1399586327,), (1399586329,), (1399586330,), (1399586350,), (1399586353,), (1399586354,), (1399586367,), (1399586368,), (1399586369,), (1399586370,), (1399586373,), (1399586392,), (1399586393,), (1399586394,), (1399586395,), (1399586398,), (1399586411,), (1399586412,), (1399586413,), (1399586430,), (1399586432,), (1399586433,), (1399586434,), (1399586437,), (1399586453,), (1399586454,), (1399586455,), (1399586456,), (1399586459,), (1399586484,), (1399586486,), (1399586487,), (1399586504,), (1399586537,), (1399586575,), (1399586933,), (1399586968,), (1399587094,), (1399587133,), (1399587171,), (1399587718,), (1399587614,), (1399587648,), (1399587683,), (1399588157,), (1399588176,), (1399588178,), (1399588203,), (1399588246,), (1399588325,), (1399588327,), (1399588329,), (1399588331,), (1399588360,), (1399588362,), (1399588363,), (1399588364,), (1399588366,), (1399588367,), (1399588379,), (1399588380,), (1399588381,), (1399588382,), (1399588385,), (1399588388,), (1399588406,), (1399588408,), (1399588409,), (1399588436,), (1399588437,), (1399588438,), (1399588439,), (1399588442,), (1399588444,), (1399588464,), (1399588466,), (1399588467,), (1399588468,), (1399588471,), (1399588480,), (1399588482,), (1399588484,), (1399588488,), (1399588509,), (1399588510,), (1399588511,), (1399588512,), (1399588515,), (1399588518,), (1399588532,), (1399588533,), (1399588534,), (1399588554,), (1399588555,), (1399588556,), (1399588557,), (1399588560,), (1399588578,), (1399588579,), (1399588580,), (1399588581,), (1399588583,), (1399588585,), (1399588610,), (1399588614,), (1399588615,), (1399588616,), (1399588636,), (1399588638,), (1399588640,), (1399588643,), (1399588681,), (1399588676,), (1399588679,), (1399588680,), (1399588695,), (1399588697,), (1399588699,), (1399588701,), (1399588704,), (1399588716,), (1399588717,), (1399588718,), (1399588719,), (1399588735,), (1399588736,), (1399588737,), (1399588738,), (1399588741,), (1399588744,), (1399588754,), (1399588755,), (1399588756,), (1399588757,), (1399588771,), (1399588773,), (1399588775,), (1399588779,), (1399588791,), (1399588792,), (1399588793,), (1399588794,), (1399588796,), (1399588808,), (1399588809,), (1399588810,), (1399588811,), (1399588823,), (1399588824,), (1399588825,), (1399588826,), (1399588828,), (1399588842,), (1399588843,), (1399588844,), (1399588845,), (1399588848,), (1399588851,), (1399588862,), (1399588863,), (1399588864,), (1399588865,), (1399588878,), (1399588879,), (1399588880,), (1399588881,), (1399588894,), (1399588895,), (1399588896,), (1399588897,), (1399588900,), (1399588910,), (1399588911,), (1399588912,), (1399588913,), (1399588925,), (1399588926,), (1399588927,), (1399588930,), (1399588933,), (1399588936,), (1399588940,), (1399588941,), (1399588950,), (1399588942,), (1399588943,), (1399588944,), (1399588947,), (1399588961,), (1399588962,), (1399588963,), (1399588964,), (1399588975,), (1399588976,), (1399588977,), (1399588978,), (1399588981,), (1399588983,), (1399588991,), (1399588992,), (1399588993,), (1399588994,), (1399588997,), (1399589009,), (1399589010,), (1399589011,), (1399589012,), (1399589022,), (1399589023,), (1399589024,), (1399589025,), (1399589028,), (1399589041,), (1399589042,), (1399589043,), (1399589044,), (1399589047,), (1399589059,), (1399589060,), (1399589061,), (1399589062,), (1399589064,), (1399589076,), (1399589077,), (1399589078,), (1399589079,), (1399589082,), (1399589085,), (1399589092,), (1399589093,), (1399589104,), (1399589105,), (1399589106,), (1399589107,), (1399589124,), (1399589126,), (1399589127,), (1399589128,), (1399589131,), (1399589167,), (1399589171,), (1399589172,), (1399589173,), (1399589199,), (1399589200,), (1399589201,), (1399589202,), (1399589205,), (1399589218,), (1399589223,), (1399589225,), (1399589226,), (1399589229,), (1399589271,), (1399589269,), (1399589270,), (1399589288,), (1399589289,), (1399589291,), (1399589292,), (1399589295,), (1399589298,), (1399589315,), (1399589316,), (1399589317,), (1399589318,), (1399589321,), (1399589324,), (1399589345,), (1399589346,), (1399589347,), (1399589365,), (1399589366,), (1399589367,), (1399589368,), (1399589371,), (1399589374,), (1399589386,), (1399589387,), (1399589388,), (1399589389,), (1399589392,), (1399589417,), (1399589418,), (1399589419,), (1399589420,), (1399589449,), (1399589450,), (1399589451,), (1399589452,), (1399589455,), (1399589473,), (1399589474,), (1399589475,), (1399589476,), (1399589502,), (1399589503,), (1399589504,), (1399589505,), (1399589522,), (1399589523,), (1399589524,), (1399589525,), (1399589528,), (1399589538,), (1399589540,), (1399589542,), (1399589546,), (1399589550,), (1399589583,), (1399589584,), (1399589585,), (1399589586,), (1399589589,), (1399589592,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'16122025': {'nb_upload': 61, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29457104]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1399589592, 1399589589, 1399589586, 1399589585, 1399589584, 1399589583] map_info['map_portfolio_photo'] : {29457104: [1399589592, 1399589589, 1399589586, 1399589585, 1399589584, 1399589583, 1399589550, 1399589546, 1399589542, 1399589540, 1399589538, 1399589528, 1399589525, 1399589524, 1399589523, 1399589522, 1399589505, 1399589504, 1399589503, 1399589502, 1399589476, 1399589475, 1399589474, 1399589473, 1399589455, 1399589452, 1399589451, 1399589450, 1399589449, 1399589420, 1399589419, 1399589418, 1399589417, 1399589392, 1399589389, 1399589388, 1399589387, 1399589386, 1399589374, 1399589371, 1399589368, 1399589367, 1399589366, 1399589365, 1399589347, 1399589346, 1399589345, 1399589324, 1399589321, 1399589318, 1399589317, 1399589316, 1399589315, 1399589298, 1399589295, 1399589292, 1399589291, 1399589289, 1399589288, 1399589270, 1399589269]} final : True mtd_id 4302 list_pids : [1399589592, 1399589589, 1399589586, 1399589585, 1399589584, 1399589583] Looping around the photos to save general results len do output : 1 /29457104Didn'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, '4232915') ('4302', '29457104', '1399589592', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589589', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589586', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589585', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589584', None, None, None, None, None, '4232915') ('4302', None, None, None, None, None, None, None, '4232915') ('4302', '29457104', '1399589583', None, None, None, None, None, '4232915') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 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, '29457104', 'None', None, None, None, None, '4232915'), ('4302', '29457104', '1399589592', None, None, None, None, None, '4232915'), ('4302', '29457104', '1399589589', None, None, None, None, None, '4232915'), ('4302', '29457104', '1399589586', None, None, None, None, None, '4232915'), ('4302', '29457104', '1399589585', None, None, None, None, None, '4232915'), ('4302', '29457104', '1399589584', None, None, None, None, None, '4232915'), ('4302', '29457104', '1399589583', None, None, None, None, None, '4232915')] time used for this insertion : 0.020001888275146484 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.30472731590271 time spend to save output : 0.020197153091430664 total time spend for step 5 : 1.3249244689941406 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 (4232915) 2.06user 1.38system 0:11.80elapsed 29%CPU (0avgtext+0avgdata 166260maxresident)k 80inputs+8984outputs (2major+78913minor)pagefaults 0swaps