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 : 314426 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 (4039643) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4039643) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28472071 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4039643'] with mtr_portfolio_ids : ['28472071'] and first list_photo_ids : [] new path : /proc/314426/ Name: python3 Umask: 0002 State: R (running) Tgid: 314426 Ngid: 0 Pid: 314426 PPid: 314425 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 314426 NSpid: 314426 NSpgid: 314126 NSsid: 314126 VmPeak: 1106908 kB VmSize: 1106884 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98556 kB VmRSS: 98556 kB RssAnon: 59904 kB RssFile: 38652 kB RssShmem: 0 kB VmData: 865636 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 584 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: 46 nonvoluntary_ctxt_switches: 93 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '314426', 'Ngid': '0', 'Pid': '314426', 'PPid': '314425', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '314426', 'NSpid': '314426', 'NSpgid': '314126', 'NSsid': '314126', 'VmPeak': '1106908 kB', 'VmSize': '1106884 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98556 kB', 'VmRSS': '98556 kB', 'RssAnon': '59904 kB', 'RssFile': '38652 kB', 'RssShmem': '0 kB', 'VmData': '865636 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '584 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': '46', 'nonvoluntary_ctxt_switches': '93'} ('datou_batch_current', '314426', '1106908', '0', '1106884', '865636', '98556', b'', 'marlene', '4039643') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (28472071) 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 (4039643 ) ) 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 (28472071) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1394134367, 'portfolio_id': 28472071}, {'photo_id': 1394134287, 'portfolio_id': 28472071}, {'photo_id': 1394134284, 'portfolio_id': 28472071}, {'photo_id': 1394134217, 'portfolio_id': 28472071}, {'photo_id': 1394134214, 'portfolio_id': 28472071}, {'photo_id': 1394134091, 'portfolio_id': 28472071}, {'photo_id': 1394133824, 'portfolio_id': 28472071}, {'photo_id': 1394133823, 'portfolio_id': 28472071}, {'photo_id': 1394133573, 'portfolio_id': 28472071}] map_portfolio_id_photo_id: {28472071: [1394134367, 1394134287, 1394134284, 1394134217, 1394134214, 1394134091, 1394133824, 1394133823, 1394133573]} ##### 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.014762401580810547 #### 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 Thu Nov 13 05:59:29 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28472071) 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 : 28472071 get user id for portfolio 28472071 get sub ptf for main ptf 28472071, type 3726 and hashtags ['autre_refus', 'Carton_gris', 'Teint_Dans_La_Masse', 'cartonnette', 'kraft', 'papier', 'metal', 'flou', 'mal_croppe', 'plastique', 'Carton_brun', 'environnement'] 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`=28472071 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','Carton_gris','Teint_Dans_La_Masse','cartonnette','kraft','papier','metal','flou','mal_croppe','plastique','Carton_brun','environnement')) 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`=28472071 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','Carton_gris','Teint_Dans_La_Masse','cartonnette','kraft','papier','metal','flou','mal_croppe','plastique','Carton_brun','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 28472071, 'sub_port_id': 28472072, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288797, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 22, 59)}, 'Carton_brun': {'main_port_id': 28472071, 'sub_port_id': 28472073, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288798, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 22, 59)}, 'mal_croppe': {'main_port_id': 28472071, 'sub_port_id': 28472074, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288799, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 22, 59)}, 'kraft': {'main_port_id': 28472071, 'sub_port_id': 28472075, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288800, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 22, 59)}, 'flou': {'main_port_id': 28472071, 'sub_port_id': 28472076, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288801, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 22, 59)}, 'cartonnette': {'main_port_id': 28472071, 'sub_port_id': 28472077, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288802, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 22, 59)}, 'metal': {'main_port_id': 28472071, 'sub_port_id': 28472078, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288803, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 22, 59)}, 'environnement': {'main_port_id': 28472071, 'sub_port_id': 28472079, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288804, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 22, 59)}, 'autre_refus': {'main_port_id': 28472071, 'sub_port_id': 28472080, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288805, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 22, 59)}, 'plastique': {'main_port_id': 28472071, 'sub_port_id': 28472081, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288806, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 22, 59)}, 'Carton_gris': {'main_port_id': 28472071, 'sub_port_id': 28472082, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288807, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 22, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 28472071, 'sub_port_id': 28472083, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288808, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 22, 59)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28472072 , 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=28472071 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 (28472072) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28472071) result : ((1394133573,), (1394133823,), (1394133824,), (1394134091,), (1394134214,), (1394134217,), (1394134284,), (1394134287,), (1394134367,)) 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 28472073 , 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=28472071 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 (28472073) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28472071) result : ((1394133573,), (1394133823,), (1394133824,), (1394134091,), (1394134214,), (1394134217,), (1394134284,), (1394134287,), (1394134367,)) 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 28472074 , 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=28472071 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 (28472074) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28472071) result : ((1394133573,), (1394133823,), (1394133824,), (1394134091,), (1394134214,), (1394134217,), (1394134284,), (1394134287,), (1394134367,)) 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 28472075 , 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=28472071 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 (28472075) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28472071) result : ((1394133573,), (1394133823,), (1394133824,), (1394134091,), (1394134214,), (1394134217,), (1394134284,), (1394134287,), (1394134367,)) 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 28472076 , 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=28472071 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 (28472076) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28472071) result : ((1394133573,), (1394133823,), (1394133824,), (1394134091,), (1394134214,), (1394134217,), (1394134284,), (1394134287,), (1394134367,)) 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 28472077 , 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=28472071 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 (28472077) result : ((1394134161,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28472071) result : ((1394133573,), (1394133823,), (1394133824,), (1394134091,), (1394134214,), (1394134217,), (1394134284,), (1394134287,), (1394134367,)) 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 28472078 , 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=28472071 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 (28472078) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28472071) result : ((1394133573,), (1394133823,), (1394133824,), (1394134091,), (1394134214,), (1394134217,), (1394134284,), (1394134287,), (1394134367,)) 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 28472079 , 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=28472071 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 (28472079) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28472071) result : ((1394133573,), (1394133823,), (1394133824,), (1394134091,), (1394134214,), (1394134217,), (1394134284,), (1394134287,), (1394134367,)) 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 28472080 , 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=28472071 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 (28472080) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28472071) result : ((1394133573,), (1394133823,), (1394133824,), (1394134091,), (1394134214,), (1394134217,), (1394134284,), (1394134287,), (1394134367,)) 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 28472081 , 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=28472071 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 (28472081) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28472071) result : ((1394133573,), (1394133823,), (1394133824,), (1394134091,), (1394134214,), (1394134217,), (1394134284,), (1394134287,), (1394134367,)) 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 28472082 , 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=28472071 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 (28472082) result : ((1394134359,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28472071) result : ((1394133573,), (1394133823,), (1394133824,), (1394134091,), (1394134214,), (1394134217,), (1394134284,), (1394134287,), (1394134367,)) 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 28472083 , 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=28472071 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 (28472083) result : ((1394134154,), (1394134155,), (1394134156,), (1394134157,), (1394134158,), (1394134159,), (1394134160,), (1394134172,), (1394134173,), (1394134174,), (1394134175,), (1394134176,), (1394134177,), (1394134178,), (1394134179,), (1394134354,), (1394134355,), (1394134356,), (1394134357,), (1394134592,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28472071) result : ((1394133573,), (1394133823,), (1394133824,), (1394134091,), (1394134214,), (1394134217,), (1394134284,), (1394134287,), (1394134367,)) 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`=28472071 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','Carton_gris','Teint_Dans_La_Masse','cartonnette','kraft','papier','metal','flou','mal_croppe','plastique','Carton_brun','environnement')) 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`=28472071 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','Carton_gris','Teint_Dans_La_Masse','cartonnette','kraft','papier','metal','flou','mal_croppe','plastique','Carton_brun','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 28472071, 'sub_port_id': 28472084, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288809, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 23)}, 'Carton_brun': {'main_port_id': 28472071, 'sub_port_id': 28472085, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288810, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 23)}, 'mal_croppe': {'main_port_id': 28472071, 'sub_port_id': 28472086, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288811, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 23)}, 'kraft': {'main_port_id': 28472071, 'sub_port_id': 28472087, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288812, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 23)}, 'flou': {'main_port_id': 28472071, 'sub_port_id': 28472088, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288813, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 23)}, 'cartonnette': {'main_port_id': 28472071, 'sub_port_id': 28472089, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288814, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 23)}, 'metal': {'main_port_id': 28472071, 'sub_port_id': 28472090, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288815, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 23)}, 'environnement': {'main_port_id': 28472071, 'sub_port_id': 28472091, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288816, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 23)}, 'autre_refus': {'main_port_id': 28472071, 'sub_port_id': 28472092, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288817, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 23)}, 'plastique': {'main_port_id': 28472071, 'sub_port_id': 28472093, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288818, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 23)}, 'Carton_gris': {'main_port_id': 28472071, 'sub_port_id': 28472094, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288819, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 23), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 23)}, 'Teint_Dans_La_Masse': {'main_port_id': 28472071, 'sub_port_id': 28472095, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19288820, 'last_updated_at': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 0, 32, 31), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 0, 23)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28472084,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28472072 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28472085,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28472073 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28472086,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28472074 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28472087,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28472075 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28472088,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28472076 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28472089,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28472077 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28472090,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28472078 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28472091,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28472079 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28472092,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28472080 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28472093,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28472081 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28472094,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28472082 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28472095,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28472083 lien utilise dans velours : https://marlene.fotonower.com/velours/28472084,28472085,28472086,28472087,28472088,28472089,28472090,28472091,28472092,28472093,28472094,28472095?tags=papier,Carton_brun,mal_croppe,kraft,flou,cartonnette,metal,environnement,autre_refus,plastique,Carton_gris,Teint_Dans_La_Masse After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28472071]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1394134367, 1394134287, 1394134284, 1394134217, 1394134214, 1394134091, 1394133824, 1394133823, 1394133573] map_info['map_portfolio_photo'] : {28472071: [1394134367, 1394134287, 1394134284, 1394134217, 1394134214, 1394134091, 1394133824, 1394133823, 1394133573]} final : False mtd_id 4302 list_pids : [1394134367, 1394134287, 1394134284, 1394134217, 1394134214, 1394134091, 1394133824, 1394133823, 1394133573] Looping around the photos to save general results len do output : 1 /28472071. 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, '4039643') ('4302', '28472071', '1394134367', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134287', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134284', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134217', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134214', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134091', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394133824', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394133823', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394133573', None, None, None, None, None, '4039643') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 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, '28472071', "{'papier': 28472072, 'Carton_brun': 28472073, 'mal_croppe': 28472074, 'kraft': 28472075, 'flou': 28472076, 'cartonnette': 28472077, 'metal': 28472078, 'environnement': 28472079, 'autre_refus': 28472080, 'plastique': 28472081, 'Carton_gris': 28472082, 'Teint_Dans_La_Masse': 28472083}", None, None, None, None, '4039643'), ('4302', '28472071', '1394134367', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394134287', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394134284', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394134217', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394134214', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394134091', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394133824', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394133823', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394133573', None, None, None, None, None, '4039643')] time used for this insertion : 0.015762805938720703 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5242564678192139 time spend to save output : 0.01600933074951172 total time spend for step 1 : 1.5402657985687256 step2:final Thu Nov 13 05:59:30 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 (28472071) 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 28472071 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1394133824,1394133573,1394133823,1394134091,1394134217,1394134214,1394134287,1394134284,1394134367); 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([28472071]) Inside saveOutput : final : False verbose : True original output for save of step final : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ('0.07328867128515715',), 1394134217: ('0.07328867128515715',), 1394134214: ('0.07328867128515715',), 1394134091: ('0.07328867128515715',), 1394133824: ('0.07328867128515715',), 1394133823: ('0.07328867128515715',), 1394133573: ('0.07328867128515715',)} new output for save of step final : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ('0.07328867128515715',), 1394134217: ('0.07328867128515715',), 1394134214: ('0.07328867128515715',), 1394134091: ('0.07328867128515715',), 1394133824: ('0.07328867128515715',), 1394133823: ('0.07328867128515715',), 1394133573: ('0.07328867128515715',)} [1394134367, 1394134287, 1394134284, 1394134217, 1394134214, 1394134091, 1394133824, 1394133823, 1394133573] map_info['map_portfolio_photo'] : {28472071: [1394134367, 1394134287, 1394134284, 1394134217, 1394134214, 1394134091, 1394133824, 1394133823, 1394133573]} final : False mtd_id 4302 list_pids : [1394134367, 1394134287, 1394134284, 1394134217, 1394134214, 1394134091, 1394133824, 1394133823, 1394133573] Looping around the photos to save general results len do output : 9 /1394134367.Didn't retrieve data . /1394134287.Didn't retrieve data . /1394134284.Didn't retrieve data . /1394134217.Didn't retrieve data . /1394134214.Didn't retrieve data . /1394134091.Didn't retrieve data . /1394133824.Didn't retrieve data . /1394133823.Didn't retrieve data . /1394133573.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, '4039643') ('4302', '28472071', '1394134367', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134287', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134284', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134217', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134214', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134091', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394133824', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394133823', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394133573', None, None, None, None, None, '4039643') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 27 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', '28472071', '1394134367', '0.07328867128515715', None, None, None, None, '4039643'), ('4302', '28472071', '1394134287', '0.07328867128515715', None, None, None, None, '4039643'), ('4302', '28472071', '1394134284', '0.07328867128515715', None, None, None, None, '4039643'), ('4302', '28472071', '1394134217', '0.07328867128515715', None, None, None, None, '4039643'), ('4302', '28472071', '1394134214', '0.07328867128515715', None, None, None, None, '4039643'), ('4302', '28472071', '1394134091', '0.07328867128515715', None, None, None, None, '4039643'), ('4302', '28472071', '1394133824', '0.07328867128515715', None, None, None, None, '4039643'), ('4302', '28472071', '1394133823', '0.07328867128515715', None, None, None, None, '4039643'), ('4302', '28472071', '1394133573', '0.07328867128515715', None, None, None, None, '4039643')] time used for this insertion : 0.015499353408813477 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.0660088062286377 time spend to save output : 0.015984773635864258 total time spend for step 2 : 0.08199357986450195 step3:velours_tree Thu Nov 13 05:59:30 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 : {28472071: [{'papier': 28472072, 'Carton_brun': 28472073, 'mal_croppe': 28472074, 'kraft': 28472075, 'flou': 28472076, 'cartonnette': 28472077, 'metal': 28472078, 'environnement': 28472079, 'autre_refus': 28472080, 'plastique': 28472081, 'Carton_gris': 28472082, 'Teint_Dans_La_Masse': 28472083}]} input_args_next_step : {28472071: ()} output_args : {28472071: [{'papier': 28472072, 'Carton_brun': 28472073, 'mal_croppe': 28472074, 'kraft': 28472075, 'flou': 28472076, 'cartonnette': 28472077, 'metal': 28472078, 'environnement': 28472079, 'autre_refus': 28472080, 'plastique': 28472081, 'Carton_gris': 28472082, 'Teint_Dans_La_Masse': 28472083}]} args : 28472071 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 : ({'papier': 28472072, 'Carton_brun': 28472073, 'mal_croppe': 28472074, 'kraft': 28472075, 'flou': 28472076, 'cartonnette': 28472077, 'metal': 28472078, 'environnement': 28472079, 'autre_refus': 28472080, 'plastique': 28472081, 'Carton_gris': 28472082, 'Teint_Dans_La_Masse': 28472083},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28472071) 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([28472071]) 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.3009452819824219 time spend to save output : 5.269050598144531e-05 total time spend for step 3 : 0.3009979724884033 step4:send_mail_cod Thu Nov 13 05:59:31 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ('0.07328867128515715',), 1394134217: ('0.07328867128515715',), 1394134214: ('0.07328867128515715',), 1394134091: ('0.07328867128515715',), 1394133824: ('0.07328867128515715',), 1394133823: ('0.07328867128515715',), 1394133573: ('0.07328867128515715',)} input_args_next_step : {1394134367: ()} output_args : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ('0.07328867128515715',), 1394134217: ('0.07328867128515715',), 1394134214: ('0.07328867128515715',), 1394134091: ('0.07328867128515715',), 1394133824: ('0.07328867128515715',), 1394133823: ('0.07328867128515715',), 1394133573: ('0.07328867128515715',)} args : 1394134367 depend.output_id : 0 input_args_next_step : {1394134367: ('0.07328867128515715',), 1394134287: ()} output_args : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ('0.07328867128515715',), 1394134217: ('0.07328867128515715',), 1394134214: ('0.07328867128515715',), 1394134091: ('0.07328867128515715',), 1394133824: ('0.07328867128515715',), 1394133823: ('0.07328867128515715',), 1394133573: ('0.07328867128515715',)} args : 1394134287 depend.output_id : 0 input_args_next_step : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ()} output_args : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ('0.07328867128515715',), 1394134217: ('0.07328867128515715',), 1394134214: ('0.07328867128515715',), 1394134091: ('0.07328867128515715',), 1394133824: ('0.07328867128515715',), 1394133823: ('0.07328867128515715',), 1394133573: ('0.07328867128515715',)} args : 1394134284 depend.output_id : 0 input_args_next_step : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ('0.07328867128515715',), 1394134217: ()} output_args : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ('0.07328867128515715',), 1394134217: ('0.07328867128515715',), 1394134214: ('0.07328867128515715',), 1394134091: ('0.07328867128515715',), 1394133824: ('0.07328867128515715',), 1394133823: ('0.07328867128515715',), 1394133573: ('0.07328867128515715',)} args : 1394134217 depend.output_id : 0 input_args_next_step : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ('0.07328867128515715',), 1394134217: ('0.07328867128515715',), 1394134214: ()} output_args : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ('0.07328867128515715',), 1394134217: ('0.07328867128515715',), 1394134214: ('0.07328867128515715',), 1394134091: ('0.07328867128515715',), 1394133824: ('0.07328867128515715',), 1394133823: ('0.07328867128515715',), 1394133573: ('0.07328867128515715',)} args : 1394134214 depend.output_id : 0 input_args_next_step : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ('0.07328867128515715',), 1394134217: ('0.07328867128515715',), 1394134214: ('0.07328867128515715',), 1394134091: ()} output_args : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ('0.07328867128515715',), 1394134217: ('0.07328867128515715',), 1394134214: ('0.07328867128515715',), 1394134091: ('0.07328867128515715',), 1394133824: ('0.07328867128515715',), 1394133823: ('0.07328867128515715',), 1394133573: ('0.07328867128515715',)} args : 1394134091 depend.output_id : 0 input_args_next_step : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ('0.07328867128515715',), 1394134217: ('0.07328867128515715',), 1394134214: ('0.07328867128515715',), 1394134091: ('0.07328867128515715',), 1394133824: ()} output_args : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ('0.07328867128515715',), 1394134217: ('0.07328867128515715',), 1394134214: ('0.07328867128515715',), 1394134091: ('0.07328867128515715',), 1394133824: ('0.07328867128515715',), 1394133823: ('0.07328867128515715',), 1394133573: ('0.07328867128515715',)} args : 1394133824 depend.output_id : 0 input_args_next_step : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ('0.07328867128515715',), 1394134217: ('0.07328867128515715',), 1394134214: ('0.07328867128515715',), 1394134091: ('0.07328867128515715',), 1394133824: ('0.07328867128515715',), 1394133823: ()} output_args : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ('0.07328867128515715',), 1394134217: ('0.07328867128515715',), 1394134214: ('0.07328867128515715',), 1394134091: ('0.07328867128515715',), 1394133824: ('0.07328867128515715',), 1394133823: ('0.07328867128515715',), 1394133573: ('0.07328867128515715',)} args : 1394133823 depend.output_id : 0 input_args_next_step : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ('0.07328867128515715',), 1394134217: ('0.07328867128515715',), 1394134214: ('0.07328867128515715',), 1394134091: ('0.07328867128515715',), 1394133824: ('0.07328867128515715',), 1394133823: ('0.07328867128515715',), 1394133573: ()} output_args : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ('0.07328867128515715',), 1394134217: ('0.07328867128515715',), 1394134214: ('0.07328867128515715',), 1394134091: ('0.07328867128515715',), 1394133824: ('0.07328867128515715',), 1394133823: ('0.07328867128515715',), 1394133573: ('0.07328867128515715',)} args : 1394133573 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 : {28472071: [{'papier': 28472072, 'Carton_brun': 28472073, 'mal_croppe': 28472074, 'kraft': 28472075, 'flou': 28472076, 'cartonnette': 28472077, 'metal': 28472078, 'environnement': 28472079, 'autre_refus': 28472080, 'plastique': 28472081, 'Carton_gris': 28472082, 'Teint_Dans_La_Masse': 28472083}]} input_args_next_step : {1394134367: ('0.07328867128515715',), 1394134287: ('0.07328867128515715',), 1394134284: ('0.07328867128515715',), 1394134217: ('0.07328867128515715',), 1394134214: ('0.07328867128515715',), 1394134091: ('0.07328867128515715',), 1394133824: ('0.07328867128515715',), 1394133823: ('0.07328867128515715',), 1394133573: ('0.07328867128515715',), 28472071: ()} output_args : {28472071: [{'papier': 28472072, 'Carton_brun': 28472073, 'mal_croppe': 28472074, 'kraft': 28472075, 'flou': 28472076, 'cartonnette': 28472077, 'metal': 28472078, 'environnement': 28472079, 'autre_refus': 28472080, 'plastique': 28472081, 'Carton_gris': 28472082, 'Teint_Dans_La_Masse': 28472083}]} args : 28472071 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 :10, first value : ('0.07328867128515715',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28472071) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos_view ph WHERE photo_id IN (1394134367,1394134287,1394134284,1394134217,1394134214,1394134091,1394133824,1394133823,1394133573) Found this number of photos: 9 ##### Call download_photos : nb_thread : 5 begin to download photo : 1394133573 begin to download photo : 1394133824 begin to download photo : 1394134214 begin to download photo : 1394134284 begin to download photo : 1394134367 download finish for photo 1394134214 begin to download photo : 1394134217 download finish for photo 1394133824 begin to download photo : 1394134091 download finish for photo 1394134284 begin to download photo : 1394134287 download finish for photo 1394133573 begin to download photo : 1394133823 download finish for photo 1394134091 download finish for photo 1394134367 download finish for photo 1394134287 download finish for photo 1394134217 download finish for photo 1394133823 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette284720741763009971/ imagette284720751763009971/ imagette284720761763009971/ length of list_filenames : 9 ; length of list_pids : 9 ; length of list_args : 9 results_Auto_P28472071_13-11-2025_05_59_31.pdf 28472074 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28472074 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette284720741763009971 28472075 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28472075 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette284720751763009971 28472076 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28472076 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette284720761763009971 28472077 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28472077 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1394134161: '1762989907_1610540_1394133823_21d084437728f74e757a0a795a242254_rle_crop_4031926168_0.png'} change filename to text .imagette284720771763009971/ imagette284720771763009971/1762989907_1610540_1394133823_21d084437728f74e757a0a795a242254_rle_crop_4031926168_0.png.png imagette284720781763009971/ imagette284720801763009971/ imagette284720811763009971/ imagette284720731763009971/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/7512b118120ae5c313412e49c64d984a_23751260.png imagette284720771763009971 28472078 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28472078 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette284720781763009971 28472080 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28472080 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette284720801763009971 28472081 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28472081 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette284720811763009971 28472073 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28472073 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette284720731763009971 28472082 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28472082 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1394134359: '1762990265_1617952_1394134214_2dd3fb013f8f3d2febc621f82fe9a4e8_rle_crop_4031929979_0.png'} change filename to text .imagette284720821763009971/ imagette284720821763009971/1762990265_1617952_1394134214_2dd3fb013f8f3d2febc621f82fe9a4e8_rle_crop_4031929979_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/f424836c56054044b387e082125dd2a9_21963686.png imagette284720821763009971 28472083 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28472083 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1394134175: '1762989925_1610993_1394133573_c610e4eb1ce2721431de87ce6561d0a3_rle_crop_4031926277_0.png', 1394134592: '1762990385_1622990_1394134284_90c7fc0d7e374221702031991e90a5a3_rle_crop_4031931840_0.png', 1394134357: '1762990265_1617952_1394134214_2dd3fb013f8f3d2febc621f82fe9a4e8_rle_crop_4031929983_0.png', 1394134356: '1762990265_1617952_1394134214_2dd3fb013f8f3d2febc621f82fe9a4e8_rle_crop_4031929985_0.png', 1394134355: '1762990265_1617952_1394134214_2dd3fb013f8f3d2febc621f82fe9a4e8_rle_crop_4031929982_0.png', 1394134354: '1762990265_1617952_1394134287_a550a4d7499c108fb08e211305189427_rle_crop_4031929970_0.png', 1394134179: '1762989925_1610993_1394133573_c610e4eb1ce2721431de87ce6561d0a3_rle_crop_4031926282_0.png', 1394134178: '1762989925_1610993_1394133573_c610e4eb1ce2721431de87ce6561d0a3_rle_crop_4031926276_0.png', 1394134177: '1762989925_1610993_1394133573_c610e4eb1ce2721431de87ce6561d0a3_rle_crop_4031926280_0.png', 1394134176: '1762989925_1610993_1394133573_c610e4eb1ce2721431de87ce6561d0a3_rle_crop_4031926275_0.png', 1394134154: '1762989907_1610540_1394134091_0ee94ef475252877b2e3792c80aa1765_rle_crop_4031926153_0.png', 1394134174: '1762989925_1610993_1394133824_e9c8bc92daf9759ee0f4266558202bf6_rle_crop_4031926264_0.png', 1394134173: '1762989925_1610993_1394133824_e9c8bc92daf9759ee0f4266558202bf6_rle_crop_4031926262_0.png', 1394134172: '1762989925_1610993_1394133824_e9c8bc92daf9759ee0f4266558202bf6_rle_crop_4031926256_0.png', 1394134160: '1762989907_1610540_1394133823_21d084437728f74e757a0a795a242254_rle_crop_4031926167_0.png', 1394134159: '1762989907_1610540_1394133823_21d084437728f74e757a0a795a242254_rle_crop_4031926165_0.png', 1394134158: '1762989907_1610540_1394133823_21d084437728f74e757a0a795a242254_rle_crop_4031926171_0.png', 1394134157: '1762989907_1610540_1394134091_0ee94ef475252877b2e3792c80aa1765_rle_crop_4031926146_0.png', 1394134156: '1762989907_1610540_1394134091_0ee94ef475252877b2e3792c80aa1765_rle_crop_4031926156_0.png', 1394134155: '1762989907_1610540_1394134091_0ee94ef475252877b2e3792c80aa1765_rle_crop_4031926143_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/d7023721f595d551fcf05e2a2d1d0f13_36526641.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/c226caa3f59221ac190ef6a55d8e1fd0_32874985.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/330c90326d08396f37a0e249307beb83_4620284.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/108ad8419bcc9238bc06d8d6be0e721b_97863961.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/9f4a741a48b6d0b3fac24d2f4eb3e8e9_56361871.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/e68e3806bc980170fa276a224437c940_91775522.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/b1105fdef387940a4b2342a5b70c1a50_21584939.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/0a6c94b36592996f6d67517c42ed2c4d_31678073.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/69963eacc859ed671d39a7f7915ebf0d_36648289.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/59ca5b623a07972ed3cd0b7c9473ecf7_73990331.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/fb942089607f9e2a1616fae6504bedb9_93605818.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/52da07d46555f23e39043dce10d47996_49502448.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/a638db5f1b84d869f895402d06be9c4e_47883023.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/6e257bf396ba732264128147f26a4c45_97228681.png change filename to text .wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/44d83b4fd242444ef435114bfe210771_85490528.png change filename to text .wget -O 16.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/b273d5567931044766b1610a5b085a79_82790359.png change filename to text .wget -O 17.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/730a80c33d7779e67d7695d4c3974275_26346126.png change filename to text .wget -O 18.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/9a5a3dba1fbb778db2c45901fbcde4b7_40795233.png change filename to text .wget -O 19.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/5bec85e35df6b98485f50a73f52706ed_81748275.png change filename to text .imagette284720831763009971/ imagette284720831763009971/1762990385_1622990_1394134284_90c7fc0d7e374221702031991e90a5a3_rle_crop_4031931840_0.png.png imagette284720831763009971/1762990265_1617952_1394134214_2dd3fb013f8f3d2febc621f82fe9a4e8_rle_crop_4031929985_0.png.png imagette284720831763009971/1762989907_1610540_1394133823_21d084437728f74e757a0a795a242254_rle_crop_4031926167_0.png.png imagette284720831763009971/1762990265_1617952_1394134287_a550a4d7499c108fb08e211305189427_rle_crop_4031929970_0.png.png imagette284720831763009971/1762989907_1610540_1394134091_0ee94ef475252877b2e3792c80aa1765_rle_crop_4031926156_0.png.png imagette284720831763009971/1762989907_1610540_1394134091_0ee94ef475252877b2e3792c80aa1765_rle_crop_4031926143_0.png.png imagette284720831763009971/1762989925_1610993_1394133824_e9c8bc92daf9759ee0f4266558202bf6_rle_crop_4031926262_0.png.png imagette284720831763009971/1762989925_1610993_1394133573_c610e4eb1ce2721431de87ce6561d0a3_rle_crop_4031926277_0.png.png imagette284720831763009971/1762989925_1610993_1394133573_c610e4eb1ce2721431de87ce6561d0a3_rle_crop_4031926275_0.png.png imagette284720831763009971/1762989907_1610540_1394134091_0ee94ef475252877b2e3792c80aa1765_rle_crop_4031926146_0.png.png imagette284720831763009971/1762989925_1610993_1394133573_c610e4eb1ce2721431de87ce6561d0a3_rle_crop_4031926280_0.png.png imagette284720831763009971/1762989925_1610993_1394133573_c610e4eb1ce2721431de87ce6561d0a3_rle_crop_4031926282_0.png.png imagette284720831763009971/1762989907_1610540_1394133823_21d084437728f74e757a0a795a242254_rle_crop_4031926171_0.png.png imagette284720831763009971/1762989925_1610993_1394133573_c610e4eb1ce2721431de87ce6561d0a3_rle_crop_4031926276_0.png.png imagette284720831763009971/1762990265_1617952_1394134214_2dd3fb013f8f3d2febc621f82fe9a4e8_rle_crop_4031929982_0.png.png imagette284720831763009971/1762989925_1610993_1394133824_e9c8bc92daf9759ee0f4266558202bf6_rle_crop_4031926264_0.png.png imagette284720831763009971/1762989907_1610540_1394134091_0ee94ef475252877b2e3792c80aa1765_rle_crop_4031926153_0.png.png imagette284720831763009971/1762990265_1617952_1394134214_2dd3fb013f8f3d2febc621f82fe9a4e8_rle_crop_4031929983_0.png.png imagette284720831763009971/1762989925_1610993_1394133824_e9c8bc92daf9759ee0f4266558202bf6_rle_crop_4031926256_0.png.png imagette284720831763009971/1762989907_1610540_1394133823_21d084437728f74e757a0a795a242254_rle_crop_4031926165_0.png.png wget -O 20.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/fb68e9ce2edfc6019576f9834a8cc056_71079651.png imagette284720831763009971 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=28472071 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/28472084,28472085,28472086,28472087,28472088,28472089,28472090,28472091,28472092,28472093,28472094,28472095?tags=papier,Carton_brun,mal_croppe,kraft,flou,cartonnette,metal,environnement,autre_refus,plastique,Carton_gris,Teint_Dans_La_Masse your option no_mail is active, we will not send the real mail to your client args[1394134367] : ('0.07328867128515715',) no score found for photo 1394134367 We are sending mail with results at report@fotonower.com args[1394134287] : ('0.07328867128515715',) no score found for photo 1394134287 We are sending mail with results at report@fotonower.com args[1394134284] : ('0.07328867128515715',) no score found for photo 1394134284 We are sending mail with results at report@fotonower.com args[1394134217] : ('0.07328867128515715',) no score found for photo 1394134217 We are sending mail with results at report@fotonower.com args[1394134214] : ('0.07328867128515715',) no score found for photo 1394134214 We are sending mail with results at report@fotonower.com args[1394134091] : ('0.07328867128515715',) no score found for photo 1394134091 We are sending mail with results at report@fotonower.com args[1394133824] : ('0.07328867128515715',) no score found for photo 1394133824 We are sending mail with results at report@fotonower.com args[1394133823] : ('0.07328867128515715',) no score found for photo 1394133823 We are sending mail with results at report@fotonower.com args[1394133573] : ('0.07328867128515715',) no score found for photo 1394133573 We are sending mail with results at report@fotonower.com refus_total : 0.07328867128515715 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28472071 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_P28472071_13-11-2025_05_59_31.pdf results_Auto_P28472071_13-11-2025_05_59_31.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28472071_13-11-2025_05_59_31.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','28472071','results_Auto_P28472071_13-11-2025_05_59_31.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28472071_13-11-2025_05_59_31.pdf','pdf','','0.19','0.07328867128515715') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28472071]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1394134367, 1394134287, 1394134284, 1394134217, 1394134214, 1394134091, 1394133824, 1394133823, 1394133573] map_info['map_portfolio_photo'] : {28472071: [1394134367, 1394134287, 1394134284, 1394134217, 1394134214, 1394134091, 1394133824, 1394133823, 1394133573]} final : False mtd_id 4302 list_pids : [1394134367, 1394134287, 1394134284, 1394134217, 1394134214, 1394134091, 1394133824, 1394133823, 1394133573] 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, '4039643') ('4302', '28472071', '1394134367', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134287', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134284', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134217', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134214', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134091', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394133824', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394133823', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394133573', None, None, None, None, None, '4039643') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 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', '28472071', '1394134367', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394134287', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394134284', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394134217', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394134214', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394134091', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394133824', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394133823', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394133573', None, None, None, None, None, '4039643')] time used for this insertion : 0.01393890380859375 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.428499221801758 time spend to save output : 0.014134883880615234 total time spend for step 4 : 3.442634105682373 step5:split_time_score Thu Nov 13 05:59:34 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 : ['28472071'] 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 : [('28472071',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28472071) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1394133824: {'path': 'temp/1763009971_314426_1394133824_e9c8bc92daf9759ee0f4266558202bf6.jpg', 'extension': 'jpg'}, 1394134091: {'path': 'temp/1763009971_314426_1394134091_0ee94ef475252877b2e3792c80aa1765.jpg', 'extension': 'jpg'}, 1394134367: {'path': 'temp/1763009971_314426_1394134367_cc953b0374a8c7e3914f05344b583f85.jpg', 'extension': 'jpg'}, 1394134284: {'path': 'temp/1763009971_314426_1394134284_90c7fc0d7e374221702031991e90a5a3.jpg', 'extension': 'jpg'}, 1394134287: {'path': 'temp/1763009971_314426_1394134287_a550a4d7499c108fb08e211305189427.jpg', 'extension': 'jpg'}, 1394134214: {'path': 'temp/1763009971_314426_1394134214_2dd3fb013f8f3d2febc621f82fe9a4e8.jpg', 'extension': 'jpg'}, 1394134217: {'path': 'temp/1763009971_314426_1394134217_e2fcc145249aab4fedaefc834adf9eb4.jpg', 'extension': 'jpg'}, 1394133573: {'path': 'temp/1763009971_314426_1394133573_c610e4eb1ce2721431de87ce6561d0a3.jpg', 'extension': 'jpg'}, 1394133823: {'path': 'temp/1763009971_314426_1394133823_21d084437728f74e757a0a795a242254.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 = 28472071; (('arc_en_ciel_jrm_bis',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 28472071 group by h (('00', 9),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28472071 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 (28472071) 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 (28472071) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 13112025 28472071 Nombre de photos uploadées : 9 / 23040 (0%) 13112025 28472071 Nombre de photos taguées (types de déchets): 0 / 9 (0%) 13112025 28472071 Nombre de photos taguées (volume) : 0 / 9 (0%) [{'photo_id': 1394133824, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/e9c8bc92daf9759ee0f4266558202bf6.jpg', 'username': None, 'uploaded_at': 1762989667, 'text': 'image_13112025_00_15_34_010146m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1394133573, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/c610e4eb1ce2721431de87ce6561d0a3.jpg', 'username': None, 'uploaded_at': 1762989368, 'text': 'image_13112025_00_15_54_010135m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1394133823, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/21d084437728f74e757a0a795a242254.jpg', 'username': None, 'uploaded_at': 1762989667, 'text': 'image_13112025_00_20_03_009131m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1394134091, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/0ee94ef475252877b2e3792c80aa1765.jpg', 'username': None, 'uploaded_at': 1762989847, 'text': 'image_13112025_00_20_14_010140m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 5.245208740234375e-06 ????????? elapsed_time : fill_and_build_computed_from_old_data 0.0004837512969970703 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 28472071, '2025-11-13' ) 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-11-13' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2571511,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.2258167266845703 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= 2571511 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580174, 'mtr_portfolio_id': 28472071, 'dashboard_result_id': 17186394, '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_P28472071_13-11-2025_00_32_32.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28472072, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28472073, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28472074, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28472075, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28472076, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28472077, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28472078, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28472079, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28472080, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28472081, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28472082, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28472083, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580174, 'mtr_portfolio_id': 28472625, 'dashboard_result_id': 17186395, '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_P28472625_13-11-2025_01_48_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28472626, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28472627, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28472628, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28472629, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28472630, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28472631, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28472632, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28472633, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28472634, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28472635, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28472636, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28472637, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580174, 'mtr_portfolio_id': 28472733, 'dashboard_result_id': 17186396, '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_P28472733_13-11-2025_02_02_29.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28472734, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28472735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28472736, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28472737, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28472738, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28472739, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28472740, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28472741, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28472742, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28472743, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28472744, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28472745, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580174, 'mtr_portfolio_id': 28472999, 'dashboard_result_id': 17186397, '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_P28472999_13-11-2025_02_16_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473000, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473001, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473002, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473003, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473004, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473005, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473006, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473007, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473008, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473010, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473011, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580174, 'mtr_portfolio_id': 28473209, 'dashboard_result_id': 17186398, '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_P28473209_13-11-2025_02_34_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28473210, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473211, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473212, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473213, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473214, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473215, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473216, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473217, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473218, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473219, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473220, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473221, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580174, 'mtr_portfolio_id': 28473342, 'dashboard_result_id': 17186399, '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_P28473342_13-11-2025_02_46_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 28473343, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473344, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473345, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473346, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473347, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473348, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473349, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473350, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473351, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473352, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473353, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473354, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580174, 'mtr_portfolio_id': 28473449, 'dashboard_result_id': 17186400, '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_P28473449_13-11-2025_03_02_29.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473450, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473451, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473452, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473453, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473454, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473455, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473456, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473457, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473458, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473459, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473460, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473461, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580174, 'mtr_portfolio_id': 28473687, 'dashboard_result_id': 17186401, '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_P28473687_13-11-2025_03_19_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28473690, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473691, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473692, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473693, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473694, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473695, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473696, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473697, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473698, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473699, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473700, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473701, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580174, 'mtr_portfolio_id': 28473852, 'dashboard_result_id': 17186402, '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_P28473852_13-11-2025_03_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473854, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473855, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473856, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473857, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473858, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473859, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473860, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473861, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473862, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473863, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473864, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473865, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580174, 'mtr_portfolio_id': 28473961, 'dashboard_result_id': 17186403, '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_P28473961_13-11-2025_03_47_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473963, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473964, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473965, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473966, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473967, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473968, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473969, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473970, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473971, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473972, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473973, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473974, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580174, 'mtr_portfolio_id': 28474121, 'dashboard_result_id': 17186404, '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_P28474121_13-11-2025_04_02_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28474122, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474123, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28474124, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474125, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28474126, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474127, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28474128, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28474129, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474130, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474131, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28474132, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28474133, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580174, 'mtr_portfolio_id': 28474652, 'dashboard_result_id': 17186405, '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_P28474652_13-11-2025_05_17_02.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28474653, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474654, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474655, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28474656, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28474657, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474658, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474659, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474660, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28474661, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28474662, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28474663, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28474664, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580174, 'mtr_portfolio_id': 28474833, 'dashboard_result_id': 17186406, '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_P28474833_13-11-2025_05_45_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474844, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28474845, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28474846, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28474847, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474849, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28474850, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474851, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28474853, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28474854, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28474855, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474857, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474858, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580174, 'mtr_portfolio_id': 28474994, 'dashboard_result_id': 17186407, '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_P28474994_13-11-2025_05_46_32.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474995, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474996, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474997, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474998, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474999, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28475000, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28475001, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28475002, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28475003, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28475004, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28475005, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28475006, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580174, 'mtr_portfolio_id': 28475052, 'dashboard_result_id': 17186408, '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_P28475052_13-11-2025_05_58_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28475053, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28475054, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28475055, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28475056, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28475057, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28475058, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28475059, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28475060, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28475061, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28475062, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28475063, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28475064, '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 = 28472071 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': 4039643, 'mtr_portfolio_id': 28472071, 'created_at': datetime.datetime(2025, 11, 13, 5, 59, 30), 'result': '0.07328867128515715', 'result_long': None, 'result_double': None}] Qualite : 0.07328867128515715 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28472071 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28472071_13-11-2025_05_59_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28472071 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_P28472071_13-11-2025_05_59_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28472072, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28472073, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28472074, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28472075, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28472076, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28472077, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28472078, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28472079, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28472080, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28472081, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28472082, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28472083, 'pht': 3726}}" where mtr_portfolio_id = 28472071 and dashboard_run_id = 2580180 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`=28472071 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186394, 0.07328867128515715, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28472071_13-11-2025_05_59_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28472072, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28472073, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28472074, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28472075, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28472076, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28472077, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28472078, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28472079, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28472080, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28472081, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28472082, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28472083, '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 = 28472625 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': 4039115, 'mtr_portfolio_id': 28472625, 'created_at': datetime.datetime(2025, 11, 13, 1, 48, 58), 'result': '0.058389190202459744', 'result_long': None, 'result_double': None}] Qualite : 0.058389190202459744 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28472625 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28472625_13-11-2025_01_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28472625 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_P28472625_13-11-2025_01_48_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28472626, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28472627, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28472628, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28472629, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28472630, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28472631, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28472632, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28472633, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28472634, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28472635, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28472636, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28472637, 'pht': 3726}}" where mtr_portfolio_id = 28472625 and dashboard_run_id = 2580180 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`=28472625 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186395, 0.058389190202459744, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28472625_13-11-2025_01_48_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28472626, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28472627, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28472628, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28472629, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28472630, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28472631, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28472632, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28472633, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28472634, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28472635, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28472636, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28472637, '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 = 28472733 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': 4039137, 'mtr_portfolio_id': 28472733, 'created_at': datetime.datetime(2025, 11, 13, 2, 2, 29), 'result': '0.07835960148522701', 'result_long': None, 'result_double': None}] Qualite : 0.07835960148522701 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28472733 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28472733_13-11-2025_02_02_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28472733 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_P28472733_13-11-2025_02_02_29.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28472734, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28472735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28472736, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28472737, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28472738, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28472739, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28472740, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28472741, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28472742, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28472743, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28472744, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28472745, 'pht': 3726}}" where mtr_portfolio_id = 28472733 and dashboard_run_id = 2580180 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`=28472733 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186396, 0.07835960148522701, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28472733_13-11-2025_02_02_29.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28472734, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28472735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28472736, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28472737, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28472738, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28472739, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28472740, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28472741, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28472742, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28472743, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28472744, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28472745, '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 = 28472999 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 = 28472999 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 = 28472999 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 28472999 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 = 28472999 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 4039177, 'mtr_portfolio_id': 28472999, 'created_at': datetime.datetime(2025, 11, 13, 2, 16, 30), 'result': 0.0, 'result_long': None, 'result_double': None}] Qualite : 0.0 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28472999 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28472999_13-11-2025_02_16_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28472999 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_P28472999_13-11-2025_02_16_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473000, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473001, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473002, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473003, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473004, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473005, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473006, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473007, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473008, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473010, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473011, 'pht': 3726}}" where mtr_portfolio_id = 28472999 and dashboard_run_id = 2580180 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`=28472999 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186397, 0.0, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28472999_13-11-2025_02_16_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473000, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473001, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473002, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473003, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473004, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473005, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473006, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473007, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473008, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473010, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473011, '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 = 28473209 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': 4039204, 'mtr_portfolio_id': 28473209, 'created_at': datetime.datetime(2025, 11, 13, 2, 34, 58), 'result': '0.10468934540547628', 'result_long': None, 'result_double': None}] Qualite : 0.10468934540547628 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28473209 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473209_13-11-2025_02_34_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28473209 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_P28473209_13-11-2025_02_34_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28473210, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473211, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473212, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473213, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473214, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473215, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473216, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473217, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473218, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473219, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473220, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473221, 'pht': 3726}}" where mtr_portfolio_id = 28473209 and dashboard_run_id = 2580180 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`=28473209 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186398, 0.10468934540547628, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473209_13-11-2025_02_34_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28473210, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473211, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473212, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473213, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473214, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473215, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473216, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473217, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473218, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473219, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473220, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473221, '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 = 28473342 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': 4039233, 'mtr_portfolio_id': 28473342, 'created_at': datetime.datetime(2025, 11, 13, 2, 46, 57), 'result': '0.02524946837058552', 'result_long': None, 'result_double': None}] Qualite : 0.02524946837058552 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28473342 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473342_13-11-2025_02_46_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28473342 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_P28473342_13-11-2025_02_46_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 28473343, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473344, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473345, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473346, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473347, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473348, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473349, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473350, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473351, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473352, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473353, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473354, 'pht': 3726}}" where mtr_portfolio_id = 28473342 and dashboard_run_id = 2580180 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`=28473342 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186399, 0.02524946837058552, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473342_13-11-2025_02_46_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 28473343, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473344, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473345, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473346, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473347, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473348, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473349, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473350, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473351, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473352, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473353, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473354, '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 = 28473449 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': 4039255, 'mtr_portfolio_id': 28473449, 'created_at': datetime.datetime(2025, 11, 13, 3, 2, 28), 'result': '0.059780214107039674', 'result_long': None, 'result_double': None}] Qualite : 0.059780214107039674 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28473449 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473449_13-11-2025_03_02_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28473449 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_P28473449_13-11-2025_03_02_29.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473450, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473451, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473452, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473453, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473454, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473455, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473456, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473457, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473458, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473459, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473460, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473461, 'pht': 3726}}" where mtr_portfolio_id = 28473449 and dashboard_run_id = 2580180 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`=28473449 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186400, 0.059780214107039674, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473449_13-11-2025_03_02_29.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473450, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473451, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473452, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473453, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473454, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473455, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473456, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473457, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473458, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473459, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473460, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473461, '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 = 28473687 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': 4039296, 'mtr_portfolio_id': 28473687, 'created_at': datetime.datetime(2025, 11, 13, 3, 19), 'result': '0.06107707693387454', 'result_long': None, 'result_double': None}] Qualite : 0.06107707693387454 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28473687 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473687_13-11-2025_03_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28473687 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_P28473687_13-11-2025_03_19_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28473690, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473691, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473692, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473693, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473694, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473695, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473696, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473697, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473698, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473699, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473700, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473701, 'pht': 3726}}" where mtr_portfolio_id = 28473687 and dashboard_run_id = 2580180 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`=28473687 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186401, 0.06107707693387454, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473687_13-11-2025_03_19_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28473690, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473691, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473692, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473693, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473694, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473695, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473696, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473697, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473698, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473699, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473700, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473701, '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 = 28473852 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': 4039324, 'mtr_portfolio_id': 28473852, 'created_at': datetime.datetime(2025, 11, 13, 3, 32, 58), 'result': '0.0649765457543171', 'result_long': None, 'result_double': None}] Qualite : 0.0649765457543171 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28473852 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473852_13-11-2025_03_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28473852 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_P28473852_13-11-2025_03_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473854, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473855, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473856, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473857, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473858, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473859, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473860, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473861, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473862, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473863, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473864, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473865, 'pht': 3726}}" where mtr_portfolio_id = 28473852 and dashboard_run_id = 2580180 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`=28473852 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186402, 0.0649765457543171, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473852_13-11-2025_03_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473854, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473855, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473856, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473857, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473858, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473859, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473860, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473861, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473862, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473863, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473864, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473865, '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 = 28473961 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': 4039346, 'mtr_portfolio_id': 28473961, 'created_at': datetime.datetime(2025, 11, 13, 3, 47), 'result': '0.006105922087124925', 'result_long': None, 'result_double': None}] Qualite : 0.006105922087124925 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28473961 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473961_13-11-2025_03_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28473961 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_P28473961_13-11-2025_03_47_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473963, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473964, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473965, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473966, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473967, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473968, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473969, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473970, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473971, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473972, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473973, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473974, 'pht': 3726}}" where mtr_portfolio_id = 28473961 and dashboard_run_id = 2580180 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`=28473961 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186403, 0.006105922087124925, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473961_13-11-2025_03_47_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473963, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473964, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473965, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473966, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473967, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473968, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473969, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473970, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473971, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473972, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473973, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473974, '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 = 28474121 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': 4039376, 'mtr_portfolio_id': 28474121, 'created_at': datetime.datetime(2025, 11, 13, 4, 2, 58), 'result': '0.05099832172687289', 'result_long': None, 'result_double': None}] Qualite : 0.05099832172687289 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28474121 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28474121_13-11-2025_04_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28474121 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_P28474121_13-11-2025_04_02_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28474122, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474123, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28474124, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474125, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28474126, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474127, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28474128, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28474129, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474130, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474131, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28474132, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28474133, 'pht': 3726}}" where mtr_portfolio_id = 28474121 and dashboard_run_id = 2580180 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`=28474121 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186404, 0.05099832172687289, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28474121_13-11-2025_04_02_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28474122, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474123, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28474124, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474125, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28474126, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474127, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28474128, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28474129, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474130, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474131, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28474132, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28474133, '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 = 28474652 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': 4039528, 'mtr_portfolio_id': 28474652, 'created_at': datetime.datetime(2025, 11, 13, 5, 17, 1), 'result': '0.0836622837275008', 'result_long': None, 'result_double': None}] Qualite : 0.0836622837275008 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28474652 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28474652_13-11-2025_05_17_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28474652 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_P28474652_13-11-2025_05_17_02.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28474653, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474654, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474655, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28474656, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28474657, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474658, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474659, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474660, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28474661, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28474662, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28474663, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28474664, 'pht': 3726}}" where mtr_portfolio_id = 28474652 and dashboard_run_id = 2580180 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`=28474652 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186405, 0.0836622837275008, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28474652_13-11-2025_05_17_02.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28474653, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474654, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474655, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28474656, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28474657, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474658, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474659, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474660, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28474661, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28474662, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28474663, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28474664, '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 = 28474833 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': 4039547, 'mtr_portfolio_id': 28474833, 'created_at': datetime.datetime(2025, 11, 13, 5, 45, 32), 'result': '0.048134693199410335', 'result_long': None, 'result_double': None}] Qualite : 0.048134693199410335 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28474833 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28474833_13-11-2025_05_45_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28474833 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_P28474833_13-11-2025_05_45_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474844, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28474845, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28474846, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28474847, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474849, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28474850, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474851, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28474853, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28474854, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28474855, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474857, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474858, 'pht': 3726}}" where mtr_portfolio_id = 28474833 and dashboard_run_id = 2580180 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`=28474833 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186406, 0.048134693199410335, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28474833_13-11-2025_05_45_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474844, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28474845, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28474846, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28474847, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474849, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28474850, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474851, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28474853, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28474854, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28474855, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474857, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474858, '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 = 28474994 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 = 28474994 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 = 28474994 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 28474994 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 = 28474994 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 = 28474994 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28474994_13-11-2025_05_46_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28474994 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_P28474994_13-11-2025_05_46_32.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474995, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474996, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474997, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474998, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474999, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28475000, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28475001, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28475002, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28475003, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28475004, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28475005, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28475006, 'pht': 3726}}" where mtr_portfolio_id = 28474994 and dashboard_run_id = 2580173 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 = 28475052 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': 4039741, 'mtr_portfolio_id': 28475052, 'created_at': datetime.datetime(2025, 11, 13, 5, 58, 58), 'result': '0.02353065134762591', 'result_long': None, 'result_double': None}] Qualite : 0.02353065134762591 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28475052 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28475052_13-11-2025_05_58_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28475052 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_P28475052_13-11-2025_05_58_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28475053, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28475054, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28475055, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28475056, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28475057, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28475058, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28475059, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28475060, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28475061, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28475062, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28475063, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28475064, 'pht': 3726}}" where mtr_portfolio_id = 28475052 and dashboard_run_id = 2580180 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`=28475052 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186408, 0.02353065134762591, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28475052_13-11-2025_05_58_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28475053, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28475054, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28475055, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28475056, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28475057, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28475058, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28475059, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28475060, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28475061, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28475062, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28475063, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28475064, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28472071,28472625,28472733,28472999,28473209,28473342,28473449,28473687,28473852,28473961,28474121,28474652,28474833,28474994,28475052) result : ((1394133573,), (1394133823,), (1394133824,), (1394134091,), (1394134214,), (1394134217,), (1394134284,), (1394134287,), (1394134367,), (1394138510,), (1394138536,), (1394138610,), (1394138613,), (1394138650,), (1394138652,), (1394138653,), (1394138654,), (1394138713,), (1394138715,), (1394138806,), (1394138831,), (1394138858,), (1394138860,), (1394139061,), (1394139063,), (1394140058,), (1394140070,), (1394140096,), (1394140116,), (1394140139,), (1394140137,), (1394140490,), (1394141894,), (1394142345,), (1394142365,), (1394142499,), (1394142573,), (1394142676,), (1394142709,), (1394142736,), (1394142782,), (1394142838,), (1394142884,), (1394142910,), (1394142940,), (1394142943,), (1394142963,), (1394142964,), (1394142965,), (1394142967,), (1394143056,), (1394143059,), (1394143062,), (1394143087,), (1394143174,), (1394143168,), (1394143197,), (1394143250,), (1394143252,), (1394143253,), (1394143378,), (1394143400,), (1394143405,), (1394143408,), (1394143457,), (1394143482,), (1394143484,), (1394143517,), (1394143555,), (1394143585,), (1394143586,), (1394143663,), (1394143666,), (1394143688,), (1394143689,), (1394143795,), (1394143797,), (1394143798,), (1394143818,), (1394144370,), (1394144422,), (1394144426,), (1394144843,), (1394144871,), (1394144900,), (1394145458,), (1394145460,), (1394145580,), (1394145581,), (1394145634,), (1394145657,), (1394145706,), (1394145737,), (1394145758,), (1394145793,), (1394145843,), (1394145841,), (1394145873,), (1394145926,), (1394145928,), (1394145954,), (1394145980,), (1394146009,), (1394146050,), (1394146069,), (1394146072,), (1394146100,), (1394146125,), (1394146170,), (1394146192,), (1394146211,), (1394146214,), (1394146246,), (1394146249,), (1394146349,), (1394146351,), (1394146403,), (1394146405,), (1394146424,), (1394146485,), (1394146541,), (1394146543,), (1394146594,), (1394146593,), (1394146621,), (1394146649,), (1394146699,), (1394146700,), (1394146724,), (1394146754,), (1394146755,), (1394146840,), (1394146845,), (1394146866,), (1394146868,), (1394148200,), (1394151231,), (1394151862,), (1394151896,), (1394151952,), (1394151954,), (1394151987,), (1394151989,), (1394151992,), (1394152017,), (1394152018,), (1394152043,), (1394152046,), (1394152084,), (1394152107,), (1394152109,), (1394152111,), (1394152144,), (1394152146,), (1394152148,), (1394152172,), (1394152174,), (1394152176,), (1394152180,), (1394152185,), (1394152212,), (1394152209,), (1394152210,), (1394152239,), (1394152241,), (1394152242,), (1394152244,), (1394152248,), (1394152250,), (1394152274,), (1394152277,), (1394152278,), (1394152280,), (1394152301,), (1394153021,), (1394152822,), (1394153019,), (1394153042,), (1394153070,), (1394153091,), (1394153248,), (1394153273,), (1394153277,), (1394153280,), (1394153283,), (1394153286,), (1394153304,), (1394153307,), (1394153311,), (1394153316,), (1394153320,), (1394153337,), (1394153338,), (1394153339,), (1394153342,), (1394153346,), (1394153366,), (1394153368,), (1394153402,), (1394153404,), (1394153405,), (1394153406,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'13112025': {'nb_upload': 9, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28472071]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1394134367, 1394134287, 1394134284, 1394134217, 1394134214, 1394134091, 1394133824, 1394133823, 1394133573] map_info['map_portfolio_photo'] : {28472071: [1394134367, 1394134287, 1394134284, 1394134217, 1394134214, 1394134091, 1394133824, 1394133823, 1394133573]} final : True mtd_id 4302 list_pids : [1394134367, 1394134287, 1394134284, 1394134217, 1394134214, 1394134091, 1394133824, 1394133823, 1394133573] Looping around the photos to save general results len do output : 1 /28472071Didn'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, '4039643') ('4302', '28472071', '1394134367', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134287', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134284', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134217', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134214', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394134091', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394133824', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394133823', None, None, None, None, None, '4039643') ('4302', None, None, None, None, None, None, None, '4039643') ('4302', '28472071', '1394133573', None, None, None, None, None, '4039643') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 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, '28472071', 'None', None, None, None, None, '4039643'), ('4302', '28472071', '1394134367', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394134287', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394134284', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394134217', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394134214', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394134091', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394133824', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394133823', None, None, None, None, None, '4039643'), ('4302', '28472071', '1394133573', None, None, None, None, None, '4039643')] time used for this insertion : 0.01716756820678711 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.470064640045166 time spend to save output : 0.017378568649291992 total time spend for step 5 : 2.487443208694458 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 (4039643) 2.01user 2.32system 0:11.26elapsed 38%CPU (0avgtext+0avgdata 159264maxresident)k 248inputs+9600outputs (0major+64278minor)pagefaults 0swaps