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 : 3592422 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 (3432340) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3432340) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25634599 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3432340'] with mtr_portfolio_ids : ['25634599'] and first list_photo_ids : [] new path : /proc/3592422/ Name: python3 Umask: 0002 State: R (running) Tgid: 3592422 Ngid: 0 Pid: 3592422 PPid: 3592421 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3592422 NSpid: 3592422 NSpgid: 3592135 NSsid: 3592135 VmPeak: 1106860 kB VmSize: 1106860 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98612 kB VmRSS: 98612 kB RssAnon: 59816 kB RssFile: 38796 kB RssShmem: 0 kB VmData: 865612 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 580 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: 41 nonvoluntary_ctxt_switches: 95 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3592422', 'Ngid': '0', 'Pid': '3592422', 'PPid': '3592421', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3592422', 'NSpid': '3592422', 'NSpgid': '3592135', 'NSsid': '3592135', 'VmPeak': '1106860 kB', 'VmSize': '1106860 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98612 kB', 'VmRSS': '98612 kB', 'RssAnon': '59816 kB', 'RssFile': '38796 kB', 'RssShmem': '0 kB', 'VmData': '865612 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '580 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': '41', 'nonvoluntary_ctxt_switches': '95'} ('datou_batch_current', '3592422', '1106860', '0', '1106860', '865612', '98612', b'', 'marlene', '3432340') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (25634599) 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 (3432340 ) ) 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 (25634599) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1375101945, 'portfolio_id': 25634599}, {'photo_id': 1375101729, 'portfolio_id': 25634599}, {'photo_id': 1375101717, 'portfolio_id': 25634599}, {'photo_id': 1375101712, 'portfolio_id': 25634599}, {'photo_id': 1375101653, 'portfolio_id': 25634599}, {'photo_id': 1375101651, 'portfolio_id': 25634599}, {'photo_id': 1375101648, 'portfolio_id': 25634599}, {'photo_id': 1375101616, 'portfolio_id': 25634599}, {'photo_id': 1375101612, 'portfolio_id': 25634599}, {'photo_id': 1375101585, 'portfolio_id': 25634599}, {'photo_id': 1375101561, 'portfolio_id': 25634599}, {'photo_id': 1375101558, 'portfolio_id': 25634599}, {'photo_id': 1375101556, 'portfolio_id': 25634599}, {'photo_id': 1375101554, 'portfolio_id': 25634599}, {'photo_id': 1375101531, 'portfolio_id': 25634599}, {'photo_id': 1375101529, 'portfolio_id': 25634599}, {'photo_id': 1375101528, 'portfolio_id': 25634599}, {'photo_id': 1375101501, 'portfolio_id': 25634599}, {'photo_id': 1375101498, 'portfolio_id': 25634599}, {'photo_id': 1375101495, 'portfolio_id': 25634599}, {'photo_id': 1375101490, 'portfolio_id': 25634599}, {'photo_id': 1375101470, 'portfolio_id': 25634599}, {'photo_id': 1375101468, 'portfolio_id': 25634599}, {'photo_id': 1375101467, 'portfolio_id': 25634599}, {'photo_id': 1375101465, 'portfolio_id': 25634599}, {'photo_id': 1375101453, 'portfolio_id': 25634599}, {'photo_id': 1375101449, 'portfolio_id': 25634599}, {'photo_id': 1375101445, 'portfolio_id': 25634599}, {'photo_id': 1375101442, 'portfolio_id': 25634599}, {'photo_id': 1375101439, 'portfolio_id': 25634599}, {'photo_id': 1375101437, 'portfolio_id': 25634599}, {'photo_id': 1375101401, 'portfolio_id': 25634599}, {'photo_id': 1375101399, 'portfolio_id': 25634599}, {'photo_id': 1375101397, 'portfolio_id': 25634599}, {'photo_id': 1375101396, 'portfolio_id': 25634599}, {'photo_id': 1375101377, 'portfolio_id': 25634599}, {'photo_id': 1375101375, 'portfolio_id': 25634599}, {'photo_id': 1375101374, 'portfolio_id': 25634599}, {'photo_id': 1375101372, 'portfolio_id': 25634599}, {'photo_id': 1375101354, 'portfolio_id': 25634599}, {'photo_id': 1375101350, 'portfolio_id': 25634599}, {'photo_id': 1375101347, 'portfolio_id': 25634599}, {'photo_id': 1375101345, 'portfolio_id': 25634599}, {'photo_id': 1375101344, 'portfolio_id': 25634599}, {'photo_id': 1375101342, 'portfolio_id': 25634599}, {'photo_id': 1375101324, 'portfolio_id': 25634599}, {'photo_id': 1375101322, 'portfolio_id': 25634599}, {'photo_id': 1375101321, 'portfolio_id': 25634599}, {'photo_id': 1375101318, 'portfolio_id': 25634599}, {'photo_id': 1375101299, 'portfolio_id': 25634599}, {'photo_id': 1375101296, 'portfolio_id': 25634599}] map_portfolio_id_photo_id: {25634599: [1375101945, 1375101729, 1375101717, 1375101712, 1375101653, 1375101651, 1375101648, 1375101616, 1375101612, 1375101585, 1375101561, 1375101558, 1375101556, 1375101554, 1375101531, 1375101529, 1375101528, 1375101501, 1375101498, 1375101495, 1375101490, 1375101470, 1375101468, 1375101467, 1375101465, 1375101453, 1375101449, 1375101445, 1375101442, 1375101439, 1375101437, 1375101401, 1375101399, 1375101397, 1375101396, 1375101377, 1375101375, 1375101374, 1375101372, 1375101354, 1375101350, 1375101347, 1375101345, 1375101344, 1375101342, 1375101324, 1375101322, 1375101321, 1375101318, 1375101299, 1375101296]} ##### 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.014997482299804688 #### 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 Mon Aug 4 11:03:27 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 (25634599) 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 : 25634599 get user id for portfolio 25634599 get sub ptf for main ptf 25634599, type 3726 and hashtags ['environnement', 'cartonnette', 'flou', 'plastique', 'mal_croppe', 'papier', 'Carton_brun', 'metal', 'autre_refus', 'Teint_Dans_La_Masse', 'kraft', '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`=25634599 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','cartonnette','flou','plastique','mal_croppe','papier','Carton_brun','metal','autre_refus','Teint_Dans_La_Masse','kraft','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`=25634599 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','cartonnette','flou','plastique','mal_croppe','papier','Carton_brun','metal','autre_refus','Teint_Dans_La_Masse','kraft','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'autre_refus': {'main_port_id': 25634599, 'sub_port_id': 25634635, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284334, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 28)}, 'Carton_gris': {'main_port_id': 25634599, 'sub_port_id': 25634636, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284335, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 28)}, 'metal': {'main_port_id': 25634599, 'sub_port_id': 25634637, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284336, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 25634599, 'sub_port_id': 25634638, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284337, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 28)}, 'plastique': {'main_port_id': 25634599, 'sub_port_id': 25634639, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284338, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 28)}, 'flou': {'main_port_id': 25634599, 'sub_port_id': 25634640, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284339, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 28)}, 'kraft': {'main_port_id': 25634599, 'sub_port_id': 25634641, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284340, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 28)}, 'mal_croppe': {'main_port_id': 25634599, 'sub_port_id': 25634642, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284341, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 28)}, 'Carton_brun': {'main_port_id': 25634599, 'sub_port_id': 25634643, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284342, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 28)}, 'papier': {'main_port_id': 25634599, 'sub_port_id': 25634644, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284343, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 28)}, 'environnement': {'main_port_id': 25634599, 'sub_port_id': 25634645, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284344, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 28)}, 'cartonnette': {'main_port_id': 25634599, 'sub_port_id': 25634646, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284345, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25634635 , 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=25634599 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 (25634635) result : ((1375101522,), (1375101577,), (1375102191,), (1375102193,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25634599) result : ((1375101296,), (1375101299,), (1375101318,), (1375101321,), (1375101322,), (1375101324,), (1375101342,), (1375101344,), (1375101345,), (1375101347,), (1375101350,), (1375101354,), (1375101372,), (1375101374,), (1375101375,), (1375101377,), (1375101396,), (1375101397,), (1375101399,), (1375101401,), (1375101437,), (1375101439,), (1375101442,), (1375101445,), (1375101449,), (1375101453,), (1375101465,), (1375101467,), (1375101468,), (1375101470,), (1375101490,), (1375101495,), (1375101498,), (1375101501,), (1375101528,), (1375101529,), (1375101531,), (1375101554,), (1375101556,), (1375101558,), (1375101561,), (1375101585,), (1375101612,), (1375101616,), (1375101648,), (1375101651,), (1375101653,), (1375101712,), (1375101717,), (1375101729,), (1375101945,)) 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 25634636 , 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=25634599 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 (25634636) result : ((1375101523,), (1375101637,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25634599) result : ((1375101296,), (1375101299,), (1375101318,), (1375101321,), (1375101322,), (1375101324,), (1375101342,), (1375101344,), (1375101345,), (1375101347,), (1375101350,), (1375101354,), (1375101372,), (1375101374,), (1375101375,), (1375101377,), (1375101396,), (1375101397,), (1375101399,), (1375101401,), (1375101437,), (1375101439,), (1375101442,), (1375101445,), (1375101449,), (1375101453,), (1375101465,), (1375101467,), (1375101468,), (1375101470,), (1375101490,), (1375101495,), (1375101498,), (1375101501,), (1375101528,), (1375101529,), (1375101531,), (1375101554,), (1375101556,), (1375101558,), (1375101561,), (1375101585,), (1375101612,), (1375101616,), (1375101648,), (1375101651,), (1375101653,), (1375101712,), (1375101717,), (1375101729,), (1375101945,)) 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 25634637 , 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=25634599 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 (25634637) result : ((1375102229,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25634599) result : ((1375101296,), (1375101299,), (1375101318,), (1375101321,), (1375101322,), (1375101324,), (1375101342,), (1375101344,), (1375101345,), (1375101347,), (1375101350,), (1375101354,), (1375101372,), (1375101374,), (1375101375,), (1375101377,), (1375101396,), (1375101397,), (1375101399,), (1375101401,), (1375101437,), (1375101439,), (1375101442,), (1375101445,), (1375101449,), (1375101453,), (1375101465,), (1375101467,), (1375101468,), (1375101470,), (1375101490,), (1375101495,), (1375101498,), (1375101501,), (1375101528,), (1375101529,), (1375101531,), (1375101554,), (1375101556,), (1375101558,), (1375101561,), (1375101585,), (1375101612,), (1375101616,), (1375101648,), (1375101651,), (1375101653,), (1375101712,), (1375101717,), (1375101729,), (1375101945,)) 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 25634638 , 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=25634599 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 (25634638) result : ((1375101575,), (1375101635,), (1375101680,), (1375101681,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25634599) result : ((1375101296,), (1375101299,), (1375101318,), (1375101321,), (1375101322,), (1375101324,), (1375101342,), (1375101344,), (1375101345,), (1375101347,), (1375101350,), (1375101354,), (1375101372,), (1375101374,), (1375101375,), (1375101377,), (1375101396,), (1375101397,), (1375101399,), (1375101401,), (1375101437,), (1375101439,), (1375101442,), (1375101445,), (1375101449,), (1375101453,), (1375101465,), (1375101467,), (1375101468,), (1375101470,), (1375101490,), (1375101495,), (1375101498,), (1375101501,), (1375101528,), (1375101529,), (1375101531,), (1375101554,), (1375101556,), (1375101558,), (1375101561,), (1375101585,), (1375101612,), (1375101616,), (1375101648,), (1375101651,), (1375101653,), (1375101712,), (1375101717,), (1375101729,), (1375101945,)) 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 25634639 , 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=25634599 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 (25634639) result : ((1375101392,), (1375101393,), (1375102218,), (1375102220,), (1375102222,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25634599) result : ((1375101296,), (1375101299,), (1375101318,), (1375101321,), (1375101322,), (1375101324,), (1375101342,), (1375101344,), (1375101345,), (1375101347,), (1375101350,), (1375101354,), (1375101372,), (1375101374,), (1375101375,), (1375101377,), (1375101396,), (1375101397,), (1375101399,), (1375101401,), (1375101437,), (1375101439,), (1375101442,), (1375101445,), (1375101449,), (1375101453,), (1375101465,), (1375101467,), (1375101468,), (1375101470,), (1375101490,), (1375101495,), (1375101498,), (1375101501,), (1375101528,), (1375101529,), (1375101531,), (1375101554,), (1375101556,), (1375101558,), (1375101561,), (1375101585,), (1375101612,), (1375101616,), (1375101648,), (1375101651,), (1375101653,), (1375101712,), (1375101717,), (1375101729,), (1375101945,)) 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 25634640 , 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=25634599 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 (25634640) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25634599) result : ((1375101296,), (1375101299,), (1375101318,), (1375101321,), (1375101322,), (1375101324,), (1375101342,), (1375101344,), (1375101345,), (1375101347,), (1375101350,), (1375101354,), (1375101372,), (1375101374,), (1375101375,), (1375101377,), (1375101396,), (1375101397,), (1375101399,), (1375101401,), (1375101437,), (1375101439,), (1375101442,), (1375101445,), (1375101449,), (1375101453,), (1375101465,), (1375101467,), (1375101468,), (1375101470,), (1375101490,), (1375101495,), (1375101498,), (1375101501,), (1375101528,), (1375101529,), (1375101531,), (1375101554,), (1375101556,), (1375101558,), (1375101561,), (1375101585,), (1375101612,), (1375101616,), (1375101648,), (1375101651,), (1375101653,), (1375101712,), (1375101717,), (1375101729,), (1375101945,)) 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 25634641 , 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=25634599 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 (25634641) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25634599) result : ((1375101296,), (1375101299,), (1375101318,), (1375101321,), (1375101322,), (1375101324,), (1375101342,), (1375101344,), (1375101345,), (1375101347,), (1375101350,), (1375101354,), (1375101372,), (1375101374,), (1375101375,), (1375101377,), (1375101396,), (1375101397,), (1375101399,), (1375101401,), (1375101437,), (1375101439,), (1375101442,), (1375101445,), (1375101449,), (1375101453,), (1375101465,), (1375101467,), (1375101468,), (1375101470,), (1375101490,), (1375101495,), (1375101498,), (1375101501,), (1375101528,), (1375101529,), (1375101531,), (1375101554,), (1375101556,), (1375101558,), (1375101561,), (1375101585,), (1375101612,), (1375101616,), (1375101648,), (1375101651,), (1375101653,), (1375101712,), (1375101717,), (1375101729,), (1375101945,)) 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 25634642 , 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=25634599 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 (25634642) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25634599) result : ((1375101296,), (1375101299,), (1375101318,), (1375101321,), (1375101322,), (1375101324,), (1375101342,), (1375101344,), (1375101345,), (1375101347,), (1375101350,), (1375101354,), (1375101372,), (1375101374,), (1375101375,), (1375101377,), (1375101396,), (1375101397,), (1375101399,), (1375101401,), (1375101437,), (1375101439,), (1375101442,), (1375101445,), (1375101449,), (1375101453,), (1375101465,), (1375101467,), (1375101468,), (1375101470,), (1375101490,), (1375101495,), (1375101498,), (1375101501,), (1375101528,), (1375101529,), (1375101531,), (1375101554,), (1375101556,), (1375101558,), (1375101561,), (1375101585,), (1375101612,), (1375101616,), (1375101648,), (1375101651,), (1375101653,), (1375101712,), (1375101717,), (1375101729,), (1375101945,)) 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 25634643 , 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=25634599 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 (25634643) result : ((1375101391,), (1375101578,), (1375102207,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25634599) result : ((1375101296,), (1375101299,), (1375101318,), (1375101321,), (1375101322,), (1375101324,), (1375101342,), (1375101344,), (1375101345,), (1375101347,), (1375101350,), (1375101354,), (1375101372,), (1375101374,), (1375101375,), (1375101377,), (1375101396,), (1375101397,), (1375101399,), (1375101401,), (1375101437,), (1375101439,), (1375101442,), (1375101445,), (1375101449,), (1375101453,), (1375101465,), (1375101467,), (1375101468,), (1375101470,), (1375101490,), (1375101495,), (1375101498,), (1375101501,), (1375101528,), (1375101529,), (1375101531,), (1375101554,), (1375101556,), (1375101558,), (1375101561,), (1375101585,), (1375101612,), (1375101616,), (1375101648,), (1375101651,), (1375101653,), (1375101712,), (1375101717,), (1375101729,), (1375101945,)) 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 25634644 , 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=25634599 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 (25634644) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25634599) result : ((1375101296,), (1375101299,), (1375101318,), (1375101321,), (1375101322,), (1375101324,), (1375101342,), (1375101344,), (1375101345,), (1375101347,), (1375101350,), (1375101354,), (1375101372,), (1375101374,), (1375101375,), (1375101377,), (1375101396,), (1375101397,), (1375101399,), (1375101401,), (1375101437,), (1375101439,), (1375101442,), (1375101445,), (1375101449,), (1375101453,), (1375101465,), (1375101467,), (1375101468,), (1375101470,), (1375101490,), (1375101495,), (1375101498,), (1375101501,), (1375101528,), (1375101529,), (1375101531,), (1375101554,), (1375101556,), (1375101558,), (1375101561,), (1375101585,), (1375101612,), (1375101616,), (1375101648,), (1375101651,), (1375101653,), (1375101712,), (1375101717,), (1375101729,), (1375101945,)) 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 25634645 , 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=25634599 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 (25634645) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25634599) result : ((1375101296,), (1375101299,), (1375101318,), (1375101321,), (1375101322,), (1375101324,), (1375101342,), (1375101344,), (1375101345,), (1375101347,), (1375101350,), (1375101354,), (1375101372,), (1375101374,), (1375101375,), (1375101377,), (1375101396,), (1375101397,), (1375101399,), (1375101401,), (1375101437,), (1375101439,), (1375101442,), (1375101445,), (1375101449,), (1375101453,), (1375101465,), (1375101467,), (1375101468,), (1375101470,), (1375101490,), (1375101495,), (1375101498,), (1375101501,), (1375101528,), (1375101529,), (1375101531,), (1375101554,), (1375101556,), (1375101558,), (1375101561,), (1375101585,), (1375101612,), (1375101616,), (1375101648,), (1375101651,), (1375101653,), (1375101712,), (1375101717,), (1375101729,), (1375101945,)) 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 25634646 , 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=25634599 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 (25634646) result : ((1375101638,), (1375102199,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25634599) result : ((1375101296,), (1375101299,), (1375101318,), (1375101321,), (1375101322,), (1375101324,), (1375101342,), (1375101344,), (1375101345,), (1375101347,), (1375101350,), (1375101354,), (1375101372,), (1375101374,), (1375101375,), (1375101377,), (1375101396,), (1375101397,), (1375101399,), (1375101401,), (1375101437,), (1375101439,), (1375101442,), (1375101445,), (1375101449,), (1375101453,), (1375101465,), (1375101467,), (1375101468,), (1375101470,), (1375101490,), (1375101495,), (1375101498,), (1375101501,), (1375101528,), (1375101529,), (1375101531,), (1375101554,), (1375101556,), (1375101558,), (1375101561,), (1375101585,), (1375101612,), (1375101616,), (1375101648,), (1375101651,), (1375101653,), (1375101712,), (1375101717,), (1375101729,), (1375101945,)) 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`=25634599 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','cartonnette','flou','plastique','mal_croppe','papier','Carton_brun','metal','autre_refus','Teint_Dans_La_Masse','kraft','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`=25634599 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','cartonnette','flou','plastique','mal_croppe','papier','Carton_brun','metal','autre_refus','Teint_Dans_La_Masse','kraft','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'autre_refus': {'main_port_id': 25634599, 'sub_port_id': 25634648, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284346, 'last_updated_at': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 34)}, 'Carton_gris': {'main_port_id': 25634599, 'sub_port_id': 25634649, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284347, 'last_updated_at': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 34)}, 'metal': {'main_port_id': 25634599, 'sub_port_id': 25634650, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284348, 'last_updated_at': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 34)}, 'Teint_Dans_La_Masse': {'main_port_id': 25634599, 'sub_port_id': 25634651, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284349, 'last_updated_at': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 34)}, 'plastique': {'main_port_id': 25634599, 'sub_port_id': 25634652, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284350, 'last_updated_at': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 34)}, 'flou': {'main_port_id': 25634599, 'sub_port_id': 25634653, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284351, 'last_updated_at': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 34)}, 'kraft': {'main_port_id': 25634599, 'sub_port_id': 25634654, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284352, 'last_updated_at': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 34)}, 'mal_croppe': {'main_port_id': 25634599, 'sub_port_id': 25634655, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284353, 'last_updated_at': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 34)}, 'Carton_brun': {'main_port_id': 25634599, 'sub_port_id': 25634656, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284354, 'last_updated_at': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 34)}, 'papier': {'main_port_id': 25634599, 'sub_port_id': 25634657, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284355, 'last_updated_at': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 34)}, 'environnement': {'main_port_id': 25634599, 'sub_port_id': 25634658, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284356, 'last_updated_at': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 10, 47, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 34)}, 'cartonnette': {'main_port_id': 25634599, 'sub_port_id': 25634659, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17284357, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 0, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 10, 47, 34)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25634648,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25634635 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25634649,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25634636 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25634650,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25634637 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25634651,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25634638 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25634652,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25634639 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25634653,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25634640 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25634654,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25634641 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25634655,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25634642 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25634656,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25634643 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25634657,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25634644 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25634658,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25634645 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25634659,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25634646 lien utilise dans velours : https://www.fotonower.com/velours/25634648,25634649,25634650,25634651,25634652,25634653,25634654,25634655,25634656,25634657,25634658,25634659?tags=autre_refus,Carton_gris,metal,Teint_Dans_La_Masse,plastique,flou,kraft,mal_croppe,Carton_brun,papier,environnement,cartonnette After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25634599]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1375101945] map_info['map_portfolio_photo'] : {25634599: [1375101945, 1375101729, 1375101717, 1375101712, 1375101653, 1375101651, 1375101648, 1375101616, 1375101612, 1375101585, 1375101561, 1375101558, 1375101556, 1375101554, 1375101531, 1375101529, 1375101528, 1375101501, 1375101498, 1375101495, 1375101490, 1375101470, 1375101468, 1375101467, 1375101465, 1375101453, 1375101449, 1375101445, 1375101442, 1375101439, 1375101437, 1375101401, 1375101399, 1375101397, 1375101396, 1375101377, 1375101375, 1375101374, 1375101372, 1375101354, 1375101350, 1375101347, 1375101345, 1375101344, 1375101342, 1375101324, 1375101322, 1375101321, 1375101318, 1375101299, 1375101296]} final : False mtd_id 4302 list_pids : [1375101945] Looping around the photos to save general results len do output : 1 /25634599. 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, '3432340') ('4302', '25634599', '1375101945', None, None, None, None, None, '3432340') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25634599', "{'autre_refus': 25634635, 'Carton_gris': 25634636, 'metal': 25634637, 'Teint_Dans_La_Masse': 25634638, 'plastique': 25634639, 'flou': 25634640, 'kraft': 25634641, 'mal_croppe': 25634642, 'Carton_brun': 25634643, 'papier': 25634644, 'environnement': 25634645, 'cartonnette': 25634646}", None, None, None, None, '3432340'), ('4302', '25634599', '1375101945', None, None, None, None, None, '3432340')] time used for this insertion : 0.029027223587036133 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5901896953582764 time spend to save output : 0.029245615005493164 total time spend for step 1 : 1.6194353103637695 step2:final Mon Aug 4 11:03:29 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! 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 (25634599) 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 25634599 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1375101299,1375101296,1375101324,1375101322,1375101321,1375101318,1375101354,1375101350,1375101347,1375101345,1375101344,1375101342,1375101377,1375101375,1375101374,1375101372,1375101401,1375101399,1375101397,1375101396,1375101453,1375101449,1375101445,1375101442,1375101439,1375101437,1375101470,1375101468,1375101467,1375101465,1375101501,1375101498,1375101495,1375101490,1375101531,1375101529,1375101528,1375101561,1375101558,1375101556,1375101554,1375101585,1375101616,1375101612,1375101653,1375101651,1375101648,1375101729,1375101717,1375101712,1375101945); 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([25634599]) Inside saveOutput : final : False verbose : True original output for save of step final : {1375101945: ('0.036726822047875356',)} new output for save of step final : {1375101945: ('0.036726822047875356',)} [1375101945] map_info['map_portfolio_photo'] : {25634599: [1375101945, 1375101729, 1375101717, 1375101712, 1375101653, 1375101651, 1375101648, 1375101616, 1375101612, 1375101585, 1375101561, 1375101558, 1375101556, 1375101554, 1375101531, 1375101529, 1375101528, 1375101501, 1375101498, 1375101495, 1375101490, 1375101470, 1375101468, 1375101467, 1375101465, 1375101453, 1375101449, 1375101445, 1375101442, 1375101439, 1375101437, 1375101401, 1375101399, 1375101397, 1375101396, 1375101377, 1375101375, 1375101374, 1375101372, 1375101354, 1375101350, 1375101347, 1375101345, 1375101344, 1375101342, 1375101324, 1375101322, 1375101321, 1375101318, 1375101299, 1375101296]} final : False mtd_id 4302 list_pids : [1375101945] Looping around the photos to save general results len do output : 1 /1375101945.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, '3432340') ('4302', '25634599', '1375101945', None, None, None, None, None, '3432340') 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', '25634599', '1375101945', '0.036726822047875356', None, None, None, None, '3432340')] time used for this insertion : 0.018535614013671875 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06861186027526855 time spend to save output : 0.01870894432067871 total time spend for step 2 : 0.08732080459594727 step3:velours_tree Mon Aug 4 11:03:29 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {25634599: [{'autre_refus': 25634635, 'Carton_gris': 25634636, 'metal': 25634637, 'Teint_Dans_La_Masse': 25634638, 'plastique': 25634639, 'flou': 25634640, 'kraft': 25634641, 'mal_croppe': 25634642, 'Carton_brun': 25634643, 'papier': 25634644, 'environnement': 25634645, 'cartonnette': 25634646}]} input_args_next_step : {25634599: ()} output_args : {25634599: [{'autre_refus': 25634635, 'Carton_gris': 25634636, 'metal': 25634637, 'Teint_Dans_La_Masse': 25634638, 'plastique': 25634639, 'flou': 25634640, 'kraft': 25634641, 'mal_croppe': 25634642, 'Carton_brun': 25634643, 'papier': 25634644, 'environnement': 25634645, 'cartonnette': 25634646}]} args : 25634599 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 : ({'autre_refus': 25634635, 'Carton_gris': 25634636, 'metal': 25634637, 'Teint_Dans_La_Masse': 25634638, 'plastique': 25634639, 'flou': 25634640, 'kraft': 25634641, 'mal_croppe': 25634642, 'Carton_brun': 25634643, 'papier': 25634644, 'environnement': 25634645, 'cartonnette': 25634646},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25634599) 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([25634599]) 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.27805137634277344 time spend to save output : 4.57763671875e-05 total time spend for step 3 : 0.27809715270996094 step4:send_mail_cod Mon Aug 4 11:03:29 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1375101945: ('0.036726822047875356',)} input_args_next_step : {1375101945: ()} output_args : {1375101945: ('0.036726822047875356',)} args : 1375101945 depend.output_id : 0 complete output_args for input 3 : {25634599: [{'autre_refus': 25634635, 'Carton_gris': 25634636, 'metal': 25634637, 'Teint_Dans_La_Masse': 25634638, 'plastique': 25634639, 'flou': 25634640, 'kraft': 25634641, 'mal_croppe': 25634642, 'Carton_brun': 25634643, 'papier': 25634644, 'environnement': 25634645, 'cartonnette': 25634646}]} input_args_next_step : {1375101945: ('0.036726822047875356',), 25634599: ()} output_args : {25634599: [{'autre_refus': 25634635, 'Carton_gris': 25634636, 'metal': 25634637, 'Teint_Dans_La_Masse': 25634638, 'plastique': 25634639, 'flou': 25634640, 'kraft': 25634641, 'mal_croppe': 25634642, 'Carton_brun': 25634643, 'papier': 25634644, 'environnement': 25634645, 'cartonnette': 25634646}]} args : 25634599 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :2, first value : ('0.036726822047875356',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25634599) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1375101945) Found this number of photos: 1 ##### Call download_photos : nb_thread : 5 begin to download photo : 1375101945 download finish for photo 1375101945 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 1 ; length of list_pids : 1 ; length of list_args : 1 results_Auto_P25634599_04-08-2025_11_03_29.pdf 25634635 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25634635 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375101522: '1754297607_743846_1375101396_4e0034b8f4188c9df524831088b49106_rle_crop_3902463797_0.png', 1375101577: '1754297725_746642_1375101467_f55f48fcef292ec44c3cc25d5d59fb90_rle_crop_3902463876_0.png', 1375102191: '1754298086_757128_1375101648_51e760f58a384a4c381900bcdaf49293_rle_crop_3902476017_0.png', 1375102193: '1754298086_757128_1375101648_51e760f58a384a4c381900bcdaf49293_rle_crop_3902476016_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/7d3d802f98f5d4177c05d159108a77e2_88339852.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/77c990d6fa7e8b8fbaa8af970b76cb9b_49840604.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/f0320f8de2c773c7130f35af54e8a9f9_34065354.png change filename to text .imagette256346351754298209/ imagette256346351754298209/1754298086_757128_1375101648_51e760f58a384a4c381900bcdaf49293_rle_crop_3902476017_0.png.png imagette256346351754298209/1754298086_757128_1375101648_51e760f58a384a4c381900bcdaf49293_rle_crop_3902476016_0.png.png imagette256346351754298209/1754297725_746642_1375101467_f55f48fcef292ec44c3cc25d5d59fb90_rle_crop_3902463876_0.png.png imagette256346351754298209/1754297607_743846_1375101396_4e0034b8f4188c9df524831088b49106_rle_crop_3902463797_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/2ba5dd9e81d634bdcaca91f363ad33ca_52813069.png imagette256346351754298209 25634637 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25634637 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375102229: '1754298086_757128_1375101648_51e760f58a384a4c381900bcdaf49293_rle_crop_3902476014_0.png'} change filename to text .imagette256346371754298210/ imagette256346371754298210/1754298086_757128_1375101648_51e760f58a384a4c381900bcdaf49293_rle_crop_3902476014_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/3795c9954cce2374556305d366836d7a_10846455.png imagette256346371754298210 25634639 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25634639 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375101392: '1754297367_739819_1375101299_2a37fc9c9749867a4e55df1370ff3df7_rle_crop_3902463330_0.png', 1375101393: '1754297367_739819_1375101296_9a9b414c5b76ac4ab2c550da74adc134_rle_crop_3902463344_0.png', 1375102218: '1754298086_757128_1375101651_aab1a17bc81ec8fd6be0e6482d415b4b_rle_crop_3902476008_0.png', 1375102220: '1754298086_757128_1375101648_51e760f58a384a4c381900bcdaf49293_rle_crop_3902476020_0.png', 1375102222: '1754298086_757128_1375101648_51e760f58a384a4c381900bcdaf49293_rle_crop_3902476024_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/aefe42e0f5b18c4f8b3310fdecf9493d_1707440.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/5e12756560e0c0f9d1bc8d0e6a9ebda3_16063268.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/75579d30e057fe099a15babf4a2c2b74_10496047.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/5089325a12371e3fc02349a5f5f5e300_61777202.png change filename to text .imagette256346391754298210/ imagette256346391754298210/1754297367_739819_1375101296_9a9b414c5b76ac4ab2c550da74adc134_rle_crop_3902463344_0.png.png imagette256346391754298210/1754298086_757128_1375101648_51e760f58a384a4c381900bcdaf49293_rle_crop_3902476020_0.png.png imagette256346391754298210/1754298086_757128_1375101648_51e760f58a384a4c381900bcdaf49293_rle_crop_3902476024_0.png.png imagette256346391754298210/1754298086_757128_1375101651_aab1a17bc81ec8fd6be0e6482d415b4b_rle_crop_3902476008_0.png.png imagette256346391754298210/1754297367_739819_1375101299_2a37fc9c9749867a4e55df1370ff3df7_rle_crop_3902463330_0.png.png imagette256346401754298210/ imagette256346411754298210/ imagette256346421754298210/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/09445bad45602b0ac69b47217e70e2da_42829311.png imagette256346391754298210 25634640 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25634640 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette256346401754298210 25634641 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25634641 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette256346411754298210 25634642 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25634642 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette256346421754298210 25634646 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25634646 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375101638: '1754297844_750520_1375101529_3a4bb018a008b5a0a2a52259d5b046b7_rle_crop_3902470069_0.png', 1375102199: '1754298086_757128_1375101651_aab1a17bc81ec8fd6be0e6482d415b4b_rle_crop_3902476001_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/421a9d3a3c622cf257106c3a7b206a0f_61453679.png change filename to text .imagette256346461754298210/ imagette256346461754298210/1754298086_757128_1375101651_aab1a17bc81ec8fd6be0e6482d415b4b_rle_crop_3902476001_0.png.png imagette256346461754298210/1754297844_750520_1375101529_3a4bb018a008b5a0a2a52259d5b046b7_rle_crop_3902470069_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/cddbcc403b20c1b841165f1b3286e2e3_37298312.png imagette256346461754298210 25634636 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25634636 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375101523: '1754297607_743846_1375101396_4e0034b8f4188c9df524831088b49106_rle_crop_3902463796_0.png', 1375101637: '1754297844_750520_1375101529_3a4bb018a008b5a0a2a52259d5b046b7_rle_crop_3902470070_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/5c17a4dd9fa46be57950c035b607871f_30996924.png change filename to text .imagette256346361754298210/ imagette256346361754298210/1754297607_743846_1375101396_4e0034b8f4188c9df524831088b49106_rle_crop_3902463796_0.png.png imagette256346361754298210/1754297844_750520_1375101529_3a4bb018a008b5a0a2a52259d5b046b7_rle_crop_3902470070_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/14a61ffaed6bd00d2599f99406b35b80_79996513.png imagette256346361754298210 25634638 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25634638 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375101575: '1754297725_746642_1375101465_8ef496520616f0e415c99b0a9999d36e_rle_crop_3902463886_0.png', 1375101635: '1754297844_750520_1375101528_808b80d0d91561509b140855bbb6fae1_rle_crop_3902470085_0.png', 1375101680: '1754297966_753547_1375101558_f675f41c50d33e73595ffba320a7a281_rle_crop_3902474719_0.png', 1375101681: '1754297966_753547_1375101556_21e525cc72aae3c3a70a104905ba70d8_rle_crop_3902474731_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/4611fb59742b302996b7bdbd21992986_40692835.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/f624deb1c348c53e6a8fb4106bae7423_86341779.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/647bcca4caadf7991e98176c3e287869_27284402.png change filename to text .imagette256346381754298210/ imagette256346381754298210/1754297966_753547_1375101558_f675f41c50d33e73595ffba320a7a281_rle_crop_3902474719_0.png.png imagette256346381754298210/1754297725_746642_1375101465_8ef496520616f0e415c99b0a9999d36e_rle_crop_3902463886_0.png.png imagette256346381754298210/1754297966_753547_1375101556_21e525cc72aae3c3a70a104905ba70d8_rle_crop_3902474731_0.png.png imagette256346381754298210/1754297844_750520_1375101528_808b80d0d91561509b140855bbb6fae1_rle_crop_3902470085_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/0592c855aef04e213145ad9effa8a18d_8151887.png imagette256346381754298210 25634643 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25634643 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375101391: '1754297367_739819_1375101299_2a37fc9c9749867a4e55df1370ff3df7_rle_crop_3902463331_0.png', 1375101578: '1754297725_746642_1375101468_cf646b1dc5a9ac38e49323eff06b076e_rle_crop_3902463865_0.png', 1375102207: '1754298086_757128_1375101648_51e760f58a384a4c381900bcdaf49293_rle_crop_3902476019_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/dc7572f07fc5f3d546a52e79c137d507_46410213.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/4eac6e7bf5b6d6d1a6d73e6d33f1daf6_42878288.png change filename to text .imagette256346431754298210/ imagette256346431754298210/1754297367_739819_1375101299_2a37fc9c9749867a4e55df1370ff3df7_rle_crop_3902463331_0.png.png imagette256346431754298210/1754297725_746642_1375101468_cf646b1dc5a9ac38e49323eff06b076e_rle_crop_3902463865_0.png.png imagette256346431754298210/1754298086_757128_1375101648_51e760f58a384a4c381900bcdaf49293_rle_crop_3902476019_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/6e4ffeaf79dea76895a660ab397519e8_15428946.png imagette256346431754298210 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=25634599 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/25634648,25634649,25634650,25634651,25634652,25634653,25634654,25634655,25634656,25634657,25634658,25634659?tags=autre_refus,Carton_gris,metal,Teint_Dans_La_Masse,plastique,flou,kraft,mal_croppe,Carton_brun,papier,environnement,cartonnette your option no_mail is active, we will not send the real mail to your client args[1375101945] : ('0.036726822047875356',) no score found for photo 1375101945 We are sending mail with results at report@fotonower.com refus_total : 0.036726822047875356 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25634599 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_P25634599_04-08-2025_11_03_29.pdf results_Auto_P25634599_04-08-2025_11_03_29.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25634599_04-08-2025_11_03_29.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','25634599','results_Auto_P25634599_04-08-2025_11_03_29.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25634599_04-08-2025_11_03_29.pdf','pdf','','0.1','0.036726822047875356') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25634599]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1375101945] map_info['map_portfolio_photo'] : {25634599: [1375101945, 1375101729, 1375101717, 1375101712, 1375101653, 1375101651, 1375101648, 1375101616, 1375101612, 1375101585, 1375101561, 1375101558, 1375101556, 1375101554, 1375101531, 1375101529, 1375101528, 1375101501, 1375101498, 1375101495, 1375101490, 1375101470, 1375101468, 1375101467, 1375101465, 1375101453, 1375101449, 1375101445, 1375101442, 1375101439, 1375101437, 1375101401, 1375101399, 1375101397, 1375101396, 1375101377, 1375101375, 1375101374, 1375101372, 1375101354, 1375101350, 1375101347, 1375101345, 1375101344, 1375101342, 1375101324, 1375101322, 1375101321, 1375101318, 1375101299, 1375101296]} final : False mtd_id 4302 list_pids : [1375101945] 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, '3432340') ('4302', '25634599', '1375101945', None, None, None, None, None, '3432340') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 1 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '25634599', '1375101945', None, None, None, None, None, '3432340')] time used for this insertion : 0.011999368667602539 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.1185925006866455 time spend to save output : 0.012148857116699219 total time spend for step 4 : 2.1307413578033447 step5:split_time_score Mon Aug 4 11:03:31 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 : ['25634599'] 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 : [('25634599',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25634599) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1375101945: {'path': 'temp/1754298209_3592422_1375101945_7b32ff582ab4f773cbe842adc65e6c55.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 = 25634599; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 25634599 group by h (('10', 51),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25634599 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 (25634599) 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 (25634599) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 04082025 25634599 Nombre de photos uploadées : 51 / 23040 (0%) 04082025 25634599 Nombre de photos taguées (types de déchets): 0 / 51 (0%) 04082025 25634599 Nombre de photos taguées (volume) : 0 / 51 (0%) [{'photo_id': 1375101299, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/2a37fc9c9749867a4e55df1370ff3df7.jpg', 'username': None, 'uploaded_at': 1754297167, 'text': 'image_04082025_10_45_04_009144m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1375101296, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/9a9b414c5b76ac4ab2c550da74adc134.jpg', 'username': None, 'uploaded_at': 1754297167, 'text': 'image_04082025_10_45_34_010137m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1375101324, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/626894f17c2808d380f0a7d5f0d77fe1.jpg', 'username': None, 'uploaded_at': 1754297227, 'text': 'image_04082025_10_45_44_10137.jpg'}, {'photo_id': 1375101322, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/f0464eec3ee74cd2009e992f8990e6bd.jpg', 'username': None, 'uploaded_at': 1754297227, 'text': 'image_04082025_10_46_14_9127.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 4.76837158203125e-06 ??????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.00439763069152832 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 25634599, '2025-08-04' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-08-04' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2055199,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.21825551986694336 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= 2055199 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2055199, 'dashboard_run_id': 2064471, 'mtr_portfolio_id': 25626685, 'dashboard_result_id': 13534400, '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_P25626685_04-08-2025_05_17_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25626687, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25626688, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25626689, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25626690, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25626691, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25626692, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25626693, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25626694, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25626695, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25626696, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25626697, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25626698, 'pht': 3726}}"}, {'dashboat_entry_day': 2055199, 'dashboard_run_id': 2064471, 'mtr_portfolio_id': 25626882, 'dashboard_result_id': 13534401, '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_P25626882_04-08-2025_05_36_31.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25626890, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25626891, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25626892, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25626893, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25626894, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25626895, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25626896, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25626897, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25626898, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25626899, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25626900, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25626901, 'pht': 3726}}"}, {'dashboat_entry_day': 2055199, 'dashboard_run_id': 2064471, 'mtr_portfolio_id': 25627175, 'dashboard_result_id': 13534402, '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_P25627175_04-08-2025_06_20_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25627184, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25627185, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25627186, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25627187, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25627188, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25627189, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25627190, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25627191, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25627192, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25627193, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25627194, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25627195, 'pht': 3726}}"}, {'dashboat_entry_day': 2055199, 'dashboard_run_id': 2064471, 'mtr_portfolio_id': 25627892, 'dashboard_result_id': 13534403, '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_P25627892_04-08-2025_06_34_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25627896, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25627897, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25627898, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25627899, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25627900, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25627901, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25627902, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25627903, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25627904, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25627905, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25627906, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25627907, 'pht': 3726}}"}, {'dashboat_entry_day': 2055199, 'dashboard_run_id': 2064471, 'mtr_portfolio_id': 25628013, 'dashboard_result_id': 13534404, '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_P25628013_04-08-2025_06_47_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25628023, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25628024, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25628025, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25628026, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25628027, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25628028, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25628029, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25628030, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25628031, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25628032, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25628033, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25628034, 'pht': 3726}}"}, {'dashboat_entry_day': 2055199, 'dashboard_run_id': 2064471, 'mtr_portfolio_id': 25628303, 'dashboard_result_id': 13534405, '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_P25628303_04-08-2025_07_21_29.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25628314, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25628315, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25628316, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25628317, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25628318, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25628319, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25628320, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25628321, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25628322, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25628323, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25628324, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25628325, 'pht': 3726}}"}, {'dashboat_entry_day': 2055199, 'dashboard_run_id': 2064471, 'mtr_portfolio_id': 25629056, 'dashboard_result_id': 13534406, '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_P25629056_04-08-2025_07_32_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25629057, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25629058, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25629059, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25629060, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25629061, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25629062, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25629063, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25629064, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25629065, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25629066, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25629067, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25629068, 'pht': 3726}}"}, {'dashboat_entry_day': 2055199, 'dashboard_run_id': 2064471, 'mtr_portfolio_id': 25629211, 'dashboard_result_id': 13534407, '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_P25629211_04-08-2025_07_47_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25629223, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25629224, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25629225, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25629226, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25629227, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25629228, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25629229, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25629230, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25629231, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25629232, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25629233, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25629234, 'pht': 3726}}"}, {'dashboat_entry_day': 2055199, 'dashboard_run_id': 2064471, 'mtr_portfolio_id': 25629456, 'dashboard_result_id': 13534408, '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_P25629456_04-08-2025_08_03_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25629467, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25629468, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25629469, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25629470, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25629471, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25629472, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25629473, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25629474, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25629475, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25629476, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25629477, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25629478, 'pht': 3726}}"}, {'dashboat_entry_day': 2055199, 'dashboard_run_id': 2064471, 'mtr_portfolio_id': 25629837, 'dashboard_result_id': 13534409, '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_P25629837_04-08-2025_08_16_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25629886, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25629887, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25629888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25629889, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25629890, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25629891, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25629892, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25629893, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25629894, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25629895, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25629896, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25629897, 'pht': 3726}}"}, {'dashboat_entry_day': 2055199, 'dashboard_run_id': 2064471, 'mtr_portfolio_id': 25630398, 'dashboard_result_id': 13534410, '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_P25630398_04-08-2025_08_32_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25630405, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25630406, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25630407, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25630408, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25630410, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25630411, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25630412, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25630413, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25630414, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25630415, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25630416, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25630417, 'pht': 3726}}"}, {'dashboat_entry_day': 2055199, 'dashboard_run_id': 2064471, 'mtr_portfolio_id': 25630863, 'dashboard_result_id': 13534411, '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_P25630863_04-08-2025_08_46_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25630928, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25630929, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25630930, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25630931, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25630932, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25630933, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25630934, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25630935, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25630936, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25630937, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25630938, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25630939, 'pht': 3726}}"}, {'dashboat_entry_day': 2055199, 'dashboard_run_id': 2064471, 'mtr_portfolio_id': 25631422, 'dashboard_result_id': 13534412, '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_P25631422_04-08-2025_09_34_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25631429, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25631430, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25631431, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25631432, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25631433, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25631434, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25631435, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25631436, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25631437, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25631438, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25631439, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25631440, 'pht': 3726}}"}, {'dashboat_entry_day': 2055199, 'dashboard_run_id': 2064471, 'mtr_portfolio_id': 25632607, 'dashboard_result_id': 13534413, '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_P25632607_04-08-2025_09_56_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25632611, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25632612, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25632613, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25632614, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25632615, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25632616, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25632617, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25632618, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25632620, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25632621, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25632622, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25632624, 'pht': 3726}}"}, {'dashboat_entry_day': 2055199, 'dashboard_run_id': 2064471, 'mtr_portfolio_id': 25633178, 'dashboard_result_id': 13534414, '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_P25633178_04-08-2025_10_03_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25633183, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25633184, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25633185, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25633186, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25633187, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25633188, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25633189, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25633190, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25633191, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25633192, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25633193, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25633194, 'pht': 3726}}"}, {'dashboat_entry_day': 2055199, 'dashboard_run_id': 2064471, 'mtr_portfolio_id': 25633267, 'dashboard_result_id': 13534415, '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_P25633267_04-08-2025_10_17_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25633305, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25633306, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25633307, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25633308, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25633309, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25633310, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25633311, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25633312, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25633313, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25633314, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25633315, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25633316, 'pht': 3726}}"}, {'dashboat_entry_day': 2055199, 'dashboard_run_id': 2064471, 'mtr_portfolio_id': 25633910, 'dashboard_result_id': 13534416, '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_P25633910_04-08-2025_10_33_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25633915, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25633916, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25633917, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25633918, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25633919, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25633920, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25633921, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25633922, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25633923, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25633924, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25633925, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25633926, 'pht': 3726}}"}, {'dashboat_entry_day': 2055199, 'dashboard_run_id': 2064471, 'mtr_portfolio_id': 25634253, 'dashboard_result_id': 13534417, '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_P25634253_04-08-2025_10_47_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25634262, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25634263, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25634264, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25634265, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25634266, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25634267, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25634268, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25634269, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25634270, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25634271, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25634272, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25634273, 'pht': 3726}}"}, {'dashboat_entry_day': 2055199, 'dashboard_run_id': 2064471, 'mtr_portfolio_id': 25634599, 'dashboard_result_id': 13534418, '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_P25634599_04-08-2025_10_58_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25634635, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25634636, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25634637, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25634638, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25634639, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25634640, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25634641, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25634642, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25634643, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25634644, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25634645, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25634646, '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 = 25626685 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': 3429655, 'mtr_portfolio_id': 25626685, 'created_at': datetime.datetime(2025, 8, 4, 5, 17), 'result': '0.05648562522524135', 'result_long': None, 'result_double': None}] Qualite : 0.05648562522524135 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25626685 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25626685_04-08-2025_05_17_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25626685 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_P25626685_04-08-2025_05_17_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25626687, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25626688, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25626689, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25626690, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25626691, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25626692, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25626693, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25626694, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25626695, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25626696, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25626697, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25626698, 'pht': 3726}}" where mtr_portfolio_id = 25626685 and dashboard_run_id = 2064471 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`=25626685 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13534400, 0.05648562522524135, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25626685_04-08-2025_05_17_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25626687, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25626688, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25626689, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25626690, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25626691, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25626692, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25626693, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25626694, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25626695, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25626696, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25626697, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25626698, '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 = 25626882 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': 3429694, 'mtr_portfolio_id': 25626882, 'created_at': datetime.datetime(2025, 8, 4, 5, 36, 31), 'result': '0.029916060513912043', 'result_long': None, 'result_double': None}] Qualite : 0.029916060513912043 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25626882 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25626882_04-08-2025_05_36_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25626882 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_P25626882_04-08-2025_05_36_31.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25626890, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25626891, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25626892, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25626893, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25626894, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25626895, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25626896, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25626897, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25626898, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25626899, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25626900, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25626901, 'pht': 3726}}" where mtr_portfolio_id = 25626882 and dashboard_run_id = 2064471 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`=25626882 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13534401, 0.029916060513912043, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25626882_04-08-2025_05_36_31.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25626890, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25626891, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25626892, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25626893, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25626894, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25626895, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25626896, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25626897, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25626898, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25626899, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25626900, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25626901, '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 = 25627175 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': 3429790, 'mtr_portfolio_id': 25627175, 'created_at': datetime.datetime(2025, 8, 4, 6, 20, 58), 'result': '0.03489243569320978', 'result_long': None, 'result_double': None}] Qualite : 0.03489243569320978 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25627175 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25627175_04-08-2025_06_20_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25627175 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_P25627175_04-08-2025_06_20_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25627184, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25627185, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25627186, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25627187, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25627188, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25627189, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25627190, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25627191, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25627192, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25627193, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25627194, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25627195, 'pht': 3726}}" where mtr_portfolio_id = 25627175 and dashboard_run_id = 2064471 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`=25627175 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13534402, 0.03489243569320978, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25627175_04-08-2025_06_20_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25627184, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25627185, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25627186, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25627187, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25627188, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25627189, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25627190, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25627191, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25627192, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25627193, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25627194, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25627195, '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 = 25627892 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': 3429979, 'mtr_portfolio_id': 25627892, 'created_at': datetime.datetime(2025, 8, 4, 6, 34, 59), 'result': '0.043597261028997226', 'result_long': None, 'result_double': None}] Qualite : 0.043597261028997226 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25627892 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25627892_04-08-2025_06_34_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25627892 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_P25627892_04-08-2025_06_34_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25627896, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25627897, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25627898, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25627899, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25627900, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25627901, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25627902, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25627903, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25627904, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25627905, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25627906, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25627907, 'pht': 3726}}" where mtr_portfolio_id = 25627892 and dashboard_run_id = 2064471 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`=25627892 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13534403, 0.043597261028997226, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25627892_04-08-2025_06_34_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25627896, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25627897, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25627898, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25627899, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25627900, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25627901, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25627902, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25627903, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25627904, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25627905, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25627906, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25627907, '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 = 25628013 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': 3430010, 'mtr_portfolio_id': 25628013, 'created_at': datetime.datetime(2025, 8, 4, 6, 47, 1), 'result': '0.07528744149381071', 'result_long': None, 'result_double': None}] Qualite : 0.07528744149381071 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25628013 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25628013_04-08-2025_06_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25628013 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_P25628013_04-08-2025_06_47_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25628023, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25628024, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25628025, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25628026, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25628027, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25628028, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25628029, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25628030, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25628031, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25628032, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25628033, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25628034, 'pht': 3726}}" where mtr_portfolio_id = 25628013 and dashboard_run_id = 2064471 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`=25628013 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13534404, 0.07528744149381071, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25628013_04-08-2025_06_47_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25628023, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25628024, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25628025, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25628026, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25628027, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25628028, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25628029, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25628030, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25628031, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25628032, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25628033, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25628034, '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 = 25628303 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': 3430097, 'mtr_portfolio_id': 25628303, 'created_at': datetime.datetime(2025, 8, 4, 7, 21, 28), 'result': '0.031837840229790776', 'result_long': None, 'result_double': None}] Qualite : 0.031837840229790776 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25628303 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25628303_04-08-2025_07_21_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25628303 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_P25628303_04-08-2025_07_21_29.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25628314, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25628315, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25628316, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25628317, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25628318, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25628319, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25628320, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25628321, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25628322, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25628323, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25628324, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25628325, 'pht': 3726}}" where mtr_portfolio_id = 25628303 and dashboard_run_id = 2064471 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`=25628303 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13534405, 0.031837840229790776, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25628303_04-08-2025_07_21_29.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25628314, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25628315, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25628316, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25628317, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25628318, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25628319, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25628320, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25628321, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25628322, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25628323, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25628324, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25628325, '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 = 25629056 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': 3430339, 'mtr_portfolio_id': 25629056, 'created_at': datetime.datetime(2025, 8, 4, 7, 32, 59), 'result': '0.031762630395397166', 'result_long': None, 'result_double': None}] Qualite : 0.031762630395397166 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25629056 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25629056_04-08-2025_07_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25629056 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_P25629056_04-08-2025_07_32_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25629057, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25629058, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25629059, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25629060, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25629061, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25629062, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25629063, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25629064, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25629065, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25629066, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25629067, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25629068, 'pht': 3726}}" where mtr_portfolio_id = 25629056 and dashboard_run_id = 2064471 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`=25629056 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13534406, 0.031762630395397166, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25629056_04-08-2025_07_32_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25629057, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25629058, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25629059, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25629060, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25629061, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25629062, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25629063, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25629064, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25629065, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25629066, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25629067, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25629068, '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 = 25629211 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': 3430405, 'mtr_portfolio_id': 25629211, 'created_at': datetime.datetime(2025, 8, 4, 7, 47), 'result': '0.054070794273323806', 'result_long': None, 'result_double': None}] Qualite : 0.054070794273323806 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25629211 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25629211_04-08-2025_07_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25629211 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_P25629211_04-08-2025_07_47_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25629223, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25629224, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25629225, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25629226, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25629227, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25629228, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25629229, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25629230, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25629231, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25629232, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25629233, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25629234, 'pht': 3726}}" where mtr_portfolio_id = 25629211 and dashboard_run_id = 2064471 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`=25629211 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13534407, 0.054070794273323806, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25629211_04-08-2025_07_47_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25629223, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25629224, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25629225, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25629226, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25629227, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25629228, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25629229, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25629230, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25629231, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25629232, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25629233, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25629234, '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 = 25629456 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': 3430493, 'mtr_portfolio_id': 25629456, 'created_at': datetime.datetime(2025, 8, 4, 8, 3), 'result': '0.0425232015476235', 'result_long': None, 'result_double': None}] Qualite : 0.0425232015476235 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25629456 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25629456_04-08-2025_08_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25629456 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_P25629456_04-08-2025_08_03_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25629467, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25629468, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25629469, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25629470, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25629471, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25629472, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25629473, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25629474, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25629475, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25629476, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25629477, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25629478, 'pht': 3726}}" where mtr_portfolio_id = 25629456 and dashboard_run_id = 2064471 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`=25629456 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13534408, 0.0425232015476235, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25629456_04-08-2025_08_03_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25629467, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25629468, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25629469, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25629470, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25629471, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25629472, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25629473, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25629474, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25629475, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25629476, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25629477, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25629478, '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 = 25629837 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': 3430672, 'mtr_portfolio_id': 25629837, 'created_at': datetime.datetime(2025, 8, 4, 8, 16, 59), 'result': '0.07792245153552262', 'result_long': None, 'result_double': None}] Qualite : 0.07792245153552262 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25629837 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25629837_04-08-2025_08_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25629837 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_P25629837_04-08-2025_08_16_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25629886, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25629887, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25629888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25629889, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25629890, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25629891, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25629892, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25629893, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25629894, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25629895, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25629896, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25629897, 'pht': 3726}}" where mtr_portfolio_id = 25629837 and dashboard_run_id = 2064471 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`=25629837 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13534409, 0.07792245153552262, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25629837_04-08-2025_08_16_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25629886, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25629887, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25629888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25629889, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25629890, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25629891, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25629892, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25629893, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25629894, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25629895, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25629896, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25629897, '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 = 25630398 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': 3430905, 'mtr_portfolio_id': 25630398, 'created_at': datetime.datetime(2025, 8, 4, 8, 32, 57), 'result': '0.08088320189388051', 'result_long': None, 'result_double': None}] Qualite : 0.08088320189388051 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25630398 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25630398_04-08-2025_08_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25630398 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_P25630398_04-08-2025_08_32_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25630405, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25630406, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25630407, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25630408, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25630410, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25630411, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25630412, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25630413, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25630414, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25630415, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25630416, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25630417, 'pht': 3726}}" where mtr_portfolio_id = 25630398 and dashboard_run_id = 2064471 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`=25630398 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13534410, 0.08088320189388051, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25630398_04-08-2025_08_32_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25630405, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25630406, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25630407, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25630408, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25630410, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25630411, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25630412, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25630413, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25630414, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25630415, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25630416, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25630417, '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 = 25630863 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': 3431125, 'mtr_portfolio_id': 25630863, 'created_at': datetime.datetime(2025, 8, 4, 8, 46, 57), 'result': '0.04889978098275844', 'result_long': None, 'result_double': None}] Qualite : 0.04889978098275844 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25630863 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25630863_04-08-2025_08_46_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25630863 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_P25630863_04-08-2025_08_46_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25630928, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25630929, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25630930, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25630931, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25630932, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25630933, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25630934, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25630935, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25630936, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25630937, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25630938, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25630939, 'pht': 3726}}" where mtr_portfolio_id = 25630863 and dashboard_run_id = 2064471 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`=25630863 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13534411, 0.04889978098275844, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25630863_04-08-2025_08_46_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25630928, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25630929, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25630930, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25630931, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25630932, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25630933, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25630934, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25630935, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25630936, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25630937, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25630938, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25630939, '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 = 25631422 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': 3431362, 'mtr_portfolio_id': 25631422, 'created_at': datetime.datetime(2025, 8, 4, 9, 34, 59), 'result': '0.0493744862914315', 'result_long': None, 'result_double': None}] Qualite : 0.0493744862914315 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25631422 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25631422_04-08-2025_09_34_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25631422 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_P25631422_04-08-2025_09_34_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25631429, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25631430, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25631431, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25631432, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25631433, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25631434, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25631435, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25631436, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25631437, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25631438, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25631439, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25631440, 'pht': 3726}}" where mtr_portfolio_id = 25631422 and dashboard_run_id = 2064471 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`=25631422 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13534412, 0.0493744862914315, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25631422_04-08-2025_09_34_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25631429, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25631430, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25631431, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25631432, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25631433, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25631434, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25631435, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25631436, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25631437, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25631438, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25631439, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25631440, '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 = 25632607 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': 3431849, 'mtr_portfolio_id': 25632607, 'created_at': datetime.datetime(2025, 8, 4, 9, 56, 59), 'result': '0.043566782272666464', 'result_long': None, 'result_double': None}] Qualite : 0.043566782272666464 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25632607 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25632607_04-08-2025_09_56_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25632607 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_P25632607_04-08-2025_09_56_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25632611, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25632612, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25632613, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25632614, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25632615, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25632616, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25632617, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25632618, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25632620, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25632621, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25632622, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25632624, 'pht': 3726}}" where mtr_portfolio_id = 25632607 and dashboard_run_id = 2064471 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`=25632607 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13534413, 0.043566782272666464, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25632607_04-08-2025_09_56_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25632611, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25632612, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25632613, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25632614, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25632615, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25632616, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25632617, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25632618, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25632620, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25632621, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25632622, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25632624, '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 = 25633178 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': 3431971, 'mtr_portfolio_id': 25633178, 'created_at': datetime.datetime(2025, 8, 4, 10, 3), 'result': '0.03506150318190517', 'result_long': None, 'result_double': None}] Qualite : 0.03506150318190517 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25633178 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25633178_04-08-2025_10_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25633178 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_P25633178_04-08-2025_10_03_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25633183, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25633184, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25633185, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25633186, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25633187, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25633188, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25633189, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25633190, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25633191, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25633192, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25633193, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25633194, 'pht': 3726}}" where mtr_portfolio_id = 25633178 and dashboard_run_id = 2064471 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`=25633178 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13534414, 0.03506150318190517, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25633178_04-08-2025_10_03_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25633183, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25633184, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25633185, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25633186, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25633187, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25633188, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25633189, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25633190, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25633191, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25633192, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25633193, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25633194, '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 = 25633267 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': 3431998, 'mtr_portfolio_id': 25633267, 'created_at': datetime.datetime(2025, 8, 4, 10, 17), 'result': '0.024798719441786084', 'result_long': None, 'result_double': None}] Qualite : 0.024798719441786084 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25633267 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25633267_04-08-2025_10_17_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25633267 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_P25633267_04-08-2025_10_17_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25633305, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25633306, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25633307, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25633308, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25633309, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25633310, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25633311, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25633312, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25633313, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25633314, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25633315, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25633316, 'pht': 3726}}" where mtr_portfolio_id = 25633267 and dashboard_run_id = 2064471 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`=25633267 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13534415, 0.024798719441786084, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25633267_04-08-2025_10_17_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25633305, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25633306, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25633307, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25633308, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25633309, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25633310, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25633311, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25633312, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25633313, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25633314, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25633315, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25633316, '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 = 25633910 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': 3432109, 'mtr_portfolio_id': 25633910, 'created_at': datetime.datetime(2025, 8, 4, 10, 33, 31), 'result': '0.08209164754837169', 'result_long': None, 'result_double': None}] Qualite : 0.08209164754837169 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25633910 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25633910_04-08-2025_10_33_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25633910 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_P25633910_04-08-2025_10_33_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25633915, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25633916, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25633917, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25633918, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25633919, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25633920, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25633921, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25633922, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25633923, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25633924, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25633925, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25633926, 'pht': 3726}}" where mtr_portfolio_id = 25633910 and dashboard_run_id = 2064473 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`=25633910 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13534416, 0.08209164754837169, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25633910_04-08-2025_10_33_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25633915, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25633916, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25633917, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25633918, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25633919, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25633920, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25633921, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25633922, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25633923, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25633924, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25633925, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25633926, '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 = 25634253 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': 3432203, 'mtr_portfolio_id': 25634253, 'created_at': datetime.datetime(2025, 8, 4, 10, 47), 'result': '0.0692149309258792', 'result_long': None, 'result_double': None}] Qualite : 0.0692149309258792 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25634253 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25634253_04-08-2025_10_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25634253 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_P25634253_04-08-2025_10_47_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25634262, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25634263, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25634264, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25634265, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25634266, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25634267, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25634268, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25634269, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25634270, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25634271, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25634272, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25634273, 'pht': 3726}}" where mtr_portfolio_id = 25634253 and dashboard_run_id = 2064473 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`=25634253 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13534417, 0.0692149309258792, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25634253_04-08-2025_10_47_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25634262, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25634263, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25634264, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25634265, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25634266, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25634267, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25634268, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25634269, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25634270, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25634271, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25634272, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25634273, '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 = 25634599 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': 3432340, 'mtr_portfolio_id': 25634599, 'created_at': datetime.datetime(2025, 8, 4, 11, 3, 29), 'result': '0.036726822047875356', 'result_long': None, 'result_double': None}] Qualite : 0.036726822047875356 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25634599 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25634599_04-08-2025_11_03_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25634599 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_P25634599_04-08-2025_11_03_29.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25634635, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25634636, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25634637, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25634638, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25634639, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25634640, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25634641, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25634642, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25634643, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25634644, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25634645, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25634646, 'pht': 3726}}" where mtr_portfolio_id = 25634599 and dashboard_run_id = 2064473 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`=25634599 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13534418, 0.036726822047875356, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25634599_04-08-2025_11_03_29.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25634635, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25634636, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25634637, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25634638, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25634639, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25634640, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25634641, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25634642, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25634643, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25634644, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25634645, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25634646, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25626685,25626882,25627175,25627892,25628013,25628303,25629056,25629211,25629456,25629837,25630398,25630863,25631422,25632607,25633178,25633267,25633910,25634253,25634599) result : ((1375079294,), (1375079309,), (1375079310,), (1375079311,), (1375079318,), (1375079319,), (1375079320,), (1375079321,), (1375079329,), (1375079330,), (1375079352,), (1375079353,), (1375079364,), (1375079366,), (1375079380,), (1375079381,), (1375079389,), (1375079390,), (1375079391,), (1375079392,), (1375079393,), (1375079401,), (1375079403,), (1375079405,), (1375079406,), (1375079408,), (1375079411,), (1375079417,), (1375079419,), (1375079424,), (1375079425,), (1375079426,), (1375079427,), (1375079436,), (1375079437,), (1375079446,), (1375079447,), (1375079448,), (1375079449,), (1375079458,), (1375079460,), (1375079461,), (1375079462,), (1375079472,), (1375079470,), (1375079471,), (1375079480,), (1375079485,), (1375079487,), (1375079488,), (1375079489,), (1375079495,), (1375079496,), (1375079502,), (1375079510,), (1375079521,), (1375079522,), (1375079523,), (1375079524,), (1375079525,), (1375079527,), (1375079528,), (1375079529,), (1375079530,), (1375079531,), (1375079533,), (1375079538,), (1375079540,), (1375079541,), (1375079542,), (1375079543,), (1375079544,), (1375079566,), (1375079567,), (1375079568,), (1375079603,), (1375079614,), (1375079600,), (1375079601,), (1375079602,), (1375079604,), (1375079605,), (1375079606,), (1375079607,), (1375079608,), (1375079609,), (1375079618,), (1375079619,), (1375079620,), (1375079621,), (1375079629,), (1375079630,), (1375079631,), (1375079632,), (1375079633,), (1375079640,), (1375079641,), (1375079642,), (1375079643,), (1375079650,), (1375079651,), (1375079652,), (1375079653,), (1375079654,), (1375079657,), (1375079658,), (1375079659,), (1375079660,), (1375081088,), (1375081082,), (1375081084,), (1375081085,), (1375081086,), (1375081087,), (1375081098,), (1375081101,), (1375081102,), (1375081114,), (1375081116,), (1375081126,), (1375081128,), (1375081130,), (1375081131,), (1375081145,), (1375081148,), (1375081150,), (1375081153,), (1375081156,), (1375081160,), (1375081174,), (1375081176,), (1375081202,), (1375081226,), (1375081230,), (1375081231,), (1375081234,), (1375081246,), (1375081248,), (1375081249,), (1375081264,), (1375081267,), (1375081268,), (1375081269,), (1375081271,), (1375081277,), (1375081278,), (1375081279,), (1375081280,), (1375081282,), (1375081323,), (1375081325,), (1375081330,), (1375081341,), (1375081342,), (1375081343,), (1375081344,), (1375081345,), (1375081357,), (1375081359,), (1375081360,), (1375081361,), (1375081366,), (1375081368,), (1375081390,), (1375081419,), (1375081380,), (1375081381,), (1375081382,), (1375081384,), (1375081388,), (1375081400,), (1375081401,), (1375081403,), (1375081406,), (1375081408,), (1375081411,), (1375081417,), (1375081422,), (1375081424,), (1375081426,), (1375081430,), (1375081432,), (1375081436,), (1375081459,), (1375081461,), (1375081464,), (1375081467,), (1375081471,), (1375081474,), (1375081481,), (1375081482,), (1375081484,), (1375081486,), (1375081490,), (1375081494,), (1375081498,), (1375081501,), (1375081511,), (1375081512,), (1375081528,), (1375081529,), (1375081547,), (1375081552,), (1375081557,), (1375081559,), (1375081572,), (1375081574,), (1375081576,), (1375081603,), (1375081605,), (1375081606,), (1375081620,), (1375081621,), (1375081623,), (1375081626,), (1375081628,), (1375081649,), (1375081650,), (1375081651,), (1375081653,), (1375081657,), (1375081671,), (1375081672,), (1375081673,), (1375081675,), (1375081679,), (1375081696,), (1375081697,), (1375081698,), (1375081700,), (1375081727,), (1375081728,), (1375081762,), (1375081752,), (1375081754,), (1375081756,), (1375081759,), (1375081780,), (1375081781,), (1375081813,), (1375081816,), (1375081846,), (1375081847,), (1375081848,), (1375081850,), (1375081876,), (1375081877,), (1375081878,), (1375081898,), (1375081899,), (1375081900,), (1375081902,), (1375081926,), (1375081927,), (1375081928,), (1375081952,), (1375081953,), (1375081954,), (1375081986,), (1375081988,), (1375081990,), (1375082014,), (1375082016,), (1375082045,), (1375084121,), (1375084087,), (1375084116,), (1375084119,), (1375084160,), (1375084190,), (1375084193,), (1375084194,), (1375084197,), (1375084220,), (1375084222,), (1375084225,), (1375084229,), (1375084257,), (1375084258,), (1375084259,), (1375084287,), (1375084289,), (1375084319,), (1375084321,), (1375084322,), (1375084324,), (1375084355,), (1375084358,), (1375084360,), (1375084363,), (1375084383,), (1375084385,), (1375084386,), (1375084411,), (1375084414,), (1375084416,), (1375084452,), (1375084455,), (1375084456,), (1375084458,), (1375084462,), (1375084501,), (1375084496,), (1375084498,), (1375084525,), (1375084526,), (1375084528,), (1375084530,), (1375084533,), (1375084554,), (1375084557,), (1375084559,), (1375084562,), (1375084564,), (1375084569,), (1375084584,), (1375084587,), (1375084589,), (1375084592,), (1375084595,), (1375084614,), (1375084617,), (1375084648,), (1375084653,), (1375084655,), (1375084658,), (1375084661,), (1375084664,), (1375084687,), (1375084688,), (1375084690,), (1375084692,), (1375084695,), (1375084718,), (1375084720,), (1375084722,), (1375084725,), (1375084751,), (1375084783,), (1375084785,), (1375084786,), (1375084788,), (1375084791,), (1375084827,), (1375084830,), (1375084832,), (1375084835,), (1375084870,), (1375084873,), (1375084874,), (1375084876,), (1375084896,), (1375084899,), (1375084901,), (1375084904,), (1375084930,), (1375084932,), (1375084955,), (1375084959,), (1375084961,), (1375084993,), (1375084990,), (1375084992,), (1375085018,), (1375085020,), (1375085023,), (1375085026,), (1375085029,), (1375085057,), (1375085059,), (1375085088,), (1375085090,), (1375085113,), (1375085116,), (1375085154,), (1375085179,), (1375085181,), (1375085183,), (1375085187,), (1375085216,), (1375085217,), (1375085219,), (1375085222,), (1375085225,), (1375085227,), (1375085247,), (1375085251,), (1375085256,), (1375085259,), (1375085263,), (1375085266,), (1375085276,), (1375085277,), (1375085279,), (1375085281,), (1375085289,), (1375085294,), (1375085299,), (1375085303,), (1375085307,), (1375085312,), (1375085321,), (1375085324,), (1375085327,), (1375085330,), (1375085351,), (1375085354,), (1375085357,), (1375085516,), (1375085540,), (1375085564,), (1375085587,), (1375085612,), (1375086038,), (1375086041,), (1375086045,), (1375086049,), (1375086053,), (1375086057,), (1375086102,), (1375086098,), (1375086450,), (1375086475,), (1375086498,), (1375086912,), (1375086940,), (1375086961,), (1375087002,), (1375087189,), (1375087191,), (1375087194,), (1375087197,), (1375087201,), (1375087204,), (1375087223,), (1375087226,), (1375087228,), (1375087230,), (1375087258,), (1375087260,), (1375087337,), (1375087351,), (1375087361,), (1375087406,), (1375087434,), (1375087462,), (1375087464,), (1375087488,), (1375087490,), (1375087503,), (1375087529,), (1375087531,), (1375087533,), (1375087535,), (1375087538,), (1375087555,), (1375087558,), (1375087583,), (1375087688,), (1375087738,), (1375087741,), (1375087743,), (1375087801,), (1375087809,), (1375087815,), (1375088009,), (1375088019,), (1375088153,), (1375088155,), (1375088157,), (1375088205,), (1375088207,), (1375088211,), (1375088213,), (1375088216,), (1375088219,), (1375088274,), (1375088301,), (1375088330,), (1375088355,), (1375088597,), (1375088600,), (1375088683,), (1375088684,), (1375088685,), (1375088704,), (1375088705,), (1375088728,), (1375088729,), (1375088753,), (1375088755,), (1375088780,), (1375088781,), (1375088844,), (1375088843,), (1375088926,), (1375089003,), (1375089038,), (1375089039,), (1375089095,), (1375089194,), (1375089222,), (1375089223,), (1375089259,), (1375089288,), (1375089289,), (1375089312,), (1375089315,), (1375089317,), (1375089425,), (1375089763,), (1375089764,), (1375089765,), (1375089964,), (1375089966,), (1375089968,), (1375089999,), (1375090001,), (1375090002,), (1375090280,), (1375090259,), (1375090390,), (1375090392,), (1375090393,), (1375090437,), (1375090466,), (1375090469,), (1375090471,), (1375090532,), (1375090558,), (1375090614,), (1375090618,), (1375090621,), (1375090625,), (1375090629,), (1375090632,), (1375090644,), (1375090646,), (1375090678,), (1375090679,), (1375090707,), (1375090708,), (1375090709,), (1375090711,), (1375090737,), (1375090739,), (1375090741,), (1375090744,), (1375090748,), (1375090751,), (1375090767,), (1375090768,), (1375090769,), (1375090771,), (1375090804,), (1375090836,), (1375090861,), (1375090890,), (1375090916,), (1375091143,), (1375091881,), (1375091893,), (1375091955,), (1375091959,), (1375091962,), (1375091966,), (1375091985,), (1375091988,), (1375091990,), (1375091991,), (1375091994,), (1375091997,), (1375093488,), (1375093485,), (1375093487,), (1375093680,), (1375093687,), (1375093689,), (1375093692,), (1375093694,), (1375093712,), (1375093714,), (1375093715,), (1375093890,), (1375093915,), (1375093939,), (1375094168,), (1375094187,), (1375094210,), (1375094235,), (1375094237,), (1375094239,), (1375094336,), (1375094338,), (1375094339,), (1375094348,), (1375094408,), (1375094410,), (1375094411,), (1375094446,), (1375094448,), (1375094451,), (1375094454,), (1375094459,), (1375094460,), (1375094479,), (1375094481,), (1375094484,), (1375094487,), (1375094573,), (1375094579,), (1375094592,), (1375094594,), (1375094803,), (1375094805,), (1375094806,), (1375094915,), (1375095788,), (1375095786,), (1375095812,), (1375095814,), (1375095815,), (1375095834,), (1375095836,), (1375095837,), (1375095839,), (1375096249,), (1375096297,), (1375096344,), (1375096373,), (1375096480,), (1375096516,), (1375096562,), (1375096906,), (1375096788,), (1375096794,), (1375096817,), (1375096847,), (1375097072,), (1375097263,), (1375097289,), (1375097749,), (1375097775,), (1375097779,), (1375097824,), (1375097942,), (1375097960,), (1375098002,), (1375098013,), (1375098080,), (1375098085,), (1375098087,), (1375098090,), (1375098103,), (1375098355,), (1375098359,), (1375098361,), (1375098489,), (1375098515,), (1375098869,), (1375098894,), (1375099473,), (1375099822,), (1375099848,), (1375099846,), (1375099924,), (1375099937,), (1375100191,), (1375100193,), (1375100210,), (1375100329,), (1375100331,), (1375100333,), (1375100335,), (1375100339,), (1375100362,), (1375100364,), (1375100377,), (1375100402,), (1375100427,), (1375100470,), (1375100471,), (1375100472,), (1375100498,), (1375100541,), (1375100542,), (1375100543,), (1375100545,), (1375100548,), (1375100550,), (1375100561,), (1375100563,), (1375100565,), (1375100567,), (1375100569,), (1375100571,), (1375100572,), (1375100574,), (1375100577,), (1375100580,), (1375100583,), (1375100593,), (1375100594,), (1375100595,), (1375100628,), (1375100630,), (1375100633,), (1375100635,), (1375100638,), (1375100641,), (1375100666,), (1375100667,), (1375100668,), (1375100670,), (1375100673,), (1375100686,), (1375100687,), (1375100699,), (1375100704,), (1375100706,), (1375100722,), (1375100723,), (1375100724,), (1375100727,), (1375100753,), (1375100755,), (1375100756,), (1375100758,), (1375100760,), (1375100763,), (1375100804,), (1375100789,), (1375100793,), (1375100795,), (1375100798,), (1375100801,), (1375100823,), (1375100838,), (1375100839,), (1375100841,), (1375100855,), (1375100857,), (1375100858,), (1375100860,), (1375100863,), (1375100865,), (1375100873,), (1375100875,), (1375100876,), (1375100879,), (1375100882,), (1375100884,), (1375100901,), (1375100903,), (1375100904,), (1375100906,), (1375100909,), (1375100928,), (1375100931,), (1375100940,), (1375100962,), (1375100964,), (1375100965,), (1375100966,), (1375100968,), (1375101024,), (1375101026,), (1375101027,), (1375101029,), (1375101031,), (1375101034,), (1375101052,), (1375101054,), (1375101055,), (1375101074,), (1375101077,), (1375101079,), (1375101138,), (1375101144,), (1375101149,), (1375101151,), (1375101153,), (1375101155,), (1375101163,), (1375101165,), (1375101168,), (1375101174,), (1375101178,), (1375101181,), (1375101201,), (1375101202,), (1375101205,), (1375101209,), (1375101226,), (1375101230,), (1375101258,), (1375101260,), (1375101261,), (1375101262,), (1375101264,), (1375101300,), (1375101296,), (1375101299,), (1375101318,), (1375101321,), (1375101322,), (1375101324,), (1375101342,), (1375101344,), (1375101345,), (1375101347,), (1375101350,), (1375101354,), (1375101372,), (1375101374,), (1375101375,), (1375101377,), (1375101396,), (1375101397,), (1375101399,), (1375101401,), (1375101437,), (1375101439,), (1375101442,), (1375101445,), (1375101449,), (1375101453,), (1375101465,), (1375101467,), (1375101468,), (1375101470,), (1375101490,), (1375101495,), (1375101498,), (1375101501,), (1375101528,), (1375101529,), (1375101531,), (1375101554,), (1375101556,), (1375101558,), (1375101561,), (1375101585,), (1375101612,), (1375101616,), (1375101648,), (1375101651,), (1375101653,), (1375101712,), (1375101717,), (1375101729,), (1375101945,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'04082025': {'nb_upload': 51, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25634599]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1375101945] map_info['map_portfolio_photo'] : {25634599: [1375101945, 1375101729, 1375101717, 1375101712, 1375101653, 1375101651, 1375101648, 1375101616, 1375101612, 1375101585, 1375101561, 1375101558, 1375101556, 1375101554, 1375101531, 1375101529, 1375101528, 1375101501, 1375101498, 1375101495, 1375101490, 1375101470, 1375101468, 1375101467, 1375101465, 1375101453, 1375101449, 1375101445, 1375101442, 1375101439, 1375101437, 1375101401, 1375101399, 1375101397, 1375101396, 1375101377, 1375101375, 1375101374, 1375101372, 1375101354, 1375101350, 1375101347, 1375101345, 1375101344, 1375101342, 1375101324, 1375101322, 1375101321, 1375101318, 1375101299, 1375101296]} final : True mtd_id 4302 list_pids : [1375101945] Looping around the photos to save general results len do output : 1 /25634599Didn'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, '3432340') ('4302', '25634599', '1375101945', None, None, None, None, None, '3432340') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25634599', 'None', None, None, None, None, '3432340'), ('4302', '25634599', '1375101945', None, None, None, None, None, '3432340')] time used for this insertion : 0.013576507568359375 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.8119640350341797 time spend to save output : 0.013707399368286133 total time spend for step 5 : 1.8256714344024658 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 (3432340) 1.79user 2.27system 0:08.52elapsed 47%CPU (0avgtext+0avgdata 155764maxresident)k 672inputs+4128outputs (8major+61943minor)pagefaults 0swaps