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 : 2342143 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 (3362666) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3362666) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25363554 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3362666'] with mtr_portfolio_ids : ['25363554'] and first list_photo_ids : [] new path : /proc/2342143/ Name: python3 Umask: 0002 State: R (running) Tgid: 2342143 Ngid: 0 Pid: 2342143 PPid: 2342142 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2342143 NSpid: 2342143 NSpgid: 2339973 NSsid: 2339973 VmPeak: 1106892 kB VmSize: 1106892 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 100052 kB VmRSS: 100052 kB RssAnon: 59820 kB RssFile: 40232 kB RssShmem: 0 kB VmData: 865644 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 612 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 54 nonvoluntary_ctxt_switches: 91 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2342143', 'Ngid': '0', 'Pid': '2342143', 'PPid': '2342142', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2342143', 'NSpid': '2342143', 'NSpgid': '2339973', 'NSsid': '2339973', 'VmPeak': '1106892 kB', 'VmSize': '1106892 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '100052 kB', 'VmRSS': '100052 kB', 'RssAnon': '59820 kB', 'RssFile': '40232 kB', 'RssShmem': '0 kB', 'VmData': '865644 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '612 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '54', 'nonvoluntary_ctxt_switches': '91'} ('datou_batch_current', '2342143', '1106892', '0', '1106892', '865644', '100052', b'', 'marlene', '3362666') 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 (25363554) 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 (3362666 ) ) 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 (25363554) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1373867605, 'portfolio_id': 25363554}, {'photo_id': 1373867090, 'portfolio_id': 25363554}, {'photo_id': 1373867064, 'portfolio_id': 25363554}, {'photo_id': 1373867025, 'portfolio_id': 25363554}, {'photo_id': 1373866981, 'portfolio_id': 25363554}, {'photo_id': 1373866933, 'portfolio_id': 25363554}, {'photo_id': 1373866895, 'portfolio_id': 25363554}, {'photo_id': 1373866653, 'portfolio_id': 25363554}, {'photo_id': 1373866628, 'portfolio_id': 25363554}, {'photo_id': 1373866608, 'portfolio_id': 25363554}, {'photo_id': 1373866592, 'portfolio_id': 25363554}, {'photo_id': 1373866590, 'portfolio_id': 25363554}, {'photo_id': 1373866588, 'portfolio_id': 25363554}, {'photo_id': 1373866570, 'portfolio_id': 25363554}, {'photo_id': 1373866567, 'portfolio_id': 25363554}, {'photo_id': 1373866564, 'portfolio_id': 25363554}, {'photo_id': 1373866562, 'portfolio_id': 25363554}, {'photo_id': 1373866561, 'portfolio_id': 25363554}, {'photo_id': 1373866558, 'portfolio_id': 25363554}, {'photo_id': 1373866539, 'portfolio_id': 25363554}, {'photo_id': 1373866525, 'portfolio_id': 25363554}, {'photo_id': 1373866523, 'portfolio_id': 25363554}, {'photo_id': 1373866521, 'portfolio_id': 25363554}, {'photo_id': 1373866519, 'portfolio_id': 25363554}, {'photo_id': 1373866516, 'portfolio_id': 25363554}, {'photo_id': 1373866513, 'portfolio_id': 25363554}, {'photo_id': 1373866489, 'portfolio_id': 25363554}, {'photo_id': 1373866487, 'portfolio_id': 25363554}, {'photo_id': 1373866486, 'portfolio_id': 25363554}, {'photo_id': 1373866485, 'portfolio_id': 25363554}, {'photo_id': 1373866484, 'portfolio_id': 25363554}, {'photo_id': 1373866481, 'portfolio_id': 25363554}, {'photo_id': 1373866433, 'portfolio_id': 25363554}, {'photo_id': 1373866416, 'portfolio_id': 25363554}, {'photo_id': 1373866413, 'portfolio_id': 25363554}, {'photo_id': 1373866398, 'portfolio_id': 25363554}, {'photo_id': 1373866383, 'portfolio_id': 25363554}, {'photo_id': 1373866380, 'portfolio_id': 25363554}, {'photo_id': 1373866377, 'portfolio_id': 25363554}, {'photo_id': 1373866353, 'portfolio_id': 25363554}, {'photo_id': 1373866345, 'portfolio_id': 25363554}, {'photo_id': 1373866334, 'portfolio_id': 25363554}, {'photo_id': 1373866323, 'portfolio_id': 25363554}, {'photo_id': 1373866319, 'portfolio_id': 25363554}, {'photo_id': 1373866316, 'portfolio_id': 25363554}, {'photo_id': 1373866301, 'portfolio_id': 25363554}, {'photo_id': 1373866300, 'portfolio_id': 25363554}, {'photo_id': 1373866298, 'portfolio_id': 25363554}, {'photo_id': 1373866297, 'portfolio_id': 25363554}, {'photo_id': 1373866296, 'portfolio_id': 25363554}, {'photo_id': 1373866294, 'portfolio_id': 25363554}, {'photo_id': 1373866274, 'portfolio_id': 25363554}, {'photo_id': 1373866271, 'portfolio_id': 25363554}, {'photo_id': 1373866268, 'portfolio_id': 25363554}, {'photo_id': 1373866266, 'portfolio_id': 25363554}, {'photo_id': 1373866263, 'portfolio_id': 25363554}, {'photo_id': 1373866261, 'portfolio_id': 25363554}, {'photo_id': 1373866235, 'portfolio_id': 25363554}, {'photo_id': 1373866233, 'portfolio_id': 25363554}, {'photo_id': 1373866232, 'portfolio_id': 25363554}, {'photo_id': 1373866231, 'portfolio_id': 25363554}, {'photo_id': 1373866229, 'portfolio_id': 25363554}, {'photo_id': 1373866227, 'portfolio_id': 25363554}, {'photo_id': 1373866209, 'portfolio_id': 25363554}, {'photo_id': 1373866206, 'portfolio_id': 25363554}, {'photo_id': 1373866198, 'portfolio_id': 25363554}, {'photo_id': 1373866189, 'portfolio_id': 25363554}, {'photo_id': 1373866181, 'portfolio_id': 25363554}, {'photo_id': 1373866178, 'portfolio_id': 25363554}] map_portfolio_id_photo_id: {25363554: [1373867605, 1373867090, 1373867064, 1373867025, 1373866981, 1373866933, 1373866895, 1373866653, 1373866628, 1373866608, 1373866592, 1373866590, 1373866588, 1373866570, 1373866567, 1373866564, 1373866562, 1373866561, 1373866558, 1373866539, 1373866525, 1373866523, 1373866521, 1373866519, 1373866516, 1373866513, 1373866489, 1373866487, 1373866486, 1373866485, 1373866484, 1373866481, 1373866433, 1373866416, 1373866413, 1373866398, 1373866383, 1373866380, 1373866377, 1373866353, 1373866345, 1373866334, 1373866323, 1373866319, 1373866316, 1373866301, 1373866300, 1373866298, 1373866297, 1373866296, 1373866294, 1373866274, 1373866271, 1373866268, 1373866266, 1373866263, 1373866261, 1373866235, 1373866233, 1373866232, 1373866231, 1373866229, 1373866227, 1373866209, 1373866206, 1373866198, 1373866189, 1373866181, 1373866178]} ##### 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.015520572662353516 #### 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 Sat Jul 26 05:00:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25363554) 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 : 25363554 get user id for portfolio 25363554 get sub ptf for main ptf 25363554, type 3726 and hashtags ['environnement', 'mal_croppe', 'Carton_brun', 'metal', 'autre_refus', 'plastique', 'flou', 'Carton_gris', 'kraft', 'papier', 'Teint_Dans_La_Masse', 'cartonnette'] 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`=25363554 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','mal_croppe','Carton_brun','metal','autre_refus','plastique','flou','Carton_gris','kraft','papier','Teint_Dans_La_Masse','cartonnette')) 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`=25363554 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','mal_croppe','Carton_brun','metal','autre_refus','plastique','flou','Carton_gris','kraft','papier','Teint_Dans_La_Masse','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'cartonnette': {'main_port_id': 25363554, 'sub_port_id': 25363566, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108571, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 26)}, 'environnement': {'main_port_id': 25363554, 'sub_port_id': 25363567, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108572, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 26)}, 'papier': {'main_port_id': 25363554, 'sub_port_id': 25363568, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108573, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 26)}, 'Teint_Dans_La_Masse': {'main_port_id': 25363554, 'sub_port_id': 25363569, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108574, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 26)}, 'Carton_gris': {'main_port_id': 25363554, 'sub_port_id': 25363570, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108575, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 26)}, 'Carton_brun': {'main_port_id': 25363554, 'sub_port_id': 25363571, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108576, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 26)}, 'flou': {'main_port_id': 25363554, 'sub_port_id': 25363572, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108577, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 26)}, 'plastique': {'main_port_id': 25363554, 'sub_port_id': 25363573, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108578, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 26)}, 'mal_croppe': {'main_port_id': 25363554, 'sub_port_id': 25363574, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108579, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 26)}, 'kraft': {'main_port_id': 25363554, 'sub_port_id': 25363575, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108580, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 26)}, 'autre_refus': {'main_port_id': 25363554, 'sub_port_id': 25363576, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108581, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 26)}, 'metal': {'main_port_id': 25363554, 'sub_port_id': 25363577, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108582, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 26)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25363566 , 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=25363554 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 (25363566) result : ((1373866343,), (1373866344,), (1373866346,), (1373866347,), (1373866348,), (1373866349,), (1373866459,), (1373866460,), (1373866461,), (1373866462,), (1373866463,), (1373866464,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25363554) result : ((1373866178,), (1373866181,), (1373866189,), (1373866198,), (1373866206,), (1373866209,), (1373866227,), (1373866229,), (1373866231,), (1373866232,), (1373866233,), (1373866235,), (1373866261,), (1373866263,), (1373866266,), (1373866268,), (1373866271,), (1373866274,), (1373866294,), (1373866296,), (1373866297,), (1373866298,), (1373866300,), (1373866301,), (1373866316,), (1373866319,), (1373866323,), (1373866334,), (1373866345,), (1373866353,), (1373866377,), (1373866380,), (1373866383,), (1373866398,), (1373866413,), (1373866416,), (1373866433,), (1373866481,), (1373866484,), (1373866485,), (1373866486,), (1373866487,), (1373866489,), (1373866513,), (1373866516,), (1373866519,), (1373866521,), (1373866523,), (1373866525,), (1373866539,), (1373866558,), (1373866561,), (1373866562,), (1373866564,), (1373866567,), (1373866570,), (1373866588,), (1373866590,), (1373866592,), (1373866608,), (1373866628,), (1373866653,), (1373866895,), (1373866933,), (1373866981,), (1373867025,), (1373867064,), (1373867090,), (1373867605,)) 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 (1373866300) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25363567 , 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=25363554 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 (25363567) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25363554) result : ((1373866178,), (1373866181,), (1373866189,), (1373866198,), (1373866206,), (1373866209,), (1373866227,), (1373866229,), (1373866231,), (1373866232,), (1373866233,), (1373866235,), (1373866261,), (1373866263,), (1373866266,), (1373866268,), (1373866271,), (1373866274,), (1373866294,), (1373866296,), (1373866297,), (1373866298,), (1373866300,), (1373866301,), (1373866316,), (1373866319,), (1373866323,), (1373866334,), (1373866345,), (1373866353,), (1373866377,), (1373866380,), (1373866383,), (1373866398,), (1373866413,), (1373866416,), (1373866433,), (1373866481,), (1373866484,), (1373866485,), (1373866486,), (1373866487,), (1373866489,), (1373866513,), (1373866516,), (1373866519,), (1373866521,), (1373866523,), (1373866525,), (1373866539,), (1373866558,), (1373866561,), (1373866562,), (1373866564,), (1373866567,), (1373866570,), (1373866588,), (1373866590,), (1373866592,), (1373866608,), (1373866628,), (1373866653,), (1373866895,), (1373866933,), (1373866981,), (1373867025,), (1373867064,), (1373867090,), (1373867605,)) 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 (1373866300) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25363568 , 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=25363554 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 (25363568) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25363554) result : ((1373866178,), (1373866181,), (1373866189,), (1373866198,), (1373866206,), (1373866209,), (1373866227,), (1373866229,), (1373866231,), (1373866232,), (1373866233,), (1373866235,), (1373866261,), (1373866263,), (1373866266,), (1373866268,), (1373866271,), (1373866274,), (1373866294,), (1373866296,), (1373866297,), (1373866298,), (1373866300,), (1373866301,), (1373866316,), (1373866319,), (1373866323,), (1373866334,), (1373866345,), (1373866353,), (1373866377,), (1373866380,), (1373866383,), (1373866398,), (1373866413,), (1373866416,), (1373866433,), (1373866481,), (1373866484,), (1373866485,), (1373866486,), (1373866487,), (1373866489,), (1373866513,), (1373866516,), (1373866519,), (1373866521,), (1373866523,), (1373866525,), (1373866539,), (1373866558,), (1373866561,), (1373866562,), (1373866564,), (1373866567,), (1373866570,), (1373866588,), (1373866590,), (1373866592,), (1373866608,), (1373866628,), (1373866653,), (1373866895,), (1373866933,), (1373866981,), (1373867025,), (1373867064,), (1373867090,), (1373867605,)) 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 (1373866300) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25363569 , 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=25363554 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 (25363569) result : ((1373866325,), (1373866326,), (1373866327,), (1373866328,), (1373866329,), (1373866330,), (1373866331,), (1373866332,), (1373866333,), (1373866436,), (1373866437,), (1373866438,), (1373866439,), (1373866440,), (1373866441,), (1373866442,), (1373866443,), (1373866444,), (1373866446,), (1373866447,), (1373866448,), (1373866449,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25363554) result : ((1373866178,), (1373866181,), (1373866189,), (1373866198,), (1373866206,), (1373866209,), (1373866227,), (1373866229,), (1373866231,), (1373866232,), (1373866233,), (1373866235,), (1373866261,), (1373866263,), (1373866266,), (1373866268,), (1373866271,), (1373866274,), (1373866294,), (1373866296,), (1373866297,), (1373866298,), (1373866300,), (1373866301,), (1373866316,), (1373866319,), (1373866323,), (1373866334,), (1373866345,), (1373866353,), (1373866377,), (1373866380,), (1373866383,), (1373866398,), (1373866413,), (1373866416,), (1373866433,), (1373866481,), (1373866484,), (1373866485,), (1373866486,), (1373866487,), (1373866489,), (1373866513,), (1373866516,), (1373866519,), (1373866521,), (1373866523,), (1373866525,), (1373866539,), (1373866558,), (1373866561,), (1373866562,), (1373866564,), (1373866567,), (1373866570,), (1373866588,), (1373866590,), (1373866592,), (1373866608,), (1373866628,), (1373866653,), (1373866895,), (1373866933,), (1373866981,), (1373867025,), (1373867064,), (1373867090,), (1373867605,)) 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 (1373866300) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25363570 , 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=25363554 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 (25363570) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25363554) result : ((1373866178,), (1373866181,), (1373866189,), (1373866198,), (1373866206,), (1373866209,), (1373866227,), (1373866229,), (1373866231,), (1373866232,), (1373866233,), (1373866235,), (1373866261,), (1373866263,), (1373866266,), (1373866268,), (1373866271,), (1373866274,), (1373866294,), (1373866296,), (1373866297,), (1373866298,), (1373866300,), (1373866301,), (1373866316,), (1373866319,), (1373866323,), (1373866334,), (1373866345,), (1373866353,), (1373866377,), (1373866380,), (1373866383,), (1373866398,), (1373866413,), (1373866416,), (1373866433,), (1373866481,), (1373866484,), (1373866485,), (1373866486,), (1373866487,), (1373866489,), (1373866513,), (1373866516,), (1373866519,), (1373866521,), (1373866523,), (1373866525,), (1373866539,), (1373866558,), (1373866561,), (1373866562,), (1373866564,), (1373866567,), (1373866570,), (1373866588,), (1373866590,), (1373866592,), (1373866608,), (1373866628,), (1373866653,), (1373866895,), (1373866933,), (1373866981,), (1373867025,), (1373867064,), (1373867090,), (1373867605,)) 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 (1373866300) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25363571 , 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=25363554 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 (25363571) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25363554) result : ((1373866178,), (1373866181,), (1373866189,), (1373866198,), (1373866206,), (1373866209,), (1373866227,), (1373866229,), (1373866231,), (1373866232,), (1373866233,), (1373866235,), (1373866261,), (1373866263,), (1373866266,), (1373866268,), (1373866271,), (1373866274,), (1373866294,), (1373866296,), (1373866297,), (1373866298,), (1373866300,), (1373866301,), (1373866316,), (1373866319,), (1373866323,), (1373866334,), (1373866345,), (1373866353,), (1373866377,), (1373866380,), (1373866383,), (1373866398,), (1373866413,), (1373866416,), (1373866433,), (1373866481,), (1373866484,), (1373866485,), (1373866486,), (1373866487,), (1373866489,), (1373866513,), (1373866516,), (1373866519,), (1373866521,), (1373866523,), (1373866525,), (1373866539,), (1373866558,), (1373866561,), (1373866562,), (1373866564,), (1373866567,), (1373866570,), (1373866588,), (1373866590,), (1373866592,), (1373866608,), (1373866628,), (1373866653,), (1373866895,), (1373866933,), (1373866981,), (1373867025,), (1373867064,), (1373867090,), (1373867605,)) 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 (1373866300) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25363572 , 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=25363554 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 (25363572) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25363554) result : ((1373866178,), (1373866181,), (1373866189,), (1373866198,), (1373866206,), (1373866209,), (1373866227,), (1373866229,), (1373866231,), (1373866232,), (1373866233,), (1373866235,), (1373866261,), (1373866263,), (1373866266,), (1373866268,), (1373866271,), (1373866274,), (1373866294,), (1373866296,), (1373866297,), (1373866298,), (1373866300,), (1373866301,), (1373866316,), (1373866319,), (1373866323,), (1373866334,), (1373866345,), (1373866353,), (1373866377,), (1373866380,), (1373866383,), (1373866398,), (1373866413,), (1373866416,), (1373866433,), (1373866481,), (1373866484,), (1373866485,), (1373866486,), (1373866487,), (1373866489,), (1373866513,), (1373866516,), (1373866519,), (1373866521,), (1373866523,), (1373866525,), (1373866539,), (1373866558,), (1373866561,), (1373866562,), (1373866564,), (1373866567,), (1373866570,), (1373866588,), (1373866590,), (1373866592,), (1373866608,), (1373866628,), (1373866653,), (1373866895,), (1373866933,), (1373866981,), (1373867025,), (1373867064,), (1373867090,), (1373867605,)) 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 (1373866300) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25363573 , 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=25363554 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 (25363573) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25363554) result : ((1373866178,), (1373866181,), (1373866189,), (1373866198,), (1373866206,), (1373866209,), (1373866227,), (1373866229,), (1373866231,), (1373866232,), (1373866233,), (1373866235,), (1373866261,), (1373866263,), (1373866266,), (1373866268,), (1373866271,), (1373866274,), (1373866294,), (1373866296,), (1373866297,), (1373866298,), (1373866300,), (1373866301,), (1373866316,), (1373866319,), (1373866323,), (1373866334,), (1373866345,), (1373866353,), (1373866377,), (1373866380,), (1373866383,), (1373866398,), (1373866413,), (1373866416,), (1373866433,), (1373866481,), (1373866484,), (1373866485,), (1373866486,), (1373866487,), (1373866489,), (1373866513,), (1373866516,), (1373866519,), (1373866521,), (1373866523,), (1373866525,), (1373866539,), (1373866558,), (1373866561,), (1373866562,), (1373866564,), (1373866567,), (1373866570,), (1373866588,), (1373866590,), (1373866592,), (1373866608,), (1373866628,), (1373866653,), (1373866895,), (1373866933,), (1373866981,), (1373867025,), (1373867064,), (1373867090,), (1373867605,)) 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 (1373866300) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25363574 , 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=25363554 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 (25363574) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25363554) result : ((1373866178,), (1373866181,), (1373866189,), (1373866198,), (1373866206,), (1373866209,), (1373866227,), (1373866229,), (1373866231,), (1373866232,), (1373866233,), (1373866235,), (1373866261,), (1373866263,), (1373866266,), (1373866268,), (1373866271,), (1373866274,), (1373866294,), (1373866296,), (1373866297,), (1373866298,), (1373866300,), (1373866301,), (1373866316,), (1373866319,), (1373866323,), (1373866334,), (1373866345,), (1373866353,), (1373866377,), (1373866380,), (1373866383,), (1373866398,), (1373866413,), (1373866416,), (1373866433,), (1373866481,), (1373866484,), (1373866485,), (1373866486,), (1373866487,), (1373866489,), (1373866513,), (1373866516,), (1373866519,), (1373866521,), (1373866523,), (1373866525,), (1373866539,), (1373866558,), (1373866561,), (1373866562,), (1373866564,), (1373866567,), (1373866570,), (1373866588,), (1373866590,), (1373866592,), (1373866608,), (1373866628,), (1373866653,), (1373866895,), (1373866933,), (1373866981,), (1373867025,), (1373867064,), (1373867090,), (1373867605,)) 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 (1373866300) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25363575 , 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=25363554 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 (25363575) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25363554) result : ((1373866178,), (1373866181,), (1373866189,), (1373866198,), (1373866206,), (1373866209,), (1373866227,), (1373866229,), (1373866231,), (1373866232,), (1373866233,), (1373866235,), (1373866261,), (1373866263,), (1373866266,), (1373866268,), (1373866271,), (1373866274,), (1373866294,), (1373866296,), (1373866297,), (1373866298,), (1373866300,), (1373866301,), (1373866316,), (1373866319,), (1373866323,), (1373866334,), (1373866345,), (1373866353,), (1373866377,), (1373866380,), (1373866383,), (1373866398,), (1373866413,), (1373866416,), (1373866433,), (1373866481,), (1373866484,), (1373866485,), (1373866486,), (1373866487,), (1373866489,), (1373866513,), (1373866516,), (1373866519,), (1373866521,), (1373866523,), (1373866525,), (1373866539,), (1373866558,), (1373866561,), (1373866562,), (1373866564,), (1373866567,), (1373866570,), (1373866588,), (1373866590,), (1373866592,), (1373866608,), (1373866628,), (1373866653,), (1373866895,), (1373866933,), (1373866981,), (1373867025,), (1373867064,), (1373867090,), (1373867605,)) 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 (1373866300) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25363576 , 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=25363554 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 (25363576) result : ((1373866336,), (1373866338,), (1373866340,), (1373866341,), (1373866451,), (1373866452,), (1373866453,), (1373866454,), (1373866455,), (1373866456,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25363554) result : ((1373866178,), (1373866181,), (1373866189,), (1373866198,), (1373866206,), (1373866209,), (1373866227,), (1373866229,), (1373866231,), (1373866232,), (1373866233,), (1373866235,), (1373866261,), (1373866263,), (1373866266,), (1373866268,), (1373866271,), (1373866274,), (1373866294,), (1373866296,), (1373866297,), (1373866298,), (1373866300,), (1373866301,), (1373866316,), (1373866319,), (1373866323,), (1373866334,), (1373866345,), (1373866353,), (1373866377,), (1373866380,), (1373866383,), (1373866398,), (1373866413,), (1373866416,), (1373866433,), (1373866481,), (1373866484,), (1373866485,), (1373866486,), (1373866487,), (1373866489,), (1373866513,), (1373866516,), (1373866519,), (1373866521,), (1373866523,), (1373866525,), (1373866539,), (1373866558,), (1373866561,), (1373866562,), (1373866564,), (1373866567,), (1373866570,), (1373866588,), (1373866590,), (1373866592,), (1373866608,), (1373866628,), (1373866653,), (1373866895,), (1373866933,), (1373866981,), (1373867025,), (1373867064,), (1373867090,), (1373867605,)) 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 (1373866300) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25363577 , 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=25363554 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 (25363577) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25363554) result : ((1373866178,), (1373866181,), (1373866189,), (1373866198,), (1373866206,), (1373866209,), (1373866227,), (1373866229,), (1373866231,), (1373866232,), (1373866233,), (1373866235,), (1373866261,), (1373866263,), (1373866266,), (1373866268,), (1373866271,), (1373866274,), (1373866294,), (1373866296,), (1373866297,), (1373866298,), (1373866300,), (1373866301,), (1373866316,), (1373866319,), (1373866323,), (1373866334,), (1373866345,), (1373866353,), (1373866377,), (1373866380,), (1373866383,), (1373866398,), (1373866413,), (1373866416,), (1373866433,), (1373866481,), (1373866484,), (1373866485,), (1373866486,), (1373866487,), (1373866489,), (1373866513,), (1373866516,), (1373866519,), (1373866521,), (1373866523,), (1373866525,), (1373866539,), (1373866558,), (1373866561,), (1373866562,), (1373866564,), (1373866567,), (1373866570,), (1373866588,), (1373866590,), (1373866592,), (1373866608,), (1373866628,), (1373866653,), (1373866895,), (1373866933,), (1373866981,), (1373867025,), (1373867064,), (1373867090,), (1373867605,)) 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 (1373866300) and cspi.crop_hashtag_id = chi.id; To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25363554 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','mal_croppe','Carton_brun','metal','autre_refus','plastique','flou','Carton_gris','kraft','papier','Teint_Dans_La_Masse','cartonnette')) 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`=25363554 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','mal_croppe','Carton_brun','metal','autre_refus','plastique','flou','Carton_gris','kraft','papier','Teint_Dans_La_Masse','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'cartonnette': {'main_port_id': 25363554, 'sub_port_id': 25363580, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108583, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 32)}, 'environnement': {'main_port_id': 25363554, 'sub_port_id': 25363581, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108584, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 32)}, 'papier': {'main_port_id': 25363554, 'sub_port_id': 25363582, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108585, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 32)}, 'Teint_Dans_La_Masse': {'main_port_id': 25363554, 'sub_port_id': 25363583, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108586, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 32)}, 'Carton_gris': {'main_port_id': 25363554, 'sub_port_id': 25363584, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108587, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 32)}, 'Carton_brun': {'main_port_id': 25363554, 'sub_port_id': 25363585, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108588, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 32)}, 'flou': {'main_port_id': 25363554, 'sub_port_id': 25363586, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108589, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 32)}, 'plastique': {'main_port_id': 25363554, 'sub_port_id': 25363587, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108590, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 32)}, 'mal_croppe': {'main_port_id': 25363554, 'sub_port_id': 25363588, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108591, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 32)}, 'kraft': {'main_port_id': 25363554, 'sub_port_id': 25363589, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108592, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 32)}, 'autre_refus': {'main_port_id': 25363554, 'sub_port_id': 25363590, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108593, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 47, 32), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 32)}, 'metal': {'main_port_id': 25363554, 'sub_port_id': 25363591, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17108594, 'last_updated_at': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 26, 4, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 26, 4, 47, 32)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25363580,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25363566 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25363581,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25363567 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25363582,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25363568 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25363583,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25363569 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25363584,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25363570 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25363585,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25363571 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25363586,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25363572 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25363587,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25363573 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25363588,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25363574 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25363589,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25363575 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25363590,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25363576 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25363591,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25363577 lien utilise dans velours : https://www.fotonower.com/velours/25363580,25363581,25363582,25363583,25363584,25363585,25363586,25363587,25363588,25363589,25363590,25363591?tags=cartonnette,environnement,papier,Teint_Dans_La_Masse,Carton_gris,Carton_brun,flou,plastique,mal_croppe,kraft,autre_refus,metal After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25363554]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1373867605] map_info['map_portfolio_photo'] : {25363554: [1373867605, 1373867090, 1373867064, 1373867025, 1373866981, 1373866933, 1373866895, 1373866653, 1373866628, 1373866608, 1373866592, 1373866590, 1373866588, 1373866570, 1373866567, 1373866564, 1373866562, 1373866561, 1373866558, 1373866539, 1373866525, 1373866523, 1373866521, 1373866519, 1373866516, 1373866513, 1373866489, 1373866487, 1373866486, 1373866485, 1373866484, 1373866481, 1373866433, 1373866416, 1373866413, 1373866398, 1373866383, 1373866380, 1373866377, 1373866353, 1373866345, 1373866334, 1373866323, 1373866319, 1373866316, 1373866301, 1373866300, 1373866298, 1373866297, 1373866296, 1373866294, 1373866274, 1373866271, 1373866268, 1373866266, 1373866263, 1373866261, 1373866235, 1373866233, 1373866232, 1373866231, 1373866229, 1373866227, 1373866209, 1373866206, 1373866198, 1373866189, 1373866181, 1373866178]} final : False mtd_id 4302 list_pids : [1373867605] Looping around the photos to save general results len do output : 1 /25363554. 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, '3362666') ('4302', '25363554', '1373867605', None, None, None, None, None, '3362666') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 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, '25363554', "{'cartonnette': 25363566, 'environnement': 25363567, 'papier': 25363568, 'Teint_Dans_La_Masse': 25363569, 'Carton_gris': 25363570, 'Carton_brun': 25363571, 'flou': 25363572, 'plastique': 25363573, 'mal_croppe': 25363574, 'kraft': 25363575, 'autre_refus': 25363576, 'metal': 25363577}", None, None, None, None, '3362666'), ('4302', '25363554', '1373867605', None, None, None, None, None, '3362666')] time used for this insertion : 0.014708757400512695 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.41442084312438965 time spend to save output : 0.014976739883422852 total time spend for step 1 : 0.4293975830078125 step2:final Sat Jul 26 05:00:59 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 (25363554) 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 25363554 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1373866209,1373866206,1373866198,1373866189,1373866181,1373866178,1373866235,1373866233,1373866232,1373866231,1373866229,1373866227,1373866274,1373866271,1373866268,1373866266,1373866263,1373866261,1373866301,1373866300,1373866298,1373866297,1373866296,1373866294,1373866353,1373866345,1373866334,1373866323,1373866319,1373866316,1373866433,1373866416,1373866413,1373866398,1373866383,1373866380,1373866377,1373866489,1373866487,1373866486,1373866485,1373866484,1373866481,1373866539,1373866525,1373866523,1373866521,1373866519,1373866516,1373866513,1373866570,1373866567,1373866564,1373866562,1373866561,1373866558,1373866653,1373866628,1373866608,1373866592,1373866590,1373866588,1373867090,1373867064,1373867025,1373866981,1373866933,1373866895,1373867605); 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([25363554]) Inside saveOutput : final : False verbose : True original output for save of step final : {1373867605: ('0.20614438704415652',)} new output for save of step final : {1373867605: ('0.20614438704415652',)} [1373867605] map_info['map_portfolio_photo'] : {25363554: [1373867605, 1373867090, 1373867064, 1373867025, 1373866981, 1373866933, 1373866895, 1373866653, 1373866628, 1373866608, 1373866592, 1373866590, 1373866588, 1373866570, 1373866567, 1373866564, 1373866562, 1373866561, 1373866558, 1373866539, 1373866525, 1373866523, 1373866521, 1373866519, 1373866516, 1373866513, 1373866489, 1373866487, 1373866486, 1373866485, 1373866484, 1373866481, 1373866433, 1373866416, 1373866413, 1373866398, 1373866383, 1373866380, 1373866377, 1373866353, 1373866345, 1373866334, 1373866323, 1373866319, 1373866316, 1373866301, 1373866300, 1373866298, 1373866297, 1373866296, 1373866294, 1373866274, 1373866271, 1373866268, 1373866266, 1373866263, 1373866261, 1373866235, 1373866233, 1373866232, 1373866231, 1373866229, 1373866227, 1373866209, 1373866206, 1373866198, 1373866189, 1373866181, 1373866178]} final : False mtd_id 4302 list_pids : [1373867605] Looping around the photos to save general results len do output : 1 /1373867605.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, '3362666') ('4302', '25363554', '1373867605', None, None, None, None, None, '3362666') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 3 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '25363554', '1373867605', '0.20614438704415652', None, None, None, None, '3362666')] time used for this insertion : 0.010997295379638672 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06177949905395508 time spend to save output : 0.011146306991577148 total time spend for step 2 : 0.07292580604553223 step3:velours_tree Sat Jul 26 05:00:59 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 : {25363554: [{'cartonnette': 25363566, 'environnement': 25363567, 'papier': 25363568, 'Teint_Dans_La_Masse': 25363569, 'Carton_gris': 25363570, 'Carton_brun': 25363571, 'flou': 25363572, 'plastique': 25363573, 'mal_croppe': 25363574, 'kraft': 25363575, 'autre_refus': 25363576, 'metal': 25363577}]} input_args_next_step : {25363554: ()} output_args : {25363554: [{'cartonnette': 25363566, 'environnement': 25363567, 'papier': 25363568, 'Teint_Dans_La_Masse': 25363569, 'Carton_gris': 25363570, 'Carton_brun': 25363571, 'flou': 25363572, 'plastique': 25363573, 'mal_croppe': 25363574, 'kraft': 25363575, 'autre_refus': 25363576, 'metal': 25363577}]} args : 25363554 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 : ({'cartonnette': 25363566, 'environnement': 25363567, 'papier': 25363568, 'Teint_Dans_La_Masse': 25363569, 'Carton_gris': 25363570, 'Carton_brun': 25363571, 'flou': 25363572, 'plastique': 25363573, 'mal_croppe': 25363574, 'kraft': 25363575, 'autre_refus': 25363576, 'metal': 25363577},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25363554) 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([25363554]) 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.31827545166015625 time spend to save output : 5.1975250244140625e-05 total time spend for step 3 : 0.3183274269104004 step4:send_mail_cod Sat Jul 26 05:00:59 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 : {1373867605: ('0.20614438704415652',)} input_args_next_step : {1373867605: ()} output_args : {1373867605: ('0.20614438704415652',)} args : 1373867605 depend.output_id : 0 complete output_args for input 3 : {25363554: [{'cartonnette': 25363566, 'environnement': 25363567, 'papier': 25363568, 'Teint_Dans_La_Masse': 25363569, 'Carton_gris': 25363570, 'Carton_brun': 25363571, 'flou': 25363572, 'plastique': 25363573, 'mal_croppe': 25363574, 'kraft': 25363575, 'autre_refus': 25363576, 'metal': 25363577}]} input_args_next_step : {1373867605: ('0.20614438704415652',), 25363554: ()} output_args : {25363554: [{'cartonnette': 25363566, 'environnement': 25363567, 'papier': 25363568, 'Teint_Dans_La_Masse': 25363569, 'Carton_gris': 25363570, 'Carton_brun': 25363571, 'flou': 25363572, 'plastique': 25363573, 'mal_croppe': 25363574, 'kraft': 25363575, 'autre_refus': 25363576, 'metal': 25363577}]} args : 25363554 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 :2, first value : ('0.20614438704415652',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25363554) 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 (1373867605) Found this number of photos: 1 ##### Call download_photos : nb_thread : 5 begin to download photo : 1373867605 download finish for photo 1373867605 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 : 1 ; length of list_pids : 1 ; length of list_args : 1 results_Auto_P25363554_26-07-2025_05_00_59.pdf 25363566 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=25363566 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1373866343: '1753498165_359483_1373866209_1684f550cbeb61e48c94ba7587a72815_rle_crop_3894743121_0.png', 1373866344: '1753498165_359483_1373866206_8846e773afd2d8500599ed882abf0c49_rle_crop_3894743135_0.png', 1373866346: '1753498165_359483_1373866198_7bdc9cfc3de94c2fca272fd86ad20d8f_rle_crop_3894743148_0.png', 1373866347: '1753498165_359483_1373866189_a8470401f2d951aa8c8e18ae3767a43a_rle_crop_3894743157_0.png', 1373866348: '1753498165_359483_1373866181_6678ecf6c7df1ae3d37113b82c192c60_rle_crop_3894743171_0.png', 1373866349: '1753498165_359483_1373866178_efc240283779b2b72407fdc3ab90cc94_rle_crop_3894743183_0.png', 1373866459: '1753498286_362837_1373866235_5b56756ef8b431a2cebc83ec82d48fb0_rle_crop_3894743603_0.png', 1373866460: '1753498286_362837_1373866233_d9caee184539d39ed645654aeea63633_rle_crop_3894743615_0.png', 1373866461: '1753498286_362837_1373866232_6102a79306bae15fb39c1e4e8888895f_rle_crop_3894743629_0.png', 1373866462: '1753498286_362837_1373866231_09a317e50e881fb0e03bdce4b36ae2c6_rle_crop_3894743642_0.png', 1373866463: '1753498286_362837_1373866229_42dd8a683b0b306b063de55c0a482cde_rle_crop_3894743653_0.png', 1373866464: '1753498286_362837_1373866227_c06318c2410f3223ba0c39c445e6be84_rle_crop_3894743662_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/279f213e4f50aca52dc16417c7c35207_39081351.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/dabdaa95690b83747ce3b049b72b413c_90453941.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/e8cda061f8742dc76fe4c772bc24f976_37220985.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/9bee36d8c25a8bd70d90f936e5cc6cd4_25360783.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/d473e65007759780935f9789ff5980b4_75224308.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/e26ef3dba124175bff1b8208ebeb4780_80855512.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/382e76bdacb427775d09769dbefa64ac_3613398.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/db3b5d43a64da5f96d925038ffb94641_80268118.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/9d019486e35dfb145e6e7d0772a1655a_3568791.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/1b2dd47266b4ccce04ef4e1a373afd49_42506729.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/ac09ae4479544973f4dd61e997ef7977_79953765.png change filename to text .imagette253635661753498859/ imagette253635661753498859/1753498165_359483_1373866178_efc240283779b2b72407fdc3ab90cc94_rle_crop_3894743183_0.png.png imagette253635661753498859/1753498286_362837_1373866231_09a317e50e881fb0e03bdce4b36ae2c6_rle_crop_3894743642_0.png.png imagette253635661753498859/1753498286_362837_1373866233_d9caee184539d39ed645654aeea63633_rle_crop_3894743615_0.png.png imagette253635661753498859/1753498165_359483_1373866206_8846e773afd2d8500599ed882abf0c49_rle_crop_3894743135_0.png.png imagette253635661753498859/1753498165_359483_1373866198_7bdc9cfc3de94c2fca272fd86ad20d8f_rle_crop_3894743148_0.png.png imagette253635661753498859/1753498286_362837_1373866235_5b56756ef8b431a2cebc83ec82d48fb0_rle_crop_3894743603_0.png.png imagette253635661753498859/1753498165_359483_1373866189_a8470401f2d951aa8c8e18ae3767a43a_rle_crop_3894743157_0.png.png imagette253635661753498859/1753498165_359483_1373866181_6678ecf6c7df1ae3d37113b82c192c60_rle_crop_3894743171_0.png.png imagette253635661753498859/1753498286_362837_1373866229_42dd8a683b0b306b063de55c0a482cde_rle_crop_3894743653_0.png.png imagette253635661753498859/1753498165_359483_1373866209_1684f550cbeb61e48c94ba7587a72815_rle_crop_3894743121_0.png.png imagette253635661753498859/1753498286_362837_1373866232_6102a79306bae15fb39c1e4e8888895f_rle_crop_3894743629_0.png.png imagette253635661753498859/1753498286_362837_1373866227_c06318c2410f3223ba0c39c445e6be84_rle_crop_3894743662_0.png.png imagette253635721753498860/ imagette253635731753498860/ imagette253635741753498860/ imagette253635751753498860/ wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/a09ce27354cdc328e00252cc47e36e5b_5496527.png imagette253635661753498859 25363572 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=25363572 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette253635721753498860 25363573 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=25363573 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette253635731753498860 25363574 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=25363574 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette253635741753498860 25363575 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=25363575 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette253635751753498860 25363576 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=25363576 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1373866336: '1753498165_359483_1373866206_8846e773afd2d8500599ed882abf0c49_rle_crop_3894743136_0.png', 1373866338: '1753498165_359483_1373866189_a8470401f2d951aa8c8e18ae3767a43a_rle_crop_3894743161_0.png', 1373866340: '1753498165_359483_1373866181_6678ecf6c7df1ae3d37113b82c192c60_rle_crop_3894743170_0.png', 1373866341: '1753498165_359483_1373866178_efc240283779b2b72407fdc3ab90cc94_rle_crop_3894743181_0.png', 1373866451: '1753498286_362837_1373866235_5b56756ef8b431a2cebc83ec82d48fb0_rle_crop_3894743602_0.png', 1373866452: '1753498286_362837_1373866233_d9caee184539d39ed645654aeea63633_rle_crop_3894743617_0.png', 1373866453: '1753498286_362837_1373866232_6102a79306bae15fb39c1e4e8888895f_rle_crop_3894743627_0.png', 1373866454: '1753498286_362837_1373866231_09a317e50e881fb0e03bdce4b36ae2c6_rle_crop_3894743640_0.png', 1373866455: '1753498286_362837_1373866229_42dd8a683b0b306b063de55c0a482cde_rle_crop_3894743655_0.png', 1373866456: '1753498286_362837_1373866227_c06318c2410f3223ba0c39c445e6be84_rle_crop_3894743667_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/478a6b79b5f6b09af52014290adff9b7_24125099.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/710c090e0721870a50b5df8038a8e69f_85499957.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/a7bce62968cd43eb047dc694df07cf68_653714.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/e746eaa1c8b05954ec8dae6316b23c1c_14425260.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/a1ab0147ec39e971d1e46e7a26a7bb73_50124767.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/abbed7abd5de2da96cc31a27584ee935_88021363.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/d45b03773814f1d7cb1efe2ba40f056d_1889313.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/856012d1b006d6749bf2237a7307317d_56031028.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/1be7b752748eb03ec8dba58aca1e1d4f_29503275.png change filename to text .imagette253635761753498860/ imagette253635761753498860/1753498286_362837_1373866229_42dd8a683b0b306b063de55c0a482cde_rle_crop_3894743655_0.png.png imagette253635761753498860/1753498165_359483_1373866189_a8470401f2d951aa8c8e18ae3767a43a_rle_crop_3894743161_0.png.png imagette253635761753498860/1753498286_362837_1373866233_d9caee184539d39ed645654aeea63633_rle_crop_3894743617_0.png.png imagette253635761753498860/1753498165_359483_1373866206_8846e773afd2d8500599ed882abf0c49_rle_crop_3894743136_0.png.png imagette253635761753498860/1753498286_362837_1373866227_c06318c2410f3223ba0c39c445e6be84_rle_crop_3894743667_0.png.png imagette253635761753498860/1753498165_359483_1373866181_6678ecf6c7df1ae3d37113b82c192c60_rle_crop_3894743170_0.png.png imagette253635761753498860/1753498286_362837_1373866231_09a317e50e881fb0e03bdce4b36ae2c6_rle_crop_3894743640_0.png.png imagette253635761753498860/1753498286_362837_1373866232_6102a79306bae15fb39c1e4e8888895f_rle_crop_3894743627_0.png.png imagette253635761753498860/1753498165_359483_1373866178_efc240283779b2b72407fdc3ab90cc94_rle_crop_3894743181_0.png.png imagette253635761753498860/1753498286_362837_1373866235_5b56756ef8b431a2cebc83ec82d48fb0_rle_crop_3894743602_0.png.png imagette253635771753498861/ wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/eb57eb558dbec4a9b34aebcd4dfaeed4_4900562.png imagette253635761753498860 25363577 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=25363577 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette253635771753498861 25363569 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=25363569 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1373866438: '1753498286_362837_1373866235_5b56756ef8b431a2cebc83ec82d48fb0_rle_crop_3894743600_0.png', 1373866449: '1753498286_362837_1373866227_c06318c2410f3223ba0c39c445e6be84_rle_crop_3894743665_0.png', 1373866448: '1753498286_362837_1373866227_c06318c2410f3223ba0c39c445e6be84_rle_crop_3894743664_0.png', 1373866447: '1753498286_362837_1373866227_c06318c2410f3223ba0c39c445e6be84_rle_crop_3894743670_0.png', 1373866446: '1753498286_362837_1373866229_42dd8a683b0b306b063de55c0a482cde_rle_crop_3894743652_0.png', 1373866444: '1753498286_362837_1373866229_42dd8a683b0b306b063de55c0a482cde_rle_crop_3894743658_0.png', 1373866443: '1753498286_362837_1373866231_09a317e50e881fb0e03bdce4b36ae2c6_rle_crop_3894743645_0.png', 1373866442: '1753498286_362837_1373866232_6102a79306bae15fb39c1e4e8888895f_rle_crop_3894743628_0.png', 1373866441: '1753498286_362837_1373866232_6102a79306bae15fb39c1e4e8888895f_rle_crop_3894743632_0.png', 1373866440: '1753498286_362837_1373866233_d9caee184539d39ed645654aeea63633_rle_crop_3894743614_0.png', 1373866439: '1753498286_362837_1373866233_d9caee184539d39ed645654aeea63633_rle_crop_3894743620_0.png', 1373866325: '1753498165_359483_1373866209_1684f550cbeb61e48c94ba7587a72815_rle_crop_3894743127_0.png', 1373866437: '1753498286_362837_1373866235_5b56756ef8b431a2cebc83ec82d48fb0_rle_crop_3894743601_0.png', 1373866436: '1753498286_362837_1373866235_5b56756ef8b431a2cebc83ec82d48fb0_rle_crop_3894743607_0.png', 1373866333: '1753498165_359483_1373866178_efc240283779b2b72407fdc3ab90cc94_rle_crop_3894743185_0.png', 1373866332: '1753498165_359483_1373866178_efc240283779b2b72407fdc3ab90cc94_rle_crop_3894743188_0.png', 1373866331: '1753498165_359483_1373866181_6678ecf6c7df1ae3d37113b82c192c60_rle_crop_3894743173_0.png', 1373866330: '1753498165_359483_1373866181_6678ecf6c7df1ae3d37113b82c192c60_rle_crop_3894743169_0.png', 1373866329: '1753498165_359483_1373866181_6678ecf6c7df1ae3d37113b82c192c60_rle_crop_3894743176_0.png', 1373866328: '1753498165_359483_1373866189_a8470401f2d951aa8c8e18ae3767a43a_rle_crop_3894743163_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/1a9c2479bd99c616392d6d3771f005cb_87433532.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/2ced203704c662120f5d2b9fe9ce0863_8880150.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/877514b792afce7d66076a6b3eae3e9d_15910896.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/3b773e47814f192a9a0f76c751c45203_79541316.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/a1248008c8240eeea85f8ec8295b1cc9_29320253.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/05f26caf51fe5c044a429073975e31a3_66062597.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/ebaf4cc4365f68838d98d81f463eef48_15666331.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/bbefc425806a732483a43fa80569b61d_35866505.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/6cd3fb50f9d397c708de190ab1a867e7_67539927.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/0208c6d7d4686149fa8f549241c71379_28993377.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/0279904ae0980a26e53c8c8f90666ba3_80590034.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/5ee7b438d155c40b22cbdf802db8d0bf_45238759.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/47dd8a34ca1cefda421858c7b05c7f69_34063172.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/0f0330c9af8e12cb3c416bc1a08842df_24716643.png change filename to text .wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/066a411ea88119c517007a6d770553e9_12742289.png change filename to text .wget -O 16.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/1263274bf35c9b95035582a8fdddeb77_95092584.png change filename to text .wget -O 17.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/b3052b3af195844b7b790473679081fd_59639893.png change filename to text .wget -O 18.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/44bc113f546bd7299247f0be261bce36_28002111.png change filename to text .wget -O 19.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/ab7edf46bec7a32883bbb8ad6ddd4512_2546548.png change filename to text .imagette253635691753498861/ imagette253635691753498861/1753498286_362837_1373866233_d9caee184539d39ed645654aeea63633_rle_crop_3894743620_0.png.png imagette253635691753498861/1753498286_362837_1373866227_c06318c2410f3223ba0c39c445e6be84_rle_crop_3894743665_0.png.png imagette253635691753498861/1753498165_359483_1373866178_efc240283779b2b72407fdc3ab90cc94_rle_crop_3894743188_0.png.png imagette253635691753498861/1753498286_362837_1373866232_6102a79306bae15fb39c1e4e8888895f_rle_crop_3894743628_0.png.png imagette253635691753498861/1753498286_362837_1373866235_5b56756ef8b431a2cebc83ec82d48fb0_rle_crop_3894743600_0.png.png imagette253635691753498861/1753498286_362837_1373866229_42dd8a683b0b306b063de55c0a482cde_rle_crop_3894743658_0.png.png imagette253635691753498861/1753498286_362837_1373866231_09a317e50e881fb0e03bdce4b36ae2c6_rle_crop_3894743645_0.png.png imagette253635691753498861/1753498286_362837_1373866235_5b56756ef8b431a2cebc83ec82d48fb0_rle_crop_3894743601_0.png.png imagette253635691753498861/1753498165_359483_1373866181_6678ecf6c7df1ae3d37113b82c192c60_rle_crop_3894743173_0.png.png imagette253635691753498861/1753498286_362837_1373866232_6102a79306bae15fb39c1e4e8888895f_rle_crop_3894743632_0.png.png imagette253635691753498861/1753498165_359483_1373866181_6678ecf6c7df1ae3d37113b82c192c60_rle_crop_3894743169_0.png.png imagette253635691753498861/1753498286_362837_1373866233_d9caee184539d39ed645654aeea63633_rle_crop_3894743614_0.png.png imagette253635691753498861/1753498165_359483_1373866189_a8470401f2d951aa8c8e18ae3767a43a_rle_crop_3894743163_0.png.png imagette253635691753498861/1753498165_359483_1373866209_1684f550cbeb61e48c94ba7587a72815_rle_crop_3894743127_0.png.png imagette253635691753498861/1753498286_362837_1373866229_42dd8a683b0b306b063de55c0a482cde_rle_crop_3894743652_0.png.png imagette253635691753498861/1753498165_359483_1373866181_6678ecf6c7df1ae3d37113b82c192c60_rle_crop_3894743176_0.png.png imagette253635691753498861/1753498165_359483_1373866178_efc240283779b2b72407fdc3ab90cc94_rle_crop_3894743185_0.png.png imagette253635691753498861/1753498286_362837_1373866235_5b56756ef8b431a2cebc83ec82d48fb0_rle_crop_3894743607_0.png.png imagette253635691753498861/1753498286_362837_1373866227_c06318c2410f3223ba0c39c445e6be84_rle_crop_3894743664_0.png.png imagette253635691753498861/1753498286_362837_1373866227_c06318c2410f3223ba0c39c445e6be84_rle_crop_3894743670_0.png.png imagette253635701753498862/ imagette253635711753498862/ wget -O 20.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/3d7c7996d3e8d63951ca30366336a6ef_74150160.png imagette253635691753498861 25363570 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=25363570 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette253635701753498862 25363571 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=25363571 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette253635711753498862 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=25363554 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/25363580,25363581,25363582,25363583,25363584,25363585,25363586,25363587,25363588,25363589,25363590,25363591?tags=cartonnette,environnement,papier,Teint_Dans_La_Masse,Carton_gris,Carton_brun,flou,plastique,mal_croppe,kraft,autre_refus,metal your option no_mail is active, we will not send the real mail to your client args[1373867605] : ('0.20614438704415652',) no score found for photo 1373867605 We are sending mail with results at report@fotonower.com refus_total : 0.20614438704415652 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=25363554 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_P25363554_26-07-2025_05_00_59.pdf results_Auto_P25363554_26-07-2025_05_00_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25363554_26-07-2025_05_00_59.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','25363554','results_Auto_P25363554_26-07-2025_05_00_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25363554_26-07-2025_05_00_59.pdf','pdf','','0.21','0.20614438704415652') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25363554]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1373867605] map_info['map_portfolio_photo'] : {25363554: [1373867605, 1373867090, 1373867064, 1373867025, 1373866981, 1373866933, 1373866895, 1373866653, 1373866628, 1373866608, 1373866592, 1373866590, 1373866588, 1373866570, 1373866567, 1373866564, 1373866562, 1373866561, 1373866558, 1373866539, 1373866525, 1373866523, 1373866521, 1373866519, 1373866516, 1373866513, 1373866489, 1373866487, 1373866486, 1373866485, 1373866484, 1373866481, 1373866433, 1373866416, 1373866413, 1373866398, 1373866383, 1373866380, 1373866377, 1373866353, 1373866345, 1373866334, 1373866323, 1373866319, 1373866316, 1373866301, 1373866300, 1373866298, 1373866297, 1373866296, 1373866294, 1373866274, 1373866271, 1373866268, 1373866266, 1373866263, 1373866261, 1373866235, 1373866233, 1373866232, 1373866231, 1373866229, 1373866227, 1373866209, 1373866206, 1373866198, 1373866189, 1373866181, 1373866178]} final : False mtd_id 4302 list_pids : [1373867605] 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, '3362666') ('4302', '25363554', '1373867605', None, None, None, None, None, '3362666') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 1 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', '25363554', '1373867605', None, None, None, None, None, '3362666')] time used for this insertion : 0.014785289764404297 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.8779115676879883 time spend to save output : 0.014999151229858398 total time spend for step 4 : 3.8929107189178467 step5:split_time_score Sat Jul 26 05:01:03 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 : ['25363554'] 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 : [('25363554',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25363554) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1373867605: {'path': 'temp/1753498859_2342143_1373867605_cfc323b974bd295c92b9b362e8e0b243.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 = 25363554; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm_bis',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 25363554 group by h (('04', 69),) 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=25363554 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 (25363554) 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 (25363554) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 26072025 25363554 Nombre de photos uploadées : 69 / 23040 (0%) 26072025 25363554 Nombre de photos taguées (types de déchets): 0 / 69 (0%) 26072025 25363554 Nombre de photos taguées (volume) : 0 / 69 (0%) [{'photo_id': 1373866209, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/1684f550cbeb61e48c94ba7587a72815.jpg', 'username': None, 'uploaded_at': 1753497963, 'text': 'image_26072025_04_45_04_010162m0.jpg 1e-05 for time 1, id_amount 4 this amount prod time diff : 1e-05'}, {'photo_id': 1373866206, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/8846e773afd2d8500599ed882abf0c49.jpg', 'username': None, 'uploaded_at': 1753497963, 'text': 'image_26072025_04_45_14_010137m0.jpg 2e-05 for time 1, id_amount 4 this amount prod time diff : 1e-05'}, {'photo_id': 1373866198, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/7bdc9cfc3de94c2fca272fd86ad20d8f.jpg', 'username': None, 'uploaded_at': 1753497963, 'text': 'image_26072025_04_45_23_009124m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1373866189, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/26/a8470401f2d951aa8c8e18ae3767a43a.jpg', 'username': None, 'uploaded_at': 1753497963, 'text': 'image_26072025_04_45_33_010134m0.jpg 4e-05 for time 1, id_amount 4 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 2.6226043701171875e-06 elapsed_time : order_list_meta_photo_and_scores 5.9604644775390625e-06 ????????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0030698776245117188 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 25363554, '2025-07-26' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2010380,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02380681037902832 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= 2010380 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25355301, 'dashboard_result_id': 13169468, '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_P25355301_26-07-2025_00_17_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25355314, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25355315, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25355316, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25355317, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25355318, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25355319, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25355320, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25355321, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25355322, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25355323, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25355324, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25355325, 'pht': 3726}}"}, {'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25355557, 'dashboard_result_id': 13169469, '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_P25355557_26-07-2025_01_02_57.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25355621, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25355622, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25355623, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25355624, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25355625, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25355626, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25355627, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25355628, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25355629, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25355630, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25355631, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25355632, 'pht': 3726}}"}, {'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25356024, 'dashboard_result_id': 13169470, '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_P25356024_26-07-2025_00_47_30.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25356030, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25356031, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25356032, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25356033, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25356034, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25356035, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25356036, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25356037, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25356038, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25356039, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25356040, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25356041, 'pht': 3726}}"}, {'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25356383, 'dashboard_result_id': 13169471, '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_P25356383_26-07-2025_01_00_32.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25356413, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25356414, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25356415, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25356416, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25356417, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25356418, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25356419, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25356420, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25356421, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25356422, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25356423, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25356424, 'pht': 3726}}"}, {'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25356726, 'dashboard_result_id': 13169472, '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_P25356726_26-07-2025_01_16_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25356829, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25356830, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25356832, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25356833, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25356834, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25356835, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25356836, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25356837, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25356838, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25356839, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25356840, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25356841, 'pht': 3726}}"}, {'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25357325, 'dashboard_result_id': 13169473, '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_P25357325_26-07-2025_01_30_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25357330, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25357331, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25357332, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25357333, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25357334, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25357335, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25357336, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25357337, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25357338, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25357339, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25357340, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25357341, 'pht': 3726}}"}, {'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25357747, 'dashboard_result_id': 13169474, '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_P25357747_26-07-2025_01_46_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25357753, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25357754, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25357755, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25357756, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25357757, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25357758, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25357759, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25357760, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25357761, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25357762, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25357763, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25357764, 'pht': 3726}}"}, {'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25358202, 'dashboard_result_id': 13169475, '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_P25358202_26-07-2025_02_00_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25358215, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25358216, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25358217, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25358218, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25358219, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25358220, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25358221, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25358222, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25358223, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25358224, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25358225, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25358226, 'pht': 3726}}"}, {'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25358712, 'dashboard_result_id': 13169476, '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_P25358712_26-07-2025_02_16_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25358728, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25358729, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25358730, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25358731, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25358732, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25358733, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25358734, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25358735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25358736, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25358737, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25358738, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25358739, 'pht': 3726}}"}, {'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25359335, 'dashboard_result_id': 13169477, '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_P25359335_26-07-2025_02_30_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25359354, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25359355, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25359356, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25359357, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25359358, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25359359, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25359360, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25359361, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25359362, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25359363, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25359364, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25359365, 'pht': 3726}}"}, {'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25359733, 'dashboard_result_id': 13169478, '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_P25359733_26-07-2025_02_46_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25359737, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25359738, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25359739, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25359740, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25359741, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25359742, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25359743, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25359744, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25359745, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25359746, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25359747, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25359748, 'pht': 3726}}"}, {'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25360112, 'dashboard_result_id': 13169479, '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_P25360112_26-07-2025_03_00_57.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25360161, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25360162, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25360163, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25360164, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25360165, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25360166, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25360167, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25360168, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25360169, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25360170, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25360171, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25360172, 'pht': 3726}}"}, {'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25360473, 'dashboard_result_id': 13169480, '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_P25360473_26-07-2025_03_16_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25360474, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25360475, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25360476, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25360477, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25360478, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25360479, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25360480, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25360481, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25360482, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25360483, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25360484, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25360485, 'pht': 3726}}"}, {'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25361118, 'dashboard_result_id': 13169481, '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_P25361118_26-07-2025_03_30_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25361119, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25361120, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25361121, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25361122, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25361123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25361124, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25361125, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25361126, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25361127, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25361128, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25361129, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25361130, 'pht': 3726}}"}, {'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25361494, 'dashboard_result_id': 13169483, '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_P25361494_26-07-2025_03_46_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25361500, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25361501, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25361502, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25361503, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25361504, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25361505, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25361506, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25361507, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25361508, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25361509, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25361510, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25361511, 'pht': 3726}}"}, {'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25361824, 'dashboard_result_id': 13169484, '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_P25361824_26-07-2025_04_01_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25361861, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25361862, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25361863, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25361864, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25361865, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25361866, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25361867, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25361868, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25361869, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25361870, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25361871, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25361872, 'pht': 3726}}"}, {'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25362209, 'dashboard_result_id': 13169485, '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_P25362209_26-07-2025_04_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25362215, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25362216, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25362217, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25362218, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25362219, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25362220, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25362221, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25362222, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25362223, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25362224, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25362225, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25362226, 'pht': 3726}}"}, {'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25362747, 'dashboard_result_id': 13169486, '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_P25362747_26-07-2025_04_31_02.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25362751, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25362752, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25362753, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25362754, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25362755, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25362756, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25362757, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25362758, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25362759, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25362760, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25362761, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25362762, 'pht': 3726}}"}, {'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25363150, 'dashboard_result_id': 13169487, '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_P25363150_26-07-2025_04_47_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25363152, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25363153, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25363154, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25363155, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25363156, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25363157, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25363158, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25363159, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25363160, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25363161, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25363162, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25363163, 'pht': 3726}}"}, {'dashboat_entry_day': 2010380, 'dashboard_run_id': 2018322, 'mtr_portfolio_id': 25363554, 'dashboard_result_id': 13169488, '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_P25363554_26-07-2025_04_58_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25363566, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25363567, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25363568, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25363569, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25363570, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25363571, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25363572, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25363573, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25363574, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25363575, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25363576, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25363577, '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 = 25355301 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': 3360864, 'mtr_portfolio_id': 25355301, 'created_at': datetime.datetime(2025, 7, 26, 0, 17), 'result': '0.04350535935102565', 'result_long': None, 'result_double': None}] Qualite : 0.04350535935102565 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25355301 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25355301_26-07-2025_00_17_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25355301 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_P25355301_26-07-2025_00_17_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25355314, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25355315, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25355316, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25355317, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25355318, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25355319, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25355320, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25355321, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25355322, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25355323, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25355324, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25355325, 'pht': 3726}}" where mtr_portfolio_id = 25355301 and dashboard_run_id = 2018322 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`=25355301 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169468, 0.04350535935102565, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25355301_26-07-2025_00_17_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25355314, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25355315, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25355316, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25355317, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25355318, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25355319, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25355320, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25355321, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25355322, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25355323, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25355324, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25355325, '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 = 25355557 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': 3360915, 'mtr_portfolio_id': 25355557, 'created_at': datetime.datetime(2025, 7, 26, 1, 2, 57), 'result': '0.07381431508147096', 'result_long': None, 'result_double': None}] Qualite : 0.07381431508147096 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25355557 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25355557_26-07-2025_01_02_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25355557 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_P25355557_26-07-2025_01_02_57.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25355621, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25355622, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25355623, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25355624, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25355625, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25355626, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25355627, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25355628, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25355629, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25355630, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25355631, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25355632, 'pht': 3726}}" where mtr_portfolio_id = 25355557 and dashboard_run_id = 2018322 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`=25355557 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169469, 0.07381431508147096, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25355557_26-07-2025_01_02_57.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25355621, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25355622, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25355623, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25355624, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25355625, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25355626, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25355627, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25355628, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25355629, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25355630, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25355631, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25355632, '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 = 25356024 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': 3361007, 'mtr_portfolio_id': 25356024, 'created_at': datetime.datetime(2025, 7, 26, 0, 47, 29), 'result': '0.10719126764138359', 'result_long': None, 'result_double': None}] Qualite : 0.10719126764138359 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25356024 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25356024_26-07-2025_00_47_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25356024 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_P25356024_26-07-2025_00_47_30.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25356030, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25356031, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25356032, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25356033, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25356034, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25356035, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25356036, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25356037, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25356038, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25356039, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25356040, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25356041, 'pht': 3726}}" where mtr_portfolio_id = 25356024 and dashboard_run_id = 2018322 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`=25356024 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169470, 0.10719126764138359, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25356024_26-07-2025_00_47_30.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25356030, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25356031, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25356032, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25356033, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25356034, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25356035, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25356036, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25356037, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25356038, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25356039, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25356040, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25356041, '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 = 25356383 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': 3361100, 'mtr_portfolio_id': 25356383, 'created_at': datetime.datetime(2025, 7, 26, 1, 0, 32), 'result': '0.05492209439366332', 'result_long': None, 'result_double': None}] Qualite : 0.05492209439366332 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25356383 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25356383_26-07-2025_01_00_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25356383 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_P25356383_26-07-2025_01_00_32.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25356413, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25356414, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25356415, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25356416, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25356417, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25356418, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25356419, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25356420, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25356421, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25356422, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25356423, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25356424, 'pht': 3726}}" where mtr_portfolio_id = 25356383 and dashboard_run_id = 2018322 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`=25356383 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169471, 0.05492209439366332, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25356383_26-07-2025_01_00_32.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25356413, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25356414, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25356415, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25356416, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25356417, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25356418, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25356419, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25356420, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25356421, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25356422, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25356423, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25356424, '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 = 25356726 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': 3361210, 'mtr_portfolio_id': 25356726, 'created_at': datetime.datetime(2025, 7, 26, 1, 16, 58), 'result': '0.02502067535634038', 'result_long': None, 'result_double': None}] Qualite : 0.02502067535634038 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25356726 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25356726_26-07-2025_01_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25356726 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_P25356726_26-07-2025_01_16_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25356829, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25356830, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25356832, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25356833, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25356834, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25356835, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25356836, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25356837, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25356838, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25356839, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25356840, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25356841, 'pht': 3726}}" where mtr_portfolio_id = 25356726 and dashboard_run_id = 2018322 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`=25356726 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169472, 0.02502067535634038, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25356726_26-07-2025_01_16_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25356829, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25356830, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25356832, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25356833, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25356834, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25356835, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25356836, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25356837, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25356838, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25356839, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25356840, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25356841, '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 = 25357325 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': 3361316, 'mtr_portfolio_id': 25357325, 'created_at': datetime.datetime(2025, 7, 26, 1, 30, 58), 'result': '0.02750181159715733', 'result_long': None, 'result_double': None}] Qualite : 0.02750181159715733 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25357325 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25357325_26-07-2025_01_30_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25357325 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_P25357325_26-07-2025_01_30_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25357330, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25357331, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25357332, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25357333, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25357334, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25357335, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25357336, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25357337, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25357338, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25357339, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25357340, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25357341, 'pht': 3726}}" where mtr_portfolio_id = 25357325 and dashboard_run_id = 2018322 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`=25357325 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169473, 0.02750181159715733, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25357325_26-07-2025_01_30_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25357330, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25357331, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25357332, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25357333, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25357334, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25357335, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25357336, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25357337, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25357338, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25357339, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25357340, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25357341, '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 = 25357747 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': 3361409, 'mtr_portfolio_id': 25357747, 'created_at': datetime.datetime(2025, 7, 26, 1, 46, 58), 'result': '0.03484047156154063', 'result_long': None, 'result_double': None}] Qualite : 0.03484047156154063 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25357747 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25357747_26-07-2025_01_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25357747 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_P25357747_26-07-2025_01_46_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25357753, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25357754, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25357755, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25357756, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25357757, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25357758, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25357759, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25357760, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25357761, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25357762, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25357763, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25357764, 'pht': 3726}}" where mtr_portfolio_id = 25357747 and dashboard_run_id = 2018322 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`=25357747 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169474, 0.03484047156154063, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25357747_26-07-2025_01_46_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25357753, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25357754, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25357755, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25357756, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25357757, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25357758, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25357759, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25357760, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25357761, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25357762, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25357763, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25357764, '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 = 25358202 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': 3361531, 'mtr_portfolio_id': 25358202, 'created_at': datetime.datetime(2025, 7, 26, 2, 0, 57), 'result': '0.021311767897973788', 'result_long': None, 'result_double': None}] Qualite : 0.021311767897973788 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25358202 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25358202_26-07-2025_02_00_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25358202 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_P25358202_26-07-2025_02_00_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25358215, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25358216, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25358217, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25358218, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25358219, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25358220, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25358221, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25358222, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25358223, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25358224, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25358225, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25358226, 'pht': 3726}}" where mtr_portfolio_id = 25358202 and dashboard_run_id = 2018322 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`=25358202 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169475, 0.021311767897973788, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25358202_26-07-2025_02_00_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25358215, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25358216, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25358217, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25358218, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25358219, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25358220, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25358221, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25358222, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25358223, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25358224, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25358225, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25358226, '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 = 25358712 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': 3361638, 'mtr_portfolio_id': 25358712, 'created_at': datetime.datetime(2025, 7, 26, 2, 16, 57), 'result': '0.04786645152349526', 'result_long': None, 'result_double': None}] Qualite : 0.04786645152349526 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25358712 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25358712_26-07-2025_02_16_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25358712 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_P25358712_26-07-2025_02_16_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25358728, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25358729, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25358730, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25358731, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25358732, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25358733, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25358734, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25358735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25358736, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25358737, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25358738, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25358739, 'pht': 3726}}" where mtr_portfolio_id = 25358712 and dashboard_run_id = 2018322 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`=25358712 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169476, 0.04786645152349526, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25358712_26-07-2025_02_16_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25358728, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25358729, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25358730, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25358731, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25358732, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25358733, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25358734, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25358735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25358736, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25358737, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25358738, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25358739, '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 = 25359335 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': 3361752, 'mtr_portfolio_id': 25359335, 'created_at': datetime.datetime(2025, 7, 26, 2, 30, 58), 'result': '0.0265633758083267', 'result_long': None, 'result_double': None}] Qualite : 0.0265633758083267 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25359335 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25359335_26-07-2025_02_30_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25359335 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_P25359335_26-07-2025_02_30_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25359354, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25359355, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25359356, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25359357, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25359358, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25359359, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25359360, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25359361, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25359362, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25359363, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25359364, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25359365, 'pht': 3726}}" where mtr_portfolio_id = 25359335 and dashboard_run_id = 2018322 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`=25359335 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169477, 0.0265633758083267, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25359335_26-07-2025_02_30_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25359354, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25359355, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25359356, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25359357, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25359358, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25359359, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25359360, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25359361, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25359362, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25359363, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25359364, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25359365, '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 = 25359733 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': 3361828, 'mtr_portfolio_id': 25359733, 'created_at': datetime.datetime(2025, 7, 26, 2, 46, 58), 'result': '0.037232871340269216', 'result_long': None, 'result_double': None}] Qualite : 0.037232871340269216 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25359733 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25359733_26-07-2025_02_46_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25359733 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_P25359733_26-07-2025_02_46_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25359737, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25359738, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25359739, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25359740, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25359741, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25359742, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25359743, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25359744, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25359745, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25359746, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25359747, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25359748, 'pht': 3726}}" where mtr_portfolio_id = 25359733 and dashboard_run_id = 2018322 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`=25359733 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169478, 0.037232871340269216, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25359733_26-07-2025_02_46_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25359737, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25359738, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25359739, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25359740, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25359741, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25359742, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25359743, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25359744, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25359745, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25359746, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25359747, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25359748, '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 = 25360112 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': 3361902, 'mtr_portfolio_id': 25360112, 'created_at': datetime.datetime(2025, 7, 26, 3, 0, 56), 'result': '0.04767642330542805', 'result_long': None, 'result_double': None}] Qualite : 0.04767642330542805 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25360112 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25360112_26-07-2025_03_00_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25360112 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_P25360112_26-07-2025_03_00_57.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25360161, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25360162, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25360163, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25360164, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25360165, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25360166, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25360167, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25360168, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25360169, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25360170, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25360171, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25360172, 'pht': 3726}}" where mtr_portfolio_id = 25360112 and dashboard_run_id = 2018322 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`=25360112 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169479, 0.04767642330542805, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25360112_26-07-2025_03_00_57.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25360161, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25360162, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25360163, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25360164, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25360165, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25360166, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25360167, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25360168, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25360169, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25360170, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25360171, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25360172, '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 = 25360473 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': 3362005, 'mtr_portfolio_id': 25360473, 'created_at': datetime.datetime(2025, 7, 26, 3, 16, 30), 'result': '0.0659289065652644', 'result_long': None, 'result_double': None}] Qualite : 0.0659289065652644 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25360473 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25360473_26-07-2025_03_16_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25360473 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_P25360473_26-07-2025_03_16_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25360474, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25360475, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25360476, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25360477, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25360478, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25360479, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25360480, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25360481, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25360482, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25360483, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25360484, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25360485, 'pht': 3726}}" where mtr_portfolio_id = 25360473 and dashboard_run_id = 2018322 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`=25360473 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169480, 0.0659289065652644, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25360473_26-07-2025_03_16_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25360474, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25360475, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25360476, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25360477, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25360478, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25360479, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25360480, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25360481, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25360482, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25360483, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25360484, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25360485, '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 = 25361118 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': 3362110, 'mtr_portfolio_id': 25361118, 'created_at': datetime.datetime(2025, 7, 26, 3, 30, 58), 'result': '0.018704900255951878', 'result_long': None, 'result_double': None}] Qualite : 0.018704900255951878 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25361118 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25361118_26-07-2025_03_30_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25361118 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_P25361118_26-07-2025_03_30_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25361119, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25361120, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25361121, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25361122, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25361123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25361124, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25361125, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25361126, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25361127, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25361128, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25361129, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25361130, 'pht': 3726}}" where mtr_portfolio_id = 25361118 and dashboard_run_id = 2018322 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`=25361118 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169481, 0.018704900255951878, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25361118_26-07-2025_03_30_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25361119, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25361120, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25361121, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25361122, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25361123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25361124, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25361125, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25361126, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25361127, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25361128, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25361129, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25361130, '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 = 25361494 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': 3362181, 'mtr_portfolio_id': 25361494, 'created_at': datetime.datetime(2025, 7, 26, 3, 46, 59), 'result': '0.20598258545813505', 'result_long': None, 'result_double': None}] Qualite : 0.20598258545813505 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25361494 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25361494_26-07-2025_03_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25361494 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_P25361494_26-07-2025_03_46_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25361500, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25361501, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25361502, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25361503, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25361504, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25361505, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25361506, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25361507, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25361508, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25361509, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25361510, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25361511, 'pht': 3726}}" where mtr_portfolio_id = 25361494 and dashboard_run_id = 2018322 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`=25361494 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169483, 0.20598258545813505, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25361494_26-07-2025_03_46_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25361500, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25361501, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25361502, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25361503, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25361504, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25361505, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25361506, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25361507, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25361508, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25361509, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25361510, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25361511, '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 = 25361824 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': 3362265, 'mtr_portfolio_id': 25361824, 'created_at': datetime.datetime(2025, 7, 26, 4, 0, 59), 'result': '0.05383170731202942', 'result_long': None, 'result_double': None}] Qualite : 0.05383170731202942 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25361824 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25361824_26-07-2025_04_01_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25361824 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_P25361824_26-07-2025_04_01_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25361861, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25361862, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25361863, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25361864, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25361865, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25361866, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25361867, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25361868, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25361869, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25361870, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25361871, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25361872, 'pht': 3726}}" where mtr_portfolio_id = 25361824 and dashboard_run_id = 2018322 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`=25361824 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169484, 0.05383170731202942, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25361824_26-07-2025_04_01_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25361861, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25361862, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25361863, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25361864, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25361865, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25361866, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25361867, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25361868, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25361869, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25361870, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25361871, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25361872, '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 = 25362209 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': 3362373, 'mtr_portfolio_id': 25362209, 'created_at': datetime.datetime(2025, 7, 26, 4, 17), 'result': '0.032312357123223875', 'result_long': None, 'result_double': None}] Qualite : 0.032312357123223875 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25362209 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25362209_26-07-2025_04_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25362209 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_P25362209_26-07-2025_04_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25362215, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25362216, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25362217, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25362218, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25362219, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25362220, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25362221, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25362222, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25362223, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25362224, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25362225, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25362226, 'pht': 3726}}" where mtr_portfolio_id = 25362209 and dashboard_run_id = 2018322 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`=25362209 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169485, 0.032312357123223875, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25362209_26-07-2025_04_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25362215, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25362216, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25362217, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25362218, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25362219, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25362220, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25362221, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25362222, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25362223, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25362224, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25362225, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25362226, '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 = 25362747 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': 3362469, 'mtr_portfolio_id': 25362747, 'created_at': datetime.datetime(2025, 7, 26, 4, 31), 'result': '0.085164918807342', 'result_long': None, 'result_double': None}] Qualite : 0.085164918807342 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25362747 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25362747_26-07-2025_04_31_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25362747 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_P25362747_26-07-2025_04_31_02.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25362751, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25362752, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25362753, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25362754, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25362755, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25362756, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25362757, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25362758, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25362759, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25362760, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25362761, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25362762, 'pht': 3726}}" where mtr_portfolio_id = 25362747 and dashboard_run_id = 2018322 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`=25362747 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169486, 0.085164918807342, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25362747_26-07-2025_04_31_02.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25362751, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25362752, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25362753, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25362754, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25362755, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25362756, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25362757, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25362758, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25362759, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25362760, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25362761, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25362762, '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 = 25363150 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': 3362564, 'mtr_portfolio_id': 25363150, 'created_at': datetime.datetime(2025, 7, 26, 4, 46, 58), 'result': '0.12042797009369928', 'result_long': None, 'result_double': None}] Qualite : 0.12042797009369928 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25363150 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25363150_26-07-2025_04_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25363150 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_P25363150_26-07-2025_04_47_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25363152, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25363153, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25363154, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25363155, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25363156, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25363157, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25363158, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25363159, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25363160, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25363161, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25363162, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25363163, 'pht': 3726}}" where mtr_portfolio_id = 25363150 and dashboard_run_id = 2018322 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`=25363150 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169487, 0.12042797009369928, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25363150_26-07-2025_04_47_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25363152, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25363153, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25363154, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25363155, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25363156, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25363157, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25363158, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25363159, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25363160, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25363161, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25363162, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25363163, '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 = 25363554 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': 3362666, 'mtr_portfolio_id': 25363554, 'created_at': datetime.datetime(2025, 7, 26, 5, 0, 59), 'result': '0.20614438704415652', 'result_long': None, 'result_double': None}] Qualite : 0.20614438704415652 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25363554 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25363554_26-07-2025_05_00_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25363554 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_P25363554_26-07-2025_05_00_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25363566, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25363567, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25363568, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25363569, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25363570, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25363571, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25363572, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25363573, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25363574, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25363575, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25363576, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25363577, 'pht': 3726}}" where mtr_portfolio_id = 25363554 and dashboard_run_id = 2018322 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`=25363554 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13169488, 0.20614438704415652, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25363554_26-07-2025_05_00_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25363566, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25363567, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25363568, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25363569, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25363570, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25363571, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25363572, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25363573, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25363574, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25363575, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25363576, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25363577, '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 (25355301,25355557,25356024,25356383,25356726,25357325,25357747,25358202,25358712,25359335,25359733,25360112,25360473,25361118,25361494,25361824,25362209,25362747,25363150,25363554) result : ((1373845745,), (1373845819,), (1373845822,), (1373845825,), (1373845827,), (1373845829,), (1373845831,), (1373845846,), (1373845847,), (1373845848,), (1373845849,), (1373845851,), (1373845854,), (1373846223,), (1373846311,), (1373846347,), (1373846349,), (1373846351,), (1373846355,), (1373846549,), (1373846554,), (1373846559,), (1373846563,), (1373846566,), (1373846569,), (1373846583,), (1373846590,), (1373846592,), (1373846594,), (1373846597,), (1373846599,), (1373846620,), (1373846621,), (1373846622,), (1373846623,), (1373846626,), (1373846628,), (1373846654,), (1373846657,), (1373846658,), (1373846661,), (1373846664,), (1373846666,), (1373846678,), (1373846701,), (1373846704,), (1373846706,), (1373846707,), (1373846711,), (1373846715,), (1373846725,), (1373846727,), (1373846729,), (1373846745,), (1373846754,), (1373846756,), (1373846778,), (1373846790,), (1373846792,), (1373846793,), (1373846794,), (1373846795,), (1373846798,), (1373846812,), (1373846813,), (1373846816,), (1373846819,), (1373846822,), (1373846826,), (1373846860,), (1373847030,), (1373847120,), (1373847206,), (1373847230,), (1373847256,), (1373847284,), (1373847494,), (1373847497,), (1373847498,), (1373847499,), (1373847509,), (1373847533,), (1373847566,), (1373847569,), (1373847570,), (1373847594,), (1373847621,), (1373847647,), (1373847755,), (1373847763,), (1373847767,), (1373847783,), (1373847790,), (1373847794,), (1373847895,), (1373847898,), (1373847901,), (1373847902,), (1373847904,), (1373847907,), (1373847916,), (1373847918,), (1373847920,), (1373847921,), (1373847924,), (1373847928,), (1373847951,), (1373848125,), (1373848153,), (1373848181,), (1373848206,), (1373848232,), (1373848260,), (1373848406,), (1373848411,), (1373848412,), (1373848413,), (1373848415,), (1373848417,), (1373848430,), (1373848431,), (1373848433,), (1373848435,), (1373848438,), (1373848440,), (1373848453,), (1373848471,), (1373848488,), (1373848497,), (1373848500,), (1373848502,), (1373848579,), (1373848724,), (1373848778,), (1373848780,), (1373848782,), (1373848784,), (1373848785,), (1373848789,), (1373848802,), (1373848805,), (1373848821,), (1373848832,), (1373848835,), (1373848839,), (1373852523,), (1373848849,), (1373848851,), (1373848853,), (1373848854,), (1373848856,), (1373848859,), (1373848879,), (1373848919,), (1373848921,), (1373848922,), (1373848923,), (1373848924,), (1373848926,), (1373848940,), (1373848941,), (1373848946,), (1373848964,), (1373848968,), (1373849000,), (1373849293,), (1373849318,), (1373849341,), (1373849362,), (1373849387,), (1373849419,), (1373849617,), (1373849620,), (1373849623,), (1373849644,), (1373849655,), (1373849658,), (1373849757,), (1373849784,), (1373849813,), (1373849837,), (1373849866,), (1373849893,), (1373850009,), (1373850012,), (1373850014,), (1373850016,), (1373850018,), (1373850020,), (1373850036,), (1373850037,), (1373850039,), (1373850041,), (1373850042,), (1373850045,), (1373850140,), (1373850164,), (1373850189,), (1373850234,), (1373850265,), (1373850294,), (1373850398,), (1373850429,), (1373850432,), (1373850454,), (1373850458,), (1373850460,), (1373850462,), (1373850474,), (1373850477,), (1373850499,), (1373850506,), (1373850508,), (1373850510,), (1373850524,), (1373850528,), (1373850551,), (1373850554,), (1373850558,), (1373850560,), (1373850574,), (1373850578,), (1373850581,), (1373850582,), (1373850583,), (1373850585,), (1373850599,), (1373850601,), (1373850620,), (1373850623,), (1373850626,), (1373850629,), (1373850652,), (1373850667,), (1373850668,), (1373850670,), (1373850672,), (1373850674,), (1373850676,), (1373850694,), (1373850711,), (1373850713,), (1373850716,), (1373850718,), (1373850720,), (1373850722,), (1373850735,), (1373850755,), (1373850762,), (1373850764,), (1373850766,), (1373850769,), (1373850772,), (1373850789,), (1373850791,), (1373850793,), (1373850795,), (1373850797,), (1373850799,), (1373850810,), (1373850813,), (1373850814,), (1373850817,), (1373850820,), (1373850822,), (1373850829,), (1373850831,), (1373850833,), (1373850835,), (1373850839,), (1373850842,), (1373850848,), (1373850851,), (1373850855,), (1373850858,), (1373850861,), (1373850865,), (1373850873,), (1373850875,), (1373850877,), (1373850880,), (1373850882,), (1373850887,), (1373850984,), (1373851039,), (1373851086,), (1373851132,), (1373851188,), (1373851236,), (1373852292,), (1373852512,), (1373852514,), (1373852516,), (1373852518,), (1373852520,), (1373852546,), (1373852573,), (1373852595,), (1373852597,), (1373852600,), (1373852603,), (1373852605,), (1373852608,), (1373852621,), (1373852622,), (1373852623,), (1373852625,), (1373852627,), (1373852629,), (1373852652,), (1373852655,), (1373852657,), (1373852660,), (1373852663,), (1373852666,), (1373852684,), (1373852686,), (1373852688,), (1373852689,), (1373852692,), (1373852696,), (1373852711,), (1373852717,), (1373852723,), (1373852730,), (1373852732,), (1373852735,), (1373852751,), (1373852759,), (1373852766,), (1373852768,), (1373852769,), (1373852771,), (1373852783,), (1373852789,), (1373852795,), (1373852796,), (1373852797,), (1373852799,), (1373852816,), (1373852859,), (1373852867,), (1373852876,), (1373852878,), (1373852881,), (1373852883,), (1373852894,), (1373852913,), (1373852935,), (1373852974,), (1373852976,), (1373852978,), (1373852992,), (1373853002,), (1373853005,), (1373853034,), (1373853035,), (1373853036,), (1373853037,), (1373853039,), (1373853042,), (1373853066,), (1373853076,), (1373853078,), (1373853080,), (1373853081,), (1373853085,), (1373853107,), (1373853117,), (1373853120,), (1373853122,), (1373853126,), (1373853128,), (1373853141,), (1373853143,), (1373853145,), (1373853147,), (1373853149,), (1373853151,), (1373853163,), (1373853198,), (1373853204,), (1373853212,), (1373853219,), (1373853222,), (1373853225,), (1373853246,), (1373853271,), (1373853273,), (1373853275,), (1373853285,), (1373853294,), (1373853297,), (1373853311,), (1373853315,), (1373853316,), (1373853319,), (1373853323,), (1373853326,), (1373853334,), (1373853335,), (1373853336,), (1373853337,), (1373853338,), (1373853340,), (1373853364,), (1373853365,), (1373853366,), (1373853368,), (1373853370,), (1373853373,), (1373853383,), (1373853388,), (1373853395,), (1373853403,), (1373853405,), (1373853408,), (1373853416,), (1373853418,), (1373853421,), (1373853424,), (1373853425,), (1373853429,), (1373853445,), (1373853454,), (1373853463,), (1373853464,), (1373853466,), (1373853468,), (1373853488,), (1373853491,), (1373853494,), (1373853495,), (1373853497,), (1373853500,), (1373853525,), (1373853555,), (1373853563,), (1373853565,), (1373853567,), (1373853569,), (1373853572,), (1373853590,), (1373853594,), (1373853604,), (1373853612,), (1373853613,), (1373853617,), (1373853628,), (1373853638,), (1373853647,), (1373853649,), (1373853650,), (1373853653,), (1373853666,), (1373853677,), (1373853682,), (1373853684,), (1373853686,), (1373853690,), (1373853718,), (1373853719,), (1373853720,), (1373853721,), (1373853723,), (1373853726,), (1373853748,), (1373853751,), (1373853753,), (1373853754,), (1373853756,), (1373853758,), (1373853769,), (1373853771,), (1373853772,), (1373853773,), (1373853776,), (1373853780,), (1373853798,), (1373853800,), (1373853802,), (1373853807,), (1373853809,), (1373853812,), (1373853831,), (1373853878,), (1373853879,), (1373853882,), (1373853885,), (1373853887,), (1373853891,), (1373853901,), (1373853902,), (1373853903,), (1373853904,), (1373853905,), (1373853907,), (1373853934,), (1373853936,), (1373853938,), (1373853940,), (1373853941,), (1373853944,), (1373853972,), (1373853974,), (1373853976,), (1373853978,), (1373853979,), (1373853981,), (1373853997,), (1373853999,), (1373854001,), (1373854002,), (1373854004,), (1373854010,), (1373854033,), (1373854035,), (1373854037,), (1373854039,), (1373854041,), (1373854043,), (1373854057,), (1373854059,), (1373854061,), (1373854063,), (1373854065,), (1373854068,), (1373854080,), (1373854082,), (1373854084,), (1373854085,), (1373854087,), (1373854090,), (1373854106,), (1373854108,), (1373854109,), (1373854110,), (1373854112,), (1373854114,), (1373854138,), (1373854150,), (1373854157,), (1373854165,), (1373854166,), (1373854168,), (1373854171,), (1373854276,), (1373854300,), (1373854328,), (1373854350,), (1373854374,), (1373854398,), (1373854649,), (1373854673,), (1373854696,), (1373854726,), (1373854749,), (1373854774,), (1373854846,), (1373854847,), (1373854848,), (1373854863,), (1373854884,), (1373854908,), (1373855094,), (1373855103,), (1373855115,), (1373855120,), (1373855123,), (1373855126,), (1373855144,), (1373855167,), (1373855171,), (1373855173,), (1373855176,), (1373855178,), (1373855181,), (1373855413,), (1373855425,), (1373855428,), (1373855429,), (1373855432,), (1373855436,), (1373855456,), (1373855458,), (1373855464,), (1373855470,), (1373855472,), (1373855474,), (1373855494,), (1373855518,), (1373855545,), (1373855568,), (1373855574,), (1373855576,), (1373855578,), (1373855588,), (1373855618,), (1373855795,), (1373855821,), (1373855827,), (1373855851,), (1373855866,), (1373855872,), (1373855884,), (1373855887,), (1373855890,), (1373855893,), (1373855894,), (1373855898,), (1373855925,), (1373855934,), (1373855936,), (1373855938,), (1373855940,), (1373855944,), (1373855968,), (1373855988,), (1373855995,), (1373855997,), (1373856000,), (1373856003,), (1373856006,), (1373856021,), (1373856043,), (1373856044,), (1373856046,), (1373856048,), (1373856051,), (1373856053,), (1373856065,), (1373856092,), (1373856115,), (1373856136,), (1373856161,), (1373856186,), (1373856446,), (1373856480,), (1373856503,), (1373856529,), (1373856554,), (1373856584,), (1373856704,), (1373856726,), (1373856748,), (1373856765,), (1373856768,), (1373856784,), (1373856856,), (1373856858,), (1373856867,), (1373856868,), (1373856874,), (1373856876,), (1373856887,), (1373856888,), (1373856890,), (1373856893,), (1373856896,), (1373856899,), (1373856912,), (1373856918,), (1373856920,), (1373856922,), (1373856926,), (1373856930,), (1373856943,), (1373856947,), (1373856949,), (1373856951,), (1373856954,), (1373856957,), (1373856977,), (1373856981,), (1373856984,), (1373856985,), (1373856987,), (1373856989,), (1373857000,), (1373857001,), (1373857003,), (1373857005,), (1373857008,), (1373857011,), (1373857029,), (1373857048,), (1373857050,), (1373857052,), (1373857054,), (1373857057,), (1373857059,), (1373857075,), (1373857076,), (1373857078,), (1373857080,), (1373857082,), (1373857086,), (1373857099,), (1373857123,), (1373857126,), (1373857127,), (1373857128,), (1373857130,), (1373857132,), (1373857149,), (1373857150,), (1373857151,), (1373857152,), (1373857153,), (1373857155,), (1373857166,), (1373857167,), (1373857169,), (1373857171,), (1373857174,), (1373857178,), (1373857192,), (1373857194,), (1373857197,), (1373857201,), (1373857204,), (1373857209,), (1373857228,), (1373857231,), (1373857234,), (1373857237,), (1373857241,), (1373857244,), (1373857266,), (1373857271,), (1373857272,), (1373857274,), (1373857276,), (1373857280,), (1373857298,), (1373857315,), (1373857317,), (1373857319,), (1373857321,), (1373857325,), (1373857327,), (1373857338,), (1373857340,), (1373857342,), (1373857344,), (1373857347,), (1373857351,), (1373857364,), (1373857374,), (1373857377,), (1373857379,), (1373857382,), (1373857384,), (1373857401,), (1373857410,), (1373857412,), (1373857414,), (1373857415,), (1373857419,), (1373857448,), (1373857450,), (1373857451,), (1373857453,), (1373857454,), (1373857456,), (1373857478,), (1373857488,), (1373857492,), (1373857494,), (1373857496,), (1373857498,), (1373857515,), (1373857518,), (1373857520,), (1373857521,), (1373857524,), (1373857527,), (1373857534,), (1373857535,), (1373857537,), (1373857539,), (1373857541,), (1373857546,), (1373857585,), (1373857636,), (1373857643,), (1373857645,), (1373857647,), (1373857649,), (1373857652,), (1373857662,), (1373857663,), (1373857664,), (1373857665,), (1373857666,), (1373857669,), (1373857686,), (1373857693,), (1373857695,), (1373857697,), (1373857698,), (1373857701,), (1373857722,), (1373857724,), (1373857725,), (1373857727,), (1373857728,), (1373857730,), (1373857741,), (1373857746,), (1373857749,), (1373857751,), (1373857752,), (1373857755,), (1373857796,), (1373857798,), (1373857800,), (1373857801,), (1373857804,), (1373857807,), (1373857818,), (1373857821,), (1373857824,), (1373857827,), (1373857830,), (1373857834,), (1373857846,), (1373857849,), (1373857850,), (1373857852,), (1373857855,), (1373857858,), (1373857878,), (1373857880,), (1373857884,), (1373857886,), (1373857889,), (1373857892,), (1373857936,), (1373857937,), (1373857938,), (1373857939,), (1373857941,), (1373857944,), (1373857993,), (1373858025,), (1373858034,), (1373858036,), (1373858038,), (1373858039,), (1373858042,), (1373858065,), (1373858068,), (1373858070,), (1373858072,), (1373858074,), (1373858076,), (1373858093,), (1373858094,), (1373858095,), (1373858096,), (1373858097,), (1373858101,), (1373858117,), (1373858118,), (1373858119,), (1373858120,), (1373858122,), (1373858126,), (1373858139,), (1373858140,), (1373858141,), (1373858142,), (1373858156,), (1373858184,), (1373858429,), (1373858456,), (1373858484,), (1373858510,), (1373858534,), (1373858559,), (1373859190,), (1373859427,), (1373859441,), (1373859456,), (1373859460,), (1373859463,), (1373859656,), (1373859995,), (1373860026,), (1373860055,), (1373860079,), (1373860104,), (1373860138,), (1373860263,), (1373860286,), (1373860310,), (1373860336,), (1373860357,), (1373860418,), (1373860559,), (1373860570,), (1373860579,), (1373860581,), (1373860583,), (1373860586,), (1373860608,), (1373860609,), (1373860611,), (1373860613,), (1373860615,), (1373860618,), (1373860632,), (1373860634,), (1373860642,), (1373860645,), (1373860647,), (1373860651,), (1373860668,), (1373860670,), (1373860673,), (1373860676,), (1373860678,), (1373860680,), (1373860692,), (1373860695,), (1373860697,), (1373860699,), (1373860702,), (1373860705,), (1373860723,), (1373860725,), (1373860728,), (1373860731,), (1373860734,), (1373860736,), (1373860822,), (1373860823,), (1373860834,), (1373860836,), (1373860849,), (1373860854,), (1373860951,), (1373860998,), (1373861002,), (1373861004,), (1373861006,), (1373861008,), (1373861012,), (1373861084,), (1373861090,), (1373861091,), (1373861092,), (1373861093,), (1373861095,), (1373861119,), (1373861143,), (1373861145,), (1373861147,), (1373861149,), (1373861152,), (1373861155,), (1373861176,), (1373861179,), (1373861181,), (1373861183,), (1373861185,), (1373861187,), (1373861200,), (1373861209,), (1373861212,), (1373861214,), (1373861215,), (1373861218,), (1373861233,), (1373861240,), (1373861248,), (1373861254,), (1373861256,), (1373861261,), (1373861270,), (1373861277,), (1373861288,), (1373861289,), (1373861290,), (1373861292,), (1373861339,), (1373861356,), (1373861363,), (1373861366,), (1373861367,), (1373861370,), (1373861372,), (1373861382,), (1373861383,), (1373861396,), (1373861404,), (1373861411,), (1373861414,), (1373861418,), (1373861436,), (1373861444,), (1373861446,), (1373861447,), (1373861450,), (1373861453,), (1373861463,), (1373861466,), (1373861469,), (1373861471,), (1373861473,), (1373861477,), (1373861486,), (1373861492,), (1373861500,), (1373861502,), (1373861504,), (1373861507,), (1373861527,), (1373861547,), (1373861549,), (1373861550,), (1373861551,), (1373861553,), (1373861555,), (1373861570,), (1373861571,), (1373861573,), (1373861575,), (1373861578,), (1373861580,), (1373861596,), (1373861598,), (1373861600,), (1373861602,), (1373861604,), (1373861607,), (1373861673,), (1373861674,), (1373861676,), (1373861678,), (1373861681,), (1373861685,), (1373861700,), (1373861716,), (1373861719,), (1373861721,), (1373861722,), (1373861724,), (1373861727,), (1373861743,), (1373861744,), (1373861745,), (1373861746,), (1373861747,), (1373861749,), (1373861765,), (1373861767,), (1373861770,), (1373861773,), (1373861776,), (1373861780,), (1373861800,), (1373861802,), (1373861804,), (1373861806,), (1373861808,), (1373861811,), (1373861832,), (1373861834,), (1373861837,), (1373861840,), (1373861843,), (1373861847,), (1373861873,), (1373861879,), (1373861882,), (1373861884,), (1373861887,), (1373861891,), (1373861937,), (1373861940,), (1373861946,), (1373861954,), (1373861964,), (1373861967,), (1373861980,), (1373861982,), (1373861989,), (1373862001,), (1373862007,), (1373862014,), (1373862055,), (1373862072,), (1373862077,), (1373862078,), (1373862079,), (1373862104,), (1373862107,), (1373862119,), (1373862121,), (1373862127,), (1373862133,), (1373862135,), (1373862138,), (1373862152,), (1373862153,), (1373862156,), (1373862165,), (1373862174,), (1373862185,), (1373862199,), (1373862203,), (1373862206,), (1373862210,), (1373862213,), (1373862215,), (1373862228,), (1373862229,), (1373862236,), (1373862245,), (1373862247,), (1373862258,), (1373862273,), (1373862279,), (1373862286,), (1373862288,), (1373862289,), (1373862293,), (1373862305,), (1373862308,), (1373862311,), (1373862313,), (1373862318,), (1373862321,), (1373862332,), (1373862335,), (1373862345,), (1373862347,), (1373862350,), (1373862354,), (1373862362,), (1373862364,), (1373862371,), (1373862374,), (1373862378,), (1373862382,), (1373862423,), (1373862435,), (1373862436,), (1373862443,), (1373862448,), (1373862450,), (1373862454,), (1373862492,), (1373862499,), (1373862501,), (1373862502,), (1373862505,), (1373862509,), (1373862582,), (1373862585,), (1373862589,), (1373862591,), (1373862592,), (1373862595,), (1373862617,), (1373862620,), (1373862622,), (1373862624,), (1373862626,), (1373862629,), (1373862640,), (1373862643,), (1373862645,), (1373862648,), (1373862651,), (1373862655,), (1373862668,), (1373862963,), (1373862991,), (1373863016,), (1373863042,), (1373863068,), (1373863095,), (1373863266,), (1373863292,), (1373863315,), (1373863338,), (1373863359,), (1373863383,), (1373863631,), (1373863646,), (1373863649,), (1373863652,), (1373863654,), (1373863657,), (1373863818,), (1373863847,), (1373863850,), (1373863851,), (1373863852,), (1373863853,), (1373863855,), (1373863879,), (1373863880,), (1373863881,), (1373863882,), (1373863884,), (1373863886,), (1373863909,), (1373863923,), (1373863952,), (1373863977,), (1373864001,), (1373864025,), (1373864252,), (1373864280,), (1373864305,), (1373864331,), (1373864355,), (1373864381,), (1373864481,), (1373864486,), (1373864510,), (1373864534,), (1373864556,), (1373864581,), (1373864719,), (1373864722,), (1373864746,), (1373864757,), (1373864759,), (1373864762,), (1373864782,), (1373864804,), (1373864806,), (1373864810,), (1373864814,), (1373864817,), (1373864822,), (1373864854,), (1373864871,), (1373864873,), (1373864875,), (1373864877,), (1373864879,), (1373864881,), (1373864902,), (1373864904,), (1373864906,), (1373864908,), (1373864911,), (1373864914,), (1373864936,), (1373864937,), (1373864939,), (1373864941,), (1373864942,), (1373864944,), (1373864968,), (1373864970,), (1373864971,), (1373864972,), (1373864974,), (1373864979,), (1373864996,), (1373864999,), (1373865001,), (1373865004,), (1373865008,), (1373865012,), (1373865027,), (1373865031,), (1373865049,), (1373865052,), (1373865056,), (1373865062,), (1373865082,), (1373865085,), (1373865088,), (1373865090,), (1373865093,), (1373865095,), (1373865110,), (1373865113,), (1373865115,), (1373865117,), (1373865119,), (1373865121,), (1373865146,), (1373865149,), (1373865152,), (1373865153,), (1373865154,), (1373865156,), (1373865184,), (1373865186,), (1373865187,), (1373865189,), (1373865191,), (1373865194,), (1373865232,), (1373865257,), (1373865261,), (1373865263,), (1373865265,), (1373865268,), (1373865271,), (1373865289,), (1373865296,), (1373865304,), (1373865306,), (1373865308,), (1373865311,), (1373865345,), (1373865365,), (1373865374,), (1373865384,), (1373865387,), (1373865390,), (1373865394,), (1373865407,), (1373865410,), (1373865412,), (1373865414,), (1373865415,), (1373865418,), (1373865447,), (1373865457,), (1373865464,), (1373865470,), (1373865472,), (1373865475,), (1373865498,), (1373865500,), (1373865502,), (1373865505,), (1373865508,), (1373865511,), (1373865528,), (1373865529,), (1373865532,), (1373865539,), (1373865547,), (1373865551,), (1373865581,), (1373865631,), (1373865633,), (1373865638,), (1373865640,), (1373865642,), (1373865645,), (1373865668,), (1373865671,), (1373865673,), (1373865675,), (1373865679,), (1373865683,), (1373865707,), (1373865709,), (1373865710,), (1373865711,), (1373865713,), (1373865716,), (1373865736,), (1373865738,), (1373865739,), (1373865740,), (1373865741,), (1373865745,), (1373865768,), (1373865772,), (1373865775,), (1373865777,), (1373865780,), (1373865783,), (1373865815,), (1373865816,), (1373865817,), (1373865818,), (1373865820,), (1373865823,), (1373865846,), (1373865849,), (1373865850,), (1373865854,), (1373865857,), (1373865858,), (1373865878,), (1373865879,), (1373865881,), (1373865895,), (1373865898,), (1373865902,), (1373865914,), (1373865917,), (1373865920,), (1373865933,), (1373865941,), (1373865944,), (1373865971,), (1373865993,), (1373865996,), (1373866005,), (1373866015,), (1373866025,), (1373866028,), (1373866046,), (1373866047,), (1373866049,), (1373866051,), (1373866065,), (1373866076,), (1373866095,), (1373866097,), (1373866103,), (1373866114,), (1373866124,), (1373866128,), (1373866141,), (1373866144,), (1373866148,), (1373866150,), (1373866154,), (1373866157,), (1373866178,), (1373866181,), (1373866189,), (1373866198,), (1373866206,), (1373866209,), (1373866227,), (1373866229,), (1373866231,), (1373866232,), (1373866233,), (1373866235,), (1373866261,), (1373866263,), (1373866266,), (1373866268,), (1373866271,), (1373866274,), (1373866294,), (1373866296,), (1373866297,), (1373866298,), (1373866300,), (1373866301,), (1373866316,), (1373866319,), (1373866323,), (1373866334,), (1373866345,), (1373866353,), (1373866377,), (1373866380,), (1373866383,), (1373866398,), (1373866413,), (1373866416,), (1373866433,), (1373866481,), (1373866484,), (1373866485,), (1373866486,), (1373866487,), (1373866489,), (1373866513,), (1373866516,), (1373866519,), (1373866521,), (1373866523,), (1373866525,), (1373866539,), (1373866558,), (1373866561,), (1373866562,), (1373866564,), (1373866567,), (1373866570,), (1373866588,), (1373866590,), (1373866592,), (1373866608,), (1373866628,), (1373866653,), (1373866895,), (1373866933,), (1373866981,), (1373867025,), (1373867064,), (1373867090,), (1373867605,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'26072025': {'nb_upload': 69, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25363554]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1373867605] map_info['map_portfolio_photo'] : {25363554: [1373867605, 1373867090, 1373867064, 1373867025, 1373866981, 1373866933, 1373866895, 1373866653, 1373866628, 1373866608, 1373866592, 1373866590, 1373866588, 1373866570, 1373866567, 1373866564, 1373866562, 1373866561, 1373866558, 1373866539, 1373866525, 1373866523, 1373866521, 1373866519, 1373866516, 1373866513, 1373866489, 1373866487, 1373866486, 1373866485, 1373866484, 1373866481, 1373866433, 1373866416, 1373866413, 1373866398, 1373866383, 1373866380, 1373866377, 1373866353, 1373866345, 1373866334, 1373866323, 1373866319, 1373866316, 1373866301, 1373866300, 1373866298, 1373866297, 1373866296, 1373866294, 1373866274, 1373866271, 1373866268, 1373866266, 1373866263, 1373866261, 1373866235, 1373866233, 1373866232, 1373866231, 1373866229, 1373866227, 1373866209, 1373866206, 1373866198, 1373866189, 1373866181, 1373866178]} final : True mtd_id 4302 list_pids : [1373867605] Looping around the photos to save general results len do output : 1 /25363554Didn'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, '3362666') ('4302', '25363554', '1373867605', None, None, None, None, None, '3362666') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 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, '25363554', 'None', None, None, None, None, '3362666'), ('4302', '25363554', '1373867605', None, None, None, None, None, '3362666')] time used for this insertion : 0.015060186386108398 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.7771403789520264 time spend to save output : 0.015257120132446289 total time spend for step 5 : 1.7923974990844727 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 (3362666) 1.99user 2.28system 0:10.87elapsed 39%CPU (0avgtext+0avgdata 157156maxresident)k 592inputs+9000outputs (3major+62162minor)pagefaults 0swaps