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 : 4076665 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 (3750971) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3750971) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27062744 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3750971'] with mtr_portfolio_ids : ['27062744'] and first list_photo_ids : [] new path : /proc/4076665/ Name: python3 Umask: 0002 State: R (running) Tgid: 4076665 Ngid: 0 Pid: 4076665 PPid: 4076664 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 4076665 NSpid: 4076665 NSpgid: 4075908 NSsid: 4075908 VmPeak: 1107240 kB VmSize: 1107240 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97332 kB VmRSS: 97332 kB RssAnon: 60168 kB RssFile: 37164 kB RssShmem: 0 kB VmData: 865992 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 592 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: 48 nonvoluntary_ctxt_switches: 89 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '4076665', 'Ngid': '0', 'Pid': '4076665', 'PPid': '4076664', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '4076665', 'NSpid': '4076665', 'NSpgid': '4075908', 'NSsid': '4075908', 'VmPeak': '1107240 kB', 'VmSize': '1107240 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97332 kB', 'VmRSS': '97332 kB', 'RssAnon': '60168 kB', 'RssFile': '37164 kB', 'RssShmem': '0 kB', 'VmData': '865992 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '592 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': '48', 'nonvoluntary_ctxt_switches': '89'} ('datou_batch_current', '4076665', '1107240', '0', '1107240', '865992', '97332', b'', 'marlene', '3750971') 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 (27062744) 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 (3750971 ) ) 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 (27062744) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1385199583, 'portfolio_id': 27062744}, {'photo_id': 1385199233, 'portfolio_id': 27062744}, {'photo_id': 1385199109, 'portfolio_id': 27062744}, {'photo_id': 1385199108, 'portfolio_id': 27062744}, {'photo_id': 1385199107, 'portfolio_id': 27062744}, {'photo_id': 1385199084, 'portfolio_id': 27062744}, {'photo_id': 1385199081, 'portfolio_id': 27062744}, {'photo_id': 1385199078, 'portfolio_id': 27062744}, {'photo_id': 1385199076, 'portfolio_id': 27062744}, {'photo_id': 1385199075, 'portfolio_id': 27062744}, {'photo_id': 1385199059, 'portfolio_id': 27062744}, {'photo_id': 1385199057, 'portfolio_id': 27062744}, {'photo_id': 1385199056, 'portfolio_id': 27062744}, {'photo_id': 1385199055, 'portfolio_id': 27062744}] map_portfolio_id_photo_id: {27062744: [1385199583, 1385199233, 1385199109, 1385199108, 1385199107, 1385199084, 1385199081, 1385199078, 1385199076, 1385199075, 1385199059, 1385199057, 1385199056, 1385199055]} ##### 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.015995025634765625 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Sat Sep 20 05:59:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27062744) 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 : 27062744 get user id for portfolio 27062744 get sub ptf for main ptf 27062744, type 3726 and hashtags ['plastique', 'cartonnette', 'autre_refus', 'flou', 'Carton_gris', 'metal', 'environnement', 'mal_croppe', 'Carton_brun', 'Teint_Dans_La_Masse', 'kraft', 'papier'] 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`=27062744 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','cartonnette','autre_refus','flou','Carton_gris','metal','environnement','mal_croppe','Carton_brun','Teint_Dans_La_Masse','kraft','papier')) 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`=27062744 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','cartonnette','autre_refus','flou','Carton_gris','metal','environnement','mal_croppe','Carton_brun','Teint_Dans_La_Masse','kraft','papier')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 27062744, 'sub_port_id': 27062753, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264905, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 28)}, 'flou': {'main_port_id': 27062744, 'sub_port_id': 27062754, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264906, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 28)}, 'metal': {'main_port_id': 27062744, 'sub_port_id': 27062755, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264907, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 28)}, 'Carton_gris': {'main_port_id': 27062744, 'sub_port_id': 27062756, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264908, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 28)}, 'cartonnette': {'main_port_id': 27062744, 'sub_port_id': 27062757, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264909, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 28)}, 'papier': {'main_port_id': 27062744, 'sub_port_id': 27062758, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264910, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 28)}, 'kraft': {'main_port_id': 27062744, 'sub_port_id': 27062759, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264911, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 28)}, 'mal_croppe': {'main_port_id': 27062744, 'sub_port_id': 27062760, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264912, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 28)}, 'environnement': {'main_port_id': 27062744, 'sub_port_id': 27062761, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264913, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 28)}, 'Carton_brun': {'main_port_id': 27062744, 'sub_port_id': 27062762, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264914, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 28)}, 'autre_refus': {'main_port_id': 27062744, 'sub_port_id': 27062763, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264915, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 28)}, 'plastique': {'main_port_id': 27062744, 'sub_port_id': 27062764, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264916, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27062753 , 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=27062744 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 (27062753) result : ((1385199190,), (1385199191,), (1385199192,), (1385199270,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27062744) result : ((1385199055,), (1385199056,), (1385199057,), (1385199059,), (1385199075,), (1385199076,), (1385199078,), (1385199081,), (1385199084,), (1385199107,), (1385199108,), (1385199109,), (1385199233,), (1385199583,)) 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 27062754 , 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=27062744 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 (27062754) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27062744) result : ((1385199055,), (1385199056,), (1385199057,), (1385199059,), (1385199075,), (1385199076,), (1385199078,), (1385199081,), (1385199084,), (1385199107,), (1385199108,), (1385199109,), (1385199233,), (1385199583,)) 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 27062755 , 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=27062744 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 (27062755) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27062744) result : ((1385199055,), (1385199056,), (1385199057,), (1385199059,), (1385199075,), (1385199076,), (1385199078,), (1385199081,), (1385199084,), (1385199107,), (1385199108,), (1385199109,), (1385199233,), (1385199583,)) 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 27062756 , 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=27062744 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 (27062756) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27062744) result : ((1385199055,), (1385199056,), (1385199057,), (1385199059,), (1385199075,), (1385199076,), (1385199078,), (1385199081,), (1385199084,), (1385199107,), (1385199108,), (1385199109,), (1385199233,), (1385199583,)) 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 27062757 , 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=27062744 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 (27062757) result : ((1385199271,), (1385199272,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27062744) result : ((1385199055,), (1385199056,), (1385199057,), (1385199059,), (1385199075,), (1385199076,), (1385199078,), (1385199081,), (1385199084,), (1385199107,), (1385199108,), (1385199109,), (1385199233,), (1385199583,)) 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 27062758 , 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=27062744 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 (27062758) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27062744) result : ((1385199055,), (1385199056,), (1385199057,), (1385199059,), (1385199075,), (1385199076,), (1385199078,), (1385199081,), (1385199084,), (1385199107,), (1385199108,), (1385199109,), (1385199233,), (1385199583,)) 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 27062759 , 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=27062744 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 (27062759) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27062744) result : ((1385199055,), (1385199056,), (1385199057,), (1385199059,), (1385199075,), (1385199076,), (1385199078,), (1385199081,), (1385199084,), (1385199107,), (1385199108,), (1385199109,), (1385199233,), (1385199583,)) 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 27062760 , 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=27062744 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 (27062760) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27062744) result : ((1385199055,), (1385199056,), (1385199057,), (1385199059,), (1385199075,), (1385199076,), (1385199078,), (1385199081,), (1385199084,), (1385199107,), (1385199108,), (1385199109,), (1385199233,), (1385199583,)) 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 27062761 , 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=27062744 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 (27062761) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27062744) result : ((1385199055,), (1385199056,), (1385199057,), (1385199059,), (1385199075,), (1385199076,), (1385199078,), (1385199081,), (1385199084,), (1385199107,), (1385199108,), (1385199109,), (1385199233,), (1385199583,)) 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 27062762 , 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=27062744 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 (27062762) result : ((1385199273,), (1385199274,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27062744) result : ((1385199055,), (1385199056,), (1385199057,), (1385199059,), (1385199075,), (1385199076,), (1385199078,), (1385199081,), (1385199084,), (1385199107,), (1385199108,), (1385199109,), (1385199233,), (1385199583,)) 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 27062763 , 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=27062744 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 (27062763) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27062744) result : ((1385199055,), (1385199056,), (1385199057,), (1385199059,), (1385199075,), (1385199076,), (1385199078,), (1385199081,), (1385199084,), (1385199107,), (1385199108,), (1385199109,), (1385199233,), (1385199583,)) 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 27062764 , 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=27062744 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 (27062764) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27062744) result : ((1385199055,), (1385199056,), (1385199057,), (1385199059,), (1385199075,), (1385199076,), (1385199078,), (1385199081,), (1385199084,), (1385199107,), (1385199108,), (1385199109,), (1385199233,), (1385199583,)) 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`=27062744 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','cartonnette','autre_refus','flou','Carton_gris','metal','environnement','mal_croppe','Carton_brun','Teint_Dans_La_Masse','kraft','papier')) 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`=27062744 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','cartonnette','autre_refus','flou','Carton_gris','metal','environnement','mal_croppe','Carton_brun','Teint_Dans_La_Masse','kraft','papier')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 27062744, 'sub_port_id': 27062777, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264929, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 34)}, 'flou': {'main_port_id': 27062744, 'sub_port_id': 27062778, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264930, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 34)}, 'metal': {'main_port_id': 27062744, 'sub_port_id': 27062779, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264931, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 34)}, 'Carton_gris': {'main_port_id': 27062744, 'sub_port_id': 27062780, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264932, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 34)}, 'cartonnette': {'main_port_id': 27062744, 'sub_port_id': 27062781, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264933, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 34)}, 'papier': {'main_port_id': 27062744, 'sub_port_id': 27062782, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264934, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 34)}, 'kraft': {'main_port_id': 27062744, 'sub_port_id': 27062783, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264935, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 34)}, 'mal_croppe': {'main_port_id': 27062744, 'sub_port_id': 27062784, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264936, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 34)}, 'environnement': {'main_port_id': 27062744, 'sub_port_id': 27062785, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264937, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 34)}, 'Carton_brun': {'main_port_id': 27062744, 'sub_port_id': 27062786, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264938, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 34)}, 'autre_refus': {'main_port_id': 27062744, 'sub_port_id': 27062787, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264939, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 19, 34), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 34)}, 'plastique': {'main_port_id': 27062744, 'sub_port_id': 27062788, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18264940, 'last_updated_at': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_desc': datetime.datetime(2025, 9, 20, 2, 37), 'last_updated_at_asc': datetime.datetime(2025, 9, 20, 2, 19, 34)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27062777,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27062753 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27062778,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27062754 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27062779,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27062755 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27062780,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27062756 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27062781,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27062757 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27062782,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27062758 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27062783,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27062759 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27062784,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27062760 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27062785,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27062761 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27062786,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27062762 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27062787,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27062763 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27062788,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27062764 lien utilise dans velours : https://marlene.fotonower.com/velours/27062777,27062778,27062779,27062780,27062781,27062782,27062783,27062784,27062785,27062786,27062787,27062788?tags=Teint_Dans_La_Masse,flou,metal,Carton_gris,cartonnette,papier,kraft,mal_croppe,environnement,Carton_brun,autre_refus,plastique After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27062744]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1385199583, 1385199233, 1385199109, 1385199108, 1385199107, 1385199084, 1385199081, 1385199078, 1385199076, 1385199075, 1385199059, 1385199057, 1385199056, 1385199055] map_info['map_portfolio_photo'] : {27062744: [1385199583, 1385199233, 1385199109, 1385199108, 1385199107, 1385199084, 1385199081, 1385199078, 1385199076, 1385199075, 1385199059, 1385199057, 1385199056, 1385199055]} final : False mtd_id 4302 list_pids : [1385199583, 1385199233, 1385199109, 1385199108, 1385199107, 1385199084, 1385199081, 1385199078, 1385199076, 1385199075, 1385199059, 1385199057, 1385199056, 1385199055] Looping around the photos to save general results len do output : 1 /27062744. 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, '3750971') ('4302', '27062744', '1385199583', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199233', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199109', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199108', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199107', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199084', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199081', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199078', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199076', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199075', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199059', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199057', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199056', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199055', None, None, None, None, None, '3750971') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '27062744', "{'Teint_Dans_La_Masse': 27062753, 'flou': 27062754, 'metal': 27062755, 'Carton_gris': 27062756, 'cartonnette': 27062757, 'papier': 27062758, 'kraft': 27062759, 'mal_croppe': 27062760, 'environnement': 27062761, 'Carton_brun': 27062762, 'autre_refus': 27062763, 'plastique': 27062764}", None, None, None, None, '3750971'), ('4302', '27062744', '1385199583', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199233', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199109', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199108', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199107', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199084', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199081', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199078', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199076', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199075', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199059', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199057', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199056', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199055', None, None, None, None, None, '3750971')] time used for this insertion : 0.07841610908508301 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.485116720199585 time spend to save output : 0.07869577407836914 total time spend for step 1 : 1.563812494277954 step2:final Sat Sep 20 05:59:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27062744) 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 27062744 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1385199059,1385199084,1385199057,1385199081,1385199056,1385199078,1385199055,1385199076,1385199075,1385199109,1385199108,1385199107,1385199583,1385199233); 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([27062744]) Inside saveOutput : final : False verbose : True original output for save of step final : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ('0.019034238391496025',), 1385199055: ('0.019034238391496025',)} new output for save of step final : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ('0.019034238391496025',), 1385199055: ('0.019034238391496025',)} [1385199583, 1385199233, 1385199109, 1385199108, 1385199107, 1385199084, 1385199081, 1385199078, 1385199076, 1385199075, 1385199059, 1385199057, 1385199056, 1385199055] map_info['map_portfolio_photo'] : {27062744: [1385199583, 1385199233, 1385199109, 1385199108, 1385199107, 1385199084, 1385199081, 1385199078, 1385199076, 1385199075, 1385199059, 1385199057, 1385199056, 1385199055]} final : False mtd_id 4302 list_pids : [1385199583, 1385199233, 1385199109, 1385199108, 1385199107, 1385199084, 1385199081, 1385199078, 1385199076, 1385199075, 1385199059, 1385199057, 1385199056, 1385199055] Looping around the photos to save general results len do output : 14 /1385199583.Didn't retrieve data . /1385199233.Didn't retrieve data . /1385199109.Didn't retrieve data . /1385199108.Didn't retrieve data . /1385199107.Didn't retrieve data . /1385199084.Didn't retrieve data . /1385199081.Didn't retrieve data . /1385199078.Didn't retrieve data . /1385199076.Didn't retrieve data . /1385199075.Didn't retrieve data . /1385199059.Didn't retrieve data . /1385199057.Didn't retrieve data . /1385199056.Didn't retrieve data . /1385199055.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, '3750971') ('4302', '27062744', '1385199583', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199233', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199109', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199108', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199107', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199084', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199081', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199078', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199076', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199075', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199059', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199057', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199056', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199055', None, None, None, None, None, '3750971') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 42 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '27062744', '1385199583', '0.019034238391496025', None, None, None, None, '3750971'), ('4302', '27062744', '1385199233', '0.019034238391496025', None, None, None, None, '3750971'), ('4302', '27062744', '1385199109', '0.019034238391496025', None, None, None, None, '3750971'), ('4302', '27062744', '1385199108', '0.019034238391496025', None, None, None, None, '3750971'), ('4302', '27062744', '1385199107', '0.019034238391496025', None, None, None, None, '3750971'), ('4302', '27062744', '1385199084', '0.019034238391496025', None, None, None, None, '3750971'), ('4302', '27062744', '1385199081', '0.019034238391496025', None, None, None, None, '3750971'), ('4302', '27062744', '1385199078', '0.019034238391496025', None, None, None, None, '3750971'), ('4302', '27062744', '1385199076', '0.019034238391496025', None, None, None, None, '3750971'), ('4302', '27062744', '1385199075', '0.019034238391496025', None, None, None, None, '3750971'), ('4302', '27062744', '1385199059', '0.019034238391496025', None, None, None, None, '3750971'), ('4302', '27062744', '1385199057', '0.019034238391496025', None, None, None, None, '3750971'), ('4302', '27062744', '1385199056', '0.019034238391496025', None, None, None, None, '3750971'), ('4302', '27062744', '1385199055', '0.019034238391496025', None, None, None, None, '3750971')] time used for this insertion : 0.021778106689453125 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07889509201049805 time spend to save output : 0.022385358810424805 total time spend for step 2 : 0.10128045082092285 step3:velours_tree Sat Sep 20 05:59:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {27062744: [{'Teint_Dans_La_Masse': 27062753, 'flou': 27062754, 'metal': 27062755, 'Carton_gris': 27062756, 'cartonnette': 27062757, 'papier': 27062758, 'kraft': 27062759, 'mal_croppe': 27062760, 'environnement': 27062761, 'Carton_brun': 27062762, 'autre_refus': 27062763, 'plastique': 27062764}]} input_args_next_step : {27062744: ()} output_args : {27062744: [{'Teint_Dans_La_Masse': 27062753, 'flou': 27062754, 'metal': 27062755, 'Carton_gris': 27062756, 'cartonnette': 27062757, 'papier': 27062758, 'kraft': 27062759, 'mal_croppe': 27062760, 'environnement': 27062761, 'Carton_brun': 27062762, 'autre_refus': 27062763, 'plastique': 27062764}]} args : 27062744 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 : ({'Teint_Dans_La_Masse': 27062753, 'flou': 27062754, 'metal': 27062755, 'Carton_gris': 27062756, 'cartonnette': 27062757, 'papier': 27062758, 'kraft': 27062759, 'mal_croppe': 27062760, 'environnement': 27062761, 'Carton_brun': 27062762, 'autre_refus': 27062763, 'plastique': 27062764},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27062744) 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([27062744]) 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.2667539119720459 time spend to save output : 4.982948303222656e-05 total time spend for step 3 : 0.2668037414550781 step4:send_mail_cod Sat Sep 20 06:00:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ('0.019034238391496025',), 1385199055: ('0.019034238391496025',)} input_args_next_step : {1385199583: ()} output_args : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ('0.019034238391496025',), 1385199055: ('0.019034238391496025',)} args : 1385199583 depend.output_id : 0 input_args_next_step : {1385199583: ('0.019034238391496025',), 1385199233: ()} output_args : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ('0.019034238391496025',), 1385199055: ('0.019034238391496025',)} args : 1385199233 depend.output_id : 0 input_args_next_step : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ()} output_args : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ('0.019034238391496025',), 1385199055: ('0.019034238391496025',)} args : 1385199109 depend.output_id : 0 input_args_next_step : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ()} output_args : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ('0.019034238391496025',), 1385199055: ('0.019034238391496025',)} args : 1385199108 depend.output_id : 0 input_args_next_step : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ()} output_args : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ('0.019034238391496025',), 1385199055: ('0.019034238391496025',)} args : 1385199107 depend.output_id : 0 input_args_next_step : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ()} output_args : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ('0.019034238391496025',), 1385199055: ('0.019034238391496025',)} args : 1385199084 depend.output_id : 0 input_args_next_step : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ()} output_args : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ('0.019034238391496025',), 1385199055: ('0.019034238391496025',)} args : 1385199081 depend.output_id : 0 input_args_next_step : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ()} output_args : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ('0.019034238391496025',), 1385199055: ('0.019034238391496025',)} args : 1385199078 depend.output_id : 0 input_args_next_step : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ()} output_args : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ('0.019034238391496025',), 1385199055: ('0.019034238391496025',)} args : 1385199076 depend.output_id : 0 input_args_next_step : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ()} output_args : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ('0.019034238391496025',), 1385199055: ('0.019034238391496025',)} args : 1385199075 depend.output_id : 0 input_args_next_step : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ()} output_args : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ('0.019034238391496025',), 1385199055: ('0.019034238391496025',)} args : 1385199059 depend.output_id : 0 input_args_next_step : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ()} output_args : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ('0.019034238391496025',), 1385199055: ('0.019034238391496025',)} args : 1385199057 depend.output_id : 0 input_args_next_step : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ()} output_args : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ('0.019034238391496025',), 1385199055: ('0.019034238391496025',)} args : 1385199056 depend.output_id : 0 input_args_next_step : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ('0.019034238391496025',), 1385199055: ()} output_args : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ('0.019034238391496025',), 1385199055: ('0.019034238391496025',)} args : 1385199055 depend.output_id : 0 Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 3 : {27062744: [{'Teint_Dans_La_Masse': 27062753, 'flou': 27062754, 'metal': 27062755, 'Carton_gris': 27062756, 'cartonnette': 27062757, 'papier': 27062758, 'kraft': 27062759, 'mal_croppe': 27062760, 'environnement': 27062761, 'Carton_brun': 27062762, 'autre_refus': 27062763, 'plastique': 27062764}]} input_args_next_step : {1385199583: ('0.019034238391496025',), 1385199233: ('0.019034238391496025',), 1385199109: ('0.019034238391496025',), 1385199108: ('0.019034238391496025',), 1385199107: ('0.019034238391496025',), 1385199084: ('0.019034238391496025',), 1385199081: ('0.019034238391496025',), 1385199078: ('0.019034238391496025',), 1385199076: ('0.019034238391496025',), 1385199075: ('0.019034238391496025',), 1385199059: ('0.019034238391496025',), 1385199057: ('0.019034238391496025',), 1385199056: ('0.019034238391496025',), 1385199055: ('0.019034238391496025',), 27062744: ()} output_args : {27062744: [{'Teint_Dans_La_Masse': 27062753, 'flou': 27062754, 'metal': 27062755, 'Carton_gris': 27062756, 'cartonnette': 27062757, 'papier': 27062758, 'kraft': 27062759, 'mal_croppe': 27062760, 'environnement': 27062761, 'Carton_brun': 27062762, 'autre_refus': 27062763, 'plastique': 27062764}]} args : 27062744 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :15, first value : ('0.019034238391496025',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27062744) 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 (1385199583,1385199233,1385199109,1385199108,1385199107,1385199084,1385199081,1385199078,1385199076,1385199075,1385199059,1385199057,1385199056,1385199055) Found this number of photos: 14 ##### Call download_photos : nb_thread : 5 begin to download photo : 1385199055 begin to download photo : 1385199059 begin to download photo : 1385199078 begin to download photo : 1385199107 begin to download photo : 1385199233 download finish for photo 1385199078 begin to download photo : 1385199081 download finish for photo 1385199107 begin to download photo : 1385199108 download finish for photo 1385199055 begin to download photo : 1385199056 download finish for photo 1385199233 begin to download photo : 1385199583 download finish for photo 1385199059 begin to download photo : 1385199075 download finish for photo 1385199108 begin to download photo : 1385199109 download finish for photo 1385199075 begin to download photo : 1385199076 download finish for photo 1385199056 begin to download photo : 1385199057 download finish for photo 1385199081 begin to download photo : 1385199084 download finish for photo 1385199583 download finish for photo 1385199109 download finish for photo 1385199084 download finish for photo 1385199076 download finish for photo 1385199057 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette270627541758340800/ imagette270627551758340800/ length of list_filenames : 14 ; length of list_pids : 14 ; length of list_args : 14 results_Auto_P27062744_20-09-2025_06_00_00.pdf 27062754 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=27062754 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette270627541758340800 27062755 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=27062755 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette270627551758340800 27062757 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=27062757 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1385199271: '1758327808_1220058_1385199078_6665a479809c33967254e5c36270bcab_rle_crop_3968507450_0.png', 1385199272: '1758327808_1220058_1385199056_1219304c488cb8c71472f5f443b272c4_rle_crop_3968507503_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/20/9965ab14de721906707507e12daf9f3d_21285035.png change filename to text .imagette270627571758340800/ imagette270627571758340800/1758327808_1220058_1385199078_6665a479809c33967254e5c36270bcab_rle_crop_3968507450_0.png.png imagette270627571758340800/1758327808_1220058_1385199056_1219304c488cb8c71472f5f443b272c4_rle_crop_3968507503_0.png.png imagette270627591758340800/ imagette270627601758340800/ imagette270627631758340800/ imagette270627641758340800/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/20/9965ab14de721906707507e12daf9f3d_22596316.png imagette270627571758340800 27062759 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=27062759 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette270627591758340800 27062760 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=27062760 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette270627601758340800 27062763 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=27062763 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette270627631758340800 27062764 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=27062764 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette270627641758340800 27062753 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=27062753 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1385199190: '1758327665_1212735_1385199108_8adbe8e5507c4afdfd650219754d501c_rle_crop_3968506920_0.png', 1385199191: '1758327665_1212735_1385199107_7d98f59645d280aacd73bb50d108735b_rle_crop_3968506929_0.png', 1385199192: '1758327665_1212735_1385199107_7d98f59645d280aacd73bb50d108735b_rle_crop_3968506930_0.png', 1385199270: '1758327808_1220058_1385199075_2c07dc9db8242a493ede981a124171ae_rle_crop_3968507475_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/20/6f373dcdecc033bbb5371de85773de3a_10326114.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/20/0e49389c7ddef45a060655dd762b4f14_86653707.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/20/dbf4b5646ba88973a2bf39be26180c59_36989501.png change filename to text .imagette270627531758340800/ imagette270627531758340800/1758327665_1212735_1385199107_7d98f59645d280aacd73bb50d108735b_rle_crop_3968506929_0.png.png imagette270627531758340800/1758327665_1212735_1385199108_8adbe8e5507c4afdfd650219754d501c_rle_crop_3968506920_0.png.png imagette270627531758340800/1758327665_1212735_1385199107_7d98f59645d280aacd73bb50d108735b_rle_crop_3968506930_0.png.png imagette270627531758340800/1758327808_1220058_1385199075_2c07dc9db8242a493ede981a124171ae_rle_crop_3968507475_0.png.png imagette270627561758340801/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/20/15cef5d0213f200975bed9b1dd6cb685_70207387.png imagette270627531758340800 27062756 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=27062756 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette270627561758340801 27062762 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=27062762 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1385199273: '1758327808_1220058_1385199076_ece67319c62f5bd5117f276e67ba31ae_rle_crop_3968507465_0.png', 1385199274: '1758327808_1220058_1385199055_38fa449f8a111cfab8c3bbd1fa0a1dc8_rle_crop_3968507518_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/20/b95ce6b247f0abc22db2a318d88e3109_26349304.png change filename to text .imagette270627621758340801/ imagette270627621758340801/1758327808_1220058_1385199055_38fa449f8a111cfab8c3bbd1fa0a1dc8_rle_crop_3968507518_0.png.png imagette270627621758340801/1758327808_1220058_1385199076_ece67319c62f5bd5117f276e67ba31ae_rle_crop_3968507465_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/20/b95ce6b247f0abc22db2a318d88e3109_17473557.png imagette270627621758340801 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=27062744 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/27062777,27062778,27062779,27062780,27062781,27062782,27062783,27062784,27062785,27062786,27062787,27062788?tags=Teint_Dans_La_Masse,flou,metal,Carton_gris,cartonnette,papier,kraft,mal_croppe,environnement,Carton_brun,autre_refus,plastique your option no_mail is active, we will not send the real mail to your client args[1385199583] : ('0.019034238391496025',) no score found for photo 1385199583 We are sending mail with results at report@fotonower.com args[1385199233] : ('0.019034238391496025',) no score found for photo 1385199233 We are sending mail with results at report@fotonower.com args[1385199109] : ('0.019034238391496025',) no score found for photo 1385199109 We are sending mail with results at report@fotonower.com args[1385199108] : ('0.019034238391496025',) no score found for photo 1385199108 We are sending mail with results at report@fotonower.com args[1385199107] : ('0.019034238391496025',) no score found for photo 1385199107 We are sending mail with results at report@fotonower.com args[1385199084] : ('0.019034238391496025',) no score found for photo 1385199084 We are sending mail with results at report@fotonower.com args[1385199081] : ('0.019034238391496025',) no score found for photo 1385199081 We are sending mail with results at report@fotonower.com args[1385199078] : ('0.019034238391496025',) no score found for photo 1385199078 We are sending mail with results at report@fotonower.com args[1385199076] : ('0.019034238391496025',) no score found for photo 1385199076 We are sending mail with results at report@fotonower.com args[1385199075] : ('0.019034238391496025',) no score found for photo 1385199075 We are sending mail with results at report@fotonower.com args[1385199059] : ('0.019034238391496025',) no score found for photo 1385199059 We are sending mail with results at report@fotonower.com args[1385199057] : ('0.019034238391496025',) no score found for photo 1385199057 We are sending mail with results at report@fotonower.com args[1385199056] : ('0.019034238391496025',) no score found for photo 1385199056 We are sending mail with results at report@fotonower.com args[1385199055] : ('0.019034238391496025',) no score found for photo 1385199055 We are sending mail with results at report@fotonower.com refus_total : 0.019034238391496025 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=27062744 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_P27062744_20-09-2025_06_00_00.pdf results_Auto_P27062744_20-09-2025_06_00_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27062744_20-09-2025_06_00_00.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','27062744','results_Auto_P27062744_20-09-2025_06_00_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27062744_20-09-2025_06_00_00.pdf','pdf','','0.14','0.019034238391496025') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27062744]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1385199583, 1385199233, 1385199109, 1385199108, 1385199107, 1385199084, 1385199081, 1385199078, 1385199076, 1385199075, 1385199059, 1385199057, 1385199056, 1385199055] map_info['map_portfolio_photo'] : {27062744: [1385199583, 1385199233, 1385199109, 1385199108, 1385199107, 1385199084, 1385199081, 1385199078, 1385199076, 1385199075, 1385199059, 1385199057, 1385199056, 1385199055]} final : False mtd_id 4302 list_pids : [1385199583, 1385199233, 1385199109, 1385199108, 1385199107, 1385199084, 1385199081, 1385199078, 1385199076, 1385199075, 1385199059, 1385199057, 1385199056, 1385199055] 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, '3750971') ('4302', '27062744', '1385199583', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199233', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199109', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199108', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199107', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199084', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199081', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199078', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199076', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199075', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199059', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199057', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199056', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199055', None, None, None, None, None, '3750971') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '27062744', '1385199583', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199233', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199109', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199108', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199107', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199084', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199081', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199078', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199076', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199075', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199059', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199057', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199056', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199055', None, None, None, None, None, '3750971')] time used for this insertion : 0.014182329177856445 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.9956865310668945 time spend to save output : 0.014349222183227539 total time spend for step 4 : 3.010035753250122 step5:split_time_score Sat Sep 20 06:00:03 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['27062744'] 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 : [('27062744',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27062744) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1385199233: {'path': 'temp/1758340800_4076665_1385199233_013e5f11bf53c26a345a05dfc5f7cba0.jpg', 'extension': 'jpg'}, 1385199583: {'path': 'temp/1758340800_4076665_1385199583_9b0bf43091692b79412f50fbfc9f3d13.jpg', 'extension': 'jpg'}, 1385199107: {'path': 'temp/1758340800_4076665_1385199107_7d98f59645d280aacd73bb50d108735b.jpg', 'extension': 'jpg'}, 1385199108: {'path': 'temp/1758340800_4076665_1385199108_8adbe8e5507c4afdfd650219754d501c.jpg', 'extension': 'jpg'}, 1385199109: {'path': 'temp/1758340800_4076665_1385199109_da664fd11ddd02d73c56feaa67240633.jpg', 'extension': 'jpg'}, 1385199078: {'path': 'temp/1758340800_4076665_1385199078_6665a479809c33967254e5c36270bcab.jpg', 'extension': 'jpg'}, 1385199081: {'path': 'temp/1758340800_4076665_1385199081_11bf332b1dba49d6200cf2968559b586.jpg', 'extension': 'jpg'}, 1385199084: {'path': 'temp/1758340800_4076665_1385199084_be7fcc3cd1f495bc6628568adfbb5e6a.jpg', 'extension': 'jpg'}, 1385199059: {'path': 'temp/1758340800_4076665_1385199059_7cdb85be5dc5d95c60d1e961e65ea80e.jpg', 'extension': 'jpg'}, 1385199075: {'path': 'temp/1758340800_4076665_1385199075_2c07dc9db8242a493ede981a124171ae.jpg', 'extension': 'jpg'}, 1385199076: {'path': 'temp/1758340800_4076665_1385199076_ece67319c62f5bd5117f276e67ba31ae.jpg', 'extension': 'jpg'}, 1385199055: {'path': 'temp/1758340800_4076665_1385199055_38fa449f8a111cfab8c3bbd1fa0a1dc8.jpg', 'extension': 'jpg'}, 1385199056: {'path': 'temp/1758340800_4076665_1385199056_1219304c488cb8c71472f5f443b272c4.jpg', 'extension': 'jpg'}, 1385199057: {'path': 'temp/1758340800_4076665_1385199057_359f7b3b3bfc31d0330595e6e1dfad57.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 = 27062744; (('arc_en_ciel_jrm',), ('arc_en_ciel_jrm_bis',)) 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 = 27062744 group by h (('02', 14),) 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=27062744 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 (27062744) 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 (27062744) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 20092025 27062744 Nombre de photos uploadées : 14 / 23040 (0%) 20092025 27062744 Nombre de photos taguées (types de déchets): 0 / 14 (0%) 20092025 27062744 Nombre de photos taguées (volume) : 0 / 14 (0%) [{'photo_id': 1385199059, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/20/7cdb85be5dc5d95c60d1e961e65ea80e.jpg', 'username': None, 'uploaded_at': 1758327367, 'text': 'image_20092025_02_15_04_010162m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1385199084, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/20/be7fcc3cd1f495bc6628568adfbb5e6a.jpg', 'username': None, 'uploaded_at': 1758327432, 'text': 'image_20092025_02_15_04_010162m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1385199057, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/20/359f7b3b3bfc31d0330595e6e1dfad57.jpg', 'username': None, 'uploaded_at': 1758327367, 'text': 'image_20092025_02_15_14_010134m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1385199081, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/20/11bf332b1dba49d6200cf2968559b586.jpg', 'username': None, 'uploaded_at': 1758327432, 'text': 'image_20092025_02_15_14_010134m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 2.86102294921875e-06 elapsed_time : order_list_meta_photo_and_scores 8.344650268554688e-06 ?????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0013179779052734375 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 27062744, '2025-09-20' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-09-20' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2324043,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.2057819366455078 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= 2324043 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2324043, 'dashboard_run_id': 2332807, 'mtr_portfolio_id': 27058917, 'dashboard_result_id': 15468236, '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_P27058917_20-09-2025_05_56_31.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27058974, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27058975, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27058976, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27058977, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27058978, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27058979, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27058980, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27058981, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27058982, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27058983, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27058984, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27058985, 'pht': 3726}}"}, {'dashboat_entry_day': 2324043, 'dashboard_run_id': 2332807, 'mtr_portfolio_id': 27059371, 'dashboard_result_id': 15468237, '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_P27059371_20-09-2025_05_57_08.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27059411, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27059412, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27059413, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27059414, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27059415, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27059416, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27059417, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27059418, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27059419, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27059420, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27059421, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27059422, 'pht': 3726}}"}, {'dashboat_entry_day': 2324043, 'dashboard_run_id': 2332807, 'mtr_portfolio_id': 27060004, 'dashboard_result_id': 15468238, '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_P27060004_20-09-2025_05_57_33.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27060014, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27060015, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27060016, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27060017, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27060018, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27060019, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27060020, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27060021, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27060022, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27060023, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27060024, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27060025, 'pht': 3726}}"}, {'dashboat_entry_day': 2324043, 'dashboard_run_id': 2332807, 'mtr_portfolio_id': 27060492, 'dashboard_result_id': 15468239, '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_P27060492_20-09-2025_05_58_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27060502, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27060503, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27060504, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27060505, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27060506, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27060507, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27060508, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27060509, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27060510, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27060511, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27060512, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27060513, 'pht': 3726}}"}, {'dashboat_entry_day': 2324043, 'dashboard_run_id': 2332807, 'mtr_portfolio_id': 27061608, 'dashboard_result_id': 15468240, '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_P27061608_20-09-2025_05_58_30.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27061610, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27061611, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27061612, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27061613, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27061614, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27061615, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27061616, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27061617, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27061618, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27061619, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27061620, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27061621, 'pht': 3726}}"}, {'dashboat_entry_day': 2324043, 'dashboard_run_id': 2332807, 'mtr_portfolio_id': 27061790, 'dashboard_result_id': 15468241, '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_P27061790_20-09-2025_05_59_03.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27061793, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27061794, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27061795, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27061796, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27061797, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27061798, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27061799, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27061800, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27061801, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27061802, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27061803, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27061804, 'pht': 3726}}"}, {'dashboat_entry_day': 2324043, 'dashboard_run_id': 2332807, 'mtr_portfolio_id': 27062417, 'dashboard_result_id': 15468242, '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_P27062417_20-09-2025_05_59_35.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27062426, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27062427, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27062428, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27062429, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27062430, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27062431, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27062432, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27062433, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27062434, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27062435, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27062436, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27062437, 'pht': 3726}}"}, {'dashboat_entry_day': 2324043, 'dashboard_run_id': 2332807, 'mtr_portfolio_id': 27062744, 'dashboard_result_id': 15468243, '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_P27062744_20-09-2025_02_37_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27062753, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27062754, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27062755, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27062756, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27062757, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27062758, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27062759, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27062760, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27062761, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27062762, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27062763, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27062764, 'pht': 3726}}"}, {'dashboat_entry_day': 2324043, 'dashboard_run_id': 2332807, 'mtr_portfolio_id': 27063070, 'dashboard_result_id': 15468244, '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_P27063070_20-09-2025_02_50_31.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27063075, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27063076, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27063077, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27063078, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27063079, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27063080, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27063081, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27063082, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27063083, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27063084, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27063085, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27063086, 'pht': 3726}}"}, {'dashboat_entry_day': 2324043, 'dashboard_run_id': 2332807, 'mtr_portfolio_id': 27063360, 'dashboard_result_id': 15468245, '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_P27063360_20-09-2025_03_02_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27063365, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27063366, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27063367, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27063368, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27063369, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27063370, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27063371, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27063372, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27063373, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27063374, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27063375, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27063376, 'pht': 3726}}"}, {'dashboat_entry_day': 2324043, 'dashboard_run_id': 2332807, 'mtr_portfolio_id': 27063705, 'dashboard_result_id': 15468246, '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_P27063705_20-09-2025_03_19_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27063727, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27063728, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27063729, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27063730, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27063731, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27063732, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27063733, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27063734, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27063735, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27063736, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27063737, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27063738, 'pht': 3726}}"}, {'dashboat_entry_day': 2324043, 'dashboard_run_id': 2332807, 'mtr_portfolio_id': 27064191, 'dashboard_result_id': 15468247, '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_P27064191_20-09-2025_03_32_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27064201, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27064202, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27064203, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27064204, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27064205, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27064206, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27064207, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27064208, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27064209, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27064210, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27064211, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27064212, 'pht': 3726}}"}, {'dashboat_entry_day': 2324043, 'dashboard_run_id': 2332807, 'mtr_portfolio_id': 27064657, 'dashboard_result_id': 15468248, '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_P27064657_20-09-2025_03_49_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27064667, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27064668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27064669, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27064670, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27064671, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27064672, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27064673, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27064674, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27064675, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27064676, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27064677, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27064678, 'pht': 3726}}"}, {'dashboat_entry_day': 2324043, 'dashboard_run_id': 2332807, 'mtr_portfolio_id': 27065068, 'dashboard_result_id': 15468249, '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_P27065068_20-09-2025_04_03_03.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27065094, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27065095, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27065096, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27065097, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27065098, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27065099, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27065100, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27065101, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27065102, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27065103, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27065104, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27065105, 'pht': 3726}}"}, {'dashboat_entry_day': 2324043, 'dashboard_run_id': 2332807, 'mtr_portfolio_id': 27065519, 'dashboard_result_id': 15468250, '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_P27065519_20-09-2025_04_14_33.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27065572, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27065573, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27065574, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27065575, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27065576, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27065577, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27065578, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27065579, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27065580, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27065581, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27065582, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27065583, 'pht': 3726}}"}, {'dashboat_entry_day': 2324043, 'dashboard_run_id': 2332807, 'mtr_portfolio_id': 27066381, 'dashboard_result_id': 15468251, '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_P27066381_20-09-2025_05_27_02.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27066382, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27066383, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27066384, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27066385, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27066386, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27066387, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27066388, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27066389, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27066390, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27066391, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27066392, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27066393, '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 = 27058917 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': 3750964, 'mtr_portfolio_id': 27058917, 'created_at': datetime.datetime(2025, 9, 20, 5, 56, 28), 'result': '0.05156737114490578', 'result_long': None, 'result_double': None}] Qualite : 0.05156737114490578 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27058917 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27058917_20-09-2025_05_56_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27058917 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_P27058917_20-09-2025_05_56_31.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27058974, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27058975, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27058976, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27058977, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27058978, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27058979, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27058980, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27058981, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27058982, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27058983, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27058984, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27058985, 'pht': 3726}}" where mtr_portfolio_id = 27058917 and dashboard_run_id = 2332813 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`=27058917 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15468236, 0.05156737114490578, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27058917_20-09-2025_05_56_31.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27058974, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27058975, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27058976, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27058977, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27058978, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27058979, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27058980, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27058981, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27058982, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27058983, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27058984, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27058985, '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 = 27059371 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': 3750965, 'mtr_portfolio_id': 27059371, 'created_at': datetime.datetime(2025, 9, 20, 5, 57), 'result': '0.054431468118045626', 'result_long': None, 'result_double': None}] Qualite : 0.054431468118045626 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27059371 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27059371_20-09-2025_05_57_08.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27059371 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_P27059371_20-09-2025_05_57_08.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27059411, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27059412, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27059413, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27059414, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27059415, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27059416, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27059417, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27059418, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27059419, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27059420, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27059421, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27059422, 'pht': 3726}}" where mtr_portfolio_id = 27059371 and dashboard_run_id = 2332813 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`=27059371 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15468237, 0.054431468118045626, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27059371_20-09-2025_05_57_08.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27059411, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27059412, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27059413, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27059414, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27059415, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27059416, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27059417, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27059418, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27059419, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27059420, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27059421, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27059422, '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 = 27060004 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': 3750966, 'mtr_portfolio_id': 27060004, 'created_at': datetime.datetime(2025, 9, 20, 5, 57, 30), 'result': '0.05216509127750335', 'result_long': None, 'result_double': None}] Qualite : 0.05216509127750335 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27060004 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27060004_20-09-2025_05_57_33.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27060004 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_P27060004_20-09-2025_05_57_33.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27060014, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27060015, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27060016, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27060017, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27060018, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27060019, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27060020, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27060021, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27060022, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27060023, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27060024, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27060025, 'pht': 3726}}" where mtr_portfolio_id = 27060004 and dashboard_run_id = 2332813 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`=27060004 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15468238, 0.05216509127750335, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27060004_20-09-2025_05_57_33.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27060014, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27060015, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27060016, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27060017, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27060018, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27060019, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27060020, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27060021, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27060022, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27060023, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27060024, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27060025, '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 = 27060492 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': 3750967, 'mtr_portfolio_id': 27060492, 'created_at': datetime.datetime(2025, 9, 20, 5, 57, 58), 'result': '0.04370231488243175', 'result_long': None, 'result_double': None}] Qualite : 0.04370231488243175 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27060492 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27060492_20-09-2025_05_58_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27060492 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_P27060492_20-09-2025_05_58_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27060502, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27060503, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27060504, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27060505, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27060506, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27060507, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27060508, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27060509, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27060510, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27060511, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27060512, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27060513, 'pht': 3726}}" where mtr_portfolio_id = 27060492 and dashboard_run_id = 2332813 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`=27060492 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15468239, 0.04370231488243175, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27060492_20-09-2025_05_58_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27060502, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27060503, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27060504, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27060505, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27060506, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27060507, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27060508, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27060509, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27060510, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27060511, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27060512, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27060513, '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 = 27061608 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': 3750968, 'mtr_portfolio_id': 27061608, 'created_at': datetime.datetime(2025, 9, 20, 5, 58, 28), 'result': '0.04954202345399494', 'result_long': None, 'result_double': None}] Qualite : 0.04954202345399494 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27061608 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27061608_20-09-2025_05_58_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27061608 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_P27061608_20-09-2025_05_58_30.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27061610, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27061611, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27061612, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27061613, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27061614, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27061615, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27061616, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27061617, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27061618, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27061619, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27061620, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27061621, 'pht': 3726}}" where mtr_portfolio_id = 27061608 and dashboard_run_id = 2332813 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`=27061608 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15468240, 0.04954202345399494, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27061608_20-09-2025_05_58_30.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27061610, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27061611, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27061612, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27061613, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27061614, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27061615, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27061616, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27061617, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27061618, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27061619, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27061620, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27061621, '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 = 27061790 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': 3750969, 'mtr_portfolio_id': 27061790, 'created_at': datetime.datetime(2025, 9, 20, 5, 59, 1), 'result': '0.045642743993012234', 'result_long': None, 'result_double': None}] Qualite : 0.045642743993012234 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27061790 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27061790_20-09-2025_05_59_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27061790 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_P27061790_20-09-2025_05_59_03.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27061793, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27061794, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27061795, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27061796, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27061797, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27061798, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27061799, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27061800, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27061801, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27061802, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27061803, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27061804, 'pht': 3726}}" where mtr_portfolio_id = 27061790 and dashboard_run_id = 2332813 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`=27061790 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15468241, 0.045642743993012234, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27061790_20-09-2025_05_59_03.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27061793, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27061794, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27061795, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27061796, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27061797, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27061798, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27061799, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27061800, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27061801, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27061802, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27061803, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27061804, '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 = 27062417 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': 3750970, 'mtr_portfolio_id': 27062417, 'created_at': datetime.datetime(2025, 9, 20, 5, 59, 29), 'result': '0.04022193769611102', 'result_long': None, 'result_double': None}] Qualite : 0.04022193769611102 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27062417 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27062417_20-09-2025_05_59_35.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27062417 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_P27062417_20-09-2025_05_59_35.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27062426, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27062427, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27062428, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27062429, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27062430, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27062431, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27062432, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27062433, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27062434, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27062435, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27062436, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27062437, 'pht': 3726}}" where mtr_portfolio_id = 27062417 and dashboard_run_id = 2332813 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`=27062417 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15468242, 0.04022193769611102, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27062417_20-09-2025_05_59_35.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27062426, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27062427, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27062428, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27062429, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27062430, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27062431, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27062432, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27062433, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27062434, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27062435, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27062436, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27062437, '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 = 27062744 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': 3750971, 'mtr_portfolio_id': 27062744, 'created_at': datetime.datetime(2025, 9, 20, 5, 59, 59), 'result': '0.019034238391496025', 'result_long': None, 'result_double': None}] Qualite : 0.019034238391496025 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27062744 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27062744_20-09-2025_06_00_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27062744 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_P27062744_20-09-2025_06_00_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27062753, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27062754, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27062755, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27062756, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27062757, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27062758, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27062759, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27062760, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27062761, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27062762, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27062763, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27062764, 'pht': 3726}}" where mtr_portfolio_id = 27062744 and dashboard_run_id = 2332813 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`=27062744 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15468243, 0.019034238391496025, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27062744_20-09-2025_06_00_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27062753, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27062754, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27062755, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27062756, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27062757, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27062758, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27062759, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27062760, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27062761, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27062762, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27062763, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27062764, '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 = 27063070 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': 3750247, 'mtr_portfolio_id': 27063070, 'created_at': datetime.datetime(2025, 9, 20, 2, 50, 31), 'result': '0.04675312110965916', 'result_long': None, 'result_double': None}] Qualite : 0.04675312110965916 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27063070 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27063070_20-09-2025_02_50_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27063070 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_P27063070_20-09-2025_02_50_31.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27063075, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27063076, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27063077, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27063078, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27063079, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27063080, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27063081, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27063082, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27063083, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27063084, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27063085, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27063086, 'pht': 3726}}" where mtr_portfolio_id = 27063070 and dashboard_run_id = 2332813 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`=27063070 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15468244, 0.04675312110965916, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27063070_20-09-2025_02_50_31.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27063075, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27063076, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27063077, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27063078, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27063079, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27063080, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27063081, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27063082, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27063083, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27063084, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27063085, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27063086, '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 = 27063360 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': 3750289, 'mtr_portfolio_id': 27063360, 'created_at': datetime.datetime(2025, 9, 20, 3, 2, 57), 'result': '0.0470545739291256', 'result_long': None, 'result_double': None}] Qualite : 0.0470545739291256 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27063360 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27063360_20-09-2025_03_02_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27063360 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_P27063360_20-09-2025_03_02_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27063365, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27063366, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27063367, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27063368, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27063369, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27063370, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27063371, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27063372, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27063373, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27063374, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27063375, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27063376, 'pht': 3726}}" where mtr_portfolio_id = 27063360 and dashboard_run_id = 2332813 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`=27063360 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15468245, 0.0470545739291256, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27063360_20-09-2025_03_02_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27063365, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27063366, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27063367, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27063368, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27063369, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27063370, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27063371, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27063372, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27063373, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27063374, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27063375, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27063376, '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 = 27063705 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': 3750369, 'mtr_portfolio_id': 27063705, 'created_at': datetime.datetime(2025, 9, 20, 3, 19), 'result': '0.04609367832645654', 'result_long': None, 'result_double': None}] Qualite : 0.04609367832645654 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27063705 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27063705_20-09-2025_03_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27063705 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_P27063705_20-09-2025_03_19_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27063727, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27063728, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27063729, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27063730, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27063731, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27063732, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27063733, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27063734, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27063735, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27063736, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27063737, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27063738, 'pht': 3726}}" where mtr_portfolio_id = 27063705 and dashboard_run_id = 2332813 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`=27063705 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15468246, 0.04609367832645654, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27063705_20-09-2025_03_19_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27063727, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27063728, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27063729, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27063730, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27063731, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27063732, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27063733, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27063734, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27063735, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27063736, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27063737, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27063738, '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 = 27064191 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': 3750460, 'mtr_portfolio_id': 27064191, 'created_at': datetime.datetime(2025, 9, 20, 3, 32, 59), 'result': '0.05231396374475747', 'result_long': None, 'result_double': None}] Qualite : 0.05231396374475747 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27064191 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27064191_20-09-2025_03_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27064191 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_P27064191_20-09-2025_03_32_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27064201, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27064202, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27064203, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27064204, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27064205, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27064206, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27064207, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27064208, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27064209, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27064210, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27064211, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27064212, 'pht': 3726}}" where mtr_portfolio_id = 27064191 and dashboard_run_id = 2332813 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`=27064191 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15468247, 0.05231396374475747, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27064191_20-09-2025_03_32_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27064201, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27064202, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27064203, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27064204, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27064205, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27064206, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27064207, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27064208, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27064209, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27064210, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27064211, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27064212, '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 = 27064657 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': 3750535, 'mtr_portfolio_id': 27064657, 'created_at': datetime.datetime(2025, 9, 20, 3, 49), 'result': '0.06194596881750793', 'result_long': None, 'result_double': None}] Qualite : 0.06194596881750793 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27064657 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27064657_20-09-2025_03_49_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27064657 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_P27064657_20-09-2025_03_49_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27064667, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27064668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27064669, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27064670, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27064671, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27064672, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27064673, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27064674, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27064675, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27064676, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27064677, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27064678, 'pht': 3726}}" where mtr_portfolio_id = 27064657 and dashboard_run_id = 2332813 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`=27064657 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15468248, 0.06194596881750793, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27064657_20-09-2025_03_49_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27064667, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27064668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27064669, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27064670, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27064671, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27064672, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27064673, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27064674, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27064675, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27064676, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27064677, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27064678, '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 = 27065068 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': 3750604, 'mtr_portfolio_id': 27065068, 'created_at': datetime.datetime(2025, 9, 20, 4, 3, 2), 'result': '0.04818601226331831', 'result_long': None, 'result_double': None}] Qualite : 0.04818601226331831 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27065068 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27065068_20-09-2025_04_03_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27065068 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_P27065068_20-09-2025_04_03_03.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27065094, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27065095, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27065096, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27065097, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27065098, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27065099, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27065100, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27065101, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27065102, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27065103, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27065104, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27065105, 'pht': 3726}}" where mtr_portfolio_id = 27065068 and dashboard_run_id = 2332813 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`=27065068 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15468249, 0.04818601226331831, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27065068_20-09-2025_04_03_03.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27065094, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27065095, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27065096, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27065097, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27065098, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27065099, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27065100, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27065101, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27065102, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27065103, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27065104, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27065105, '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 = 27065519 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': 3750690, 'mtr_portfolio_id': 27065519, 'created_at': datetime.datetime(2025, 9, 20, 4, 14, 31), 'result': '0.06810650177148635', 'result_long': None, 'result_double': None}] Qualite : 0.06810650177148635 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27065519 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27065519_20-09-2025_04_14_33.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27065519 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_P27065519_20-09-2025_04_14_33.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27065572, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27065573, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27065574, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27065575, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27065576, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27065577, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27065578, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27065579, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27065580, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27065581, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27065582, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27065583, 'pht': 3726}}" where mtr_portfolio_id = 27065519 and dashboard_run_id = 2332813 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`=27065519 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15468250, 0.06810650177148635, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27065519_20-09-2025_04_14_33.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27065572, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27065573, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27065574, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27065575, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27065576, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27065577, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27065578, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27065579, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27065580, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27065581, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27065582, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27065583, '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 = 27066381 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27066381 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 27066381 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27066381 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27066381 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27066381 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27066381_20-09-2025_05_27_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27066381 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_P27066381_20-09-2025_05_27_02.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27066382, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27066383, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27066384, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27066385, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27066386, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27066387, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27066388, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27066389, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27066390, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27066391, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27066392, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27066393, 'pht': 3726}}" where mtr_portfolio_id = 27066381 and dashboard_run_id = 2332807 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27058917,27059371,27060004,27060492,27061608,27061790,27062417,27062744,27063070,27063360,27063705,27064191,27064657,27065068,27065519,27066381) result : ((1385182586,), (1385182641,), (1385182822,), (1385182824,), (1385182827,), (1385182831,), (1385183045,), (1385183050,), (1385183053,), (1385183065,), (1385183092,), (1385183165,), (1385183167,), (1385183169,), (1385183171,), (1385183174,), (1385183186,), (1385183194,), (1385183198,), (1385183202,), (1385183206,), (1385183210,), (1385183223,), (1385183225,), (1385183227,), (1385183250,), (1385183253,), (1385183256,), (1385183258,), (1385183262,), (1385183344,), (1385183359,), (1385183361,), (1385183364,), (1385183368,), (1385184372,), (1385184407,), (1385184433,), (1385184456,), (1385184464,), (1385184556,), (1385184662,), (1385184688,), (1385184690,), (1385184692,), (1385184695,), (1385184717,), (1385184765,), (1385184792,), (1385184794,), (1385184841,), (1385184844,), (1385184846,), (1385184906,), (1385184944,), (1385184973,), (1385185000,), (1385185038,), (1385185039,), (1385185040,), (1385185042,), (1385185044,), (1385185085,), (1385185088,), (1385185094,), (1385185096,), (1385185098,), (1385185101,), (1385185075,), (1385185076,), (1385185078,), (1385185081,), (1385185129,), (1385185132,), (1385185135,), (1385185154,), (1385185222,), (1385185223,), (1385185224,), (1385185227,), (1385185241,), (1385185525,), (1385185541,), (1385185550,), (1385185555,), (1385185689,), (1385185690,), (1385185691,), (1385185694,), (1385185698,), (1385185701,), (1385185712,), (1385185714,), (1385185717,), (1385185721,), (1385185990,), (1385186015,), (1385186045,), (1385186065,), (1385186131,), (1385186201,), (1385186202,), (1385186203,), (1385186206,), (1385186210,), (1385186213,), (1385186234,), (1385186236,), (1385186238,), (1385186283,), (1385186285,), (1385186286,), (1385186288,), (1385186339,), (1385186367,), (1385186391,), (1385186417,), (1385186669,), (1385186672,), (1385186674,), (1385186687,), (1385186690,), (1385186701,), (1385186848,), (1385186850,), (1385186851,), (1385186854,), (1385187014,), (1385187051,), (1385187058,), (1385187061,), (1385187327,), (1385187368,), (1385187396,), (1385187696,), (1385187695,), (1385187730,), (1385187731,), (1385187732,), (1385187748,), (1385187752,), (1385187811,), (1385187813,), (1385187862,), (1385187864,), (1385187866,), (1385187877,), (1385187879,), (1385187881,), (1385187884,), (1385187921,), (1385187922,), (1385187923,), (1385187925,), (1385188019,), (1385188022,), (1385188026,), (1385188029,), (1385188056,), (1385188061,), (1385188065,), (1385188071,), (1385188075,), (1385188078,), (1385188145,), (1385188148,), (1385188211,), (1385188212,), (1385188242,), (1385188244,), (1385188259,), (1385188286,), (1385188289,), (1385188315,), (1385188316,), (1385188317,), (1385188353,), (1385188354,), (1385188355,), (1385188357,), (1385188362,), (1385188384,), (1385188387,), (1385188388,), (1385188392,), (1385188396,), (1385188409,), (1385188410,), (1385188411,), (1385188413,), (1385188417,), (1385188422,), (1385188455,), (1385188458,), (1385188461,), (1385188463,), (1385188466,), (1385188467,), (1385188468,), (1385188450,), (1385188452,), (1385188470,), (1385188471,), (1385188473,), (1385188508,), (1385188511,), (1385188513,), (1385188517,), (1385188538,), (1385188540,), (1385188542,), (1385188546,), (1385188550,), (1385188572,), (1385188576,), (1385188578,), (1385188589,), (1385188652,), (1385188654,), (1385188656,), (1385188659,), (1385188663,), (1385188688,), (1385188690,), (1385188692,), (1385188695,), (1385188709,), (1385188710,), (1385188711,), (1385188713,), (1385188731,), (1385189268,), (1385189274,), (1385189276,), (1385189278,), (1385189281,), (1385189283,), (1385194015,), (1385194124,), (1385193888,), (1385193955,), (1385194105,), (1385194106,), (1385194108,), (1385194110,), (1385194113,), (1385194116,), (1385194202,), (1385194226,), (1385194227,), (1385194228,), (1385194231,), (1385194235,), (1385194251,), (1385194253,), (1385194255,), (1385194271,), (1385194272,), (1385194273,), (1385194275,), (1385194298,), (1385194300,), (1385194302,), (1385194305,), (1385194308,), (1385194312,), (1385194328,), (1385194330,), (1385194334,), (1385194338,), (1385194349,), (1385194351,), (1385194353,), (1385194355,), (1385194358,), (1385194372,), (1385194373,), (1385194374,), (1385194408,), (1385194451,), (1385194405,), (1385194406,), (1385194407,), (1385194423,), (1385194425,), (1385194429,), (1385194432,), (1385194435,), (1385194437,), (1385194448,), (1385194450,), (1385194457,), (1385194459,), (1385194462,), (1385194466,), (1385194470,), (1385194484,), (1385194485,), (1385194510,), (1385194519,), (1385194523,), (1385194527,), (1385194539,), (1385194540,), (1385194541,), (1385194543,), (1385194546,), (1385194549,), (1385194575,), (1385194577,), (1385194597,), (1385194599,), (1385194603,), (1385194608,), (1385194613,), (1385194629,), (1385194633,), (1385194635,), (1385194677,), (1385194679,), (1385194680,), (1385194701,), (1385194702,), (1385194703,), (1385194721,), (1385194722,), (1385194724,), (1385194727,), (1385194730,), (1385194787,), (1385194789,), (1385194791,), (1385194813,), (1385194816,), (1385194820,), (1385194823,), (1385194833,), (1385194834,), (1385194835,), (1385194836,), (1385194837,), (1385194838,), (1385194895,), (1385194888,), (1385194890,), (1385194891,), (1385194892,), (1385194921,), (1385194923,), (1385194924,), (1385194929,), (1385194944,), (1385194947,), (1385194949,), (1385194954,), (1385194955,), (1385195216,), (1385195289,), (1385195319,), (1385195350,), (1385195838,), (1385195892,), (1385195944,), (1385195994,), (1385196048,), (1385196100,), (1385196291,), (1385196348,), (1385196399,), (1385196548,), (1385196573,), (1385196598,), (1385196631,), (1385196656,), (1385196683,), (1385197016,), (1385197064,), (1385197113,), (1385197154,), (1385197185,), (1385197214,), (1385197312,), (1385197339,), (1385197365,), (1385197401,), (1385197568,), (1385197620,), (1385197630,), (1385197650,), (1385197674,), (1385197677,), (1385197680,), (1385197702,), (1385197704,), (1385197706,), (1385197709,), (1385197724,), (1385197726,), (1385197728,), (1385197754,), (1385197755,), (1385197756,), (1385197759,), (1385197763,), (1385197821,), (1385197887,), (1385197960,), (1385198044,), (1385198128,), (1385198786,), (1385198788,), (1385198790,), (1385198794,), (1385199014,), (1385199017,), (1385199020,), (1385199061,), (1385199087,), (1385199055,), (1385199056,), (1385199057,), (1385199059,), (1385199075,), (1385199076,), (1385199078,), (1385199081,), (1385199084,), (1385199107,), (1385199108,), (1385199109,), (1385199233,), (1385199583,), (1385199497,), (1385199570,), (1385199573,), (1385199575,), (1385199578,), (1385199592,), (1385199593,), (1385199594,), (1385199607,), (1385199609,), (1385199612,), (1385199615,), (1385199651,), (1385199652,), (1385199654,), (1385199657,), (1385199660,), (1385199661,), (1385199669,), (1385199670,), (1385199679,), (1385199681,), (1385199683,), (1385199686,), (1385199689,), (1385199701,), (1385199702,), (1385199703,), (1385199705,), (1385199708,), (1385199746,), (1385199748,), (1385199750,), (1385199753,), (1385199756,), (1385199759,), (1385199769,), (1385199770,), (1385199771,), (1385199797,), (1385199799,), (1385199801,), (1385199805,), (1385199808,), (1385199841,), (1385199843,), (1385199844,), (1385199847,), (1385199850,), (1385199853,), (1385199874,), (1385199876,), (1385199878,), (1385199882,), (1385199896,), (1385199898,), (1385199899,), (1385199901,), (1385199905,), (1385199940,), (1385199943,), (1385199945,), (1385199990,), (1385199992,), (1385199994,), (1385199995,), (1385200031,), (1385200032,), (1385200040,), (1385199932,), (1385199934,), (1385199937,), (1385199956,), (1385199960,), (1385199963,), (1385199968,), (1385199971,), (1385199978,), (1385199986,), (1385199988,), (1385200003,), (1385200004,), (1385200006,), (1385200007,), (1385200009,), (1385200010,), (1385200012,), (1385200014,), (1385200028,), (1385200029,), (1385200036,), (1385200037,), (1385200038,), (1385200067,), (1385200070,), (1385200073,), (1385200090,), (1385200091,), (1385200092,), (1385200094,), (1385200097,), (1385200126,), (1385200128,), (1385200130,), (1385200149,), (1385200150,), (1385200151,), (1385200153,), (1385200178,), (1385200180,), (1385200182,), (1385200185,), (1385200189,), (1385200208,), (1385200210,), (1385200233,), (1385200234,), (1385200235,), (1385200238,), (1385200253,), (1385200255,), (1385200258,), (1385200261,), (1385200265,), (1385200267,), (1385200279,), (1385200281,), (1385200286,), (1385200287,), (1385200289,), (1385200692,), (1385200726,), (1385200755,), (1385200968,), (1385200946,), (1385200965,), (1385200989,), (1385200992,), (1385200993,), (1385200996,), (1385201008,), (1385201010,), (1385201363,), (1385201388,), (1385201416,), (1385201441,), (1385201717,), (1385201744,), (1385202006,), (1385202007,), (1385202008,), (1385202009,), (1385202011,), (1385202133,), (1385202161,), (1385202188,), (1385202213,), (1385202239,), (1385202265,), (1385202317,), (1385202320,), (1385202323,), (1385202330,), (1385202348,), (1385202411,), (1385202412,), (1385202415,), (1385202483,), (1385202485,), (1385202487,), (1385202489,), (1385202506,), (1385202507,), (1385202516,), (1385202518,), (1385202520,), (1385202522,), (1385202524,), (1385202547,), (1385202548,), (1385202549,), (1385202550,), (1385202582,), (1385202584,), (1385202608,), (1385202609,), (1385202610,), (1385202612,), (1385202615,), (1385202625,), (1385202626,), (1385202628,), (1385202630,), (1385202632,), (1385202633,), (1385202645,), (1385202659,), (1385202669,), (1385202693,), (1385202667,), (1385202668,), (1385202684,), (1385202686,), (1385202688,), (1385202690,), (1385202692,), (1385202700,), (1385202701,), (1385202702,), (1385202703,), (1385202735,), (1385202737,), (1385202739,), (1385202757,), (1385202758,), (1385202768,), (1385202770,), (1385202772,), (1385202775,), (1385202819,), (1385202821,), (1385202823,), (1385202838,), (1385202839,), (1385202840,), (1385202859,), (1385202862,), (1385202901,), (1385202902,), (1385202903,), (1385202912,), (1385202914,), (1385202916,), (1385202926,), (1385202927,), (1385202928,), (1385202929,), (1385202931,), (1385202934,), (1385202974,), (1385202975,), (1385202984,), (1385202986,), (1385202988,), (1385202990,), (1385203054,), (1385203044,), (1385203046,), (1385203050,), (1385203052,), (1385203079,), (1385203081,), (1385203083,), (1385203085,), (1385203096,), (1385203097,), (1385203099,), (1385203131,), (1385203133,), (1385203135,), (1385203145,), (1385203153,), (1385203154,), (1385203156,), (1385203157,), (1385203178,), (1385203179,), (1385203208,), (1385203210,), (1385203227,), (1385203228,), (1385203229,), (1385203231,), (1385203232,), (1385203241,), (1385203243,), (1385203245,), (1385203247,), (1385203249,), (1385203251,), (1385203289,), (1385203291,), (1385203292,), (1385203293,), (1385203295,), (1385203297,), (1385203307,), (1385203309,), (1385203311,), (1385203313,), (1385203322,), (1385203323,), (1385203324,), (1385203325,), (1385203354,), (1385203356,), (1385203359,), (1385203362,), (1385203364,), (1385203367,), (1385203388,), (1385203390,), (1385203392,), (1385203394,), (1385203397,), (1385203405,), (1385203407,), (1385203409,), (1385203411,), (1385203439,), (1385203458,), (1385203433,), (1385203436,), (1385203450,), (1385203451,), (1385203452,), (1385203454,), (1385203456,), (1385203467,), (1385203468,), (1385203469,), (1385203482,), (1385203486,), (1385203489,), (1385203510,), (1385203511,), (1385203512,), (1385203513,), (1385203515,), (1385203529,), (1385203531,), (1385203533,), (1385203535,), (1385203538,), (1385203540,), (1385203553,), (1385203554,), (1385203556,), (1385203563,), (1385203569,), (1385203570,), (1385203572,), (1385203574,), (1385203576,), (1385203578,), (1385203582,), (1385203584,), (1385203586,), (1385203588,), (1385203590,), (1385203607,), (1385203608,), (1385203609,), (1385203610,), (1385203634,), (1385203638,), (1385203641,), (1385203662,), (1385203664,), (1385203665,), (1385203666,), (1385203675,), (1385203677,), (1385203679,), (1385203681,), (1385203684,), (1385203686,), (1385203702,), (1385203707,), (1385203710,), (1385203715,), (1385203717,), (1385203719,), (1385203721,), (1385204273,), (1385204326,), (1385204363,), (1385204402,), (1385204453,), (1385204490,), (1385204601,), (1385204595,), (1385204599,), (1385204625,), (1385204628,), (1385204631,), (1385204635,), (1385204640,), (1385204666,), (1385204671,), (1385204674,), (1385204678,), (1385204683,), (1385204704,), (1385204709,), (1385204714,), (1385204719,), (1385204725,), (1385204742,), (1385204746,), (1385204769,), (1385204772,), (1385204815,), (1385204819,), (1385204823,), (1385204827,), (1385204830,), (1385204853,), (1385204866,), (1385204871,), (1385204876,), (1385204880,), (1385204884,), (1385204897,), (1385204901,), (1385204941,), (1385204942,), (1385204945,), (1385204949,), (1385204974,), (1385204978,), (1385204982,), (1385205018,), (1385210788,), (1385211071,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'20092025': {'nb_upload': 14, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27062744]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1385199583, 1385199233, 1385199109, 1385199108, 1385199107, 1385199084, 1385199081, 1385199078, 1385199076, 1385199075, 1385199059, 1385199057, 1385199056, 1385199055] map_info['map_portfolio_photo'] : {27062744: [1385199583, 1385199233, 1385199109, 1385199108, 1385199107, 1385199084, 1385199081, 1385199078, 1385199076, 1385199075, 1385199059, 1385199057, 1385199056, 1385199055]} final : True mtd_id 4302 list_pids : [1385199583, 1385199233, 1385199109, 1385199108, 1385199107, 1385199084, 1385199081, 1385199078, 1385199076, 1385199075, 1385199059, 1385199057, 1385199056, 1385199055] Looping around the photos to save general results len do output : 1 /27062744Didn'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, '3750971') ('4302', '27062744', '1385199583', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199233', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199109', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199108', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199107', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199084', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199081', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199078', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199076', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199075', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199059', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199057', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199056', None, None, None, None, None, '3750971') ('4302', None, None, None, None, None, None, None, '3750971') ('4302', '27062744', '1385199055', None, None, None, None, None, '3750971') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '27062744', 'None', None, None, None, None, '3750971'), ('4302', '27062744', '1385199583', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199233', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199109', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199108', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199107', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199084', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199081', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199078', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199076', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199075', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199059', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199057', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199056', None, None, None, None, None, '3750971'), ('4302', '27062744', '1385199055', None, None, None, None, None, '3750971')] time used for this insertion : 0.07874917984008789 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.391517162322998 time spend to save output : 0.07903933525085449 total time spend for step 5 : 3.4705564975738525 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 (3750971) 2.28user 2.42system 0:11.21elapsed 41%CPU (0avgtext+0avgdata 165536maxresident)k 40inputs+9240outputs (3major+71424minor)pagefaults 0swaps