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 : 773176 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 (3733125) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3733125) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26928251 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3733125'] with mtr_portfolio_ids : ['26928251'] and first list_photo_ids : [] new path : /proc/773176/ Name: python3 Umask: 0002 State: R (running) Tgid: 773176 Ngid: 0 Pid: 773176 PPid: 773175 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 773176 NSpid: 773176 NSpgid: 770489 NSsid: 770489 VmPeak: 1107244 kB VmSize: 1107244 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98896 kB VmRSS: 98896 kB RssAnon: 60172 kB RssFile: 38724 kB RssShmem: 0 kB VmData: 865996 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 600 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: 55 nonvoluntary_ctxt_switches: 88 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '773176', 'Ngid': '0', 'Pid': '773176', 'PPid': '773175', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '773176', 'NSpid': '773176', 'NSpgid': '770489', 'NSsid': '770489', 'VmPeak': '1107244 kB', 'VmSize': '1107244 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98896 kB', 'VmRSS': '98896 kB', 'RssAnon': '60172 kB', 'RssFile': '38724 kB', 'RssShmem': '0 kB', 'VmData': '865996 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '600 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': '55', 'nonvoluntary_ctxt_switches': '88'} ('datou_batch_current', '773176', '1107244', '0', '1107244', '865996', '98896', b'', 'marlene', '3733125') 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 ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (26928251) 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 (3733125 ) ) 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 (26928251) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1384063647, 'portfolio_id': 26928251}, {'photo_id': 1384063596, 'portfolio_id': 26928251}, {'photo_id': 1384063571, 'portfolio_id': 26928251}, {'photo_id': 1384063549, 'portfolio_id': 26928251}, {'photo_id': 1384063524, 'portfolio_id': 26928251}, {'photo_id': 1384063438, 'portfolio_id': 26928251}, {'photo_id': 1384063437, 'portfolio_id': 26928251}, {'photo_id': 1384063436, 'portfolio_id': 26928251}, {'photo_id': 1384063420, 'portfolio_id': 26928251}, {'photo_id': 1384063417, 'portfolio_id': 26928251}, {'photo_id': 1384063413, 'portfolio_id': 26928251}, {'photo_id': 1384063410, 'portfolio_id': 26928251}, {'photo_id': 1384063408, 'portfolio_id': 26928251}, {'photo_id': 1384063405, 'portfolio_id': 26928251}, {'photo_id': 1384063396, 'portfolio_id': 26928251}, {'photo_id': 1384063386, 'portfolio_id': 26928251}, {'photo_id': 1384063380, 'portfolio_id': 26928251}, {'photo_id': 1384063371, 'portfolio_id': 26928251}, {'photo_id': 1384063363, 'portfolio_id': 26928251}, {'photo_id': 1384063214, 'portfolio_id': 26928251}, {'photo_id': 1384063213, 'portfolio_id': 26928251}, {'photo_id': 1384063210, 'portfolio_id': 26928251}, {'photo_id': 1384063181, 'portfolio_id': 26928251}, {'photo_id': 1384063178, 'portfolio_id': 26928251}, {'photo_id': 1384063176, 'portfolio_id': 26928251}, {'photo_id': 1384063163, 'portfolio_id': 26928251}, {'photo_id': 1384063140, 'portfolio_id': 26928251}, {'photo_id': 1384063082, 'portfolio_id': 26928251}, {'photo_id': 1384063080, 'portfolio_id': 26928251}, {'photo_id': 1384063071, 'portfolio_id': 26928251}, {'photo_id': 1384063068, 'portfolio_id': 26928251}, {'photo_id': 1384063065, 'portfolio_id': 26928251}, {'photo_id': 1384063061, 'portfolio_id': 26928251}, {'photo_id': 1384063048, 'portfolio_id': 26928251}, {'photo_id': 1384063039, 'portfolio_id': 26928251}, {'photo_id': 1384062937, 'portfolio_id': 26928251}, {'photo_id': 1384062912, 'portfolio_id': 26928251}, {'photo_id': 1384062907, 'portfolio_id': 26928251}, {'photo_id': 1384062906, 'portfolio_id': 26928251}, {'photo_id': 1384062894, 'portfolio_id': 26928251}, {'photo_id': 1384062890, 'portfolio_id': 26928251}, {'photo_id': 1384062887, 'portfolio_id': 26928251}, {'photo_id': 1384062885, 'portfolio_id': 26928251}, {'photo_id': 1384062883, 'portfolio_id': 26928251}, {'photo_id': 1384062881, 'portfolio_id': 26928251}, {'photo_id': 1384062812, 'portfolio_id': 26928251}, {'photo_id': 1384062788, 'portfolio_id': 26928251}, {'photo_id': 1384062760, 'portfolio_id': 26928251}, {'photo_id': 1384062737, 'portfolio_id': 26928251}, {'photo_id': 1384062735, 'portfolio_id': 26928251}, {'photo_id': 1384062734, 'portfolio_id': 26928251}, {'photo_id': 1384062718, 'portfolio_id': 26928251}, {'photo_id': 1384062717, 'portfolio_id': 26928251}, {'photo_id': 1384062715, 'portfolio_id': 26928251}, {'photo_id': 1384062581, 'portfolio_id': 26928251}, {'photo_id': 1384062556, 'portfolio_id': 26928251}, {'photo_id': 1384062519, 'portfolio_id': 26928251}, {'photo_id': 1384062476, 'portfolio_id': 26928251}, {'photo_id': 1384062453, 'portfolio_id': 26928251}, {'photo_id': 1384062423, 'portfolio_id': 26928251}, {'photo_id': 1384062280, 'portfolio_id': 26928251}, {'photo_id': 1384062278, 'portfolio_id': 26928251}, {'photo_id': 1384062275, 'portfolio_id': 26928251}] map_portfolio_id_photo_id: {26928251: [1384063647, 1384063596, 1384063571, 1384063549, 1384063524, 1384063438, 1384063437, 1384063436, 1384063420, 1384063417, 1384063413, 1384063410, 1384063408, 1384063405, 1384063396, 1384063386, 1384063380, 1384063371, 1384063363, 1384063214, 1384063213, 1384063210, 1384063181, 1384063178, 1384063176, 1384063163, 1384063140, 1384063082, 1384063080, 1384063071, 1384063068, 1384063065, 1384063061, 1384063048, 1384063039, 1384062937, 1384062912, 1384062907, 1384062906, 1384062894, 1384062890, 1384062887, 1384062885, 1384062883, 1384062881, 1384062812, 1384062788, 1384062760, 1384062737, 1384062735, 1384062734, 1384062718, 1384062717, 1384062715, 1384062581, 1384062556, 1384062519, 1384062476, 1384062453, 1384062423, 1384062280, 1384062278, 1384062275]} ##### 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.016447067260742188 #### 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 Wed Sep 17 07:28:56 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 (26928251) 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 : 26928251 get user id for portfolio 26928251 get sub ptf for main ptf 26928251, type 3726 and hashtags ['Carton_brun', 'flou', 'kraft', 'plastique', 'mal_croppe', 'papier', 'environnement', 'cartonnette', 'Teint_Dans_La_Masse', 'metal', 'autre_refus', 'Carton_gris'] 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`=26928251 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','flou','kraft','plastique','mal_croppe','papier','environnement','cartonnette','Teint_Dans_La_Masse','metal','autre_refus','Carton_gris')) 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`=26928251 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','flou','kraft','plastique','mal_croppe','papier','environnement','cartonnette','Teint_Dans_La_Masse','metal','autre_refus','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_brun': {'main_port_id': 26928251, 'sub_port_id': 26928262, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160362, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 29)}, 'kraft': {'main_port_id': 26928251, 'sub_port_id': 26928263, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160363, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 29)}, 'autre_refus': {'main_port_id': 26928251, 'sub_port_id': 26928264, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160364, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 29)}, 'plastique': {'main_port_id': 26928251, 'sub_port_id': 26928265, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160365, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 29)}, 'mal_croppe': {'main_port_id': 26928251, 'sub_port_id': 26928266, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160366, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 29)}, 'environnement': {'main_port_id': 26928251, 'sub_port_id': 26928267, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160367, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 29)}, 'metal': {'main_port_id': 26928251, 'sub_port_id': 26928268, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160368, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 29)}, 'flou': {'main_port_id': 26928251, 'sub_port_id': 26928269, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160369, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 29)}, 'Carton_gris': {'main_port_id': 26928251, 'sub_port_id': 26928270, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160370, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 29)}, 'papier': {'main_port_id': 26928251, 'sub_port_id': 26928271, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160371, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 26928251, 'sub_port_id': 26928272, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160372, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 29)}, 'cartonnette': {'main_port_id': 26928251, 'sub_port_id': 26928273, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160373, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 29)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26928262 , 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=26928251 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 (26928262) result : ((1384063187,), (1384063189,), (1384063201,), (1384063202,), (1384063203,), (1384063209,), (1384063431,), (1384063432,), (1384063489,), (1384063490,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26928251) result : ((1384062275,), (1384062278,), (1384062280,), (1384062423,), (1384062453,), (1384062476,), (1384062519,), (1384062556,), (1384062581,), (1384062715,), (1384062717,), (1384062718,), (1384062734,), (1384062735,), (1384062737,), (1384062760,), (1384062788,), (1384062812,), (1384062881,), (1384062883,), (1384062885,), (1384062887,), (1384062890,), (1384062894,), (1384062906,), (1384062907,), (1384062912,), (1384062937,), (1384063039,), (1384063048,), (1384063061,), (1384063065,), (1384063068,), (1384063071,), (1384063080,), (1384063082,), (1384063140,), (1384063163,), (1384063176,), (1384063178,), (1384063181,), (1384063210,), (1384063213,), (1384063214,), (1384063363,), (1384063371,), (1384063380,), (1384063386,), (1384063396,), (1384063405,), (1384063408,), (1384063410,), (1384063413,), (1384063417,), (1384063420,), (1384063436,), (1384063437,), (1384063438,), (1384063524,), (1384063549,), (1384063571,), (1384063596,), (1384063647,)) 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 26928263 , 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=26928251 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 (26928263) result : ((1384063497,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26928251) result : ((1384062275,), (1384062278,), (1384062280,), (1384062423,), (1384062453,), (1384062476,), (1384062519,), (1384062556,), (1384062581,), (1384062715,), (1384062717,), (1384062718,), (1384062734,), (1384062735,), (1384062737,), (1384062760,), (1384062788,), (1384062812,), (1384062881,), (1384062883,), (1384062885,), (1384062887,), (1384062890,), (1384062894,), (1384062906,), (1384062907,), (1384062912,), (1384062937,), (1384063039,), (1384063048,), (1384063061,), (1384063065,), (1384063068,), (1384063071,), (1384063080,), (1384063082,), (1384063140,), (1384063163,), (1384063176,), (1384063178,), (1384063181,), (1384063210,), (1384063213,), (1384063214,), (1384063363,), (1384063371,), (1384063380,), (1384063386,), (1384063396,), (1384063405,), (1384063408,), (1384063410,), (1384063413,), (1384063417,), (1384063420,), (1384063436,), (1384063437,), (1384063438,), (1384063524,), (1384063549,), (1384063571,), (1384063596,), (1384063647,)) 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 26928264 , 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=26928251 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 (26928264) result : ((1384063197,), (1384063487,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26928251) result : ((1384062275,), (1384062278,), (1384062280,), (1384062423,), (1384062453,), (1384062476,), (1384062519,), (1384062556,), (1384062581,), (1384062715,), (1384062717,), (1384062718,), (1384062734,), (1384062735,), (1384062737,), (1384062760,), (1384062788,), (1384062812,), (1384062881,), (1384062883,), (1384062885,), (1384062887,), (1384062890,), (1384062894,), (1384062906,), (1384062907,), (1384062912,), (1384062937,), (1384063039,), (1384063048,), (1384063061,), (1384063065,), (1384063068,), (1384063071,), (1384063080,), (1384063082,), (1384063140,), (1384063163,), (1384063176,), (1384063178,), (1384063181,), (1384063210,), (1384063213,), (1384063214,), (1384063363,), (1384063371,), (1384063380,), (1384063386,), (1384063396,), (1384063405,), (1384063408,), (1384063410,), (1384063413,), (1384063417,), (1384063420,), (1384063436,), (1384063437,), (1384063438,), (1384063524,), (1384063549,), (1384063571,), (1384063596,), (1384063647,)) 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 26928265 , 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=26928251 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 (26928265) result : ((1384063211,), (1384063491,), (1384063493,), (1384063495,), (1384063496,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26928251) result : ((1384062275,), (1384062278,), (1384062280,), (1384062423,), (1384062453,), (1384062476,), (1384062519,), (1384062556,), (1384062581,), (1384062715,), (1384062717,), (1384062718,), (1384062734,), (1384062735,), (1384062737,), (1384062760,), (1384062788,), (1384062812,), (1384062881,), (1384062883,), (1384062885,), (1384062887,), (1384062890,), (1384062894,), (1384062906,), (1384062907,), (1384062912,), (1384062937,), (1384063039,), (1384063048,), (1384063061,), (1384063065,), (1384063068,), (1384063071,), (1384063080,), (1384063082,), (1384063140,), (1384063163,), (1384063176,), (1384063178,), (1384063181,), (1384063210,), (1384063213,), (1384063214,), (1384063363,), (1384063371,), (1384063380,), (1384063386,), (1384063396,), (1384063405,), (1384063408,), (1384063410,), (1384063413,), (1384063417,), (1384063420,), (1384063436,), (1384063437,), (1384063438,), (1384063524,), (1384063549,), (1384063571,), (1384063596,), (1384063647,)) 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 26928266 , 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=26928251 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 (26928266) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26928251) result : ((1384062275,), (1384062278,), (1384062280,), (1384062423,), (1384062453,), (1384062476,), (1384062519,), (1384062556,), (1384062581,), (1384062715,), (1384062717,), (1384062718,), (1384062734,), (1384062735,), (1384062737,), (1384062760,), (1384062788,), (1384062812,), (1384062881,), (1384062883,), (1384062885,), (1384062887,), (1384062890,), (1384062894,), (1384062906,), (1384062907,), (1384062912,), (1384062937,), (1384063039,), (1384063048,), (1384063061,), (1384063065,), (1384063068,), (1384063071,), (1384063080,), (1384063082,), (1384063140,), (1384063163,), (1384063176,), (1384063178,), (1384063181,), (1384063210,), (1384063213,), (1384063214,), (1384063363,), (1384063371,), (1384063380,), (1384063386,), (1384063396,), (1384063405,), (1384063408,), (1384063410,), (1384063413,), (1384063417,), (1384063420,), (1384063436,), (1384063437,), (1384063438,), (1384063524,), (1384063549,), (1384063571,), (1384063596,), (1384063647,)) 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 26928267 , 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=26928251 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 (26928267) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26928251) result : ((1384062275,), (1384062278,), (1384062280,), (1384062423,), (1384062453,), (1384062476,), (1384062519,), (1384062556,), (1384062581,), (1384062715,), (1384062717,), (1384062718,), (1384062734,), (1384062735,), (1384062737,), (1384062760,), (1384062788,), (1384062812,), (1384062881,), (1384062883,), (1384062885,), (1384062887,), (1384062890,), (1384062894,), (1384062906,), (1384062907,), (1384062912,), (1384062937,), (1384063039,), (1384063048,), (1384063061,), (1384063065,), (1384063068,), (1384063071,), (1384063080,), (1384063082,), (1384063140,), (1384063163,), (1384063176,), (1384063178,), (1384063181,), (1384063210,), (1384063213,), (1384063214,), (1384063363,), (1384063371,), (1384063380,), (1384063386,), (1384063396,), (1384063405,), (1384063408,), (1384063410,), (1384063413,), (1384063417,), (1384063420,), (1384063436,), (1384063437,), (1384063438,), (1384063524,), (1384063549,), (1384063571,), (1384063596,), (1384063647,)) 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 26928268 , 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=26928251 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 (26928268) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26928251) result : ((1384062275,), (1384062278,), (1384062280,), (1384062423,), (1384062453,), (1384062476,), (1384062519,), (1384062556,), (1384062581,), (1384062715,), (1384062717,), (1384062718,), (1384062734,), (1384062735,), (1384062737,), (1384062760,), (1384062788,), (1384062812,), (1384062881,), (1384062883,), (1384062885,), (1384062887,), (1384062890,), (1384062894,), (1384062906,), (1384062907,), (1384062912,), (1384062937,), (1384063039,), (1384063048,), (1384063061,), (1384063065,), (1384063068,), (1384063071,), (1384063080,), (1384063082,), (1384063140,), (1384063163,), (1384063176,), (1384063178,), (1384063181,), (1384063210,), (1384063213,), (1384063214,), (1384063363,), (1384063371,), (1384063380,), (1384063386,), (1384063396,), (1384063405,), (1384063408,), (1384063410,), (1384063413,), (1384063417,), (1384063420,), (1384063436,), (1384063437,), (1384063438,), (1384063524,), (1384063549,), (1384063571,), (1384063596,), (1384063647,)) 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 26928269 , 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=26928251 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 (26928269) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26928251) result : ((1384062275,), (1384062278,), (1384062280,), (1384062423,), (1384062453,), (1384062476,), (1384062519,), (1384062556,), (1384062581,), (1384062715,), (1384062717,), (1384062718,), (1384062734,), (1384062735,), (1384062737,), (1384062760,), (1384062788,), (1384062812,), (1384062881,), (1384062883,), (1384062885,), (1384062887,), (1384062890,), (1384062894,), (1384062906,), (1384062907,), (1384062912,), (1384062937,), (1384063039,), (1384063048,), (1384063061,), (1384063065,), (1384063068,), (1384063071,), (1384063080,), (1384063082,), (1384063140,), (1384063163,), (1384063176,), (1384063178,), (1384063181,), (1384063210,), (1384063213,), (1384063214,), (1384063363,), (1384063371,), (1384063380,), (1384063386,), (1384063396,), (1384063405,), (1384063408,), (1384063410,), (1384063413,), (1384063417,), (1384063420,), (1384063436,), (1384063437,), (1384063438,), (1384063524,), (1384063549,), (1384063571,), (1384063596,), (1384063647,)) 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 26928270 , 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=26928251 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 (26928270) result : ((1384063198,), (1384063199,), (1384063430,), (1384063488,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26928251) result : ((1384062275,), (1384062278,), (1384062280,), (1384062423,), (1384062453,), (1384062476,), (1384062519,), (1384062556,), (1384062581,), (1384062715,), (1384062717,), (1384062718,), (1384062734,), (1384062735,), (1384062737,), (1384062760,), (1384062788,), (1384062812,), (1384062881,), (1384062883,), (1384062885,), (1384062887,), (1384062890,), (1384062894,), (1384062906,), (1384062907,), (1384062912,), (1384062937,), (1384063039,), (1384063048,), (1384063061,), (1384063065,), (1384063068,), (1384063071,), (1384063080,), (1384063082,), (1384063140,), (1384063163,), (1384063176,), (1384063178,), (1384063181,), (1384063210,), (1384063213,), (1384063214,), (1384063363,), (1384063371,), (1384063380,), (1384063386,), (1384063396,), (1384063405,), (1384063408,), (1384063410,), (1384063413,), (1384063417,), (1384063420,), (1384063436,), (1384063437,), (1384063438,), (1384063524,), (1384063549,), (1384063571,), (1384063596,), (1384063647,)) 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 26928271 , 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=26928251 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 (26928271) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26928251) result : ((1384062275,), (1384062278,), (1384062280,), (1384062423,), (1384062453,), (1384062476,), (1384062519,), (1384062556,), (1384062581,), (1384062715,), (1384062717,), (1384062718,), (1384062734,), (1384062735,), (1384062737,), (1384062760,), (1384062788,), (1384062812,), (1384062881,), (1384062883,), (1384062885,), (1384062887,), (1384062890,), (1384062894,), (1384062906,), (1384062907,), (1384062912,), (1384062937,), (1384063039,), (1384063048,), (1384063061,), (1384063065,), (1384063068,), (1384063071,), (1384063080,), (1384063082,), (1384063140,), (1384063163,), (1384063176,), (1384063178,), (1384063181,), (1384063210,), (1384063213,), (1384063214,), (1384063363,), (1384063371,), (1384063380,), (1384063386,), (1384063396,), (1384063405,), (1384063408,), (1384063410,), (1384063413,), (1384063417,), (1384063420,), (1384063436,), (1384063437,), (1384063438,), (1384063524,), (1384063549,), (1384063571,), (1384063596,), (1384063647,)) 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 26928272 , 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=26928251 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 (26928272) result : ((1384063185,), (1384063186,), (1384063194,), (1384063195,), (1384063206,), (1384063429,), (1384063494,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26928251) result : ((1384062275,), (1384062278,), (1384062280,), (1384062423,), (1384062453,), (1384062476,), (1384062519,), (1384062556,), (1384062581,), (1384062715,), (1384062717,), (1384062718,), (1384062734,), (1384062735,), (1384062737,), (1384062760,), (1384062788,), (1384062812,), (1384062881,), (1384062883,), (1384062885,), (1384062887,), (1384062890,), (1384062894,), (1384062906,), (1384062907,), (1384062912,), (1384062937,), (1384063039,), (1384063048,), (1384063061,), (1384063065,), (1384063068,), (1384063071,), (1384063080,), (1384063082,), (1384063140,), (1384063163,), (1384063176,), (1384063178,), (1384063181,), (1384063210,), (1384063213,), (1384063214,), (1384063363,), (1384063371,), (1384063380,), (1384063386,), (1384063396,), (1384063405,), (1384063408,), (1384063410,), (1384063413,), (1384063417,), (1384063420,), (1384063436,), (1384063437,), (1384063438,), (1384063524,), (1384063549,), (1384063571,), (1384063596,), (1384063647,)) 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 26928273 , 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=26928251 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 (26928273) result : ((1384063208,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26928251) result : ((1384062275,), (1384062278,), (1384062280,), (1384062423,), (1384062453,), (1384062476,), (1384062519,), (1384062556,), (1384062581,), (1384062715,), (1384062717,), (1384062718,), (1384062734,), (1384062735,), (1384062737,), (1384062760,), (1384062788,), (1384062812,), (1384062881,), (1384062883,), (1384062885,), (1384062887,), (1384062890,), (1384062894,), (1384062906,), (1384062907,), (1384062912,), (1384062937,), (1384063039,), (1384063048,), (1384063061,), (1384063065,), (1384063068,), (1384063071,), (1384063080,), (1384063082,), (1384063140,), (1384063163,), (1384063176,), (1384063178,), (1384063181,), (1384063210,), (1384063213,), (1384063214,), (1384063363,), (1384063371,), (1384063380,), (1384063386,), (1384063396,), (1384063405,), (1384063408,), (1384063410,), (1384063413,), (1384063417,), (1384063420,), (1384063436,), (1384063437,), (1384063438,), (1384063524,), (1384063549,), (1384063571,), (1384063596,), (1384063647,)) 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`=26928251 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','flou','kraft','plastique','mal_croppe','papier','environnement','cartonnette','Teint_Dans_La_Masse','metal','autre_refus','Carton_gris')) 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`=26928251 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','flou','kraft','plastique','mal_croppe','papier','environnement','cartonnette','Teint_Dans_La_Masse','metal','autre_refus','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_brun': {'main_port_id': 26928251, 'sub_port_id': 26928306, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160404, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 35)}, 'kraft': {'main_port_id': 26928251, 'sub_port_id': 26928307, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160405, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 35)}, 'autre_refus': {'main_port_id': 26928251, 'sub_port_id': 26928308, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160406, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 35)}, 'plastique': {'main_port_id': 26928251, 'sub_port_id': 26928309, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160407, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 35)}, 'mal_croppe': {'main_port_id': 26928251, 'sub_port_id': 26928310, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160408, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 35)}, 'environnement': {'main_port_id': 26928251, 'sub_port_id': 26928311, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160409, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 35)}, 'metal': {'main_port_id': 26928251, 'sub_port_id': 26928312, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160410, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 35)}, 'flou': {'main_port_id': 26928251, 'sub_port_id': 26928313, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160411, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 35)}, 'Carton_gris': {'main_port_id': 26928251, 'sub_port_id': 26928314, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160412, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 35)}, 'papier': {'main_port_id': 26928251, 'sub_port_id': 26928315, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160413, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 35)}, 'Teint_Dans_La_Masse': {'main_port_id': 26928251, 'sub_port_id': 26928316, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160414, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 35)}, 'cartonnette': {'main_port_id': 26928251, 'sub_port_id': 26928317, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18160415, 'last_updated_at': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_desc': datetime.datetime(2025, 9, 17, 7, 26, 31), 'last_updated_at_asc': datetime.datetime(2025, 9, 17, 7, 17, 35)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26928306,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26928262 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26928307,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26928263 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26928308,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26928264 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26928309,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26928265 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26928310,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26928266 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26928311,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26928267 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26928312,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26928268 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26928313,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26928269 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26928314,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26928270 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26928315,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26928271 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26928316,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26928272 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26928317,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26928273 lien utilise dans velours : https://marlene.fotonower.com/velours/26928306,26928307,26928308,26928309,26928310,26928311,26928312,26928313,26928314,26928315,26928316,26928317?tags=Carton_brun,kraft,autre_refus,plastique,mal_croppe,environnement,metal,flou,Carton_gris,papier,Teint_Dans_La_Masse,cartonnette After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26928251]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1384063647, 1384063596, 1384063571, 1384063549, 1384063524, 1384063438, 1384063437, 1384063436, 1384063420, 1384063417, 1384063413, 1384063410, 1384063408, 1384063405] map_info['map_portfolio_photo'] : {26928251: [1384063647, 1384063596, 1384063571, 1384063549, 1384063524, 1384063438, 1384063437, 1384063436, 1384063420, 1384063417, 1384063413, 1384063410, 1384063408, 1384063405, 1384063396, 1384063386, 1384063380, 1384063371, 1384063363, 1384063214, 1384063213, 1384063210, 1384063181, 1384063178, 1384063176, 1384063163, 1384063140, 1384063082, 1384063080, 1384063071, 1384063068, 1384063065, 1384063061, 1384063048, 1384063039, 1384062937, 1384062912, 1384062907, 1384062906, 1384062894, 1384062890, 1384062887, 1384062885, 1384062883, 1384062881, 1384062812, 1384062788, 1384062760, 1384062737, 1384062735, 1384062734, 1384062718, 1384062717, 1384062715, 1384062581, 1384062556, 1384062519, 1384062476, 1384062453, 1384062423, 1384062280, 1384062278, 1384062275]} final : False mtd_id 4302 list_pids : [1384063647, 1384063596, 1384063571, 1384063549, 1384063524, 1384063438, 1384063437, 1384063436, 1384063420, 1384063417, 1384063413, 1384063410, 1384063408, 1384063405] Looping around the photos to save general results len do output : 1 /26928251. 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, '3733125') ('4302', '26928251', '1384063647', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063596', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063571', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063549', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063524', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063438', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063437', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063436', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063420', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063417', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063413', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063410', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063408', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063405', None, None, None, None, None, '3733125') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 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, '26928251', "{'Carton_brun': 26928262, 'kraft': 26928263, 'autre_refus': 26928264, 'plastique': 26928265, 'mal_croppe': 26928266, 'environnement': 26928267, 'metal': 26928268, 'flou': 26928269, 'Carton_gris': 26928270, 'papier': 26928271, 'Teint_Dans_La_Masse': 26928272, 'cartonnette': 26928273}", None, None, None, None, '3733125'), ('4302', '26928251', '1384063647', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063596', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063571', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063549', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063524', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063438', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063437', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063436', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063420', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063417', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063413', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063410', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063408', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063405', None, None, None, None, None, '3733125')] time used for this insertion : 0.057993173599243164 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.6812186241149902 time spend to save output : 0.0583186149597168 total time spend for step 1 : 1.739537239074707 step2:final Wed Sep 17 07:28:57 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 (26928251) 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 26928251 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1384062280,1384062278,1384062275,1384062581,1384062556,1384062519,1384062476,1384062453,1384062423,1384062718,1384062717,1384062715,1384062812,1384062788,1384062760,1384062737,1384062735,1384062734,1384062894,1384062890,1384062887,1384062885,1384062883,1384062881,1384062937,1384063082,1384062912,1384063080,1384062907,1384063071,1384062906,1384063068,1384063065,1384063061,1384063048,1384063039,1384063181,1384063178,1384063176,1384063163,1384063140,1384063214,1384063213,1384063210,1384063396,1384063386,1384063380,1384063371,1384063363,1384063420,1384063417,1384063413,1384063410,1384063408,1384063405,1384063438,1384063437,1384063436,1384063647,1384063596,1384063571,1384063549,1384063524); 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([26928251]) Inside saveOutput : final : False verbose : True original output for save of step final : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ('0.04930537601418998',), 1384063405: ('0.04930537601418998',)} new output for save of step final : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ('0.04930537601418998',), 1384063405: ('0.04930537601418998',)} [1384063647, 1384063596, 1384063571, 1384063549, 1384063524, 1384063438, 1384063437, 1384063436, 1384063420, 1384063417, 1384063413, 1384063410, 1384063408, 1384063405] map_info['map_portfolio_photo'] : {26928251: [1384063647, 1384063596, 1384063571, 1384063549, 1384063524, 1384063438, 1384063437, 1384063436, 1384063420, 1384063417, 1384063413, 1384063410, 1384063408, 1384063405, 1384063396, 1384063386, 1384063380, 1384063371, 1384063363, 1384063214, 1384063213, 1384063210, 1384063181, 1384063178, 1384063176, 1384063163, 1384063140, 1384063082, 1384063080, 1384063071, 1384063068, 1384063065, 1384063061, 1384063048, 1384063039, 1384062937, 1384062912, 1384062907, 1384062906, 1384062894, 1384062890, 1384062887, 1384062885, 1384062883, 1384062881, 1384062812, 1384062788, 1384062760, 1384062737, 1384062735, 1384062734, 1384062718, 1384062717, 1384062715, 1384062581, 1384062556, 1384062519, 1384062476, 1384062453, 1384062423, 1384062280, 1384062278, 1384062275]} final : False mtd_id 4302 list_pids : [1384063647, 1384063596, 1384063571, 1384063549, 1384063524, 1384063438, 1384063437, 1384063436, 1384063420, 1384063417, 1384063413, 1384063410, 1384063408, 1384063405] Looping around the photos to save general results len do output : 14 /1384063647.Didn't retrieve data . /1384063596.Didn't retrieve data . /1384063571.Didn't retrieve data . /1384063549.Didn't retrieve data . /1384063524.Didn't retrieve data . /1384063438.Didn't retrieve data . /1384063437.Didn't retrieve data . /1384063436.Didn't retrieve data . /1384063420.Didn't retrieve data . /1384063417.Didn't retrieve data . /1384063413.Didn't retrieve data . /1384063410.Didn't retrieve data . /1384063408.Didn't retrieve data . /1384063405.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, '3733125') ('4302', '26928251', '1384063647', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063596', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063571', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063549', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063524', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063438', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063437', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063436', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063420', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063417', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063413', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063410', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063408', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063405', None, None, None, None, None, '3733125') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 42 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', '26928251', '1384063647', '0.04930537601418998', None, None, None, None, '3733125'), ('4302', '26928251', '1384063596', '0.04930537601418998', None, None, None, None, '3733125'), ('4302', '26928251', '1384063571', '0.04930537601418998', None, None, None, None, '3733125'), ('4302', '26928251', '1384063549', '0.04930537601418998', None, None, None, None, '3733125'), ('4302', '26928251', '1384063524', '0.04930537601418998', None, None, None, None, '3733125'), ('4302', '26928251', '1384063438', '0.04930537601418998', None, None, None, None, '3733125'), ('4302', '26928251', '1384063437', '0.04930537601418998', None, None, None, None, '3733125'), ('4302', '26928251', '1384063436', '0.04930537601418998', None, None, None, None, '3733125'), ('4302', '26928251', '1384063420', '0.04930537601418998', None, None, None, None, '3733125'), ('4302', '26928251', '1384063417', '0.04930537601418998', None, None, None, None, '3733125'), ('4302', '26928251', '1384063413', '0.04930537601418998', None, None, None, None, '3733125'), ('4302', '26928251', '1384063410', '0.04930537601418998', None, None, None, None, '3733125'), ('4302', '26928251', '1384063408', '0.04930537601418998', None, None, None, None, '3733125'), ('4302', '26928251', '1384063405', '0.04930537601418998', None, None, None, None, '3733125')] time used for this insertion : 0.015438079833984375 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.21939373016357422 time spend to save output : 0.0160830020904541 total time spend for step 2 : 0.23547673225402832 step3:velours_tree Wed Sep 17 07:28: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 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 : {26928251: [{'Carton_brun': 26928262, 'kraft': 26928263, 'autre_refus': 26928264, 'plastique': 26928265, 'mal_croppe': 26928266, 'environnement': 26928267, 'metal': 26928268, 'flou': 26928269, 'Carton_gris': 26928270, 'papier': 26928271, 'Teint_Dans_La_Masse': 26928272, 'cartonnette': 26928273}]} input_args_next_step : {26928251: ()} output_args : {26928251: [{'Carton_brun': 26928262, 'kraft': 26928263, 'autre_refus': 26928264, 'plastique': 26928265, 'mal_croppe': 26928266, 'environnement': 26928267, 'metal': 26928268, 'flou': 26928269, 'Carton_gris': 26928270, 'papier': 26928271, 'Teint_Dans_La_Masse': 26928272, 'cartonnette': 26928273}]} args : 26928251 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'Carton_brun': 26928262, 'kraft': 26928263, 'autre_refus': 26928264, 'plastique': 26928265, 'mal_croppe': 26928266, 'environnement': 26928267, 'metal': 26928268, 'flou': 26928269, 'Carton_gris': 26928270, 'papier': 26928271, 'Teint_Dans_La_Masse': 26928272, 'cartonnette': 26928273},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26928251) 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([26928251]) 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.27982091903686523 time spend to save output : 4.410743713378906e-05 total time spend for step 3 : 0.279865026473999 step4:send_mail_cod Wed Sep 17 07:28: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 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 : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ('0.04930537601418998',), 1384063405: ('0.04930537601418998',)} input_args_next_step : {1384063647: ()} output_args : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ('0.04930537601418998',), 1384063405: ('0.04930537601418998',)} args : 1384063647 depend.output_id : 0 input_args_next_step : {1384063647: ('0.04930537601418998',), 1384063596: ()} output_args : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ('0.04930537601418998',), 1384063405: ('0.04930537601418998',)} args : 1384063596 depend.output_id : 0 input_args_next_step : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ()} output_args : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ('0.04930537601418998',), 1384063405: ('0.04930537601418998',)} args : 1384063571 depend.output_id : 0 input_args_next_step : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ()} output_args : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ('0.04930537601418998',), 1384063405: ('0.04930537601418998',)} args : 1384063549 depend.output_id : 0 input_args_next_step : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ()} output_args : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ('0.04930537601418998',), 1384063405: ('0.04930537601418998',)} args : 1384063524 depend.output_id : 0 input_args_next_step : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ()} output_args : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ('0.04930537601418998',), 1384063405: ('0.04930537601418998',)} args : 1384063438 depend.output_id : 0 input_args_next_step : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ()} output_args : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ('0.04930537601418998',), 1384063405: ('0.04930537601418998',)} args : 1384063437 depend.output_id : 0 input_args_next_step : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ()} output_args : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ('0.04930537601418998',), 1384063405: ('0.04930537601418998',)} args : 1384063436 depend.output_id : 0 input_args_next_step : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ()} output_args : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ('0.04930537601418998',), 1384063405: ('0.04930537601418998',)} args : 1384063420 depend.output_id : 0 input_args_next_step : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ()} output_args : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ('0.04930537601418998',), 1384063405: ('0.04930537601418998',)} args : 1384063417 depend.output_id : 0 input_args_next_step : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ()} output_args : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ('0.04930537601418998',), 1384063405: ('0.04930537601418998',)} args : 1384063413 depend.output_id : 0 input_args_next_step : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ()} output_args : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ('0.04930537601418998',), 1384063405: ('0.04930537601418998',)} args : 1384063410 depend.output_id : 0 input_args_next_step : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ()} output_args : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ('0.04930537601418998',), 1384063405: ('0.04930537601418998',)} args : 1384063408 depend.output_id : 0 input_args_next_step : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ('0.04930537601418998',), 1384063405: ()} output_args : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ('0.04930537601418998',), 1384063405: ('0.04930537601418998',)} args : 1384063405 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 : {26928251: [{'Carton_brun': 26928262, 'kraft': 26928263, 'autre_refus': 26928264, 'plastique': 26928265, 'mal_croppe': 26928266, 'environnement': 26928267, 'metal': 26928268, 'flou': 26928269, 'Carton_gris': 26928270, 'papier': 26928271, 'Teint_Dans_La_Masse': 26928272, 'cartonnette': 26928273}]} input_args_next_step : {1384063647: ('0.04930537601418998',), 1384063596: ('0.04930537601418998',), 1384063571: ('0.04930537601418998',), 1384063549: ('0.04930537601418998',), 1384063524: ('0.04930537601418998',), 1384063438: ('0.04930537601418998',), 1384063437: ('0.04930537601418998',), 1384063436: ('0.04930537601418998',), 1384063420: ('0.04930537601418998',), 1384063417: ('0.04930537601418998',), 1384063413: ('0.04930537601418998',), 1384063410: ('0.04930537601418998',), 1384063408: ('0.04930537601418998',), 1384063405: ('0.04930537601418998',), 26928251: ()} output_args : {26928251: [{'Carton_brun': 26928262, 'kraft': 26928263, 'autre_refus': 26928264, 'plastique': 26928265, 'mal_croppe': 26928266, 'environnement': 26928267, 'metal': 26928268, 'flou': 26928269, 'Carton_gris': 26928270, 'papier': 26928271, 'Teint_Dans_La_Masse': 26928272, 'cartonnette': 26928273}]} args : 26928251 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 :15, first value : ('0.04930537601418998',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26928251) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1384063647,1384063596,1384063571,1384063549,1384063524,1384063438,1384063437,1384063436,1384063420,1384063417,1384063413,1384063410,1384063408,1384063405) Found this number of photos: 14 ##### Call download_photos : nb_thread : 5 begin to download photo : 1384063405 begin to download photo : 1384063413 begin to download photo : 1384063436 begin to download photo : 1384063524 begin to download photo : 1384063596 download finish for photo 1384063524 begin to download photo : 1384063549 download finish for photo 1384063596 begin to download photo : 1384063647 download finish for photo 1384063436 begin to download photo : 1384063437 download finish for photo 1384063405 begin to download photo : 1384063408 download finish for photo 1384063413 begin to download photo : 1384063417 download finish for photo 1384063647 download finish for photo 1384063437 begin to download photo : 1384063438 download finish for photo 1384063408 begin to download photo : 1384063410 download finish for photo 1384063549 begin to download photo : 1384063571 download finish for photo 1384063417 begin to download photo : 1384063420 download finish for photo 1384063438 download finish for photo 1384063410 download finish for photo 1384063420 download finish for photo 1384063571 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 14 ; length of list_pids : 14 ; length of list_args : 14 results_Auto_P26928251_17-09-2025_07_28_58.pdf 26928263 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26928263 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384063497: '1758086845_3312960_1384063061_3a102e1fd1c5783cdcd2183f8170ed72_rle_crop_3960523995_0.png'} change filename to text .imagette269282631758086938/ imagette269282631758086938/1758086845_3312960_1384063061_3a102e1fd1c5783cdcd2183f8170ed72_rle_crop_3960523995_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/aed7533ff061a595f20d451d48922ff5_13248335.png imagette269282631758086938 26928264 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26928264 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384063197: '1758086547_3296682_1384062735_d507fb6a7e191ee6515f2539a9790f6e_rle_crop_3960522372_0.png', 1384063487: '1758086826_3310717_1384063163_b24fe793ca369b4dfb0ffbba361eb187_rle_crop_3960523918_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/5b1b2f18ebd3e3f0265783bd4e0e90b0_34731162.png change filename to text .imagette269282641758086938/ imagette269282641758086938/1758086826_3310717_1384063163_b24fe793ca369b4dfb0ffbba361eb187_rle_crop_3960523918_0.png.png imagette269282641758086938/1758086547_3296682_1384062735_d507fb6a7e191ee6515f2539a9790f6e_rle_crop_3960522372_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/9b1244e771e148c0a10007db892505d2_1876370.png imagette269282641758086938 26928265 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26928265 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384063211: '1758086606_3298386_1384062423_2e920f56516083165a8db57e6936ea0a_rle_crop_3960522453_0.png', 1384063491: '1758086826_3310717_1384063214_373bb8f726a2d993a4829339ef49ef9c_rle_crop_3960523758_0.png', 1384063493: '1758086826_3310717_1384063163_b24fe793ca369b4dfb0ffbba361eb187_rle_crop_3960523919_0.png', 1384063495: '1758086845_3312960_1384063061_3a102e1fd1c5783cdcd2183f8170ed72_rle_crop_3960523996_0.png', 1384063496: '1758086845_3312960_1384063061_3a102e1fd1c5783cdcd2183f8170ed72_rle_crop_3960523988_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/a9df6e8f4b179f4f20b9634f4be4b05e_44235351.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/a73481e75f5f3124f58826f18198e918_42762799.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/aeb4783b373949836bfd1365766a0fec_94562959.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/e38115bb76b28375aab3d1279a6077b3_71925475.png change filename to text .imagette269282651758086939/ imagette269282651758086939/1758086606_3298386_1384062423_2e920f56516083165a8db57e6936ea0a_rle_crop_3960522453_0.png.png imagette269282651758086939/1758086826_3310717_1384063163_b24fe793ca369b4dfb0ffbba361eb187_rle_crop_3960523919_0.png.png imagette269282651758086939/1758086845_3312960_1384063061_3a102e1fd1c5783cdcd2183f8170ed72_rle_crop_3960523996_0.png.png imagette269282651758086939/1758086845_3312960_1384063061_3a102e1fd1c5783cdcd2183f8170ed72_rle_crop_3960523988_0.png.png imagette269282651758086939/1758086826_3310717_1384063214_373bb8f726a2d993a4829339ef49ef9c_rle_crop_3960523758_0.png.png imagette269282661758086939/ imagette269282681758086939/ imagette269282691758086939/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/d83298af3b0e3ff787004a8ea5731393_34203773.png imagette269282651758086939 26928266 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26928266 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette269282661758086939 26928268 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26928268 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette269282681758086939 26928269 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26928269 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette269282691758086939 26928273 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26928273 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384063208: '1758086606_3298386_1384062423_2e920f56516083165a8db57e6936ea0a_rle_crop_3960522446_0.png'} change filename to text .imagette269282731758086939/ imagette269282731758086939/1758086606_3298386_1384062423_2e920f56516083165a8db57e6936ea0a_rle_crop_3960522446_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/2ed361080876531ca835dee731d13335_75930158.png imagette269282731758086939 26928262 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26928262 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384063187: '1758086586_3297971_1384062812_9939b2675119eac5db696849efef60ca_rle_crop_3960522171_0.png', 1384063189: '1758086586_3297971_1384062715_797f4734ac1cb597fa23d12abb8b9345_rle_crop_3960522183_0.png', 1384063201: '1758086547_3296682_1384062760_f6072be385aa577ba34c8fc42ccfc914_rle_crop_3960522212_0.png', 1384063202: '1758086547_3296682_1384062735_d507fb6a7e191ee6515f2539a9790f6e_rle_crop_3960522379_0.png', 1384063203: '1758086547_3296682_1384062734_ace62a2470302cdba8eb237c71957fc8_rle_crop_3960522392_0.png', 1384063209: '1758086606_3298386_1384062453_45bc11bc5cfea1dbe5b56398943f6e01_rle_crop_3960522434_0.png', 1384063431: '1758086785_3309320_1384063213_b919f65e50f886330277d0b0bbc78f7c_rle_crop_3960523538_0.png', 1384063432: '1758086785_3309320_1384063213_b919f65e50f886330277d0b0bbc78f7c_rle_crop_3960523546_0.png', 1384063489: '1758086826_3310717_1384063163_b24fe793ca369b4dfb0ffbba361eb187_rle_crop_3960523917_0.png', 1384063490: '1758086826_3310717_1384063140_34b68089534a5361bc14771237313d5c_rle_crop_3960523929_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/b849c6c75ae6fdb6d014ad9da62dc8f3_40135574.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/7dea8a2186cea904aef45f2fa17cc525_687905.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/45a0250621e3a86637e9268d0914fa3d_26385742.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/875557625a8f839d382b631388f4624d_15269732.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/946e451356c09220025b72ab5068034f_56631288.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/40fab29620b0fd03d3aee690ae4e4db4_47735228.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/9c30325a67218d15f8965a0226c02387_71567299.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/0cd1ab7b3834d45b484d08468a8c79ef_13126968.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/68ce0bffb4b0d3f3211a49398d414f8a_23833592.png change filename to text .imagette269282621758086939/ imagette269282621758086939/1758086785_3309320_1384063213_b919f65e50f886330277d0b0bbc78f7c_rle_crop_3960523538_0.png.png imagette269282621758086939/1758086586_3297971_1384062715_797f4734ac1cb597fa23d12abb8b9345_rle_crop_3960522183_0.png.png imagette269282621758086939/1758086606_3298386_1384062453_45bc11bc5cfea1dbe5b56398943f6e01_rle_crop_3960522434_0.png.png imagette269282621758086939/1758086785_3309320_1384063213_b919f65e50f886330277d0b0bbc78f7c_rle_crop_3960523546_0.png.png imagette269282621758086939/1758086826_3310717_1384063140_34b68089534a5361bc14771237313d5c_rle_crop_3960523929_0.png.png imagette269282621758086939/1758086547_3296682_1384062760_f6072be385aa577ba34c8fc42ccfc914_rle_crop_3960522212_0.png.png imagette269282621758086939/1758086586_3297971_1384062812_9939b2675119eac5db696849efef60ca_rle_crop_3960522171_0.png.png imagette269282621758086939/1758086826_3310717_1384063163_b24fe793ca369b4dfb0ffbba361eb187_rle_crop_3960523917_0.png.png imagette269282621758086939/1758086547_3296682_1384062734_ace62a2470302cdba8eb237c71957fc8_rle_crop_3960522392_0.png.png imagette269282621758086939/1758086547_3296682_1384062735_d507fb6a7e191ee6515f2539a9790f6e_rle_crop_3960522379_0.png.png wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/10d6b58153996d841895618271057374_53296093.png imagette269282621758086939 26928270 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26928270 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384063198: '1758086547_3296682_1384062737_ed2c62ccd460115849bcda5d46503f5f_rle_crop_3960522223_0.png', 1384063199: '1758086547_3296682_1384062735_d507fb6a7e191ee6515f2539a9790f6e_rle_crop_3960522369_0.png', 1384063430: '1758086785_3309320_1384063213_b919f65e50f886330277d0b0bbc78f7c_rle_crop_3960523536_0.png', 1384063488: '1758086826_3310717_1384063163_b24fe793ca369b4dfb0ffbba361eb187_rle_crop_3960523910_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/5a8ea3eeded8c53cf4412af45862078a_72103604.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/f5ee2eacd8a4a7b63dd6e0653639bc45_25240520.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/27415b8093f43fa6efbc923eaaf32b6d_48548898.png change filename to text .imagette269282701758086940/ imagette269282701758086940/1758086785_3309320_1384063213_b919f65e50f886330277d0b0bbc78f7c_rle_crop_3960523536_0.png.png imagette269282701758086940/1758086826_3310717_1384063163_b24fe793ca369b4dfb0ffbba361eb187_rle_crop_3960523910_0.png.png imagette269282701758086940/1758086547_3296682_1384062735_d507fb6a7e191ee6515f2539a9790f6e_rle_crop_3960522369_0.png.png imagette269282701758086940/1758086547_3296682_1384062737_ed2c62ccd460115849bcda5d46503f5f_rle_crop_3960522223_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/47e76337c5aaa7d3050fbdc241792eef_88771518.png imagette269282701758086940 26928272 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26928272 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384063185: '1758086586_3297971_1384062812_9939b2675119eac5db696849efef60ca_rle_crop_3960522167_0.png', 1384063186: '1758086586_3297971_1384062715_797f4734ac1cb597fa23d12abb8b9345_rle_crop_3960522184_0.png', 1384063194: '1758086547_3296682_1384062737_ed2c62ccd460115849bcda5d46503f5f_rle_crop_3960522225_0.png', 1384063195: '1758086547_3296682_1384062735_d507fb6a7e191ee6515f2539a9790f6e_rle_crop_3960522375_0.png', 1384063206: '1758086606_3298386_1384062476_2b15f7983d475f6579d6a1e5c9f144c6_rle_crop_3960522421_0.png', 1384063429: '1758086785_3309320_1384063213_b919f65e50f886330277d0b0bbc78f7c_rle_crop_3960523542_0.png', 1384063494: '1758086845_3312960_1384063061_3a102e1fd1c5783cdcd2183f8170ed72_rle_crop_3960523993_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/2e881282b7b3926b541ef0b00cc28168_70323664.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/58639ea7e58f23dab88a9da20bc5636a_85417667.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/529ad678ace49a28363eee89714447a8_79930611.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/cf936660da05db32090e39ac6b0605d6_63621881.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/8b67a54c00cd58935b5fadca7f05387b_68636950.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/7999fb17f0f88da0b63f81f64c090bcf_14965644.png change filename to text .imagette269282721758086940/ imagette269282721758086940/1758086586_3297971_1384062812_9939b2675119eac5db696849efef60ca_rle_crop_3960522167_0.png.png imagette269282721758086940/1758086547_3296682_1384062735_d507fb6a7e191ee6515f2539a9790f6e_rle_crop_3960522375_0.png.png imagette269282721758086940/1758086547_3296682_1384062737_ed2c62ccd460115849bcda5d46503f5f_rle_crop_3960522225_0.png.png imagette269282721758086940/1758086785_3309320_1384063213_b919f65e50f886330277d0b0bbc78f7c_rle_crop_3960523542_0.png.png imagette269282721758086940/1758086845_3312960_1384063061_3a102e1fd1c5783cdcd2183f8170ed72_rle_crop_3960523993_0.png.png imagette269282721758086940/1758086606_3298386_1384062476_2b15f7983d475f6579d6a1e5c9f144c6_rle_crop_3960522421_0.png.png imagette269282721758086940/1758086586_3297971_1384062715_797f4734ac1cb597fa23d12abb8b9345_rle_crop_3960522184_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/34994ae8f3be826ab4111a0aaae26b0d_7170817.png imagette269282721758086940 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=26928251 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/26928306,26928307,26928308,26928309,26928310,26928311,26928312,26928313,26928314,26928315,26928316,26928317?tags=Carton_brun,kraft,autre_refus,plastique,mal_croppe,environnement,metal,flou,Carton_gris,papier,Teint_Dans_La_Masse,cartonnette your option no_mail is active, we will not send the real mail to your client args[1384063647] : ('0.04930537601418998',) no score found for photo 1384063647 We are sending mail with results at report@fotonower.com args[1384063596] : ('0.04930537601418998',) no score found for photo 1384063596 We are sending mail with results at report@fotonower.com args[1384063571] : ('0.04930537601418998',) no score found for photo 1384063571 We are sending mail with results at report@fotonower.com args[1384063549] : ('0.04930537601418998',) no score found for photo 1384063549 We are sending mail with results at report@fotonower.com args[1384063524] : ('0.04930537601418998',) no score found for photo 1384063524 We are sending mail with results at report@fotonower.com args[1384063438] : ('0.04930537601418998',) no score found for photo 1384063438 We are sending mail with results at report@fotonower.com args[1384063437] : ('0.04930537601418998',) no score found for photo 1384063437 We are sending mail with results at report@fotonower.com args[1384063436] : ('0.04930537601418998',) no score found for photo 1384063436 We are sending mail with results at report@fotonower.com args[1384063420] : ('0.04930537601418998',) no score found for photo 1384063420 We are sending mail with results at report@fotonower.com args[1384063417] : ('0.04930537601418998',) no score found for photo 1384063417 We are sending mail with results at report@fotonower.com args[1384063413] : ('0.04930537601418998',) no score found for photo 1384063413 We are sending mail with results at report@fotonower.com args[1384063410] : ('0.04930537601418998',) no score found for photo 1384063410 We are sending mail with results at report@fotonower.com args[1384063408] : ('0.04930537601418998',) no score found for photo 1384063408 We are sending mail with results at report@fotonower.com args[1384063405] : ('0.04930537601418998',) no score found for photo 1384063405 We are sending mail with results at report@fotonower.com refus_total : 0.04930537601418998 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26928251 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_P26928251_17-09-2025_07_28_58.pdf results_Auto_P26928251_17-09-2025_07_28_58.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26928251_17-09-2025_07_28_58.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','26928251','results_Auto_P26928251_17-09-2025_07_28_58.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26928251_17-09-2025_07_28_58.pdf','pdf','','0.2','0.04930537601418998') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26928251]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1384063647, 1384063596, 1384063571, 1384063549, 1384063524, 1384063438, 1384063437, 1384063436, 1384063420, 1384063417, 1384063413, 1384063410, 1384063408, 1384063405] map_info['map_portfolio_photo'] : {26928251: [1384063647, 1384063596, 1384063571, 1384063549, 1384063524, 1384063438, 1384063437, 1384063436, 1384063420, 1384063417, 1384063413, 1384063410, 1384063408, 1384063405, 1384063396, 1384063386, 1384063380, 1384063371, 1384063363, 1384063214, 1384063213, 1384063210, 1384063181, 1384063178, 1384063176, 1384063163, 1384063140, 1384063082, 1384063080, 1384063071, 1384063068, 1384063065, 1384063061, 1384063048, 1384063039, 1384062937, 1384062912, 1384062907, 1384062906, 1384062894, 1384062890, 1384062887, 1384062885, 1384062883, 1384062881, 1384062812, 1384062788, 1384062760, 1384062737, 1384062735, 1384062734, 1384062718, 1384062717, 1384062715, 1384062581, 1384062556, 1384062519, 1384062476, 1384062453, 1384062423, 1384062280, 1384062278, 1384062275]} final : False mtd_id 4302 list_pids : [1384063647, 1384063596, 1384063571, 1384063549, 1384063524, 1384063438, 1384063437, 1384063436, 1384063420, 1384063417, 1384063413, 1384063410, 1384063408, 1384063405] 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, '3733125') ('4302', '26928251', '1384063647', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063596', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063571', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063549', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063524', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063438', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063437', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063436', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063420', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063417', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063413', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063410', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063408', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063405', None, None, None, None, None, '3733125') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 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', '26928251', '1384063647', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063596', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063571', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063549', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063524', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063438', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063437', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063436', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063420', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063417', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063413', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063410', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063408', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063405', None, None, None, None, None, '3733125')] time used for this insertion : 0.02300286293029785 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.7309651374816895 time spend to save output : 0.02325153350830078 total time spend for step 4 : 3.7542166709899902 step5:split_time_score Wed Sep 17 07:29:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['26928251'] 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 : [('26928251',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26928251) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1384063596: {'path': 'temp/1758086938_773176_1384063596_76a80371e0748b821e7f1a1d4d8d428c.jpg', 'extension': 'jpg'}, 1384063647: {'path': 'temp/1758086938_773176_1384063647_05caaf1e2053f421ef37a89c8817f06c.jpg', 'extension': 'jpg'}, 1384063436: {'path': 'temp/1758086938_773176_1384063436_880bf1c5c50d5ff8d7ac9e0eacc05cf0.jpg', 'extension': 'jpg'}, 1384063437: {'path': 'temp/1758086938_773176_1384063437_bd578d68126ad0329dd00cfbbed5c800.jpg', 'extension': 'jpg'}, 1384063438: {'path': 'temp/1758086938_773176_1384063438_805ea7348b89bad90122266f069635fb.jpg', 'extension': 'jpg'}, 1384063405: {'path': 'temp/1758086938_773176_1384063405_187ec3ae5959828d1fdc8c871c565a11.jpg', 'extension': 'jpg'}, 1384063408: {'path': 'temp/1758086938_773176_1384063408_356aaddfe3fecceda6e75301559284f7.jpg', 'extension': 'jpg'}, 1384063410: {'path': 'temp/1758086938_773176_1384063410_4a4e9e14651da70e3c15724c2f099e35.jpg', 'extension': 'jpg'}, 1384063413: {'path': 'temp/1758086938_773176_1384063413_5f013bf83b346c313e0cc4c3ca2b4bcd.jpg', 'extension': 'jpg'}, 1384063417: {'path': 'temp/1758086938_773176_1384063417_9f4b74d826720b6e4a570f2f7a3ce896.jpg', 'extension': 'jpg'}, 1384063420: {'path': 'temp/1758086938_773176_1384063420_30140d1d698302f60c6af0e5b58d4c86.jpg', 'extension': 'jpg'}, 1384063524: {'path': 'temp/1758086938_773176_1384063524_e0d32831880558a33abf28452d36c70a.jpg', 'extension': 'jpg'}, 1384063549: {'path': 'temp/1758086938_773176_1384063549_14092b0da6daacbacf56edd59390f3eb.jpg', 'extension': 'jpg'}, 1384063571: {'path': 'temp/1758086938_773176_1384063571_c911d67edcb6582ac4d11aee0dac4813.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 = 26928251; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 26928251 group by h (('07', 63),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26928251 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 (26928251) 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 (26928251) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 17092025 26928251 Nombre de photos uploadées : 63 / 23040 (0%) 17092025 26928251 Nombre de photos taguées (types de déchets): 0 / 63 (0%) 17092025 26928251 Nombre de photos taguées (volume) : 0 / 63 (0%) [{'photo_id': 1384062280, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/5d622e536e36fff7d5d2826672133f86.jpg', 'username': None, 'uploaded_at': 1758086167, 'text': 'image_17092025_07_15_04_10151.jpg'}, {'photo_id': 1384062278, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/d8bd3beb108a2c85b1b4fa84618a2002.jpg', 'username': None, 'uploaded_at': 1758086167, 'text': 'image_17092025_07_15_13_9124.jpg'}, {'photo_id': 1384062275, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/80a99bf6f24af5d2d2ba414c95ee8fa5.jpg', 'username': None, 'uploaded_at': 1758086167, 'text': 'image_17092025_07_15_34_10140.jpg'}, {'photo_id': 1384062581, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/17/e823ec24ccbf2ed9698238c5c393f850.jpg', 'username': None, 'uploaded_at': 1758086228, 'text': 'image_17092025_07_15_54_10145.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.9073486328125e-06 elapsed_time : order_list_meta_photo_and_scores 5.9604644775390625e-06 ??????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0025300979614257812 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 26928251, '2025-09-17' ) 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-09-17' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2300667,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.22490620613098145 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= 2300667 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26918428, 'dashboard_result_id': 15289737, '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_P26918428_17-09-2025_06_17_29.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26918438, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26918439, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26918440, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26918441, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26918442, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26918443, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26918444, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26918445, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26918446, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26918447, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26918448, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26918449, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26918876, 'dashboard_result_id': 15289738, '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_P26918876_17-09-2025_06_18_04.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26918880, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26918881, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26918882, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26918883, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26918884, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26918885, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26918886, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26918887, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26918888, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26918889, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26918890, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26918891, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26919228, 'dashboard_result_id': 15289739, '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_P26919228_17-09-2025_06_18_35.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26919234, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26919235, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26919236, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26919237, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26919238, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26919239, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26919240, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26919241, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26919242, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26919243, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26919244, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26919245, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26919628, 'dashboard_result_id': 15289740, '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_P26919628_17-09-2025_06_19_33.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26919633, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26919634, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26919635, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26919636, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26919637, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26919638, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26919639, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26919640, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26919641, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26919642, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26919643, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26919644, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26920486, 'dashboard_result_id': 15289741, '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_P26920486_17-09-2025_06_20_03.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26920488, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26920489, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26920490, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26920491, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26920492, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26920493, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26920494, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26920495, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26920496, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26920497, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26920498, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26920499, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26920775, 'dashboard_result_id': 15289742, '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_P26920775_17-09-2025_06_20_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26920781, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26920782, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26920783, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26920784, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26920785, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26920786, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26920787, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26920788, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26920789, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26920790, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26920791, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26920792, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26921240, 'dashboard_result_id': 15289743, '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_P26921240_17-09-2025_06_20_40.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26921249, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26921250, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26921251, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26921252, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26921253, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26921254, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26921255, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26921256, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26921257, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26921258, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26921259, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26921260, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26921882, 'dashboard_result_id': 15289744, '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_P26921882_17-09-2025_06_21_31.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26921893, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26921894, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26921895, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26921896, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26921897, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26921898, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26921899, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26921900, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26921901, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26921902, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26921903, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26921904, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26922389, 'dashboard_result_id': 15289745, '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_P26922389_17-09-2025_06_22_02.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26922398, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26922399, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26922400, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26922401, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26922402, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26922403, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26922404, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26922405, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26922406, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26922407, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26922408, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26922409, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26922797, 'dashboard_result_id': 15289746, '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_P26922797_17-09-2025_06_22_32.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26922823, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26922824, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26922825, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26922826, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26922827, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26922828, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26922829, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26922830, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26922831, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26922832, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26922833, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26922834, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26923194, 'dashboard_result_id': 15289747, '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_P26923194_17-09-2025_06_01_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26923221, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26923222, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26923223, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26923224, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26923225, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26923226, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26923227, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26923228, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26923229, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26923230, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26923231, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26923232, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26924102, 'dashboard_result_id': 15289748, '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_P26924102_17-09-2025_06_23_04.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26924104, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26924105, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26924106, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26924107, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26924108, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26924109, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26924110, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26924111, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26924112, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26924113, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26924114, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26924115, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26924391, 'dashboard_result_id': 15289749, '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_P26924391_17-09-2025_06_23_32.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26924396, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26924397, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26924398, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26924399, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26924400, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26924401, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26924402, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26924403, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26924404, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26924405, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26924406, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26924407, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26924797, 'dashboard_result_id': 15289750, '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_P26924797_17-09-2025_05_47_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26924800, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26924801, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26924802, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26924803, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26924804, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26924805, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26924806, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26924807, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26924808, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26924809, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26924810, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26924811, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26925081, 'dashboard_result_id': 15289751, '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_P26925081_17-09-2025_06_05_28.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26925086, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26925087, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26925088, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26925089, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26925090, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26925091, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26925092, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26925093, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26925094, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26925095, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26925096, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26925097, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26925514, 'dashboard_result_id': 15289752, '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_P26925514_17-09-2025_06_19_29.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26925525, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26925526, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26925527, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26925528, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26925529, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26925530, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26925531, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26925532, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26925533, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26925534, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26925536, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26925537, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26926119, 'dashboard_result_id': 15289753, '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_P26926119_17-09-2025_06_33_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26926125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26926126, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26926127, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26926128, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26926129, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26926130, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26926131, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26926132, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26926133, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26926134, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26926135, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26926136, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26926538, 'dashboard_result_id': 15289754, '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_P26926538_17-09-2025_06_49_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26926548, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26926549, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26926550, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26926551, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26926552, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26926553, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26926554, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26926555, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26926556, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26926557, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26926558, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26926559, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26926964, 'dashboard_result_id': 15289755, '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_P26926964_17-09-2025_07_05_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26926990, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26926991, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26926992, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26926993, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26926994, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26926995, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26926996, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26926997, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26926998, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26926999, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26927000, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26927001, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26927400, 'dashboard_result_id': 15289756, '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_P26927400_17-09-2025_07_16_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26927418, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26927419, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26927421, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26927422, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26927423, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26927424, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26927425, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26927426, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26927427, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26927428, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26927429, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26927430, 'pht': 3726}}"}, {'dashboat_entry_day': 2300667, 'dashboard_run_id': 2310107, 'mtr_portfolio_id': 26928251, 'dashboard_result_id': 15289757, '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_P26928251_17-09-2025_07_24_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26928262, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26928263, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26928264, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26928265, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26928266, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26928267, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26928268, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26928269, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26928270, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26928271, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26928272, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26928273, '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 = 26918428 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': 3732548, 'mtr_portfolio_id': 26918428, 'created_at': datetime.datetime(2025, 9, 17, 6, 17, 28), 'result': '0.034418347298541714', 'result_long': None, 'result_double': None}] Qualite : 0.034418347298541714 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26918428 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26918428_17-09-2025_06_17_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26918428 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_P26918428_17-09-2025_06_17_29.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26918438, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26918439, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26918440, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26918441, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26918442, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26918443, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26918444, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26918445, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26918446, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26918447, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26918448, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26918449, 'pht': 3726}}" where mtr_portfolio_id = 26918428 and dashboard_run_id = 2310107 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`=26918428 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289737, 0.034418347298541714, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26918428_17-09-2025_06_17_29.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26918438, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26918439, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26918440, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26918441, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26918442, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26918443, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26918444, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26918445, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26918446, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26918447, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26918448, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26918449, '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 = 26918876 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': 3732549, 'mtr_portfolio_id': 26918876, 'created_at': datetime.datetime(2025, 9, 17, 6, 18, 2), 'result': '0.043610718126215635', 'result_long': None, 'result_double': None}] Qualite : 0.043610718126215635 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26918876 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26918876_17-09-2025_06_18_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26918876 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_P26918876_17-09-2025_06_18_04.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26918880, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26918881, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26918882, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26918883, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26918884, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26918885, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26918886, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26918887, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26918888, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26918889, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26918890, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26918891, 'pht': 3726}}" where mtr_portfolio_id = 26918876 and dashboard_run_id = 2310107 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`=26918876 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289738, 0.043610718126215635, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26918876_17-09-2025_06_18_04.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26918880, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26918881, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26918882, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26918883, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26918884, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26918885, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26918886, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26918887, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26918888, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26918889, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26918890, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26918891, '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 = 26919228 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': 3732550, 'mtr_portfolio_id': 26919228, 'created_at': datetime.datetime(2025, 9, 17, 6, 18, 32), 'result': '0.054799998150664726', 'result_long': None, 'result_double': None}] Qualite : 0.054799998150664726 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26919228 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26919228_17-09-2025_06_18_35.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26919228 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_P26919228_17-09-2025_06_18_35.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26919234, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26919235, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26919236, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26919237, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26919238, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26919239, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26919240, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26919241, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26919242, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26919243, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26919244, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26919245, 'pht': 3726}}" where mtr_portfolio_id = 26919228 and dashboard_run_id = 2310107 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`=26919228 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289739, 0.054799998150664726, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26919228_17-09-2025_06_18_35.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26919234, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26919235, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26919236, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26919237, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26919238, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26919239, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26919240, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26919241, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26919242, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26919243, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26919244, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26919245, '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 = 26919628 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': 3732551, 'mtr_portfolio_id': 26919628, 'created_at': datetime.datetime(2025, 9, 17, 6, 19, 30), 'result': '0.06563328552521043', 'result_long': None, 'result_double': None}] Qualite : 0.06563328552521043 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26919628 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26919628_17-09-2025_06_19_33.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26919628 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_P26919628_17-09-2025_06_19_33.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26919633, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26919634, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26919635, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26919636, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26919637, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26919638, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26919639, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26919640, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26919641, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26919642, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26919643, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26919644, 'pht': 3726}}" where mtr_portfolio_id = 26919628 and dashboard_run_id = 2310107 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`=26919628 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289740, 0.06563328552521043, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26919628_17-09-2025_06_19_33.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26919633, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26919634, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26919635, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26919636, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26919637, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26919638, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26919639, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26919640, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26919641, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26919642, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26919643, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26919644, '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 = 26920486 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': 3732552, 'mtr_portfolio_id': 26920486, 'created_at': datetime.datetime(2025, 9, 17, 6, 20), 'result': '0.03136853702815561', 'result_long': None, 'result_double': None}] Qualite : 0.03136853702815561 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26920486 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26920486_17-09-2025_06_20_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26920486 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_P26920486_17-09-2025_06_20_03.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26920488, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26920489, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26920490, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26920491, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26920492, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26920493, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26920494, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26920495, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26920496, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26920497, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26920498, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26920499, 'pht': 3726}}" where mtr_portfolio_id = 26920486 and dashboard_run_id = 2310107 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`=26920486 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289741, 0.03136853702815561, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26920486_17-09-2025_06_20_03.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26920488, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26920489, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26920490, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26920491, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26920492, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26920493, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26920494, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26920495, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26920496, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26920497, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26920498, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26920499, '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 = 26920775 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': 3732553, 'mtr_portfolio_id': 26920775, 'created_at': datetime.datetime(2025, 9, 17, 6, 20, 28), 'result': '0.038637870793443135', 'result_long': None, 'result_double': None}] Qualite : 0.038637870793443135 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26920775 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26920775_17-09-2025_06_20_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26920775 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_P26920775_17-09-2025_06_20_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26920781, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26920782, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26920783, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26920784, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26920785, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26920786, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26920787, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26920788, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26920789, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26920790, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26920791, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26920792, 'pht': 3726}}" where mtr_portfolio_id = 26920775 and dashboard_run_id = 2310107 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`=26920775 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289742, 0.038637870793443135, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26920775_17-09-2025_06_20_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26920781, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26920782, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26920783, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26920784, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26920785, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26920786, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26920787, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26920788, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26920789, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26920790, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26920791, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26920792, '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 = 26921240 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': 3732554, 'mtr_portfolio_id': 26921240, 'created_at': datetime.datetime(2025, 9, 17, 6, 20, 37), 'result': '0.04476262593749069', 'result_long': None, 'result_double': None}] Qualite : 0.04476262593749069 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26921240 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26921240_17-09-2025_06_20_40.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26921240 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_P26921240_17-09-2025_06_20_40.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26921249, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26921250, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26921251, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26921252, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26921253, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26921254, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26921255, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26921256, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26921257, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26921258, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26921259, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26921260, 'pht': 3726}}" where mtr_portfolio_id = 26921240 and dashboard_run_id = 2310107 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`=26921240 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289743, 0.04476262593749069, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26921240_17-09-2025_06_20_40.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26921249, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26921250, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26921251, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26921252, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26921253, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26921254, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26921255, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26921256, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26921257, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26921258, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26921259, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26921260, '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 = 26921882 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': 3732555, 'mtr_portfolio_id': 26921882, 'created_at': datetime.datetime(2025, 9, 17, 6, 21, 29), 'result': '0.07154484052750976', 'result_long': None, 'result_double': None}] Qualite : 0.07154484052750976 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26921882 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26921882_17-09-2025_06_21_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26921882 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_P26921882_17-09-2025_06_21_31.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26921893, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26921894, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26921895, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26921896, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26921897, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26921898, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26921899, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26921900, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26921901, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26921902, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26921903, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26921904, 'pht': 3726}}" where mtr_portfolio_id = 26921882 and dashboard_run_id = 2310107 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`=26921882 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289744, 0.07154484052750976, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26921882_17-09-2025_06_21_31.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26921893, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26921894, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26921895, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26921896, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26921897, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26921898, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26921899, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26921900, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26921901, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26921902, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26921903, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26921904, '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 = 26922389 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': 3732556, 'mtr_portfolio_id': 26922389, 'created_at': datetime.datetime(2025, 9, 17, 6, 22), 'result': '0.03665288194111033', 'result_long': None, 'result_double': None}] Qualite : 0.03665288194111033 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26922389 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26922389_17-09-2025_06_22_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26922389 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_P26922389_17-09-2025_06_22_02.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26922398, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26922399, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26922400, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26922401, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26922402, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26922403, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26922404, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26922405, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26922406, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26922407, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26922408, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26922409, 'pht': 3726}}" where mtr_portfolio_id = 26922389 and dashboard_run_id = 2310107 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`=26922389 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289745, 0.03665288194111033, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26922389_17-09-2025_06_22_02.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26922398, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26922399, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26922400, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26922401, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26922402, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26922403, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26922404, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26922405, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26922406, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26922407, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26922408, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26922409, '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 = 26922797 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': 3732557, 'mtr_portfolio_id': 26922797, 'created_at': datetime.datetime(2025, 9, 17, 6, 22, 30), 'result': '0.053258111009566775', 'result_long': None, 'result_double': None}] Qualite : 0.053258111009566775 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26922797 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26922797_17-09-2025_06_22_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26922797 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_P26922797_17-09-2025_06_22_32.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26922823, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26922824, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26922825, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26922826, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26922827, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26922828, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26922829, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26922830, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26922831, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26922832, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26922833, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26922834, 'pht': 3726}}" where mtr_portfolio_id = 26922797 and dashboard_run_id = 2310107 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`=26922797 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289746, 0.053258111009566775, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26922797_17-09-2025_06_22_32.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26922823, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26922824, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26922825, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26922826, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26922827, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26922828, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26922829, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26922830, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26922831, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26922832, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26922833, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26922834, '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 = 26923194 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': 3732142, 'mtr_portfolio_id': 26923194, 'created_at': datetime.datetime(2025, 9, 17, 6, 1, 1), 'result': '0.03187562283868707', 'result_long': None, 'result_double': None}] Qualite : 0.03187562283868707 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26923194 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26923194_17-09-2025_06_01_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26923194 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_P26923194_17-09-2025_06_01_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26923221, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26923222, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26923223, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26923224, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26923225, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26923226, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26923227, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26923228, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26923229, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26923230, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26923231, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26923232, 'pht': 3726}}" where mtr_portfolio_id = 26923194 and dashboard_run_id = 2310107 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`=26923194 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289747, 0.03187562283868707, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26923194_17-09-2025_06_01_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26923221, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26923222, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26923223, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26923224, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26923225, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26923226, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26923227, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26923228, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26923229, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26923230, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26923231, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26923232, '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 = 26924102 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': 3732558, 'mtr_portfolio_id': 26924102, 'created_at': datetime.datetime(2025, 9, 17, 6, 23, 2), 'result': '0.043806340379132926', 'result_long': None, 'result_double': None}] Qualite : 0.043806340379132926 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26924102 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26924102_17-09-2025_06_23_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26924102 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_P26924102_17-09-2025_06_23_04.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26924104, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26924105, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26924106, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26924107, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26924108, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26924109, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26924110, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26924111, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26924112, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26924113, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26924114, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26924115, 'pht': 3726}}" where mtr_portfolio_id = 26924102 and dashboard_run_id = 2310107 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`=26924102 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289748, 0.043806340379132926, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26924102_17-09-2025_06_23_04.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26924104, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26924105, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26924106, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26924107, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26924108, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26924109, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26924110, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26924111, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26924112, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26924113, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26924114, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26924115, '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 = 26924391 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': 3732559, 'mtr_portfolio_id': 26924391, 'created_at': datetime.datetime(2025, 9, 17, 6, 23, 30), 'result': '0.038854450436580125', 'result_long': None, 'result_double': None}] Qualite : 0.038854450436580125 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26924391 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26924391_17-09-2025_06_23_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26924391 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_P26924391_17-09-2025_06_23_32.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26924396, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26924397, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26924398, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26924399, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26924400, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26924401, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26924402, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26924403, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26924404, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26924405, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26924406, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26924407, 'pht': 3726}}" where mtr_portfolio_id = 26924391 and dashboard_run_id = 2310107 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`=26924391 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289749, 0.038854450436580125, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26924391_17-09-2025_06_23_32.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26924396, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26924397, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26924398, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26924399, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26924400, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26924401, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26924402, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26924403, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26924404, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26924405, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26924406, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26924407, '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 = 26924797 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': 3732605, 'mtr_portfolio_id': 26924797, 'created_at': datetime.datetime(2025, 9, 17, 5, 47, 30), 'result': '0.0555519198114147', 'result_long': None, 'result_double': None}] Qualite : 0.0555519198114147 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26924797 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26924797_17-09-2025_05_47_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26924797 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_P26924797_17-09-2025_05_47_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26924800, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26924801, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26924802, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26924803, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26924804, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26924805, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26924806, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26924807, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26924808, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26924809, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26924810, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26924811, 'pht': 3726}}" where mtr_portfolio_id = 26924797 and dashboard_run_id = 2310107 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`=26924797 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289750, 0.0555519198114147, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26924797_17-09-2025_05_47_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26924800, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26924801, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26924802, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26924803, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26924804, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26924805, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26924806, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26924807, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26924808, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26924809, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26924810, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26924811, '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 = 26925081 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': 3732641, 'mtr_portfolio_id': 26925081, 'created_at': datetime.datetime(2025, 9, 17, 6, 5, 28), 'result': '0.03614144143676788', 'result_long': None, 'result_double': None}] Qualite : 0.03614144143676788 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26925081 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26925081_17-09-2025_06_05_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26925081 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_P26925081_17-09-2025_06_05_28.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26925086, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26925087, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26925088, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26925089, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26925090, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26925091, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26925092, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26925093, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26925094, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26925095, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26925096, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26925097, 'pht': 3726}}" where mtr_portfolio_id = 26925081 and dashboard_run_id = 2310107 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`=26925081 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289751, 0.03614144143676788, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26925081_17-09-2025_06_05_28.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26925086, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26925087, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26925088, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26925089, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26925090, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26925091, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26925092, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26925093, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26925094, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26925095, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26925096, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26925097, '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 = 26925514 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': 3732710, 'mtr_portfolio_id': 26925514, 'created_at': datetime.datetime(2025, 9, 17, 6, 19, 28), 'result': '0.05163043017052247', 'result_long': None, 'result_double': None}] Qualite : 0.05163043017052247 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26925514 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26925514_17-09-2025_06_19_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26925514 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_P26925514_17-09-2025_06_19_29.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26925525, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26925526, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26925527, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26925528, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26925529, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26925530, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26925531, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26925532, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26925533, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26925534, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26925536, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26925537, 'pht': 3726}}" where mtr_portfolio_id = 26925514 and dashboard_run_id = 2310107 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`=26925514 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289752, 0.05163043017052247, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26925514_17-09-2025_06_19_29.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26925525, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26925526, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26925527, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26925528, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26925529, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26925530, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26925531, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26925532, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26925533, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26925534, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26925536, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26925537, '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 = 26926119 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': 3732790, 'mtr_portfolio_id': 26926119, 'created_at': datetime.datetime(2025, 9, 17, 6, 33), 'result': '0.05237131561620687', 'result_long': None, 'result_double': None}] Qualite : 0.05237131561620687 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26926119 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26926119_17-09-2025_06_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26926119 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_P26926119_17-09-2025_06_33_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26926125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26926126, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26926127, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26926128, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26926129, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26926130, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26926131, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26926132, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26926133, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26926134, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26926135, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26926136, 'pht': 3726}}" where mtr_portfolio_id = 26926119 and dashboard_run_id = 2310107 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`=26926119 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289753, 0.05237131561620687, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26926119_17-09-2025_06_33_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26926125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26926126, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26926127, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26926128, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26926129, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26926130, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26926131, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26926132, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26926133, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26926134, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26926135, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26926136, '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 = 26926538 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': 3732864, 'mtr_portfolio_id': 26926538, 'created_at': datetime.datetime(2025, 9, 17, 6, 49), 'result': '0.058544981737487484', 'result_long': None, 'result_double': None}] Qualite : 0.058544981737487484 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26926538 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26926538_17-09-2025_06_49_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26926538 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_P26926538_17-09-2025_06_49_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26926548, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26926549, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26926550, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26926551, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26926552, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26926553, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26926554, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26926555, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26926556, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26926557, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26926558, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26926559, 'pht': 3726}}" where mtr_portfolio_id = 26926538 and dashboard_run_id = 2310109 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`=26926538 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289754, 0.058544981737487484, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26926538_17-09-2025_06_49_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26926548, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26926549, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26926550, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26926551, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26926552, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26926553, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26926554, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26926555, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26926556, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26926557, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26926558, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26926559, '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 = 26926964 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': 3732946, 'mtr_portfolio_id': 26926964, 'created_at': datetime.datetime(2025, 9, 17, 7, 5), 'result': '0.04457282082067911', 'result_long': None, 'result_double': None}] Qualite : 0.04457282082067911 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26926964 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26926964_17-09-2025_07_05_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26926964 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_P26926964_17-09-2025_07_05_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26926990, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26926991, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26926992, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26926993, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26926994, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26926995, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26926996, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26926997, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26926998, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26926999, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26927000, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26927001, 'pht': 3726}}" where mtr_portfolio_id = 26926964 and dashboard_run_id = 2310109 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`=26926964 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289755, 0.04457282082067911, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26926964_17-09-2025_07_05_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26926990, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26926991, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26926992, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26926993, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26926994, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26926995, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26926996, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26926997, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26926998, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26926999, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26927000, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26927001, '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 = 26927400 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': 3733031, 'mtr_portfolio_id': 26927400, 'created_at': datetime.datetime(2025, 9, 17, 7, 16, 59), 'result': '0.057123809389375765', 'result_long': None, 'result_double': None}] Qualite : 0.057123809389375765 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26927400 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26927400_17-09-2025_07_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26927400 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_P26927400_17-09-2025_07_16_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26927418, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26927419, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26927421, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26927422, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26927423, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26927424, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26927425, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26927426, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26927427, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26927428, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26927429, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26927430, 'pht': 3726}}" where mtr_portfolio_id = 26927400 and dashboard_run_id = 2310109 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`=26927400 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289756, 0.057123809389375765, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26927400_17-09-2025_07_16_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26927418, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26927419, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26927421, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26927422, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26927423, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26927424, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26927425, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26927426, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26927427, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26927428, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26927429, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26927430, '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 = 26928251 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': 3733125, 'mtr_portfolio_id': 26928251, 'created_at': datetime.datetime(2025, 9, 17, 7, 28, 58), 'result': '0.04930537601418998', 'result_long': None, 'result_double': None}] Qualite : 0.04930537601418998 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26928251 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26928251_17-09-2025_07_28_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26928251 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_P26928251_17-09-2025_07_28_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26928262, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26928263, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26928264, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26928265, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26928266, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26928267, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26928268, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26928269, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26928270, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26928271, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26928272, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26928273, 'pht': 3726}}" where mtr_portfolio_id = 26928251 and dashboard_run_id = 2310109 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`=26928251 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15289757, 0.04930537601418998, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26928251_17-09-2025_07_28_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26928262, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26928263, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26928264, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26928265, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26928266, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26928267, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26928268, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26928269, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26928270, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26928271, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26928272, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26928273, '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 (26918428,26918876,26919228,26919628,26920486,26920775,26921240,26921882,26922389,26922797,26923194,26924102,26924391,26924797,26925081,26925514,26926119,26926538,26926964,26927400,26928251) result : ((1384027410,), (1384027478,), (1384027543,), (1384027593,), (1384027636,), (1384027876,), (1384027877,), (1384027878,), (1384027890,), (1384027891,), (1384027892,), (1384027894,), (1384027916,), (1384027919,), (1384027922,), (1384027924,), (1384027942,), (1384027943,), (1384027944,), (1384027946,), (1384027958,), (1384027959,), (1384027960,), (1384028042,), (1384028043,), (1384028061,), (1384028098,), (1384028100,), (1384028123,), (1384028125,), (1384028127,), (1384028129,), (1384028143,), (1384028144,), (1384028528,), (1384028524,), (1384028525,), (1384028526,), (1384028572,), (1384028573,), (1384028574,), (1384028588,), (1384028589,), (1384028591,), (1384028614,), (1384028615,), (1384028616,), (1384028638,), (1384028639,), (1384028642,), (1384028644,), (1384028686,), (1384028687,), (1384028688,), (1384028690,), (1384028703,), (1384028706,), (1384028708,), (1384028710,), (1384028713,), (1384028741,), (1384028743,), (1384028745,), (1384028748,), (1384028759,), (1384028761,), (1384028762,), (1384028765,), (1384028769,), (1384028773,), (1384028785,), (1384028786,), (1384028787,), (1384028789,), (1384028791,), (1384028794,), (1384028804,), (1384028805,), (1384028806,), (1384028826,), (1384028827,), (1384028828,), (1384028830,), (1384028833,), (1384028844,), (1384028845,), (1384028847,), (1384028849,), (1384028872,), (1384028876,), (1384028877,), (1384028895,), (1384028893,), (1384028894,), (1384028917,), (1384028918,), (1384028921,), (1384028925,), (1384028935,), (1384028936,), (1384028937,), (1384028939,), (1384028942,), (1384028964,), (1384028965,), (1384028966,), (1384028968,), (1384028984,), (1384028985,), (1384028986,), (1384028988,), (1384029002,), (1384029003,), (1384029005,), (1384029008,), (1384029021,), (1384029022,), (1384029023,), (1384029025,), (1384029071,), (1384029072,), (1384029073,), (1384029091,), (1384029092,), (1384029093,), (1384029095,), (1384029098,), (1384029115,), (1384029116,), (1384029117,), (1384029119,), (1384029135,), (1384029136,), (1384029137,), (1384029158,), (1384029159,), (1384029160,), (1384029163,), (1384029180,), (1384029181,), (1384029182,), (1384029209,), (1384029210,), (1384029230,), (1384029232,), (1384029235,), (1384029238,), (1384029263,), (1384029255,), (1384029256,), (1384029258,), (1384029260,), (1384029274,), (1384029275,), (1384029276,), (1384029312,), (1384029313,), (1384029314,), (1384029332,), (1384029333,), (1384029347,), (1384029348,), (1384029349,), (1384029351,), (1384029371,), (1384029372,), (1384029373,), (1384029375,), (1384029392,), (1384029393,), (1384029394,), (1384029402,), (1384029410,), (1384029442,), (1384029443,), (1384029444,), (1384029468,), (1384029469,), (1384029472,), (1384029475,), (1384029485,), (1384029486,), (1384029487,), (1384029489,), (1384029492,), (1384029494,), (1384029512,), (1384029518,), (1384029522,), (1384029528,), (1384029560,), (1384029561,), (1384029564,), (1384035034,), (1384035022,), (1384035025,), (1384035027,), (1384035031,), (1384035045,), (1384035051,), (1384035052,), (1384035083,), (1384035087,), (1384035123,), (1384035141,), (1384035143,), (1384035145,), (1384035163,), (1384035165,), (1384035191,), (1384035195,), (1384035196,), (1384035198,), (1384035201,), (1384035210,), (1384035211,), (1384035212,), (1384035225,), (1384035226,), (1384035227,), (1384035229,), (1384035242,), (1384035244,), (1384035247,), (1384035251,), (1384035264,), (1384035265,), (1384035266,), (1384035268,), (1384035280,), (1384035281,), (1384035282,), (1384035308,), (1384035313,), (1384035321,), (1384035351,), (1384035352,), (1384035353,), (1384035355,), (1384035358,), (1384035370,), (1384035371,), (1384035372,), (1384035399,), (1384035402,), (1384035416,), (1384035447,), (1384035445,), (1384035446,), (1384035465,), (1384035466,), (1384035467,), (1384035470,), (1384035474,), (1384035496,), (1384035498,), (1384035500,), (1384035519,), (1384035521,), (1384035523,), (1384035526,), (1384035529,), (1384035548,), (1384035549,), (1384035550,), (1384035552,), (1384035555,), (1384035565,), (1384035566,), (1384035567,), (1384035569,), (1384035593,), (1384035594,), (1384035595,), (1384035597,), (1384035608,), (1384035609,), (1384035610,), (1384035612,), (1384035613,), (1384035630,), (1384035631,), (1384035633,), (1384035637,), (1384035641,), (1384035655,), (1384035656,), (1384035675,), (1384035676,), (1384035677,), (1384035679,), (1384035682,), (1384035690,), (1384035692,), (1384035695,), (1384035698,), (1384035699,), (1384035720,), (1384035725,), (1384035738,), (1384035740,), (1384035744,), (1384035754,), (1384035757,), (1384035774,), (1384035777,), (1384035779,), (1384035781,), (1384035783,), (1384035805,), (1384035798,), (1384035799,), (1384035800,), (1384035801,), (1384035803,), (1384036020,), (1384036040,), (1384036065,), (1384036089,), (1384036370,), (1384036391,), (1384036412,), (1384036437,), (1384036459,), (1384036852,), (1384036880,), (1384036905,), (1384036930,), (1384036960,), (1384037299,), (1384037342,), (1384037402,), (1384037450,), (1384038008,), (1384038511,), (1384038630,), (1384038654,), (1384038678,), (1384038702,), (1384038809,), (1384038811,), (1384038829,), (1384038855,), (1384039331,), (1384039372,), (1384039422,), (1384039452,), (1384039478,), (1384039518,), (1384039788,), (1384039789,), (1384039942,), (1384039961,), (1384039973,), (1384039975,), (1384040054,), (1384040055,), (1384040056,), (1384040058,), (1384040061,), (1384040085,), (1384040086,), (1384040087,), (1384040090,), (1384040190,), (1384040191,), (1384040193,), (1384040211,), (1384040212,), (1384040245,), (1384040239,), (1384040244,), (1384040292,), (1384040293,), (1384040318,), (1384040319,), (1384040320,), (1384040329,), (1384040332,), (1384040334,), (1384040337,), (1384040352,), (1384040354,), (1384040356,), (1384040390,), (1384040391,), (1384040392,), (1384040415,), (1384040416,), (1384040417,), (1384040421,), (1384040441,), (1384040442,), (1384040443,), (1384040468,), (1384040469,), (1384040470,), (1384040472,), (1384040483,), (1384040484,), (1384040487,), (1384040492,), (1384040496,), (1384040510,), (1384040511,), (1384040523,), (1384040524,), (1384040525,), (1384040545,), (1384040546,), (1384040547,), (1384040559,), (1384040560,), (1384040561,), (1384040563,), (1384040595,), (1384040599,), (1384040600,), (1384040619,), (1384040617,), (1384040618,), (1384040641,), (1384040643,), (1384040675,), (1384040676,), (1384040698,), (1384040699,), (1384040701,), (1384040721,), (1384040722,), (1384040723,), (1384040726,), (1384040730,), (1384040755,), (1384040756,), (1384040757,), (1384040820,), (1384040821,), (1384040843,), (1384040844,), (1384040866,), (1384040867,), (1384040868,), (1384040870,), (1384040882,), (1384040884,), (1384040886,), (1384040889,), (1384040893,), (1384040897,), (1384040906,), (1384040908,), (1384040910,), (1384040912,), (1384040915,), (1384040970,), (1384040971,), (1384040972,), (1384040974,), (1384040984,), (1384040985,), (1384040986,), (1384040988,), (1384040991,), (1384041014,), (1384041018,), (1384041021,), (1384041039,), (1384041037,), (1384041038,), (1384041054,), (1384041055,), (1384041056,), (1384041059,), (1384041110,), (1384041111,), (1384041131,), (1384041132,), (1384041134,), (1384041137,), (1384041162,), (1384041163,), (1384041175,), (1384041176,), (1384041177,), (1384041195,), (1384041196,), (1384041197,), (1384041200,), (1384041237,), (1384041239,), (1384041263,), (1384041264,), (1384041265,), (1384041267,), (1384041285,), (1384041286,), (1384041287,), (1384041311,), (1384041313,), (1384041315,), (1384041317,), (1384041320,), (1384041324,), (1384041334,), (1384041335,), (1384041336,), (1384041338,), (1384041349,), (1384041386,), (1384041388,), (1384041390,), (1384042203,), (1384042255,), (1384042307,), (1384042491,), (1384042554,), (1384042608,), (1384042656,), (1384043315,), (1384042998,), (1384043089,), (1384043160,), (1384043231,), (1384043947,), (1384043948,), (1384044428,), (1384051246,), (1384051212,), (1384052021,), (1384052040,), (1384052043,), (1384052046,), (1384052049,), (1384052063,), (1384052086,), (1384052088,), (1384052091,), (1384052095,), (1384052144,), (1384052147,), (1384052151,), (1384052154,), (1384052156,), (1384052171,), (1384052173,), (1384052176,), (1384052178,), (1384052183,), (1384052186,), (1384052201,), (1384052203,), (1384052205,), (1384052208,), (1384052212,), (1384052220,), (1384052222,), (1384052224,), (1384052227,), (1384052254,), (1384052257,), (1384052260,), (1384052263,), (1384052266,), (1384052271,), (1384052306,), (1384052308,), (1384052310,), (1384052313,), (1384052319,), (1384052322,), (1384052332,), (1384052334,), (1384052336,), (1384052353,), (1384052356,), (1384052357,), (1384052360,), (1384052365,), (1384052368,), (1384052396,), (1384052383,), (1384052386,), (1384052388,), (1384052391,), (1384052407,), (1384052410,), (1384052413,), (1384052415,), (1384052418,), (1384052496,), (1384052498,), (1384052500,), (1384052503,), (1384052507,), (1384052523,), (1384052524,), (1384052525,), (1384052527,), (1384052539,), (1384052542,), (1384052544,), (1384052546,), (1384052548,), (1384052556,), (1384052557,), (1384052558,), (1384052561,), (1384052585,), (1384052588,), (1384052599,), (1384052621,), (1384052623,), (1384052624,), (1384052643,), (1384052644,), (1384052645,), (1384052647,), (1384052655,), (1384052657,), (1384052658,), (1384052687,), (1384052688,), (1384052689,), (1384052699,), (1384052764,), (1384052765,), (1384052767,), (1384052797,), (1384052798,), (1384052800,), (1384052803,), (1384052806,), (1384052810,), (1384052825,), (1384052851,), (1384052848,), (1384052910,), (1384052929,), (1384052931,), (1384052932,), (1384052953,), (1384052954,), (1384052955,), (1384052957,), (1384052961,), (1384052982,), (1384052985,), (1384052987,), (1384052994,), (1384053001,), (1384053037,), (1384053052,), (1384053054,), (1384053055,), (1384053057,), (1384053070,), (1384053071,), (1384053089,), (1384053091,), (1384053095,), (1384053099,), (1384053117,), (1384053119,), (1384053122,), (1384053125,), (1384053127,), (1384053129,), (1384053135,), (1384053136,), (1384053137,), (1384053139,), (1384053161,), (1384053162,), (1384053163,), (1384053164,), (1384053178,), (1384053180,), (1384053182,), (1384053184,), (1384053211,), (1384053207,), (1384053208,), (1384053209,), (1384053224,), (1384053225,), (1384053226,), (1384053227,), (1384053245,), (1384053246,), (1384053247,), (1384053249,), (1384053258,), (1384053259,), (1384053260,), (1384053262,), (1384053280,), (1384053281,), (1384053282,), (1384053284,), (1384053286,), (1384053288,), (1384053303,), (1384053305,), (1384053309,), (1384053313,), (1384053331,), (1384053333,), (1384053335,), (1384053337,), (1384053339,), (1384053340,), (1384053342,), (1384053343,), (1384053349,), (1384053350,), (1384053352,), (1384053354,), (1384053356,), (1384053366,), (1384053367,), (1384053368,), (1384053385,), (1384053387,), (1384053388,), (1384053390,), (1384053408,), (1384053414,), (1384053417,), (1384053420,), (1384053422,), (1384053425,), (1384053426,), (1384053427,), (1384053430,), (1384053435,), (1384053616,), (1384053639,), (1384053663,), (1384054070,), (1384054095,), (1384054121,), (1384054129,), (1384054132,), (1384054139,), (1384054215,), (1384054417,), (1384054207,), (1384054212,), (1384054213,), (1384054230,), (1384054231,), (1384054233,), (1384054251,), (1384054276,), (1384054301,), (1384054392,), (1384054509,), (1384054531,), (1384054555,), (1384054579,), (1384054873,), (1384054898,), (1384054919,), (1384054944,), (1384054971,), (1384055109,), (1384055139,), (1384055164,), (1384055660,), (1384055701,), (1384055745,), (1384055775,), (1384055807,), (1384056057,), (1384056080,), (1384056108,), (1384056131,), (1384056139,), (1384056202,), (1384056230,), (1384056255,), (1384056280,), (1384056422,), (1384056436,), (1384056437,), (1384056439,), (1384056465,), (1384056468,), (1384056470,), (1384056471,), (1384056474,), (1384056484,), (1384056485,), (1384056486,), (1384056488,), (1384056490,), (1384056512,), (1384056513,), (1384056515,), (1384056518,), (1384056520,), (1384056523,), (1384056529,), (1384056538,), (1384056541,), (1384056542,), (1384056545,), (1384056548,), (1384056550,), (1384056571,), (1384056574,), (1384056576,), (1384056579,), (1384056582,), (1384056595,), (1384056600,), (1384056602,), (1384056604,), (1384056646,), (1384056635,), (1384056640,), (1384056642,), (1384056644,), (1384056653,), (1384056654,), (1384056655,), (1384056656,), (1384056682,), (1384056684,), (1384056685,), (1384056687,), (1384056690,), (1384056691,), (1384056699,), (1384056700,), (1384056701,), (1384056702,), (1384056719,), (1384056721,), (1384056777,), (1384056838,), (1384056848,), (1384056851,), (1384056870,), (1384056871,), (1384056872,), (1384056874,), (1384056876,), (1384056878,), (1384056897,), (1384056900,), (1384056906,), (1384056952,), (1384056953,), (1384056954,), (1384056956,), (1384056958,), (1384057000,), (1384057002,), (1384057003,), (1384057006,), (1384057015,), (1384057016,), (1384057019,), (1384057026,), (1384057029,), (1384057032,), (1384057039,), (1384057040,), (1384057041,), (1384057043,), (1384057049,), (1384057056,), (1384057058,), (1384057076,), (1384057072,), (1384057073,), (1384057074,), (1384057095,), (1384057096,), (1384057097,), (1384057099,), (1384057109,), (1384057110,), (1384057111,), (1384057112,), (1384057114,), (1384057116,), (1384057130,), (1384057132,), (1384057133,), (1384057150,), (1384057152,), (1384057154,), (1384057158,), (1384057163,), (1384057182,), (1384057184,), (1384057185,), (1384057188,), (1384057193,), (1384057195,), (1384057206,), (1384057207,), (1384057211,), (1384057216,), (1384057271,), (1384057273,), (1384057274,), (1384057276,), (1384057292,), (1384057293,), (1384057294,), (1384057295,), (1384057297,), (1384057299,), (1384057313,), (1384057315,), (1384057316,), (1384057318,), (1384057319,), (1384057321,), (1384057337,), (1384057338,), (1384057339,), (1384057366,), (1384057367,), (1384057369,), (1384057371,), (1384057373,), (1384057375,), (1384057379,), (1384057380,), (1384057390,), (1384057396,), (1384057398,), (1384057401,), (1384057404,), (1384057406,), (1384057428,), (1384057430,), (1384057432,), (1384057434,), (1384057447,), (1384057448,), (1384057450,), (1384057452,), (1384057454,), (1384057455,), (1384057466,), (1384057470,), (1384057482,), (1384057473,), (1384057476,), (1384057478,), (1384057479,), (1384057491,), (1384057492,), (1384057493,), (1384057495,), (1384057554,), (1384057560,), (1384057565,), (1384057567,), (1384057569,), (1384057571,), (1384057586,), (1384057587,), (1384057588,), (1384057590,), (1384057591,), (1384057593,), (1384057616,), (1384057618,), (1384057619,), (1384057621,), (1384057624,), (1384057636,), (1384057637,), (1384057638,), (1384057640,), (1384057665,), (1384057673,), (1384057676,), (1384057679,), (1384057684,), (1384057695,), (1384057728,), (1384057730,), (1384057731,), (1384057740,), (1384057741,), (1384057743,), (1384057746,), (1384057749,), (1384057785,), (1384057787,), (1384057801,), (1384057802,), (1384057803,), (1384057805,), (1384057809,), (1384057830,), (1384057833,), (1384057834,), (1384057836,), (1384057839,), (1384057853,), (1384057856,), (1384057859,), (1384057863,), (1384057870,), (1384057887,), (1384057920,), (1384057924,), (1384057928,), (1384058715,), (1384058762,), (1384058812,), (1384058857,), (1384058978,), (1384059004,), (1384059029,), (1384059427,), (1384060178,), (1384059229,), (1384059255,), (1384059282,), (1384059314,), (1384059369,), (1384059700,), (1384059740,), (1384059787,), (1384059846,), (1384059905,), (1384059948,), (1384060133,), (1384060325,), (1384060360,), (1384060394,), (1384060420,), (1384060443,), (1384060711,), (1384060734,), (1384060762,), (1384060798,), (1384060822,), (1384060853,), (1384060859,), (1384060885,), (1384060909,), (1384060935,), (1384061140,), (1384061141,), (1384061162,), (1384061199,), (1384061200,), (1384061201,), (1384061203,), (1384061207,), (1384061209,), (1384061229,), (1384061235,), (1384061237,), (1384061240,), (1384061314,), (1384061322,), (1384061347,), (1384061374,), (1384061399,), (1384061408,), (1384061467,), (1384061484,), (1384061487,), (1384061489,), (1384061491,), (1384061497,), (1384061681,), (1384061711,), (1384061712,), (1384061714,), (1384061718,), (1384061818,), (1384061820,), (1384061821,), (1384061823,), (1384061938,), (1384061966,), (1384062156,), (1384062158,), (1384062161,), (1384062168,), (1384062171,), (1384062240,), (1384062246,), (1384062248,), (1384062251,), (1384062255,), (1384062259,), (1384062282,), (1384062275,), (1384062278,), (1384062280,), (1384062423,), (1384062453,), (1384062476,), (1384062519,), (1384062556,), (1384062581,), (1384062715,), (1384062717,), (1384062718,), (1384062734,), (1384062735,), (1384062737,), (1384062760,), (1384062788,), (1384062812,), (1384062881,), (1384062883,), (1384062885,), (1384062887,), (1384062890,), (1384062894,), (1384062906,), (1384062907,), (1384062912,), (1384062937,), (1384063039,), (1384063048,), (1384063061,), (1384063065,), (1384063068,), (1384063071,), (1384063080,), (1384063082,), (1384063140,), (1384063163,), (1384063176,), (1384063178,), (1384063181,), (1384063210,), (1384063213,), (1384063214,), (1384063363,), (1384063371,), (1384063380,), (1384063386,), (1384063396,), (1384063405,), (1384063408,), (1384063410,), (1384063413,), (1384063417,), (1384063420,), (1384063436,), (1384063437,), (1384063438,), (1384063524,), (1384063549,), (1384063571,), (1384063596,), (1384063647,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'17092025': {'nb_upload': 63, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26928251]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1384063647, 1384063596, 1384063571, 1384063549, 1384063524, 1384063438, 1384063437, 1384063436, 1384063420, 1384063417, 1384063413, 1384063410, 1384063408, 1384063405] map_info['map_portfolio_photo'] : {26928251: [1384063647, 1384063596, 1384063571, 1384063549, 1384063524, 1384063438, 1384063437, 1384063436, 1384063420, 1384063417, 1384063413, 1384063410, 1384063408, 1384063405, 1384063396, 1384063386, 1384063380, 1384063371, 1384063363, 1384063214, 1384063213, 1384063210, 1384063181, 1384063178, 1384063176, 1384063163, 1384063140, 1384063082, 1384063080, 1384063071, 1384063068, 1384063065, 1384063061, 1384063048, 1384063039, 1384062937, 1384062912, 1384062907, 1384062906, 1384062894, 1384062890, 1384062887, 1384062885, 1384062883, 1384062881, 1384062812, 1384062788, 1384062760, 1384062737, 1384062735, 1384062734, 1384062718, 1384062717, 1384062715, 1384062581, 1384062556, 1384062519, 1384062476, 1384062453, 1384062423, 1384062280, 1384062278, 1384062275]} final : True mtd_id 4302 list_pids : [1384063647, 1384063596, 1384063571, 1384063549, 1384063524, 1384063438, 1384063437, 1384063436, 1384063420, 1384063417, 1384063413, 1384063410, 1384063408, 1384063405] Looping around the photos to save general results len do output : 1 /26928251Didn'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, '3733125') ('4302', '26928251', '1384063647', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063596', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063571', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063549', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063524', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063438', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063437', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063436', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063420', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063417', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063413', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063410', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063408', None, None, None, None, None, '3733125') ('4302', None, None, None, None, None, None, None, '3733125') ('4302', '26928251', '1384063405', None, None, None, None, None, '3733125') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 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, '26928251', 'None', None, None, None, None, '3733125'), ('4302', '26928251', '1384063647', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063596', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063571', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063549', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063524', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063438', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063437', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063436', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063420', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063417', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063413', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063410', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063408', None, None, None, None, None, '3733125'), ('4302', '26928251', '1384063405', None, None, None, None, None, '3733125')] time used for this insertion : 0.0200808048248291 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.534635543823242 time spend to save output : 0.02036261558532715 total time spend for step 5 : 2.5549981594085693 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 (3733125) 2.30user 2.66system 0:10.01elapsed 49%CPU (0avgtext+0avgdata 161364maxresident)k 208inputs+11736outputs (4major+75739minor)pagefaults 0swaps