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 : 1248568 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 (4021263) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4021263) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28345019 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4021263'] with mtr_portfolio_ids : ['28345019'] and first list_photo_ids : [] new path : /proc/1248568/ Name: python3 Umask: 0002 State: R (running) Tgid: 1248568 Ngid: 0 Pid: 1248568 PPid: 1248567 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1248568 NSpid: 1248568 NSpgid: 1246978 NSsid: 1246978 VmPeak: 1106908 kB VmSize: 1106884 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98832 kB VmRSS: 98832 kB RssAnon: 59908 kB RssFile: 38924 kB RssShmem: 0 kB VmData: 865636 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 600 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 40 nonvoluntary_ctxt_switches: 154 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1248568', 'Ngid': '0', 'Pid': '1248568', 'PPid': '1248567', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1248568', 'NSpid': '1248568', 'NSpgid': '1246978', 'NSsid': '1246978', 'VmPeak': '1106908 kB', 'VmSize': '1106884 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98832 kB', 'VmRSS': '98832 kB', 'RssAnon': '59908 kB', 'RssFile': '38924 kB', 'RssShmem': '0 kB', 'VmData': '865636 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '600 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '40', 'nonvoluntary_ctxt_switches': '154'} ('datou_batch_current', '1248568', '1106908', '0', '1106884', '865636', '98832', b'', 'marlene', '4021263') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (28345019) 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 (4021263 ) ) 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 (28345019) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1393343164, 'portfolio_id': 28345019}, {'photo_id': 1393343160, 'portfolio_id': 28345019}, {'photo_id': 1393343045, 'portfolio_id': 28345019}, {'photo_id': 1393343043, 'portfolio_id': 28345019}, {'photo_id': 1393343041, 'portfolio_id': 28345019}, {'photo_id': 1393342933, 'portfolio_id': 28345019}, {'photo_id': 1393342899, 'portfolio_id': 28345019}, {'photo_id': 1393342864, 'portfolio_id': 28345019}, {'photo_id': 1393342828, 'portfolio_id': 28345019}, {'photo_id': 1393342760, 'portfolio_id': 28345019}, {'photo_id': 1393342756, 'portfolio_id': 28345019}, {'photo_id': 1393342752, 'portfolio_id': 28345019}, {'photo_id': 1393342749, 'portfolio_id': 28345019}, {'photo_id': 1393342746, 'portfolio_id': 28345019}, {'photo_id': 1393342215, 'portfolio_id': 28345019}, {'photo_id': 1393342212, 'portfolio_id': 28345019}, {'photo_id': 1393342209, 'portfolio_id': 28345019}, {'photo_id': 1393342207, 'portfolio_id': 28345019}, {'photo_id': 1393342205, 'portfolio_id': 28345019}, {'photo_id': 1393342168, 'portfolio_id': 28345019}, {'photo_id': 1393342166, 'portfolio_id': 28345019}, {'photo_id': 1393342116, 'portfolio_id': 28345019}, {'photo_id': 1393342114, 'portfolio_id': 28345019}, {'photo_id': 1393342113, 'portfolio_id': 28345019}, {'photo_id': 1393342112, 'portfolio_id': 28345019}, {'photo_id': 1393342098, 'portfolio_id': 28345019}, {'photo_id': 1393342096, 'portfolio_id': 28345019}, {'photo_id': 1393342091, 'portfolio_id': 28345019}, {'photo_id': 1393342086, 'portfolio_id': 28345019}, {'photo_id': 1393342080, 'portfolio_id': 28345019}, {'photo_id': 1393342057, 'portfolio_id': 28345019}, {'photo_id': 1393342056, 'portfolio_id': 28345019}, {'photo_id': 1393342055, 'portfolio_id': 28345019}, {'photo_id': 1393342023, 'portfolio_id': 28345019}, {'photo_id': 1393342014, 'portfolio_id': 28345019}, {'photo_id': 1393342004, 'portfolio_id': 28345019}, {'photo_id': 1393341943, 'portfolio_id': 28345019}, {'photo_id': 1393341940, 'portfolio_id': 28345019}, {'photo_id': 1393341938, 'portfolio_id': 28345019}, {'photo_id': 1393341916, 'portfolio_id': 28345019}, {'photo_id': 1393341913, 'portfolio_id': 28345019}, {'photo_id': 1393341911, 'portfolio_id': 28345019}, {'photo_id': 1393341910, 'portfolio_id': 28345019}, {'photo_id': 1393341909, 'portfolio_id': 28345019}, {'photo_id': 1393341860, 'portfolio_id': 28345019}, {'photo_id': 1393341857, 'portfolio_id': 28345019}, {'photo_id': 1393341853, 'portfolio_id': 28345019}, {'photo_id': 1393341850, 'portfolio_id': 28345019}, {'photo_id': 1393341831, 'portfolio_id': 28345019}, {'photo_id': 1393341828, 'portfolio_id': 28345019}, {'photo_id': 1393341825, 'portfolio_id': 28345019}, {'photo_id': 1393341824, 'portfolio_id': 28345019}, {'photo_id': 1393341822, 'portfolio_id': 28345019}, {'photo_id': 1393341796, 'portfolio_id': 28345019}, {'photo_id': 1393341794, 'portfolio_id': 28345019}, {'photo_id': 1393341755, 'portfolio_id': 28345019}, {'photo_id': 1393341751, 'portfolio_id': 28345019}, {'photo_id': 1393341743, 'portfolio_id': 28345019}, {'photo_id': 1393341706, 'portfolio_id': 28345019}, {'photo_id': 1393341704, 'portfolio_id': 28345019}, {'photo_id': 1393341703, 'portfolio_id': 28345019}, {'photo_id': 1393341702, 'portfolio_id': 28345019}] map_portfolio_id_photo_id: {28345019: [1393343164, 1393343160, 1393343045, 1393343043, 1393343041, 1393342933, 1393342899, 1393342864, 1393342828, 1393342760, 1393342756, 1393342752, 1393342749, 1393342746, 1393342215, 1393342212, 1393342209, 1393342207, 1393342205, 1393342168, 1393342166, 1393342116, 1393342114, 1393342113, 1393342112, 1393342098, 1393342096, 1393342091, 1393342086, 1393342080, 1393342057, 1393342056, 1393342055, 1393342023, 1393342014, 1393342004, 1393341943, 1393341940, 1393341938, 1393341916, 1393341913, 1393341911, 1393341910, 1393341909, 1393341860, 1393341857, 1393341853, 1393341850, 1393341831, 1393341828, 1393341825, 1393341824, 1393341822, 1393341796, 1393341794, 1393341755, 1393341751, 1393341743, 1393341706, 1393341704, 1393341703, 1393341702]} ##### 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.017130613327026367 #### 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 Nov 8 04:04:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28345019) 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 : 28345019 get user id for portfolio 28345019 get sub ptf for main ptf 28345019, type 3726 and hashtags ['papier', 'environnement', 'metal', 'flou', 'cartonnette', 'kraft', 'Carton_brun', 'plastique', 'Teint_Dans_La_Masse', 'mal_croppe', 'autre_refus', 'Carton_gris'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=28345019 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','environnement','metal','flou','cartonnette','kraft','Carton_brun','plastique','Teint_Dans_La_Masse','mal_croppe','autre_refus','Carton_gris')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=28345019 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','environnement','metal','flou','cartonnette','kraft','Carton_brun','plastique','Teint_Dans_La_Masse','mal_croppe','autre_refus','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 28345019, 'sub_port_id': 28345044, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190740, 'last_updated_at': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 27)}, 'autre_refus': {'main_port_id': 28345019, 'sub_port_id': 28345045, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190741, 'last_updated_at': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 27)}, 'Carton_brun': {'main_port_id': 28345019, 'sub_port_id': 28345046, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190742, 'last_updated_at': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 27)}, 'metal': {'main_port_id': 28345019, 'sub_port_id': 28345047, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190743, 'last_updated_at': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 27)}, 'papier': {'main_port_id': 28345019, 'sub_port_id': 28345048, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190744, 'last_updated_at': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 27)}, 'kraft': {'main_port_id': 28345019, 'sub_port_id': 28345049, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190745, 'last_updated_at': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 27)}, 'Carton_gris': {'main_port_id': 28345019, 'sub_port_id': 28345050, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190746, 'last_updated_at': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 28345019, 'sub_port_id': 28345051, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190747, 'last_updated_at': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 27)}, 'flou': {'main_port_id': 28345019, 'sub_port_id': 28345052, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190748, 'last_updated_at': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 27)}, 'cartonnette': {'main_port_id': 28345019, 'sub_port_id': 28345053, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190749, 'last_updated_at': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 27)}, 'mal_croppe': {'main_port_id': 28345019, 'sub_port_id': 28345054, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190750, 'last_updated_at': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 27)}, 'plastique': {'main_port_id': 28345019, 'sub_port_id': 28345055, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190751, 'last_updated_at': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28345044 , 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=28345019 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 (28345044) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28345019) result : ((1393341702,), (1393341703,), (1393341704,), (1393341706,), (1393341743,), (1393341751,), (1393341755,), (1393341794,), (1393341796,), (1393341822,), (1393341824,), (1393341825,), (1393341828,), (1393341831,), (1393341850,), (1393341853,), (1393341857,), (1393341860,), (1393341909,), (1393341910,), (1393341911,), (1393341913,), (1393341916,), (1393341938,), (1393341940,), (1393341943,), (1393342004,), (1393342014,), (1393342023,), (1393342055,), (1393342056,), (1393342057,), (1393342080,), (1393342086,), (1393342091,), (1393342096,), (1393342098,), (1393342112,), (1393342113,), (1393342114,), (1393342116,), (1393342166,), (1393342168,), (1393342205,), (1393342207,), (1393342209,), (1393342212,), (1393342215,), (1393342746,), (1393342749,), (1393342752,), (1393342756,), (1393342760,), (1393342828,), (1393342864,), (1393342899,), (1393342933,), (1393343041,), (1393343043,), (1393343045,), (1393343160,), (1393343164,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28345045 , 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=28345019 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 (28345045) result : ((1393341995,), (1393341996,), (1393342043,), (1393342536,), (1393343021,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28345019) result : ((1393341702,), (1393341703,), (1393341704,), (1393341706,), (1393341743,), (1393341751,), (1393341755,), (1393341794,), (1393341796,), (1393341822,), (1393341824,), (1393341825,), (1393341828,), (1393341831,), (1393341850,), (1393341853,), (1393341857,), (1393341860,), (1393341909,), (1393341910,), (1393341911,), (1393341913,), (1393341916,), (1393341938,), (1393341940,), (1393341943,), (1393342004,), (1393342014,), (1393342023,), (1393342055,), (1393342056,), (1393342057,), (1393342080,), (1393342086,), (1393342091,), (1393342096,), (1393342098,), (1393342112,), (1393342113,), (1393342114,), (1393342116,), (1393342166,), (1393342168,), (1393342205,), (1393342207,), (1393342209,), (1393342212,), (1393342215,), (1393342746,), (1393342749,), (1393342752,), (1393342756,), (1393342760,), (1393342828,), (1393342864,), (1393342899,), (1393342933,), (1393343041,), (1393343043,), (1393343045,), (1393343160,), (1393343164,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28345046 , 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=28345019 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 (28345046) result : ((1393342103,), (1393342176,), (1393342195,), (1393342196,), (1393342197,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28345019) result : ((1393341702,), (1393341703,), (1393341704,), (1393341706,), (1393341743,), (1393341751,), (1393341755,), (1393341794,), (1393341796,), (1393341822,), (1393341824,), (1393341825,), (1393341828,), (1393341831,), (1393341850,), (1393341853,), (1393341857,), (1393341860,), (1393341909,), (1393341910,), (1393341911,), (1393341913,), (1393341916,), (1393341938,), (1393341940,), (1393341943,), (1393342004,), (1393342014,), (1393342023,), (1393342055,), (1393342056,), (1393342057,), (1393342080,), (1393342086,), (1393342091,), (1393342096,), (1393342098,), (1393342112,), (1393342113,), (1393342114,), (1393342116,), (1393342166,), (1393342168,), (1393342205,), (1393342207,), (1393342209,), (1393342212,), (1393342215,), (1393342746,), (1393342749,), (1393342752,), (1393342756,), (1393342760,), (1393342828,), (1393342864,), (1393342899,), (1393342933,), (1393343041,), (1393343043,), (1393343045,), (1393343160,), (1393343164,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28345047 , 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=28345019 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 (28345047) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28345019) result : ((1393341702,), (1393341703,), (1393341704,), (1393341706,), (1393341743,), (1393341751,), (1393341755,), (1393341794,), (1393341796,), (1393341822,), (1393341824,), (1393341825,), (1393341828,), (1393341831,), (1393341850,), (1393341853,), (1393341857,), (1393341860,), (1393341909,), (1393341910,), (1393341911,), (1393341913,), (1393341916,), (1393341938,), (1393341940,), (1393341943,), (1393342004,), (1393342014,), (1393342023,), (1393342055,), (1393342056,), (1393342057,), (1393342080,), (1393342086,), (1393342091,), (1393342096,), (1393342098,), (1393342112,), (1393342113,), (1393342114,), (1393342116,), (1393342166,), (1393342168,), (1393342205,), (1393342207,), (1393342209,), (1393342212,), (1393342215,), (1393342746,), (1393342749,), (1393342752,), (1393342756,), (1393342760,), (1393342828,), (1393342864,), (1393342899,), (1393342933,), (1393343041,), (1393343043,), (1393343045,), (1393343160,), (1393343164,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28345048 , 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=28345019 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 (28345048) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28345019) result : ((1393341702,), (1393341703,), (1393341704,), (1393341706,), (1393341743,), (1393341751,), (1393341755,), (1393341794,), (1393341796,), (1393341822,), (1393341824,), (1393341825,), (1393341828,), (1393341831,), (1393341850,), (1393341853,), (1393341857,), (1393341860,), (1393341909,), (1393341910,), (1393341911,), (1393341913,), (1393341916,), (1393341938,), (1393341940,), (1393341943,), (1393342004,), (1393342014,), (1393342023,), (1393342055,), (1393342056,), (1393342057,), (1393342080,), (1393342086,), (1393342091,), (1393342096,), (1393342098,), (1393342112,), (1393342113,), (1393342114,), (1393342116,), (1393342166,), (1393342168,), (1393342205,), (1393342207,), (1393342209,), (1393342212,), (1393342215,), (1393342746,), (1393342749,), (1393342752,), (1393342756,), (1393342760,), (1393342828,), (1393342864,), (1393342899,), (1393342933,), (1393343041,), (1393343043,), (1393343045,), (1393343160,), (1393343164,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28345049 , 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=28345019 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 (28345049) result : ((1393342047,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28345019) result : ((1393341702,), (1393341703,), (1393341704,), (1393341706,), (1393341743,), (1393341751,), (1393341755,), (1393341794,), (1393341796,), (1393341822,), (1393341824,), (1393341825,), (1393341828,), (1393341831,), (1393341850,), (1393341853,), (1393341857,), (1393341860,), (1393341909,), (1393341910,), (1393341911,), (1393341913,), (1393341916,), (1393341938,), (1393341940,), (1393341943,), (1393342004,), (1393342014,), (1393342023,), (1393342055,), (1393342056,), (1393342057,), (1393342080,), (1393342086,), (1393342091,), (1393342096,), (1393342098,), (1393342112,), (1393342113,), (1393342114,), (1393342116,), (1393342166,), (1393342168,), (1393342205,), (1393342207,), (1393342209,), (1393342212,), (1393342215,), (1393342746,), (1393342749,), (1393342752,), (1393342756,), (1393342760,), (1393342828,), (1393342864,), (1393342899,), (1393342933,), (1393343041,), (1393343043,), (1393343045,), (1393343160,), (1393343164,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28345050 , 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=28345019 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 (28345050) result : ((1393342045,), (1393342102,), (1393342551,), (1393343022,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28345019) result : ((1393341702,), (1393341703,), (1393341704,), (1393341706,), (1393341743,), (1393341751,), (1393341755,), (1393341794,), (1393341796,), (1393341822,), (1393341824,), (1393341825,), (1393341828,), (1393341831,), (1393341850,), (1393341853,), (1393341857,), (1393341860,), (1393341909,), (1393341910,), (1393341911,), (1393341913,), (1393341916,), (1393341938,), (1393341940,), (1393341943,), (1393342004,), (1393342014,), (1393342023,), (1393342055,), (1393342056,), (1393342057,), (1393342080,), (1393342086,), (1393342091,), (1393342096,), (1393342098,), (1393342112,), (1393342113,), (1393342114,), (1393342116,), (1393342166,), (1393342168,), (1393342205,), (1393342207,), (1393342209,), (1393342212,), (1393342215,), (1393342746,), (1393342749,), (1393342752,), (1393342756,), (1393342760,), (1393342828,), (1393342864,), (1393342899,), (1393342933,), (1393343041,), (1393343043,), (1393343045,), (1393343160,), (1393343164,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28345051 , 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=28345019 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 (28345051) result : ((1393341840,), (1393341841,), (1393341993,), (1393341994,), (1393342038,), (1393342039,), (1393342040,), (1393342041,), (1393342042,), (1393342052,), (1393342053,), (1393342100,), (1393342173,), (1393342174,), (1393342194,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28345019) result : ((1393341702,), (1393341703,), (1393341704,), (1393341706,), (1393341743,), (1393341751,), (1393341755,), (1393341794,), (1393341796,), (1393341822,), (1393341824,), (1393341825,), (1393341828,), (1393341831,), (1393341850,), (1393341853,), (1393341857,), (1393341860,), (1393341909,), (1393341910,), (1393341911,), (1393341913,), (1393341916,), (1393341938,), (1393341940,), (1393341943,), (1393342004,), (1393342014,), (1393342023,), (1393342055,), (1393342056,), (1393342057,), (1393342080,), (1393342086,), (1393342091,), (1393342096,), (1393342098,), (1393342112,), (1393342113,), (1393342114,), (1393342116,), (1393342166,), (1393342168,), (1393342205,), (1393342207,), (1393342209,), (1393342212,), (1393342215,), (1393342746,), (1393342749,), (1393342752,), (1393342756,), (1393342760,), (1393342828,), (1393342864,), (1393342899,), (1393342933,), (1393343041,), (1393343043,), (1393343045,), (1393343160,), (1393343164,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28345052 , 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=28345019 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 (28345052) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28345019) result : ((1393341702,), (1393341703,), (1393341704,), (1393341706,), (1393341743,), (1393341751,), (1393341755,), (1393341794,), (1393341796,), (1393341822,), (1393341824,), (1393341825,), (1393341828,), (1393341831,), (1393341850,), (1393341853,), (1393341857,), (1393341860,), (1393341909,), (1393341910,), (1393341911,), (1393341913,), (1393341916,), (1393341938,), (1393341940,), (1393341943,), (1393342004,), (1393342014,), (1393342023,), (1393342055,), (1393342056,), (1393342057,), (1393342080,), (1393342086,), (1393342091,), (1393342096,), (1393342098,), (1393342112,), (1393342113,), (1393342114,), (1393342116,), (1393342166,), (1393342168,), (1393342205,), (1393342207,), (1393342209,), (1393342212,), (1393342215,), (1393342746,), (1393342749,), (1393342752,), (1393342756,), (1393342760,), (1393342828,), (1393342864,), (1393342899,), (1393342933,), (1393343041,), (1393343043,), (1393343045,), (1393343160,), (1393343164,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28345053 , 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=28345019 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 (28345053) result : ((1393341842,), (1393341843,), (1393341997,), (1393341998,), (1393342566,), (1393343023,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28345019) result : ((1393341702,), (1393341703,), (1393341704,), (1393341706,), (1393341743,), (1393341751,), (1393341755,), (1393341794,), (1393341796,), (1393341822,), (1393341824,), (1393341825,), (1393341828,), (1393341831,), (1393341850,), (1393341853,), (1393341857,), (1393341860,), (1393341909,), (1393341910,), (1393341911,), (1393341913,), (1393341916,), (1393341938,), (1393341940,), (1393341943,), (1393342004,), (1393342014,), (1393342023,), (1393342055,), (1393342056,), (1393342057,), (1393342080,), (1393342086,), (1393342091,), (1393342096,), (1393342098,), (1393342112,), (1393342113,), (1393342114,), (1393342116,), (1393342166,), (1393342168,), (1393342205,), (1393342207,), (1393342209,), (1393342212,), (1393342215,), (1393342746,), (1393342749,), (1393342752,), (1393342756,), (1393342760,), (1393342828,), (1393342864,), (1393342899,), (1393342933,), (1393343041,), (1393343043,), (1393343045,), (1393343160,), (1393343164,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28345054 , 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=28345019 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 (28345054) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28345019) result : ((1393341702,), (1393341703,), (1393341704,), (1393341706,), (1393341743,), (1393341751,), (1393341755,), (1393341794,), (1393341796,), (1393341822,), (1393341824,), (1393341825,), (1393341828,), (1393341831,), (1393341850,), (1393341853,), (1393341857,), (1393341860,), (1393341909,), (1393341910,), (1393341911,), (1393341913,), (1393341916,), (1393341938,), (1393341940,), (1393341943,), (1393342004,), (1393342014,), (1393342023,), (1393342055,), (1393342056,), (1393342057,), (1393342080,), (1393342086,), (1393342091,), (1393342096,), (1393342098,), (1393342112,), (1393342113,), (1393342114,), (1393342116,), (1393342166,), (1393342168,), (1393342205,), (1393342207,), (1393342209,), (1393342212,), (1393342215,), (1393342746,), (1393342749,), (1393342752,), (1393342756,), (1393342760,), (1393342828,), (1393342864,), (1393342899,), (1393342933,), (1393343041,), (1393343043,), (1393343045,), (1393343160,), (1393343164,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28345055 , 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=28345019 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 (28345055) result : ((1393341999,), (1393342000,), (1393342054,), (1393342104,), (1393342177,), (1393342178,), (1393342179,), (1393342574,), (1393343027,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28345019) result : ((1393341702,), (1393341703,), (1393341704,), (1393341706,), (1393341743,), (1393341751,), (1393341755,), (1393341794,), (1393341796,), (1393341822,), (1393341824,), (1393341825,), (1393341828,), (1393341831,), (1393341850,), (1393341853,), (1393341857,), (1393341860,), (1393341909,), (1393341910,), (1393341911,), (1393341913,), (1393341916,), (1393341938,), (1393341940,), (1393341943,), (1393342004,), (1393342014,), (1393342023,), (1393342055,), (1393342056,), (1393342057,), (1393342080,), (1393342086,), (1393342091,), (1393342096,), (1393342098,), (1393342112,), (1393342113,), (1393342114,), (1393342116,), (1393342166,), (1393342168,), (1393342205,), (1393342207,), (1393342209,), (1393342212,), (1393342215,), (1393342746,), (1393342749,), (1393342752,), (1393342756,), (1393342760,), (1393342828,), (1393342864,), (1393342899,), (1393342933,), (1393343041,), (1393343043,), (1393343045,), (1393343160,), (1393343164,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=28345019 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','environnement','metal','flou','cartonnette','kraft','Carton_brun','plastique','Teint_Dans_La_Masse','mal_croppe','autre_refus','Carton_gris')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=28345019 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','environnement','metal','flou','cartonnette','kraft','Carton_brun','plastique','Teint_Dans_La_Masse','mal_croppe','autre_refus','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 28345019, 'sub_port_id': 28345056, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190752, 'last_updated_at': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 29)}, 'autre_refus': {'main_port_id': 28345019, 'sub_port_id': 28345057, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190753, 'last_updated_at': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 29)}, 'Carton_brun': {'main_port_id': 28345019, 'sub_port_id': 28345058, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190754, 'last_updated_at': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 29)}, 'metal': {'main_port_id': 28345019, 'sub_port_id': 28345059, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190755, 'last_updated_at': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 29)}, 'papier': {'main_port_id': 28345019, 'sub_port_id': 28345060, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190756, 'last_updated_at': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 29)}, 'kraft': {'main_port_id': 28345019, 'sub_port_id': 28345061, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190757, 'last_updated_at': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 29)}, 'Carton_gris': {'main_port_id': 28345019, 'sub_port_id': 28345062, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190758, 'last_updated_at': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 28345019, 'sub_port_id': 28345063, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190759, 'last_updated_at': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 29)}, 'flou': {'main_port_id': 28345019, 'sub_port_id': 28345064, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190760, 'last_updated_at': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 29)}, 'cartonnette': {'main_port_id': 28345019, 'sub_port_id': 28345065, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190761, 'last_updated_at': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 29)}, 'mal_croppe': {'main_port_id': 28345019, 'sub_port_id': 28345066, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190762, 'last_updated_at': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 3, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 29)}, 'plastique': {'main_port_id': 28345019, 'sub_port_id': 28345067, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19190763, 'last_updated_at': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 4, 3, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 3, 47, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28345056,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28345044 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28345057,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28345045 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28345058,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28345046 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28345059,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28345047 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28345060,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28345048 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28345061,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28345049 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28345062,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28345050 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28345063,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28345051 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28345064,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28345052 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28345065,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28345053 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28345066,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28345054 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28345067,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28345055 lien utilise dans velours : https://marlene.fotonower.com/velours/28345056,28345057,28345058,28345059,28345060,28345061,28345062,28345063,28345064,28345065,28345066,28345067?tags=environnement,autre_refus,Carton_brun,metal,papier,kraft,Carton_gris,Teint_Dans_La_Masse,flou,cartonnette,mal_croppe,plastique After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28345019]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1393343164, 1393343160] map_info['map_portfolio_photo'] : {28345019: [1393343164, 1393343160, 1393343045, 1393343043, 1393343041, 1393342933, 1393342899, 1393342864, 1393342828, 1393342760, 1393342756, 1393342752, 1393342749, 1393342746, 1393342215, 1393342212, 1393342209, 1393342207, 1393342205, 1393342168, 1393342166, 1393342116, 1393342114, 1393342113, 1393342112, 1393342098, 1393342096, 1393342091, 1393342086, 1393342080, 1393342057, 1393342056, 1393342055, 1393342023, 1393342014, 1393342004, 1393341943, 1393341940, 1393341938, 1393341916, 1393341913, 1393341911, 1393341910, 1393341909, 1393341860, 1393341857, 1393341853, 1393341850, 1393341831, 1393341828, 1393341825, 1393341824, 1393341822, 1393341796, 1393341794, 1393341755, 1393341751, 1393341743, 1393341706, 1393341704, 1393341703, 1393341702]} final : False mtd_id 4302 list_pids : [1393343164, 1393343160] Looping around the photos to save general results len do output : 1 /28345019. 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, '4021263') ('4302', '28345019', '1393343164', None, None, None, None, None, '4021263') ('4302', None, None, None, None, None, None, None, '4021263') ('4302', '28345019', '1393343160', None, None, None, None, None, '4021263') 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', None, '28345019', "{'environnement': 28345044, 'autre_refus': 28345045, 'Carton_brun': 28345046, 'metal': 28345047, 'papier': 28345048, 'kraft': 28345049, 'Carton_gris': 28345050, 'Teint_Dans_La_Masse': 28345051, 'flou': 28345052, 'cartonnette': 28345053, 'mal_croppe': 28345054, 'plastique': 28345055}", None, None, None, None, '4021263'), ('4302', '28345019', '1393343164', None, None, None, None, None, '4021263'), ('4302', '28345019', '1393343160', None, None, None, None, None, '4021263')] time used for this insertion : 0.018132448196411133 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5186712741851807 time spend to save output : 0.018419981002807617 total time spend for step 1 : 1.5370912551879883 step2:final Sat Nov 8 04:04:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! 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 (28345019) 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 28345019 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1393341706,1393341704,1393341703,1393341702,1393341755,1393341751,1393341743,1393341796,1393341794,1393341831,1393341828,1393341825,1393341824,1393341822,1393341860,1393341857,1393341853,1393341850,1393341916,1393341913,1393341911,1393341910,1393341909,1393341943,1393341940,1393341938,1393342023,1393342014,1393342004,1393342057,1393342056,1393342055,1393342098,1393342096,1393342091,1393342086,1393342080,1393342116,1393342114,1393342113,1393342112,1393342168,1393342166,1393342215,1393342212,1393342209,1393342207,1393342205,1393342760,1393342756,1393342752,1393342749,1393342746,1393343164,1393342933,1393342899,1393343160,1393342864,1393343045,1393343043,1393342828,1393343041); 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([28345019]) Inside saveOutput : final : False verbose : True original output for save of step final : {1393343164: ('0.07153734665419287',), 1393343160: ('0.07153734665419287',)} new output for save of step final : {1393343164: ('0.07153734665419287',), 1393343160: ('0.07153734665419287',)} [1393343164, 1393343160] map_info['map_portfolio_photo'] : {28345019: [1393343164, 1393343160, 1393343045, 1393343043, 1393343041, 1393342933, 1393342899, 1393342864, 1393342828, 1393342760, 1393342756, 1393342752, 1393342749, 1393342746, 1393342215, 1393342212, 1393342209, 1393342207, 1393342205, 1393342168, 1393342166, 1393342116, 1393342114, 1393342113, 1393342112, 1393342098, 1393342096, 1393342091, 1393342086, 1393342080, 1393342057, 1393342056, 1393342055, 1393342023, 1393342014, 1393342004, 1393341943, 1393341940, 1393341938, 1393341916, 1393341913, 1393341911, 1393341910, 1393341909, 1393341860, 1393341857, 1393341853, 1393341850, 1393341831, 1393341828, 1393341825, 1393341824, 1393341822, 1393341796, 1393341794, 1393341755, 1393341751, 1393341743, 1393341706, 1393341704, 1393341703, 1393341702]} final : False mtd_id 4302 list_pids : [1393343164, 1393343160] Looping around the photos to save general results len do output : 2 /1393343164.Didn't retrieve data . /1393343160.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, '4021263') ('4302', '28345019', '1393343164', None, None, None, None, None, '4021263') ('4302', None, None, None, None, None, None, None, '4021263') ('4302', '28345019', '1393343160', None, None, None, None, None, '4021263') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '28345019', '1393343164', '0.07153734665419287', None, None, None, None, '4021263'), ('4302', '28345019', '1393343160', '0.07153734665419287', None, None, None, None, '4021263')] time used for this insertion : 0.012950658798217773 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06418085098266602 time spend to save output : 0.013172149658203125 total time spend for step 2 : 0.07735300064086914 step3:velours_tree Sat Nov 8 04:04:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {28345019: [{'environnement': 28345044, 'autre_refus': 28345045, 'Carton_brun': 28345046, 'metal': 28345047, 'papier': 28345048, 'kraft': 28345049, 'Carton_gris': 28345050, 'Teint_Dans_La_Masse': 28345051, 'flou': 28345052, 'cartonnette': 28345053, 'mal_croppe': 28345054, 'plastique': 28345055}]} input_args_next_step : {28345019: ()} output_args : {28345019: [{'environnement': 28345044, 'autre_refus': 28345045, 'Carton_brun': 28345046, 'metal': 28345047, 'papier': 28345048, 'kraft': 28345049, 'Carton_gris': 28345050, 'Teint_Dans_La_Masse': 28345051, 'flou': 28345052, 'cartonnette': 28345053, 'mal_croppe': 28345054, 'plastique': 28345055}]} args : 28345019 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 : ({'environnement': 28345044, 'autre_refus': 28345045, 'Carton_brun': 28345046, 'metal': 28345047, 'papier': 28345048, 'kraft': 28345049, 'Carton_gris': 28345050, 'Teint_Dans_La_Masse': 28345051, 'flou': 28345052, 'cartonnette': 28345053, 'mal_croppe': 28345054, 'plastique': 28345055},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28345019) 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([28345019]) 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.3306999206542969 time spend to save output : 4.2438507080078125e-05 total time spend for step 3 : 0.33074235916137695 step4:send_mail_cod Sat Nov 8 04:04: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 : {1393343164: ('0.07153734665419287',), 1393343160: ('0.07153734665419287',)} input_args_next_step : {1393343164: ()} output_args : {1393343164: ('0.07153734665419287',), 1393343160: ('0.07153734665419287',)} args : 1393343164 depend.output_id : 0 input_args_next_step : {1393343164: ('0.07153734665419287',), 1393343160: ()} output_args : {1393343164: ('0.07153734665419287',), 1393343160: ('0.07153734665419287',)} args : 1393343160 depend.output_id : 0 Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 3 : {28345019: [{'environnement': 28345044, 'autre_refus': 28345045, 'Carton_brun': 28345046, 'metal': 28345047, 'papier': 28345048, 'kraft': 28345049, 'Carton_gris': 28345050, 'Teint_Dans_La_Masse': 28345051, 'flou': 28345052, 'cartonnette': 28345053, 'mal_croppe': 28345054, 'plastique': 28345055}]} input_args_next_step : {1393343164: ('0.07153734665419287',), 1393343160: ('0.07153734665419287',), 28345019: ()} output_args : {28345019: [{'environnement': 28345044, 'autre_refus': 28345045, 'Carton_brun': 28345046, 'metal': 28345047, 'papier': 28345048, 'kraft': 28345049, 'Carton_gris': 28345050, 'Teint_Dans_La_Masse': 28345051, 'flou': 28345052, 'cartonnette': 28345053, 'mal_croppe': 28345054, 'plastique': 28345055}]} args : 28345019 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 :3, first value : ('0.07153734665419287',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28345019) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos_view ph WHERE photo_id IN (1393343164,1393343160) Found this number of photos: 2 ##### Call download_photos : nb_thread : 5 begin to download photo : 1393343160 begin to download photo : 1393343164 download finish for photo 1393343160 download finish for photo 1393343164 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 : 2 ; length of list_pids : 2 ; length of list_args : 2 results_Auto_P28345019_08-11-2025_04_04_59.pdf 28345045 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28345045 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1393341995: '1762570345_1344714_1393341857_0ba6bbc239f27765311479aee217fd0d_rle_crop_4026768241_0.png', 1393341996: '1762570345_1344714_1393341853_dc41cb3957e51609d9e4dfc86dd562ee_rle_crop_4026768270_0.png', 1393342043: '1762570387_1345493_1393341828_040947be2a26febb545e18378361ab49_rle_crop_4026768551_0.png', 1393342536: '1762570745_1362834_1393342114_8249265c3ee0a500f57bfb9e59170823_rle_crop_4026787270_0.png', 1393343021: '1762570867_1464744_1393342114_8249265c3ee0a500f57bfb9e59170823_rle_crop_4026787270_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/98ec5282f820adf76606be678d0bcc5f_86201528.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/aac6671ec57b2d3b266f1219cb6a4510_22342159.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/2514898852ba4060f590a37503ac2ef7_54682315.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/afbe8e9577e22c80d56b8f1778515296_65376081.png change filename to text .imagette283450451762571099/ imagette283450451762571099/1762570345_1344714_1393341857_0ba6bbc239f27765311479aee217fd0d_rle_crop_4026768241_0.png.png imagette283450451762571099/1762570387_1345493_1393341828_040947be2a26febb545e18378361ab49_rle_crop_4026768551_0.png.png imagette283450451762571099/1762570745_1362834_1393342114_8249265c3ee0a500f57bfb9e59170823_rle_crop_4026787270_0.png.png imagette283450451762571099/1762570867_1464744_1393342114_8249265c3ee0a500f57bfb9e59170823_rle_crop_4026787270_0.png.png imagette283450451762571099/1762570345_1344714_1393341853_dc41cb3957e51609d9e4dfc86dd562ee_rle_crop_4026768270_0.png.png imagette283450471762571099/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/afbe8e9577e22c80d56b8f1778515296_88000835.png imagette283450451762571099 28345047 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28345047 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette283450471762571099 28345049 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28345049 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1393342047: '1762570387_1345493_1393341860_38b8525601e17372b04e70dac7585b78_rle_crop_4026768543_0.png'} change filename to text .imagette283450491762571099/ imagette283450491762571099/1762570387_1345493_1393341860_38b8525601e17372b04e70dac7585b78_rle_crop_4026768543_0.png.png imagette283450521762571100/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/8ed3ec58030bb9dfa8e1f9ae504a5f88_29362527.png imagette283450491762571099 28345052 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28345052 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette283450521762571100 28345053 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28345053 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1393341842: '1762570146_1331270_1393341706_1f6bd5d8ea0d0929627423b2867bd603_rle_crop_4026767036_0.png', 1393341843: '1762570146_1331270_1393341706_1f6bd5d8ea0d0929627423b2867bd603_rle_crop_4026767039_0.png', 1393341997: '1762570345_1344714_1393341853_dc41cb3957e51609d9e4dfc86dd562ee_rle_crop_4026768272_0.png', 1393341998: '1762570345_1344714_1393341850_55013fd96ea484f57c0e4f5ed17fa0ff_rle_crop_4026768300_0.png', 1393342566: '1762570745_1362834_1393342112_8751696158c344f701c9718482682345_rle_crop_4026787296_0.png', 1393343023: '1762570867_1464744_1393342112_8751696158c344f701c9718482682345_rle_crop_4026787296_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/56ddfea4d6e2f6368d45d68ab7ad0337_36587838.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/554bab4ea09feca8779b6067779657fa_67168093.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/0566f64313bfbd85d9c7468712f2e5b6_82429334.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/03fb29876e096e9c5efd44848cdbfd24_75799536.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/a4c4668361f7744e2f006bc5f37ab1ba_7651153.png change filename to text .imagette283450531762571100/ imagette283450531762571100/1762570146_1331270_1393341706_1f6bd5d8ea0d0929627423b2867bd603_rle_crop_4026767039_0.png.png imagette283450531762571100/1762570867_1464744_1393342112_8751696158c344f701c9718482682345_rle_crop_4026787296_0.png.png imagette283450531762571100/1762570146_1331270_1393341706_1f6bd5d8ea0d0929627423b2867bd603_rle_crop_4026767036_0.png.png imagette283450531762571100/1762570345_1344714_1393341850_55013fd96ea484f57c0e4f5ed17fa0ff_rle_crop_4026768300_0.png.png imagette283450531762571100/1762570345_1344714_1393341853_dc41cb3957e51609d9e4dfc86dd562ee_rle_crop_4026768272_0.png.png imagette283450531762571100/1762570745_1362834_1393342112_8751696158c344f701c9718482682345_rle_crop_4026787296_0.png.png imagette283450541762571100/ wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/a4c4668361f7744e2f006bc5f37ab1ba_44010753.png imagette283450531762571100 28345054 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28345054 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette283450541762571100 28345055 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28345055 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1393341999: '1762570345_1344714_1393341853_dc41cb3957e51609d9e4dfc86dd562ee_rle_crop_4026768279_0.png', 1393342000: '1762570345_1344714_1393341850_55013fd96ea484f57c0e4f5ed17fa0ff_rle_crop_4026768303_0.png', 1393342054: '1762570406_1347196_1393341794_e494ac5ca03dc71450160b1122973949_rle_crop_4026768669_0.png', 1393342104: '1762570508_1352901_1393341796_d9aef34ae230d9abe48efdd4a23fc417_rle_crop_4026768798_0.png', 1393342177: '1762570626_1356659_1393342056_5600e04fe73962b55f39d1828906e6cc_rle_crop_4026775343_0.png', 1393342178: '1762570626_1356659_1393342055_07ac490306c9f6536780ff4da32ee1ea_rle_crop_4026775353_0.png', 1393342179: '1762570626_1356659_1393342055_07ac490306c9f6536780ff4da32ee1ea_rle_crop_4026775355_0.png', 1393342574: '1762570745_1362834_1393342114_8249265c3ee0a500f57bfb9e59170823_rle_crop_4026787271_0.png', 1393343027: '1762570867_1464744_1393342114_8249265c3ee0a500f57bfb9e59170823_rle_crop_4026787271_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/a7565519616a374abfe1058376526f72_52827619.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/298fa27b45ff1fc944042b1ccdf98348_31579380.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/046bf629c0884c5685bebda857ea1f4e_92650920.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/7d71e368d0fe2876f71f0839a38e7ec5_33167196.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/a2859874366948bea707733e9178c7a0_84381262.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/1d0b3577217b70ee5ab583199f44cd5d_93986672.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/d85004abd5185371662d0cb94ef6da93_66039949.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/3bc08ddacba2389530e05d6f88a50805_8762442.png change filename to text .imagette283450551762571100/ imagette283450551762571100/1762570626_1356659_1393342055_07ac490306c9f6536780ff4da32ee1ea_rle_crop_4026775353_0.png.png imagette283450551762571100/1762570345_1344714_1393341853_dc41cb3957e51609d9e4dfc86dd562ee_rle_crop_4026768279_0.png.png imagette283450551762571100/1762570867_1464744_1393342114_8249265c3ee0a500f57bfb9e59170823_rle_crop_4026787271_0.png.png imagette283450551762571100/1762570345_1344714_1393341850_55013fd96ea484f57c0e4f5ed17fa0ff_rle_crop_4026768303_0.png.png imagette283450551762571100/1762570626_1356659_1393342055_07ac490306c9f6536780ff4da32ee1ea_rle_crop_4026775355_0.png.png imagette283450551762571100/1762570626_1356659_1393342056_5600e04fe73962b55f39d1828906e6cc_rle_crop_4026775343_0.png.png imagette283450551762571100/1762570508_1352901_1393341796_d9aef34ae230d9abe48efdd4a23fc417_rle_crop_4026768798_0.png.png imagette283450551762571100/1762570745_1362834_1393342114_8249265c3ee0a500f57bfb9e59170823_rle_crop_4026787271_0.png.png imagette283450551762571100/1762570406_1347196_1393341794_e494ac5ca03dc71450160b1122973949_rle_crop_4026768669_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/3bc08ddacba2389530e05d6f88a50805_17136943.png imagette283450551762571100 28345046 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28345046 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1393342103: '1762570508_1352901_1393341796_d9aef34ae230d9abe48efdd4a23fc417_rle_crop_4026768783_0.png', 1393342176: '1762570626_1356659_1393342056_5600e04fe73962b55f39d1828906e6cc_rle_crop_4026775336_0.png', 1393342195: '1762570647_1357074_1393342057_ac0dc6c2e0d075b8977c915baffb5be9_rle_crop_4026775444_0.png', 1393342196: '1762570647_1357074_1393342004_d97f0bba963d60fe93040c5c93854190_rle_crop_4026775461_0.png', 1393342197: '1762570647_1357074_1393342004_d97f0bba963d60fe93040c5c93854190_rle_crop_4026775462_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/5b583b38a6aeb8eb3503aba6d27f5f2a_51823548.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/fb3571cb506d58cfea8dcf9b975f6037_99741506.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/c58d0984e49d7a1f5ab1e1bb08da0cd8_66233179.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/31154851008a60c78af3d2df82a77a61_18899335.png change filename to text .imagette283450461762571101/ imagette283450461762571101/1762570647_1357074_1393342057_ac0dc6c2e0d075b8977c915baffb5be9_rle_crop_4026775444_0.png.png imagette283450461762571101/1762570647_1357074_1393342004_d97f0bba963d60fe93040c5c93854190_rle_crop_4026775461_0.png.png imagette283450461762571101/1762570647_1357074_1393342004_d97f0bba963d60fe93040c5c93854190_rle_crop_4026775462_0.png.png imagette283450461762571101/1762570508_1352901_1393341796_d9aef34ae230d9abe48efdd4a23fc417_rle_crop_4026768783_0.png.png imagette283450461762571101/1762570626_1356659_1393342056_5600e04fe73962b55f39d1828906e6cc_rle_crop_4026775336_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/13aeffda4cc1895461f76c879192da78_79936190.png imagette283450461762571101 28345050 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28345050 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1393342045: '1762570387_1345493_1393341828_040947be2a26febb545e18378361ab49_rle_crop_4026768553_0.png', 1393342102: '1762570508_1352901_1393341796_d9aef34ae230d9abe48efdd4a23fc417_rle_crop_4026768784_0.png', 1393342551: '1762570745_1362834_1393342112_8751696158c344f701c9718482682345_rle_crop_4026787294_0.png', 1393343022: '1762570867_1464744_1393342112_8751696158c344f701c9718482682345_rle_crop_4026787294_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/fdce7fba049a779d6da7b0b1cafa73d4_86055683.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/43813873cd10a8ea5739ac1aa5d1a316_13287234.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/9eb438cc2afa6210ea61423fe04d4bdd_42524983.png change filename to text .imagette283450501762571101/ imagette283450501762571101/1762570867_1464744_1393342112_8751696158c344f701c9718482682345_rle_crop_4026787294_0.png.png imagette283450501762571101/1762570508_1352901_1393341796_d9aef34ae230d9abe48efdd4a23fc417_rle_crop_4026768784_0.png.png imagette283450501762571101/1762570387_1345493_1393341828_040947be2a26febb545e18378361ab49_rle_crop_4026768553_0.png.png imagette283450501762571101/1762570745_1362834_1393342112_8751696158c344f701c9718482682345_rle_crop_4026787294_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/9eb438cc2afa6210ea61423fe04d4bdd_94906781.png imagette283450501762571101 28345051 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28345051 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1393341840: '1762570146_1331270_1393341706_1f6bd5d8ea0d0929627423b2867bd603_rle_crop_4026767041_0.png', 1393341841: '1762570146_1331270_1393341704_b9eeb8d8708c96112e23162463ee660e_rle_crop_4026767048_0.png', 1393341993: '1762570345_1344714_1393341853_dc41cb3957e51609d9e4dfc86dd562ee_rle_crop_4026768273_0.png', 1393341994: '1762570345_1344714_1393341850_55013fd96ea484f57c0e4f5ed17fa0ff_rle_crop_4026768306_0.png', 1393342038: '1762570387_1345493_1393341828_040947be2a26febb545e18378361ab49_rle_crop_4026768563_0.png', 1393342039: '1762570387_1345493_1393341828_040947be2a26febb545e18378361ab49_rle_crop_4026768556_0.png', 1393342040: '1762570387_1345493_1393341825_8120d7f57f39235e3f9d27280a4d638d_rle_crop_4026768572_0.png', 1393342041: '1762570387_1345493_1393341825_8120d7f57f39235e3f9d27280a4d638d_rle_crop_4026768573_0.png', 1393342042: '1762570387_1345493_1393341822_246f723fc348656e615fc1c65d88a610_rle_crop_4026768587_0.png', 1393342052: '1762570406_1347196_1393341831_69dadbaef68e8fe17a7dd38e6bab9cfb_rle_crop_4026768663_0.png', 1393342053: '1762570406_1347196_1393341794_e494ac5ca03dc71450160b1122973949_rle_crop_4026768682_0.png', 1393342100: '1762570508_1352901_1393341796_d9aef34ae230d9abe48efdd4a23fc417_rle_crop_4026768787_0.png', 1393342173: '1762570626_1356659_1393342056_5600e04fe73962b55f39d1828906e6cc_rle_crop_4026775340_0.png', 1393342174: '1762570626_1356659_1393342055_07ac490306c9f6536780ff4da32ee1ea_rle_crop_4026775359_0.png', 1393342194: '1762570647_1357074_1393342014_a31d66fe17d20c198e36edc4e6facc97_rle_crop_4026775453_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/a4abea60a80e30c2a9ba8e6aec839d47_12923179.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/4f78c82df4bfb7004f85fbf5d61ae8cc_26093083.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/2091e1d0442c1dfc0e26693ce11ebe7f_99396687.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/9a3f6ac30dae51f5f9f54d2ca0b95975_89527374.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/cf80c13b0aaaad8e8901c748ec97e188_8816075.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/f72525d9c42e3315f70aef0e8e9b5b47_14101594.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/32428bbc9569e3ee8b1d600c669040ea_53762885.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/684529e157dcc7206bd650b754b749bb_93212660.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/1a0545c898d117f14abf1d38e061731a_67647643.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/6795776c4fd369f2731af484729dc61c_10664737.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/d12617c4c2bed4176e454187050db7d6_38796880.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/97e24c9c8183212be29261919b9ea3d5_31991183.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/9d9ecf71c00795208e96b62e6005ce5d_54190297.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/2f510a8641fc6f20bd6b4bde1e6d1212_47305230.png change filename to text .imagette283450511762571101/ imagette283450511762571101/1762570387_1345493_1393341828_040947be2a26febb545e18378361ab49_rle_crop_4026768563_0.png.png imagette283450511762571101/1762570626_1356659_1393342055_07ac490306c9f6536780ff4da32ee1ea_rle_crop_4026775359_0.png.png imagette283450511762571101/1762570146_1331270_1393341704_b9eeb8d8708c96112e23162463ee660e_rle_crop_4026767048_0.png.png imagette283450511762571101/1762570647_1357074_1393342014_a31d66fe17d20c198e36edc4e6facc97_rle_crop_4026775453_0.png.png imagette283450511762571101/1762570626_1356659_1393342056_5600e04fe73962b55f39d1828906e6cc_rle_crop_4026775340_0.png.png imagette283450511762571101/1762570146_1331270_1393341706_1f6bd5d8ea0d0929627423b2867bd603_rle_crop_4026767041_0.png.png imagette283450511762571101/1762570508_1352901_1393341796_d9aef34ae230d9abe48efdd4a23fc417_rle_crop_4026768787_0.png.png imagette283450511762571101/1762570406_1347196_1393341794_e494ac5ca03dc71450160b1122973949_rle_crop_4026768682_0.png.png imagette283450511762571101/1762570387_1345493_1393341828_040947be2a26febb545e18378361ab49_rle_crop_4026768556_0.png.png imagette283450511762571101/1762570387_1345493_1393341822_246f723fc348656e615fc1c65d88a610_rle_crop_4026768587_0.png.png imagette283450511762571101/1762570406_1347196_1393341831_69dadbaef68e8fe17a7dd38e6bab9cfb_rle_crop_4026768663_0.png.png imagette283450511762571101/1762570387_1345493_1393341825_8120d7f57f39235e3f9d27280a4d638d_rle_crop_4026768572_0.png.png imagette283450511762571101/1762570387_1345493_1393341825_8120d7f57f39235e3f9d27280a4d638d_rle_crop_4026768573_0.png.png imagette283450511762571101/1762570345_1344714_1393341850_55013fd96ea484f57c0e4f5ed17fa0ff_rle_crop_4026768306_0.png.png imagette283450511762571101/1762570345_1344714_1393341853_dc41cb3957e51609d9e4dfc86dd562ee_rle_crop_4026768273_0.png.png wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/73708c6b6dfa605bee73982321beb93b_88452011.png imagette283450511762571101 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=28345019 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/28345056,28345057,28345058,28345059,28345060,28345061,28345062,28345063,28345064,28345065,28345066,28345067?tags=environnement,autre_refus,Carton_brun,metal,papier,kraft,Carton_gris,Teint_Dans_La_Masse,flou,cartonnette,mal_croppe,plastique your option no_mail is active, we will not send the real mail to your client args[1393343164] : ('0.07153734665419287',) no score found for photo 1393343164 We are sending mail with results at report@fotonower.com args[1393343160] : ('0.07153734665419287',) no score found for photo 1393343160 We are sending mail with results at report@fotonower.com refus_total : 0.07153734665419287 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28345019 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_P28345019_08-11-2025_04_04_59.pdf results_Auto_P28345019_08-11-2025_04_04_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28345019_08-11-2025_04_04_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','28345019','results_Auto_P28345019_08-11-2025_04_04_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28345019_08-11-2025_04_04_59.pdf','pdf','','0.19','0.07153734665419287') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28345019]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1393343164, 1393343160] map_info['map_portfolio_photo'] : {28345019: [1393343164, 1393343160, 1393343045, 1393343043, 1393343041, 1393342933, 1393342899, 1393342864, 1393342828, 1393342760, 1393342756, 1393342752, 1393342749, 1393342746, 1393342215, 1393342212, 1393342209, 1393342207, 1393342205, 1393342168, 1393342166, 1393342116, 1393342114, 1393342113, 1393342112, 1393342098, 1393342096, 1393342091, 1393342086, 1393342080, 1393342057, 1393342056, 1393342055, 1393342023, 1393342014, 1393342004, 1393341943, 1393341940, 1393341938, 1393341916, 1393341913, 1393341911, 1393341910, 1393341909, 1393341860, 1393341857, 1393341853, 1393341850, 1393341831, 1393341828, 1393341825, 1393341824, 1393341822, 1393341796, 1393341794, 1393341755, 1393341751, 1393341743, 1393341706, 1393341704, 1393341703, 1393341702]} final : False mtd_id 4302 list_pids : [1393343164, 1393343160] 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, '4021263') ('4302', '28345019', '1393343164', None, None, None, None, None, '4021263') ('4302', None, None, None, None, None, None, None, '4021263') ('4302', '28345019', '1393343160', None, None, None, None, None, '4021263') 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', '28345019', '1393343164', None, None, None, None, None, '4021263'), ('4302', '28345019', '1393343160', None, None, None, None, None, '4021263')] time used for this insertion : 0.013953685760498047 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.511339426040649 time spend to save output : 0.01416015625 total time spend for step 4 : 4.525499582290649 step5:split_time_score Sat Nov 8 04:05: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 : ['28345019'] 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 : [('28345019',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28345019) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1393343160: {'path': 'temp/1762571099_1248568_1393343160_be9a5351514207ee236851d47873dbe0.jpg', 'extension': 'jpg'}, 1393343164: {'path': 'temp/1762571099_1248568_1393343164_2e4c85f18ec8d5912e950699981d7d1f.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 = 28345019; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm_bis',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 28345019 group by h (('03', 62),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28345019 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 (28345019) 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 (28345019) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 08112025 28345019 Nombre de photos uploadées : 62 / 23040 (0%) 08112025 28345019 Nombre de photos taguées (types de déchets): 0 / 62 (0%) 08112025 28345019 Nombre de photos taguées (volume) : 0 / 62 (0%) [{'photo_id': 1393341706, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/1f6bd5d8ea0d0929627423b2867bd603.jpg', 'username': None, 'uploaded_at': 1762569967, 'text': 'image_08112025_03_45_04_010138m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1393341704, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/b9eeb8d8708c96112e23162463ee660e.jpg', 'username': None, 'uploaded_at': 1762569967, 'text': 'image_08112025_03_45_13_009125m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1393341703, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/12e9dbe0d1936bd21157ee8b3a50fc45.jpg', 'username': None, 'uploaded_at': 1762569967, 'text': 'image_08112025_03_45_24_010140m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1393341702, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/4d3bf3915c3a58336322e3ff88901ac0.jpg', 'username': None, 'uploaded_at': 1762569967, 'text': 'image_08112025_03_45_34_010134m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 3.0994415283203125e-06 elapsed_time : order_list_meta_photo_and_scores 8.58306884765625e-06 ?????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0017094612121582031 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 28345019, '2025-11-08' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2540024,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.2067124843597412 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= 2540024 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548474, 'mtr_portfolio_id': 28336003, 'dashboard_result_id': 17031814, '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_P28336003_08-11-2025_00_17_28.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28336011, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28336012, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28336013, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28336014, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28336015, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28336016, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28336017, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28336018, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28336019, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28336020, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28336021, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28336022, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548474, 'mtr_portfolio_id': 28336481, 'dashboard_result_id': 17031815, '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_P28336481_08-11-2025_00_32_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28336486, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28336487, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28336488, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28336489, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28336490, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28336491, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28336492, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28336493, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28336494, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28336495, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28336496, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28336497, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548474, 'mtr_portfolio_id': 28337035, 'dashboard_result_id': 17031816, '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_P28337035_08-11-2025_00_46_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28337096, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28337097, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28337098, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28337099, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28337100, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28337101, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28337102, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28337103, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28337104, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28337105, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28337106, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28337107, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548474, 'mtr_portfolio_id': 28337671, 'dashboard_result_id': 17031817, '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_P28337671_08-11-2025_01_02_30.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28337732, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28337733, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28337734, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28337735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28337736, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28337737, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28337738, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28337739, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28337740, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28337741, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28337742, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28337743, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548474, 'mtr_portfolio_id': 28339415, 'dashboard_result_id': 17031818, '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_P28339415_08-11-2025_01_48_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28339417, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28339418, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28339419, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28339420, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28339421, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28339422, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28339423, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28339424, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28339425, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28339426, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28339427, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28339428, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548474, 'mtr_portfolio_id': 28339875, 'dashboard_result_id': 17031819, '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_P28339875_08-11-2025_02_03_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28339896, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28339897, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28339898, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28339899, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28339900, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28339901, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28339902, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28339903, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28339904, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28339905, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28339906, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28339907, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548474, 'mtr_portfolio_id': 28340539, 'dashboard_result_id': 17031820, '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_P28340539_08-11-2025_02_16_57.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28340546, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28340547, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28340548, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28340549, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28340550, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28340551, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28340552, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28340553, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28340554, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28340555, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28340556, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28340557, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548474, 'mtr_portfolio_id': 28341213, 'dashboard_result_id': 17031821, '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_P28341213_08-11-2025_02_34_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28341222, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28341223, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28341224, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28341225, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28341226, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28341227, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28341228, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28341229, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28341230, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28341231, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28341232, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28341233, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548474, 'mtr_portfolio_id': 28341967, 'dashboard_result_id': 17031822, '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_P28341967_08-11-2025_02_46_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28341980, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28341981, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28341982, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28341983, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28341984, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28341985, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28341986, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28341987, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28341988, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28341989, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28341990, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28341992, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548474, 'mtr_portfolio_id': 28342486, 'dashboard_result_id': 17031823, '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_P28342486_08-11-2025_02_58_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28342513, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28342514, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28342515, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28342516, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28342517, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28342518, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28342519, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28342520, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28342521, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28342522, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28342523, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28342524, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548474, 'mtr_portfolio_id': 28343165, 'dashboard_result_id': 17031824, '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_P28343165_08-11-2025_03_18_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28343185, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28343186, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28343187, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28343188, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28343189, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28343190, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28343191, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28343192, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28343193, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28343194, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28343195, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28343196, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548474, 'mtr_portfolio_id': 28343963, 'dashboard_result_id': 17031825, '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_P28343963_08-11-2025_03_35_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28343971, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28343972, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28343973, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28343974, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28343975, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28343976, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28343977, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28343978, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28343979, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28343980, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28343981, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28343982, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548474, 'mtr_portfolio_id': 28344516, 'dashboard_result_id': 17031826, '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_P28344516_08-11-2025_03_47_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28344550, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28344551, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28344552, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28344553, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28344554, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28344555, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28344556, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28344557, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28344558, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28344559, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28344560, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28344561, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548474, 'mtr_portfolio_id': 28345019, 'dashboard_result_id': 17031827, '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_P28345019_08-11-2025_04_03_33.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28345044, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28345045, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28345046, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28345047, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28345048, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28345049, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28345050, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28345051, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28345052, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28345053, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28345054, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28345055, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548474, 'mtr_portfolio_id': 28345480, 'dashboard_result_id': 17031828, '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_P28345480_08-11-2025_04_02_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28345483, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28345484, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28345485, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28345486, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28345487, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28345488, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28345489, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28345490, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28345491, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28345492, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28345493, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28345494, '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 = 28336003 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': 4020370, 'mtr_portfolio_id': 28336003, 'created_at': datetime.datetime(2025, 11, 8, 0, 17, 28), 'result': '0.04019632894827077', 'result_long': None, 'result_double': None}] Qualite : 0.04019632894827077 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28336003 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28336003_08-11-2025_00_17_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28336003 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_P28336003_08-11-2025_00_17_28.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28336011, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28336012, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28336013, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28336014, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28336015, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28336016, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28336017, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28336018, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28336019, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28336020, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28336021, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28336022, 'pht': 3726}}" where mtr_portfolio_id = 28336003 and dashboard_run_id = 2548474 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`=28336003 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17031814, 0.04019632894827077, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28336003_08-11-2025_00_17_28.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28336011, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28336012, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28336013, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28336014, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28336015, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28336016, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28336017, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28336018, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28336019, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28336020, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28336021, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28336022, '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 = 28336481 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': 4020414, 'mtr_portfolio_id': 28336481, 'created_at': datetime.datetime(2025, 11, 8, 0, 32, 58), 'result': '0.03956901961259934', 'result_long': None, 'result_double': None}] Qualite : 0.03956901961259934 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28336481 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28336481_08-11-2025_00_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28336481 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_P28336481_08-11-2025_00_32_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28336486, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28336487, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28336488, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28336489, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28336490, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28336491, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28336492, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28336493, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28336494, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28336495, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28336496, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28336497, 'pht': 3726}}" where mtr_portfolio_id = 28336481 and dashboard_run_id = 2548474 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`=28336481 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17031815, 0.03956901961259934, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28336481_08-11-2025_00_32_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28336486, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28336487, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28336488, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28336489, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28336490, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28336491, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28336492, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28336493, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28336494, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28336495, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28336496, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28336497, '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 = 28337035 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': 4020479, 'mtr_portfolio_id': 28337035, 'created_at': datetime.datetime(2025, 11, 8, 0, 46, 57), 'result': '0.03564186648367525', 'result_long': None, 'result_double': None}] Qualite : 0.03564186648367525 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28337035 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28337035_08-11-2025_00_46_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28337035 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_P28337035_08-11-2025_00_46_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28337096, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28337097, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28337098, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28337099, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28337100, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28337101, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28337102, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28337103, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28337104, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28337105, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28337106, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28337107, 'pht': 3726}}" where mtr_portfolio_id = 28337035 and dashboard_run_id = 2548474 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`=28337035 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17031816, 0.03564186648367525, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28337035_08-11-2025_00_46_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28337096, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28337097, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28337098, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28337099, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28337100, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28337101, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28337102, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28337103, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28337104, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28337105, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28337106, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28337107, '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 = 28337671 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': 4020549, 'mtr_portfolio_id': 28337671, 'created_at': datetime.datetime(2025, 11, 8, 1, 2, 30), 'result': '0.0375088666914562', 'result_long': None, 'result_double': None}] Qualite : 0.0375088666914562 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28337671 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28337671_08-11-2025_01_02_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28337671 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_P28337671_08-11-2025_01_02_30.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28337732, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28337733, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28337734, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28337735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28337736, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28337737, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28337738, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28337739, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28337740, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28337741, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28337742, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28337743, 'pht': 3726}}" where mtr_portfolio_id = 28337671 and dashboard_run_id = 2548474 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`=28337671 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17031817, 0.0375088666914562, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28337671_08-11-2025_01_02_30.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28337732, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28337733, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28337734, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28337735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28337736, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28337737, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28337738, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28337739, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28337740, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28337741, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28337742, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28337743, '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 = 28339415 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': 4020699, 'mtr_portfolio_id': 28339415, 'created_at': datetime.datetime(2025, 11, 8, 1, 48, 59), 'result': '0.05205984190432125', 'result_long': None, 'result_double': None}] Qualite : 0.05205984190432125 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28339415 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28339415_08-11-2025_01_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28339415 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_P28339415_08-11-2025_01_48_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28339417, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28339418, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28339419, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28339420, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28339421, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28339422, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28339423, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28339424, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28339425, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28339426, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28339427, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28339428, 'pht': 3726}}" where mtr_portfolio_id = 28339415 and dashboard_run_id = 2548474 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`=28339415 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17031818, 0.05205984190432125, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28339415_08-11-2025_01_48_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28339417, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28339418, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28339419, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28339420, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28339421, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28339422, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28339423, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28339424, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28339425, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28339426, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28339427, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28339428, '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 = 28339875 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': 4020735, 'mtr_portfolio_id': 28339875, 'created_at': datetime.datetime(2025, 11, 8, 2, 3), 'result': '0.04140678272944849', 'result_long': None, 'result_double': None}] Qualite : 0.04140678272944849 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28339875 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28339875_08-11-2025_02_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28339875 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_P28339875_08-11-2025_02_03_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28339896, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28339897, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28339898, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28339899, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28339900, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28339901, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28339902, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28339903, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28339904, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28339905, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28339906, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28339907, 'pht': 3726}}" where mtr_portfolio_id = 28339875 and dashboard_run_id = 2548474 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`=28339875 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17031819, 0.04140678272944849, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28339875_08-11-2025_02_03_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28339896, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28339897, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28339898, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28339899, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28339900, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28339901, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28339902, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28339903, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28339904, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28339905, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28339906, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28339907, '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 = 28340539 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': 4020797, 'mtr_portfolio_id': 28340539, 'created_at': datetime.datetime(2025, 11, 8, 2, 16, 57), 'result': '0.05072146864932478', 'result_long': None, 'result_double': None}] Qualite : 0.05072146864932478 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28340539 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28340539_08-11-2025_02_16_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28340539 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_P28340539_08-11-2025_02_16_57.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28340546, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28340547, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28340548, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28340549, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28340550, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28340551, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28340552, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28340553, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28340554, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28340555, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28340556, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28340557, 'pht': 3726}}" where mtr_portfolio_id = 28340539 and dashboard_run_id = 2548474 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`=28340539 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17031820, 0.05072146864932478, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28340539_08-11-2025_02_16_57.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28340546, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28340547, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28340548, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28340549, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28340550, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28340551, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28340552, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28340553, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28340554, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28340555, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28340556, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28340557, '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 = 28341213 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': 4020872, 'mtr_portfolio_id': 28341213, 'created_at': datetime.datetime(2025, 11, 8, 2, 34, 58), 'result': '0.04714598692392764', 'result_long': None, 'result_double': None}] Qualite : 0.04714598692392764 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28341213 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28341213_08-11-2025_02_34_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28341213 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_P28341213_08-11-2025_02_34_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28341222, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28341223, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28341224, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28341225, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28341226, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28341227, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28341228, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28341229, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28341230, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28341231, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28341232, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28341233, 'pht': 3726}}" where mtr_portfolio_id = 28341213 and dashboard_run_id = 2548474 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`=28341213 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17031821, 0.04714598692392764, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28341213_08-11-2025_02_34_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28341222, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28341223, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28341224, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28341225, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28341226, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28341227, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28341228, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28341229, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28341230, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28341231, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28341232, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28341233, '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 = 28341967 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': 4020945, 'mtr_portfolio_id': 28341967, 'created_at': datetime.datetime(2025, 11, 8, 2, 46, 59), 'result': '0.04329548973262093', 'result_long': None, 'result_double': None}] Qualite : 0.04329548973262093 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28341967 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28341967_08-11-2025_02_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28341967 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_P28341967_08-11-2025_02_46_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28341980, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28341981, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28341982, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28341983, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28341984, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28341985, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28341986, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28341987, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28341988, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28341989, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28341990, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28341992, 'pht': 3726}}" where mtr_portfolio_id = 28341967 and dashboard_run_id = 2548474 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`=28341967 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17031822, 0.04329548973262093, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28341967_08-11-2025_02_46_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28341980, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28341981, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28341982, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28341983, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28341984, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28341985, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28341986, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28341987, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28341988, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28341989, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28341990, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28341992, '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 = 28342486 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': 4020989, 'mtr_portfolio_id': 28342486, 'created_at': datetime.datetime(2025, 11, 8, 2, 58, 58), 'result': '0.03263845655033121', 'result_long': None, 'result_double': None}] Qualite : 0.03263845655033121 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28342486 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28342486_08-11-2025_02_58_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28342486 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_P28342486_08-11-2025_02_58_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28342513, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28342514, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28342515, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28342516, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28342517, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28342518, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28342519, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28342520, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28342521, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28342522, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28342523, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28342524, 'pht': 3726}}" where mtr_portfolio_id = 28342486 and dashboard_run_id = 2548474 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`=28342486 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17031823, 0.03263845655033121, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28342486_08-11-2025_02_58_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28342513, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28342514, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28342515, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28342516, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28342517, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28342518, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28342519, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28342520, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28342521, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28342522, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28342523, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28342524, '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 = 28343165 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': 4021069, 'mtr_portfolio_id': 28343165, 'created_at': datetime.datetime(2025, 11, 8, 3, 18, 58), 'result': '0.04579316729223647', 'result_long': None, 'result_double': None}] Qualite : 0.04579316729223647 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28343165 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28343165_08-11-2025_03_18_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28343165 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_P28343165_08-11-2025_03_18_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28343185, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28343186, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28343187, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28343188, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28343189, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28343190, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28343191, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28343192, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28343193, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28343194, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28343195, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28343196, 'pht': 3726}}" where mtr_portfolio_id = 28343165 and dashboard_run_id = 2548474 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`=28343165 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17031824, 0.04579316729223647, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28343165_08-11-2025_03_18_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28343185, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28343186, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28343187, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28343188, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28343189, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28343190, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28343191, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28343192, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28343193, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28343194, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28343195, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28343196, '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 = 28343963 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': 4021133, 'mtr_portfolio_id': 28343963, 'created_at': datetime.datetime(2025, 11, 8, 3, 35), 'result': '0.04462234563735117', 'result_long': None, 'result_double': None}] Qualite : 0.04462234563735117 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28343963 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28343963_08-11-2025_03_35_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28343963 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_P28343963_08-11-2025_03_35_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28343971, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28343972, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28343973, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28343974, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28343975, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28343976, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28343977, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28343978, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28343979, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28343980, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28343981, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28343982, 'pht': 3726}}" where mtr_portfolio_id = 28343963 and dashboard_run_id = 2548474 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`=28343963 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17031825, 0.04462234563735117, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28343963_08-11-2025_03_35_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28343971, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28343972, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28343973, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28343974, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28343975, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28343976, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28343977, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28343978, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28343979, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28343980, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28343981, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28343982, '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 = 28344516 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': 4021197, 'mtr_portfolio_id': 28344516, 'created_at': datetime.datetime(2025, 11, 8, 3, 47), 'result': '0.041810041093389025', 'result_long': None, 'result_double': None}] Qualite : 0.041810041093389025 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28344516 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28344516_08-11-2025_03_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28344516 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_P28344516_08-11-2025_03_47_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28344550, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28344551, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28344552, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28344553, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28344554, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28344555, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28344556, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28344557, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28344558, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28344559, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28344560, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28344561, 'pht': 3726}}" where mtr_portfolio_id = 28344516 and dashboard_run_id = 2548474 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`=28344516 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17031826, 0.041810041093389025, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28344516_08-11-2025_03_47_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28344550, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28344551, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28344552, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28344553, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28344554, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28344555, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28344556, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28344557, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28344558, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28344559, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28344560, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28344561, '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 = 28345019 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': 4021263, 'mtr_portfolio_id': 28345019, 'created_at': datetime.datetime(2025, 11, 8, 4, 4, 58), 'result': '0.07153734665419287', 'result_long': None, 'result_double': None}] Qualite : 0.07153734665419287 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28345019 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28345019_08-11-2025_04_04_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28345019 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_P28345019_08-11-2025_04_04_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28345044, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28345045, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28345046, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28345047, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28345048, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28345049, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28345050, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28345051, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28345052, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28345053, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28345054, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28345055, 'pht': 3726}}" where mtr_portfolio_id = 28345019 and dashboard_run_id = 2548474 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`=28345019 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17031827, 0.07153734665419287, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28345019_08-11-2025_04_04_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28345044, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28345045, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28345046, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28345047, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28345048, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28345049, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28345050, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28345051, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28345052, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28345053, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28345054, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28345055, '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 = 28345480 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 28345480 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 28345480 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 28345480 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 28345480 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28345480 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28345480_08-11-2025_04_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28345480 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_P28345480_08-11-2025_04_02_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28345483, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28345484, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28345485, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28345486, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28345487, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28345488, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28345489, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28345490, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28345491, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28345492, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28345493, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28345494, 'pht': 3726}}" where mtr_portfolio_id = 28345480 and dashboard_run_id = 2548474 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28336003,28336481,28337035,28337671,28339415,28339875,28340539,28341213,28341967,28342486,28343165,28343963,28344516,28345019,28345480) result : ((1393294530,), (1393294539,), (1393294562,), (1393294691,), (1393294724,), (1393294758,), (1393294793,), (1393294834,), (1393295403,), (1393295465,), (1393295525,), (1393295559,), (1393295753,), (1393295757,), (1393295790,), (1393295824,), (1393295863,), (1393296048,), (1393296080,), (1393296089,), (1393296153,), (1393296156,), (1393296160,), (1393296162,), (1393296164,), (1393296166,), (1393296191,), (1393296193,), (1393296267,), (1393296301,), (1393296332,), (1393296367,), (1393296405,), (1393296440,), (1393296792,), (1393296825,), (1393296860,), (1393296895,), (1393296941,), (1393297513,), (1393297554,), (1393297592,), (1393298019,), (1393298046,), (1393298050,), (1393298280,), (1393298283,), (1393298286,), (1393298289,), (1393298355,), (1393298388,), (1393298423,), (1393298818,), (1393298848,), (1393299117,), (1393299131,), (1393299146,), (1393299214,), (1393299212,), (1393299213,), (1393299255,), (1393299256,), (1393299257,), (1393299260,), (1393299535,), (1393299566,), (1393299571,), (1393299871,), (1393299910,), (1393299944,), (1393300249,), (1393300253,), (1393300255,), (1393300257,), (1393300260,), (1393300543,), (1393300547,), (1393300550,), (1393300554,), (1393300559,), (1393300590,), (1393300592,), (1393300593,), (1393300595,), (1393300598,), (1393300630,), (1393300631,), (1393300632,), (1393300634,), (1393300638,), (1393300642,), (1393300691,), (1393300693,), (1393300694,), (1393300724,), (1393300760,), (1393300793,), (1393300828,), (1393300861,), (1393300900,), (1393301025,), (1393301058,), (1393301193,), (1393301224,), (1393301269,), (1393301326,), (1393301410,), (1393301491,), (1393301916,), (1393302013,), (1393302108,), (1393302194,), (1393302285,), (1393302344,), (1393302888,), (1393302926,), (1393302962,), (1393302998,), (1393303031,), (1393303062,), (1393303248,), (1393303320,), (1393303472,), (1393303506,), (1393303536,), (1393303540,), (1393303543,), (1393303583,), (1393303585,), (1393303587,), (1393303588,), (1393303617,), (1393303648,), (1393304007,), (1393304011,), (1393304086,), (1393304109,), (1393304120,), (1393304123,), (1393304129,), (1393303942,), (1393303964,), (1393303994,), (1393304002,), (1393304159,), (1393304171,), (1393304183,), (1393304312,), (1393304313,), (1393304314,), (1393304316,), (1393304319,), (1393304424,), (1393304431,), (1393304436,), (1393304440,), (1393304444,), (1393304453,), (1393304455,), (1393304457,), (1393304466,), (1393304474,), (1393304484,), (1393304495,), (1393304498,), (1393304501,), (1393304510,), (1393304531,), (1393304536,), (1393304540,), (1393304554,), (1393304562,), (1393304567,), (1393304570,), (1393304600,), (1393304624,), (1393304635,), (1393304642,), (1393304646,), (1393304707,), (1393304739,), (1393304772,), (1393304814,), (1393304849,), (1393304885,), (1393305003,), (1393305047,), (1393305136,), (1393305138,), (1393305163,), (1393305189,), (1393305223,), (1393305397,), (1393305400,), (1393305402,), (1393305405,), (1393305410,), (1393305450,), (1393305643,), (1393305678,), (1393305712,), (1393305734,), (1393305742,), (1393305802,), (1393305803,), (1393305805,), (1393305808,), (1393305828,), (1393305833,), (1393305838,), (1393305842,), (1393305854,), (1393306107,), (1393306132,), (1393306162,), (1393306178,), (1393306192,), (1393306204,), (1393306241,), (1393306239,), (1393306240,), (1393306264,), (1393306267,), (1393306268,), (1393306270,), (1393306273,), (1393306274,), (1393306351,), (1393306353,), (1393306355,), (1393306362,), (1393306401,), (1393306846,), (1393306879,), (1393306893,), (1393306895,), (1393306898,), (1393307097,), (1393307121,), (1393307130,), (1393307134,), (1393307141,), (1393307382,), (1393307413,), (1393307499,), (1393307502,), (1393307504,), (1393307506,), (1393307509,), (1393307543,), (1393307544,), (1393307545,), (1393307548,), (1393307551,), (1393307634,), (1393307698,), (1393307700,), (1393307754,), (1393307757,), (1393307760,), (1393307763,), (1393308022,), (1393308069,), (1393308497,), (1393308500,), (1393308503,), (1393308507,), (1393308509,), (1393308511,), (1393308534,), (1393317017,), (1393317049,), (1393317402,), (1393317432,), (1393317462,), (1393317493,), (1393317500,), (1393317722,), (1393317725,), (1393317728,), (1393317751,), (1393317957,), (1393317959,), (1393317961,), (1393318152,), (1393318161,), (1393318162,), (1393318164,), (1393318166,), (1393318184,), (1393318313,), (1393318346,), (1393318383,), (1393318530,), (1393318568,), (1393318600,), (1393318631,), (1393318668,), (1393318949,), (1393318951,), (1393318952,), (1393318970,), (1393318978,), (1393319279,), (1393319299,), (1393319300,), (1393319309,), (1393319585,), (1393319615,), (1393319642,), (1393319676,), (1393319707,), (1393319760,), (1393319986,), (1393320047,), (1393320123,), (1393320181,), (1393320415,), (1393320595,), (1393320626,), (1393320662,), (1393320698,), (1393320731,), (1393320888,), (1393320889,), (1393320891,), (1393320893,), (1393320905,), (1393320907,), (1393320909,), (1393320910,), (1393320930,), (1393321069,), (1393320928,), (1393320929,), (1393320956,), (1393320972,), (1393320973,), (1393320980,), (1393320983,), (1393320986,), (1393321033,), (1393321034,), (1393321086,), (1393321088,), (1393321091,), (1393321399,), (1393321430,), (1393321460,), (1393321687,), (1393321766,), (1393321811,), (1393321815,), (1393322039,), (1393322040,), (1393322041,), (1393322069,), (1393322071,), (1393322075,), (1393322172,), (1393322209,), (1393322231,), (1393322236,), (1393322249,), (1393322282,), (1393322331,), (1393322332,), (1393322333,), (1393322334,), (1393322336,), (1393322352,), (1393322353,), (1393322354,), (1393322368,), (1393322494,), (1393322526,), (1393322559,), (1393322593,), (1393322630,), (1393322663,), (1393322755,), (1393322761,), (1393322850,), (1393322852,), (1393322873,), (1393322892,), (1393322896,), (1393322999,), (1393323001,), (1393323005,), (1393323022,), (1393323055,), (1393323206,), (1393323239,), (1393323270,), (1393323417,), (1393323406,), (1393323409,), (1393323411,), (1393323413,), (1393323688,), (1393323726,), (1393323761,), (1393323805,), (1393323824,), (1393323867,), (1393324151,), (1393324153,), (1393324168,), (1393324191,), (1393324274,), (1393324276,), (1393324278,), (1393324279,), (1393324310,), (1393324324,), (1393324579,), (1393324580,), (1393324581,), (1393324583,), (1393324587,), (1393324607,), (1393324609,), (1393324612,), (1393324616,), (1393324620,), (1393324621,), (1393324666,), (1393324669,), (1393324672,), (1393324678,), (1393324680,), (1393324696,), (1393324698,), (1393324701,), (1393324712,), (1393324719,), (1393324879,), (1393324908,), (1393324939,), (1393324971,), (1393324975,), (1393324978,), (1393325242,), (1393325300,), (1393325371,), (1393325404,), (1393325437,), (1393325659,), (1393325721,), (1393326108,), (1393326120,), (1393326131,), (1393326139,), (1393326303,), (1393326306,), (1393326309,), (1393326417,), (1393326435,), (1393326436,), (1393326462,), (1393326573,), (1393326574,), (1393326603,), (1393326595,), (1393326597,), (1393326599,), (1393326708,), (1393326810,), (1393326811,), (1393326812,), (1393326840,), (1393326842,), (1393326844,), (1393326847,), (1393326851,), (1393326901,), (1393326931,), (1393326966,), (1393327203,), (1393327204,), (1393327205,), (1393327208,), (1393327212,), (1393327216,), (1393327234,), (1393327237,), (1393327286,), (1393327288,), (1393327289,), (1393327291,), (1393327294,), (1393327564,), (1393327566,), (1393327568,), (1393327571,), (1393327576,), (1393327731,), (1393327733,), (1393327757,), (1393327794,), (1393327827,), (1393327841,), (1393327842,), (1393327843,), (1393328121,), (1393328122,), (1393328123,), (1393328125,), (1393328128,), (1393328342,), (1393328352,), (1393328355,), (1393328357,), (1393328361,), (1393328426,), (1393328460,), (1393328492,), (1393328647,), (1393328749,), (1393328736,), (1393328737,), (1393328740,), (1393328745,), (1393328793,), (1393328796,), (1393328799,), (1393328802,), (1393328804,), (1393328807,), (1393328832,), (1393328840,), (1393328843,), (1393328845,), (1393328945,), (1393328949,), (1393329214,), (1393329215,), (1393329238,), (1393329296,), (1393329298,), (1393329345,), (1393329355,), (1393329360,), (1393329365,), (1393329368,), (1393329380,), (1393329592,), (1393329625,), (1393329644,), (1393329647,), (1393329765,), (1393329767,), (1393329940,), (1393329941,), (1393329959,), (1393330014,), (1393330054,), (1393330172,), (1393330178,), (1393330180,), (1393330183,), (1393330185,), (1393330201,), (1393330203,), (1393330204,), (1393330205,), (1393330266,), (1393330267,), (1393330508,), (1393330518,), (1393330521,), (1393330530,), (1393330568,), (1393330669,), (1393330665,), (1393330667,), (1393330668,), (1393330689,), (1393330691,), (1393330693,), (1393330768,), (1393330770,), (1393330773,), (1393330775,), (1393330779,), (1393330782,), (1393330806,), (1393330808,), (1393330810,), (1393330813,), (1393330817,), (1393330846,), (1393330849,), (1393330850,), (1393330852,), (1393330856,), (1393331016,), (1393331058,), (1393331088,), (1393331120,), (1393331283,), (1393331315,), (1393331336,), (1393331339,), (1393331344,), (1393331346,), (1393331608,), (1393331611,), (1393331639,), (1393331643,), (1393331918,), (1393331944,), (1393331945,), (1393331946,), (1393331948,), (1393332042,), (1393332045,), (1393332067,), (1393332101,), (1393332123,), (1393332233,), (1393332243,), (1393332244,), (1393332272,), (1393332274,), (1393332320,), (1393332321,), (1393332324,), (1393332342,), (1393332354,), (1393332376,), (1393332379,), (1393332382,), (1393332386,), (1393333294,), (1393333315,), (1393333322,), (1393334003,), (1393333846,), (1393333913,), (1393333954,), (1393334406,), (1393334492,), (1393334578,), (1393334672,), (1393335405,), (1393335406,), (1393335407,), (1393335410,), (1393335420,), (1393335687,), (1393335706,), (1393335718,), (1393335722,), (1393336036,), (1393336068,), (1393336102,), (1393336140,), (1393336434,), (1393336437,), (1393336441,), (1393336447,), (1393336452,), (1393336645,), (1393336667,), (1393336679,), (1393336683,), (1393336687,), (1393336689,), (1393336700,), (1393336702,), (1393336703,), (1393336706,), (1393336711,), (1393336833,), (1393336863,), (1393336893,), (1393336927,), (1393337131,), (1393337168,), (1393337201,), (1393337233,), (1393337240,), (1393337248,), (1393337305,), (1393337307,), (1393337308,), (1393337311,), (1393337313,), (1393337315,), (1393337614,), (1393337645,), (1393337669,), (1393337673,), (1393337677,), (1393337681,), (1393337766,), (1393337786,), (1393337795,), (1393337815,), (1393337818,), (1393337822,), (1393337827,), (1393337829,), (1393337831,), (1393337854,), (1393337855,), (1393337856,), (1393337858,), (1393337923,), (1393337924,), (1393337925,), (1393337927,), (1393337973,), (1393337960,), (1393337962,), (1393337964,), (1393337966,), (1393337970,), (1393337994,), (1393337999,), (1393338007,), (1393338008,), (1393338011,), (1393338014,), (1393338157,), (1393338188,), (1393338218,), (1393338253,), (1393338801,), (1393339037,), (1393339108,), (1393339154,), (1393339215,), (1393339249,), (1393339591,), (1393339593,), (1393339597,), (1393339624,), (1393339660,), (1393339827,), (1393339860,), (1393339869,), (1393339889,), (1393340263,), (1393340266,), (1393340269,), (1393340449,), (1393340452,), (1393340455,), (1393340460,), (1393340484,), (1393340485,), (1393340486,), (1393340488,), (1393340509,), (1393340513,), (1393340518,), (1393340523,), (1393340527,), (1393340530,), (1393340555,), (1393340558,), (1393340564,), (1393340577,), (1393340602,), (1393340603,), (1393340604,), (1393340635,), (1393340638,), (1393340640,), (1393340641,), (1393340643,), (1393340672,), (1393340673,), (1393340674,), (1393340676,), (1393340679,), (1393340747,), (1393340750,), (1393340752,), (1393340794,), (1393340893,), (1393340909,), (1393340911,), (1393340916,), (1393340785,), (1393340786,), (1393340787,), (1393340789,), (1393340791,), (1393340811,), (1393340813,), (1393340824,), (1393340833,), (1393340844,), (1393340850,), (1393340875,), (1393340879,), (1393340885,), (1393340889,), (1393340891,), (1393340901,), (1393340903,), (1393340905,), (1393340907,), (1393340918,), (1393340920,), (1393340924,), (1393340955,), (1393340957,), (1393340958,), (1393340960,), (1393340963,), (1393340965,), (1393340983,), (1393340984,), (1393340985,), (1393340988,), (1393341057,), (1393341059,), (1393341062,), (1393341068,), (1393341083,), (1393341102,), (1393341118,), (1393341121,), (1393341122,), (1393341124,), (1393341189,), (1393341193,), (1393341195,), (1393341198,), (1393341226,), (1393341227,), (1393341228,), (1393341232,), (1393341237,), (1393341239,), (1393341265,), (1393341268,), (1393341283,), (1393341287,), (1393341290,), (1393341421,), (1393341427,), (1393341428,), (1393341575,), (1393341577,), (1393341579,), (1393341582,), (1393341584,), (1393341587,), (1393341594,), (1393341598,), (1393341601,), (1393341610,), (1393341611,), (1393341613,), (1393341617,), (1393341675,), (1393341677,), (1393341679,), (1393341681,), (1393341684,), (1393341709,), (1393341702,), (1393341703,), (1393341704,), (1393341706,), (1393341743,), (1393341751,), (1393341755,), (1393341794,), (1393341796,), (1393341822,), (1393341824,), (1393341825,), (1393341828,), (1393341831,), (1393341850,), (1393341853,), (1393341857,), (1393341860,), (1393341909,), (1393341910,), (1393341911,), (1393341913,), (1393341916,), (1393341938,), (1393341940,), (1393341943,), (1393342004,), (1393342014,), (1393342023,), (1393342055,), (1393342056,), (1393342057,), (1393342080,), (1393342086,), (1393342091,), (1393342096,), (1393342098,), (1393342112,), (1393342113,), (1393342114,), (1393342116,), (1393342166,), (1393342168,), (1393342205,), (1393342207,), (1393342209,), (1393342212,), (1393342215,), (1393342746,), (1393342749,), (1393342752,), (1393342756,), (1393342760,), (1393342828,), (1393342864,), (1393342899,), (1393342933,), (1393343041,), (1393343043,), (1393343045,), (1393343160,), (1393343164,), (1393343031,), (1393343036,), (1393343038,), (1393343064,), (1393343074,), (1393343091,), (1393343103,), (1393343111,), (1393343116,), (1393343175,), (1393343176,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'08112025': {'nb_upload': 62, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28345019]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1393343164, 1393343160] map_info['map_portfolio_photo'] : {28345019: [1393343164, 1393343160, 1393343045, 1393343043, 1393343041, 1393342933, 1393342899, 1393342864, 1393342828, 1393342760, 1393342756, 1393342752, 1393342749, 1393342746, 1393342215, 1393342212, 1393342209, 1393342207, 1393342205, 1393342168, 1393342166, 1393342116, 1393342114, 1393342113, 1393342112, 1393342098, 1393342096, 1393342091, 1393342086, 1393342080, 1393342057, 1393342056, 1393342055, 1393342023, 1393342014, 1393342004, 1393341943, 1393341940, 1393341938, 1393341916, 1393341913, 1393341911, 1393341910, 1393341909, 1393341860, 1393341857, 1393341853, 1393341850, 1393341831, 1393341828, 1393341825, 1393341824, 1393341822, 1393341796, 1393341794, 1393341755, 1393341751, 1393341743, 1393341706, 1393341704, 1393341703, 1393341702]} final : True mtd_id 4302 list_pids : [1393343164, 1393343160] Looping around the photos to save general results len do output : 1 /28345019Didn'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, '4021263') ('4302', '28345019', '1393343164', None, None, None, None, None, '4021263') ('4302', None, None, None, None, None, None, None, '4021263') ('4302', '28345019', '1393343160', None, None, None, None, None, '4021263') 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', None, '28345019', 'None', None, None, None, None, '4021263'), ('4302', '28345019', '1393343164', None, None, None, None, None, '4021263'), ('4302', '28345019', '1393343160', None, None, None, None, None, '4021263')] time used for this insertion : 0.029757261276245117 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.1480014324188232 time spend to save output : 0.029929399490356445 total time spend for step 5 : 1.1779308319091797 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 (4021263) 1.93user 2.15system 0:10.75elapsed 38%CPU (0avgtext+0avgdata 157168maxresident)k 3632inputs+10912outputs (84major+63624minor)pagefaults 0swaps