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 : 1565739 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 (4302831) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4302831) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29888232 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4302831'] with mtr_portfolio_ids : ['29888232'] and first list_photo_ids : [] new path : /proc/1565739/ Name: python3 Umask: 0002 State: R (running) Tgid: 1565739 Ngid: 0 Pid: 1565739 PPid: 1565738 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1565739 NSpid: 1565739 NSpgid: 1564394 NSsid: 1564394 VmPeak: 1113368 kB VmSize: 1113368 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 105744 kB VmRSS: 105744 kB RssAnon: 66296 kB RssFile: 39448 kB RssShmem: 0 kB VmData: 872096 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130476 kB VmPTE: 616 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: 45 nonvoluntary_ctxt_switches: 93 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1565739', 'Ngid': '0', 'Pid': '1565739', 'PPid': '1565738', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1565739', 'NSpid': '1565739', 'NSpgid': '1564394', 'NSsid': '1564394', 'VmPeak': '1113368 kB', 'VmSize': '1113368 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '105744 kB', 'VmRSS': '105744 kB', 'RssAnon': '66296 kB', 'RssFile': '39448 kB', 'RssShmem': '0 kB', 'VmData': '872096 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130476 kB', 'VmPTE': '616 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': '45', 'nonvoluntary_ctxt_switches': '93'} ('datou_batch_current', '1565739', '1113368', '0', '1113368', '872096', '105744', b'', 'marlene', '4302831') 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 (29888232) 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 (4302831 ) ) 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 (29888232) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1402147161, 'portfolio_id': 29888232}, {'photo_id': 1402147157, 'portfolio_id': 29888232}, {'photo_id': 1402147154, 'portfolio_id': 29888232}, {'photo_id': 1402147152, 'portfolio_id': 29888232}, {'photo_id': 1402147151, 'portfolio_id': 29888232}, {'photo_id': 1402147134, 'portfolio_id': 29888232}, {'photo_id': 1402147133, 'portfolio_id': 29888232}] map_portfolio_id_photo_id: {29888232: [1402147161, 1402147157, 1402147154, 1402147152, 1402147151, 1402147134, 1402147133]} ##### 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.017003774642944336 #### 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 Fri Jan 2 12:18:57 2026 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 (29888232) 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 : 29888232 get user id for portfolio 29888232 get sub ptf for main ptf 29888232, type 3726 and hashtags ['metal', 'autre_refus', 'kraft', 'environnement', 'flou', 'mal_croppe', 'Carton_gris', 'cartonnette', 'plastique', 'Carton_brun', 'Teint_Dans_La_Masse', 'papier'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29888232 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','autre_refus','kraft','environnement','flou','mal_croppe','Carton_gris','cartonnette','plastique','Carton_brun','Teint_Dans_La_Masse','papier')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29888232 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','autre_refus','kraft','environnement','flou','mal_croppe','Carton_gris','cartonnette','plastique','Carton_brun','Teint_Dans_La_Masse','papier')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_brun': {'main_port_id': 29888232, 'sub_port_id': 29888240, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446671, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 29)}, 'flou': {'main_port_id': 29888232, 'sub_port_id': 29888241, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446672, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 29)}, 'papier': {'main_port_id': 29888232, 'sub_port_id': 29888242, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446673, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 29)}, 'kraft': {'main_port_id': 29888232, 'sub_port_id': 29888243, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446674, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 29)}, 'cartonnette': {'main_port_id': 29888232, 'sub_port_id': 29888244, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446675, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 29)}, 'autre_refus': {'main_port_id': 29888232, 'sub_port_id': 29888245, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446676, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 29)}, 'environnement': {'main_port_id': 29888232, 'sub_port_id': 29888246, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446677, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 29)}, 'metal': {'main_port_id': 29888232, 'sub_port_id': 29888247, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446678, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 29)}, 'mal_croppe': {'main_port_id': 29888232, 'sub_port_id': 29888248, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446679, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 29)}, 'plastique': {'main_port_id': 29888232, 'sub_port_id': 29888249, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446680, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 29)}, 'Carton_gris': {'main_port_id': 29888232, 'sub_port_id': 29888250, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446681, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 29888232, 'sub_port_id': 29888251, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446682, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 29)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29888240 , 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=29888232 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 (29888240) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29888232) result : ((1402147133,), (1402147134,), (1402147151,), (1402147152,), (1402147154,), (1402147157,), (1402147161,)) 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 29888241 , 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=29888232 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 (29888241) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29888232) result : ((1402147133,), (1402147134,), (1402147151,), (1402147152,), (1402147154,), (1402147157,), (1402147161,)) 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 29888242 , 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=29888232 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 (29888242) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29888232) result : ((1402147133,), (1402147134,), (1402147151,), (1402147152,), (1402147154,), (1402147157,), (1402147161,)) 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 29888243 , 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=29888232 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 (29888243) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29888232) result : ((1402147133,), (1402147134,), (1402147151,), (1402147152,), (1402147154,), (1402147157,), (1402147161,)) 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 29888244 , 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=29888232 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 (29888244) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29888232) result : ((1402147133,), (1402147134,), (1402147151,), (1402147152,), (1402147154,), (1402147157,), (1402147161,)) 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 29888245 , 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=29888232 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 (29888245) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29888232) result : ((1402147133,), (1402147134,), (1402147151,), (1402147152,), (1402147154,), (1402147157,), (1402147161,)) 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 29888246 , 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=29888232 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 (29888246) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29888232) result : ((1402147133,), (1402147134,), (1402147151,), (1402147152,), (1402147154,), (1402147157,), (1402147161,)) 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 29888247 , 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=29888232 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 (29888247) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29888232) result : ((1402147133,), (1402147134,), (1402147151,), (1402147152,), (1402147154,), (1402147157,), (1402147161,)) 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 29888248 , 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=29888232 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 (29888248) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29888232) result : ((1402147133,), (1402147134,), (1402147151,), (1402147152,), (1402147154,), (1402147157,), (1402147161,)) 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 29888249 , 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=29888232 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 (29888249) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29888232) result : ((1402147133,), (1402147134,), (1402147151,), (1402147152,), (1402147154,), (1402147157,), (1402147161,)) 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 29888250 , 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=29888232 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 (29888250) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29888232) result : ((1402147133,), (1402147134,), (1402147151,), (1402147152,), (1402147154,), (1402147157,), (1402147161,)) 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 29888251 , 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=29888232 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 (29888251) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29888232) result : ((1402147133,), (1402147134,), (1402147151,), (1402147152,), (1402147154,), (1402147157,), (1402147161,)) 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`=29888232 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','autre_refus','kraft','environnement','flou','mal_croppe','Carton_gris','cartonnette','plastique','Carton_brun','Teint_Dans_La_Masse','papier')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29888232 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','autre_refus','kraft','environnement','flou','mal_croppe','Carton_gris','cartonnette','plastique','Carton_brun','Teint_Dans_La_Masse','papier')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_brun': {'main_port_id': 29888232, 'sub_port_id': 29888252, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446683, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 31)}, 'flou': {'main_port_id': 29888232, 'sub_port_id': 29888253, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446684, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 31)}, 'papier': {'main_port_id': 29888232, 'sub_port_id': 29888254, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446685, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 31)}, 'kraft': {'main_port_id': 29888232, 'sub_port_id': 29888255, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446686, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 31)}, 'cartonnette': {'main_port_id': 29888232, 'sub_port_id': 29888256, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446687, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 31)}, 'autre_refus': {'main_port_id': 29888232, 'sub_port_id': 29888257, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446688, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 31)}, 'environnement': {'main_port_id': 29888232, 'sub_port_id': 29888258, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446689, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 31)}, 'metal': {'main_port_id': 29888232, 'sub_port_id': 29888259, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446690, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 31)}, 'mal_croppe': {'main_port_id': 29888232, 'sub_port_id': 29888260, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446691, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 31)}, 'plastique': {'main_port_id': 29888232, 'sub_port_id': 29888261, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446692, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 31)}, 'Carton_gris': {'main_port_id': 29888232, 'sub_port_id': 29888262, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446693, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 31)}, 'Teint_Dans_La_Masse': {'main_port_id': 29888232, 'sub_port_id': 29888263, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20446694, 'last_updated_at': datetime.datetime(2026, 1, 2, 12, 17, 32), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 12, 17, 32), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 12, 17, 31)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29888252,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29888240 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29888253,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29888241 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29888254,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29888242 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29888255,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29888243 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29888256,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29888244 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29888257,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29888245 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29888258,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29888246 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29888259,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29888247 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29888260,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29888248 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29888261,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29888249 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29888262,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29888250 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29888263,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29888251 lien utilise dans velours : https://marlene.fotonower.com/velours/29888252,29888253,29888254,29888255,29888256,29888257,29888258,29888259,29888260,29888261,29888262,29888263?tags=Carton_brun,flou,papier,kraft,cartonnette,autre_refus,environnement,metal,mal_croppe,plastique,Carton_gris,Teint_Dans_La_Masse After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29888232]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1402147161, 1402147157, 1402147154, 1402147152, 1402147151] map_info['map_portfolio_photo'] : {29888232: [1402147161, 1402147157, 1402147154, 1402147152, 1402147151, 1402147134, 1402147133]} final : False mtd_id 4302 list_pids : [1402147161, 1402147157, 1402147154, 1402147152, 1402147151] Looping around the photos to save general results len do output : 1 /29888232. 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, '4302831') ('4302', '29888232', '1402147161', None, None, None, None, None, '4302831') ('4302', None, None, None, None, None, None, None, '4302831') ('4302', '29888232', '1402147157', None, None, None, None, None, '4302831') ('4302', None, None, None, None, None, None, None, '4302831') ('4302', '29888232', '1402147154', None, None, None, None, None, '4302831') ('4302', None, None, None, None, None, None, None, '4302831') ('4302', '29888232', '1402147152', None, None, None, None, None, '4302831') ('4302', None, None, None, None, None, None, None, '4302831') ('4302', '29888232', '1402147151', None, None, None, None, None, '4302831') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '29888232', "{'Carton_brun': 29888240, 'flou': 29888241, 'papier': 29888242, 'kraft': 29888243, 'cartonnette': 29888244, 'autre_refus': 29888245, 'environnement': 29888246, 'metal': 29888247, 'mal_croppe': 29888248, 'plastique': 29888249, 'Carton_gris': 29888250, 'Teint_Dans_La_Masse': 29888251}", None, None, None, None, '4302831'), ('4302', '29888232', '1402147161', None, None, None, None, None, '4302831'), ('4302', '29888232', '1402147157', None, None, None, None, None, '4302831'), ('4302', '29888232', '1402147154', None, None, None, None, None, '4302831'), ('4302', '29888232', '1402147152', None, None, None, None, None, '4302831'), ('4302', '29888232', '1402147151', None, None, None, None, None, '4302831')] time used for this insertion : 0.015133857727050781 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.7793960571289062 time spend to save output : 0.015351295471191406 total time spend for step 1 : 1.7947473526000977 step2:final Fri Jan 2 12:18:59 2026 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 (29888232) 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 29888232 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1402147134,1402147133,1402147161,1402147157,1402147154,1402147152,1402147151); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29888232]) Inside saveOutput : final : False verbose : True original output for save of step final : {1402147161: ('0.0',), 1402147157: ('0.0',), 1402147154: ('0.0',), 1402147152: ('0.0',), 1402147151: ('0.0',)} new output for save of step final : {1402147161: ('0.0',), 1402147157: ('0.0',), 1402147154: ('0.0',), 1402147152: ('0.0',), 1402147151: ('0.0',)} [1402147161, 1402147157, 1402147154, 1402147152, 1402147151] map_info['map_portfolio_photo'] : {29888232: [1402147161, 1402147157, 1402147154, 1402147152, 1402147151, 1402147134, 1402147133]} final : False mtd_id 4302 list_pids : [1402147161, 1402147157, 1402147154, 1402147152, 1402147151] Looping around the photos to save general results len do output : 5 /1402147161.Didn't retrieve data . /1402147157.Didn't retrieve data . /1402147154.Didn't retrieve data . /1402147152.Didn't retrieve data . /1402147151.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, '4302831') ('4302', '29888232', '1402147161', None, None, None, None, None, '4302831') ('4302', None, None, None, None, None, None, None, '4302831') ('4302', '29888232', '1402147157', None, None, None, None, None, '4302831') ('4302', None, None, None, None, None, None, None, '4302831') ('4302', '29888232', '1402147154', None, None, None, None, None, '4302831') ('4302', None, None, None, None, None, None, None, '4302831') ('4302', '29888232', '1402147152', None, None, None, None, None, '4302831') ('4302', None, None, None, None, None, None, None, '4302831') ('4302', '29888232', '1402147151', None, None, None, None, None, '4302831') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '29888232', '1402147161', '0.0', None, None, None, None, '4302831'), ('4302', '29888232', '1402147157', '0.0', None, None, None, None, '4302831'), ('4302', '29888232', '1402147154', '0.0', None, None, None, None, '4302831'), ('4302', '29888232', '1402147152', '0.0', None, None, None, None, '4302831'), ('4302', '29888232', '1402147151', '0.0', None, None, None, None, '4302831')] time used for this insertion : 0.014156579971313477 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06230783462524414 time spend to save output : 0.014460563659667969 total time spend for step 2 : 0.07676839828491211 step3:velours_tree Fri Jan 2 12:18:59 2026 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 : {29888232: [{'Carton_brun': 29888240, 'flou': 29888241, 'papier': 29888242, 'kraft': 29888243, 'cartonnette': 29888244, 'autre_refus': 29888245, 'environnement': 29888246, 'metal': 29888247, 'mal_croppe': 29888248, 'plastique': 29888249, 'Carton_gris': 29888250, 'Teint_Dans_La_Masse': 29888251}]} input_args_next_step : {29888232: ()} output_args : {29888232: [{'Carton_brun': 29888240, 'flou': 29888241, 'papier': 29888242, 'kraft': 29888243, 'cartonnette': 29888244, 'autre_refus': 29888245, 'environnement': 29888246, 'metal': 29888247, 'mal_croppe': 29888248, 'plastique': 29888249, 'Carton_gris': 29888250, 'Teint_Dans_La_Masse': 29888251}]} args : 29888232 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 : ({'Carton_brun': 29888240, 'flou': 29888241, 'papier': 29888242, 'kraft': 29888243, 'cartonnette': 29888244, 'autre_refus': 29888245, 'environnement': 29888246, 'metal': 29888247, 'mal_croppe': 29888248, 'plastique': 29888249, 'Carton_gris': 29888250, 'Teint_Dans_La_Masse': 29888251},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29888232) 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([29888232]) 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.2403116226196289 time spend to save output : 5.0067901611328125e-05 total time spend for step 3 : 0.24036169052124023 step4:send_mail_cod Fri Jan 2 12:18:59 2026 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 : {1402147161: ('0.0',), 1402147157: ('0.0',), 1402147154: ('0.0',), 1402147152: ('0.0',), 1402147151: ('0.0',)} input_args_next_step : {1402147161: ()} output_args : {1402147161: ('0.0',), 1402147157: ('0.0',), 1402147154: ('0.0',), 1402147152: ('0.0',), 1402147151: ('0.0',)} args : 1402147161 depend.output_id : 0 input_args_next_step : {1402147161: ('0.0',), 1402147157: ()} output_args : {1402147161: ('0.0',), 1402147157: ('0.0',), 1402147154: ('0.0',), 1402147152: ('0.0',), 1402147151: ('0.0',)} args : 1402147157 depend.output_id : 0 input_args_next_step : {1402147161: ('0.0',), 1402147157: ('0.0',), 1402147154: ()} output_args : {1402147161: ('0.0',), 1402147157: ('0.0',), 1402147154: ('0.0',), 1402147152: ('0.0',), 1402147151: ('0.0',)} args : 1402147154 depend.output_id : 0 input_args_next_step : {1402147161: ('0.0',), 1402147157: ('0.0',), 1402147154: ('0.0',), 1402147152: ()} output_args : {1402147161: ('0.0',), 1402147157: ('0.0',), 1402147154: ('0.0',), 1402147152: ('0.0',), 1402147151: ('0.0',)} args : 1402147152 depend.output_id : 0 input_args_next_step : {1402147161: ('0.0',), 1402147157: ('0.0',), 1402147154: ('0.0',), 1402147152: ('0.0',), 1402147151: ()} output_args : {1402147161: ('0.0',), 1402147157: ('0.0',), 1402147154: ('0.0',), 1402147152: ('0.0',), 1402147151: ('0.0',)} args : 1402147151 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 : {29888232: [{'Carton_brun': 29888240, 'flou': 29888241, 'papier': 29888242, 'kraft': 29888243, 'cartonnette': 29888244, 'autre_refus': 29888245, 'environnement': 29888246, 'metal': 29888247, 'mal_croppe': 29888248, 'plastique': 29888249, 'Carton_gris': 29888250, 'Teint_Dans_La_Masse': 29888251}]} input_args_next_step : {1402147161: ('0.0',), 1402147157: ('0.0',), 1402147154: ('0.0',), 1402147152: ('0.0',), 1402147151: ('0.0',), 29888232: ()} output_args : {29888232: [{'Carton_brun': 29888240, 'flou': 29888241, 'papier': 29888242, 'kraft': 29888243, 'cartonnette': 29888244, 'autre_refus': 29888245, 'environnement': 29888246, 'metal': 29888247, 'mal_croppe': 29888248, 'plastique': 29888249, 'Carton_gris': 29888250, 'Teint_Dans_La_Masse': 29888251}]} args : 29888232 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 :6, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29888232) 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 (1402147161,1402147157,1402147154,1402147152,1402147151) Found this number of photos: 5 ##### Call download_photos : nb_thread : 5 begin to download photo : 1402147151 begin to download photo : 1402147154 begin to download photo : 1402147161 download finish for photo 1402147161 download finish for photo 1402147154 begin to download photo : 1402147157 download finish for photo 1402147151 begin to download photo : 1402147152 download finish for photo 1402147157 download finish for photo 1402147152 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette298882411767352739/ imagette298882431767352739/ imagette298882441767352739/ imagette298882451767352739/ imagette298882471767352739/ imagette298882481767352739/ imagette298882491767352739/ imagette298882401767352739/ imagette298882501767352739/ imagette298882511767352739/ length of list_filenames : 5 ; length of list_pids : 5 ; length of list_args : 5 results_Auto_P29888232_02-01-2026_12_18_59.pdf 29888241 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=29888241 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298882411767352739 29888243 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=29888243 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298882431767352739 29888244 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=29888244 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298882441767352739 29888245 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=29888245 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298882451767352739 29888247 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=29888247 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298882471767352739 29888248 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=29888248 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298882481767352739 29888249 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=29888249 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298882491767352739 29888240 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=29888240 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298882401767352739 29888250 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=29888250 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298882501767352739 29888251 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=29888251 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298882511767352739 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=29888232 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/29888252,29888253,29888254,29888255,29888256,29888257,29888258,29888259,29888260,29888261,29888262,29888263?tags=Carton_brun,flou,papier,kraft,cartonnette,autre_refus,environnement,metal,mal_croppe,plastique,Carton_gris,Teint_Dans_La_Masse your option no_mail is active, we will not send the real mail to your client args[1402147161] : ('0.0',) no score found for photo 1402147161 We are sending mail with results at report@fotonower.com args[1402147157] : ('0.0',) no score found for photo 1402147157 We are sending mail with results at report@fotonower.com args[1402147154] : ('0.0',) no score found for photo 1402147154 We are sending mail with results at report@fotonower.com args[1402147152] : ('0.0',) no score found for photo 1402147152 We are sending mail with results at report@fotonower.com args[1402147151] : ('0.0',) no score found for photo 1402147151 We are sending mail with results at report@fotonower.com refus_total : 0.0 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=29888232 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_P29888232_02-01-2026_12_18_59.pdf results_Auto_P29888232_02-01-2026_12_18_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29888232_02-01-2026_12_18_59.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','29888232','results_Auto_P29888232_02-01-2026_12_18_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29888232_02-01-2026_12_18_59.pdf','pdf','','0.06','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29888232]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1402147161, 1402147157, 1402147154, 1402147152, 1402147151] map_info['map_portfolio_photo'] : {29888232: [1402147161, 1402147157, 1402147154, 1402147152, 1402147151, 1402147134, 1402147133]} final : False mtd_id 4302 list_pids : [1402147161, 1402147157, 1402147154, 1402147152, 1402147151] 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, '4302831') ('4302', '29888232', '1402147161', None, None, None, None, None, '4302831') ('4302', None, None, None, None, None, None, None, '4302831') ('4302', '29888232', '1402147157', None, None, None, None, None, '4302831') ('4302', None, None, None, None, None, None, None, '4302831') ('4302', '29888232', '1402147154', None, None, None, None, None, '4302831') ('4302', None, None, None, None, None, None, None, '4302831') ('4302', '29888232', '1402147152', None, None, None, None, None, '4302831') ('4302', None, None, None, None, None, None, None, '4302831') ('4302', '29888232', '1402147151', None, None, None, None, None, '4302831') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 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', '29888232', '1402147161', None, None, None, None, None, '4302831'), ('4302', '29888232', '1402147157', None, None, None, None, None, '4302831'), ('4302', '29888232', '1402147154', None, None, None, None, None, '4302831'), ('4302', '29888232', '1402147152', None, None, None, None, None, '4302831'), ('4302', '29888232', '1402147151', None, None, None, None, None, '4302831')] time used for this insertion : 0.013598918914794922 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.31280517578125 time spend to save output : 0.013811111450195312 total time spend for step 4 : 1.3266162872314453 step5:split_time_score Fri Jan 2 12:19:00 2026 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 : ['29888232'] 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 : [('29888232',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29888232) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1402147161: {'path': 'temp/1767352739_1565739_1402147161_d46199477d5fc9a7b6d21bb84d6858ee.jpg', 'extension': 'jpg'}, 1402147154: {'path': 'temp/1767352739_1565739_1402147154_f72081860a81b1cff16fab230d0611bf.jpg', 'extension': 'jpg'}, 1402147157: {'path': 'temp/1767352739_1565739_1402147157_00dacc0184e918f70754ed1e98ae456b.jpg', 'extension': 'jpg'}, 1402147151: {'path': 'temp/1767352739_1565739_1402147151_04d51590fae59946d650a58cd7e52ba8.jpg', 'extension': 'jpg'}, 1402147152: {'path': 'temp/1767352739_1565739_1402147152_42b79e7e229b783bcea087d7b394bea8.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 = 29888232; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 29888232 group by h (('12', 7),) 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=29888232 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 (29888232) 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 (29888232) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 02012026 29888232 Nombre de photos uploadées : 7 / 23040 (0%) 02012026 29888232 Nombre de photos taguées (types de déchets): 0 / 7 (0%) 02012026 29888232 Nombre de photos taguées (volume) : 0 / 7 (0%) [{'photo_id': 1402147134, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/2/104905eeef04a1b41fb4e403aecf0739.jpg', 'username': None, 'uploaded_at': 1767352567, 'text': 'image_02012026_12_15_04_10159.jpg'}, {'photo_id': 1402147133, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/2/6e0c3814f9970016282acce5d7d07c74.jpg', 'username': None, 'uploaded_at': 1767352567, 'text': 'image_02012026_12_15_14_10139.jpg'}, {'photo_id': 1402147161, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/2/d46199477d5fc9a7b6d21bb84d6858ee.jpg', 'username': None, 'uploaded_at': 1767352627, 'text': 'image_02012026_12_15_54_10136.jpg'}, {'photo_id': 1402147157, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/2/00dacc0184e918f70754ed1e98ae456b.jpg', 'username': None, 'uploaded_at': 1767352627, 'text': 'image_02012026_12_16_03_9136.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.6689300537109375e-06 elapsed_time : order_list_meta_photo_and_scores 5.0067901611328125e-06 ??????? elapsed_time : fill_and_build_computed_from_old_data 0.00041365623474121094 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 29888232, '2026-01-02' ) 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 = '2026-01-02' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2829505,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.2452254295349121 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= 2829505 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29875698, 'dashboard_result_id': 18939342, '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_P29875698_02-01-2026_06_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29875700, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29875701, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29875702, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29875703, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29875704, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29875705, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29875706, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29875707, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29875708, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29875709, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29875710, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29875711, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29875852, 'dashboard_result_id': 18939343, '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_P29875852_02-01-2026_06_33_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29875855, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29875856, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29875857, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29875858, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29875859, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29875860, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29875861, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29875862, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29875863, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29875864, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29875865, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29875866, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29876194, 'dashboard_result_id': 18939344, '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_P29876194_02-01-2026_06_52_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 29876199, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29876200, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29876201, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29876202, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29876203, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29876204, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29876205, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29876206, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29876207, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29876208, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29876209, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29876210, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29876652, 'dashboard_result_id': 18939345, '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_P29876652_02-01-2026_07_03_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29876653, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29876654, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29876655, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29876656, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29876657, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29876658, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29876659, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29876660, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29876661, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29876662, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29876663, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29876664, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29876801, 'dashboard_result_id': 18939346, '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_P29876801_02-01-2026_07_16_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29876851, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29876852, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29876853, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29876854, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29876855, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29876856, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29876857, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29876858, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29876859, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29876860, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29876861, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29876862, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29877372, 'dashboard_result_id': 18939347, '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_P29877372_02-01-2026_07_33_34.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29877428, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29877429, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29877430, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29877431, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29877432, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29877433, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29877434, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29877435, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29877436, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29877437, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29877438, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29877439, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29878166, 'dashboard_result_id': 18939348, '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_P29878166_02-01-2026_07_49_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29878167, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29878168, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29878169, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29878170, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29878171, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29878172, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29878173, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29878174, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29878175, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29878176, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29878177, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29878178, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29879046, 'dashboard_result_id': 18939349, '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_P29879046_02-01-2026_08_02_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29879072, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29879073, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29879074, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29879075, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29879076, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29879077, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29879078, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29879079, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29879080, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29879081, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29879082, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29879083, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29879603, 'dashboard_result_id': 18939350, '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_P29879603_02-01-2026_08_21_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29879618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29879619, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29879620, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29879621, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29879622, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29879623, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29879624, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29879625, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29879626, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29879627, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29879628, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29879629, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29880964, 'dashboard_result_id': 18939351, '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_P29880964_02-01-2026_09_32_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29880989, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29880990, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29880991, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29880992, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29880993, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29880994, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29880995, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29880996, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29880997, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29880998, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29880999, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29881000, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29882264, 'dashboard_result_id': 18939352, '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_P29882264_02-01-2026_09_46_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29882286, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29882287, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29882288, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29882289, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29882290, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29882291, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29882292, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29882293, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29882294, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29882295, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29882296, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29882297, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29882750, 'dashboard_result_id': 18939353, '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_P29882750_02-01-2026_10_03_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29882754, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29882755, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29882756, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29882757, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29882758, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29882759, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29882760, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29882761, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29882762, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29882763, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29882764, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29882765, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29883285, 'dashboard_result_id': 18939354, '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_P29883285_02-01-2026_10_17_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29883321, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29883322, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29883323, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29883324, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29883325, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29883326, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29883327, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29883328, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29883329, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29883330, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29883331, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29883332, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29883844, 'dashboard_result_id': 18939355, '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_P29883844_02-01-2026_10_32_57.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29883853, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29883854, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29883855, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29883856, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29883857, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29883858, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29883859, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29883860, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29883861, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29883862, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29883863, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29883864, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29885052, 'dashboard_result_id': 18939356, '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_P29885052_02-01-2026_11_03_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29885054, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29885055, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29885056, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29885057, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29885058, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29885059, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29885060, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29885061, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29885062, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29885063, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29885064, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29885065, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29885399, 'dashboard_result_id': 18939357, '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_P29885399_02-01-2026_11_19_30.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29885444, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29885445, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29885446, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29885447, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29885448, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29885449, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29885450, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29885451, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29885452, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29885453, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29885454, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29885455, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29886087, 'dashboard_result_id': 18939358, '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_P29886087_02-01-2026_11_33_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29886092, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29886093, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29886094, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29886095, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29886096, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29886097, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29886098, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29886099, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29886100, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29886101, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29886102, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29886103, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29886560, 'dashboard_result_id': 18939359, '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_P29886560_02-01-2026_11_46_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29886572, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29886573, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29886574, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29886575, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29886576, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29886577, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29886578, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29886579, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29886580, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29886581, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29886582, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29886583, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29887236, 'dashboard_result_id': 18939360, '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_P29887236_02-01-2026_12_02_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29887240, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29887241, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29887242, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29887243, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29887244, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29887245, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29887246, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29887247, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29887248, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29887249, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29887250, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29887251, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29887673, 'dashboard_result_id': 18939361, '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_P29887673_02-01-2026_12_17_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29887690, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29887691, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29887692, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29887693, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29887694, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29887695, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29887696, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29887697, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29887698, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29887699, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29887700, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29887701, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2839088, 'mtr_portfolio_id': 29888232, 'dashboard_result_id': 18939362, '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_P29888232_02-01-2026_12_17_32.pdf'}"}] 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 = 29875698 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': 4301255, 'mtr_portfolio_id': 29875698, 'created_at': datetime.datetime(2026, 1, 2, 6, 16, 59), 'result': '0.07492098906161705', 'result_long': None, 'result_double': None}] Qualite : 0.07492098906161705 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29875698 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29875698_02-01-2026_06_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29875698 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_P29875698_02-01-2026_06_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29875700, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29875701, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29875702, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29875703, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29875704, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29875705, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29875706, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29875707, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29875708, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29875709, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29875710, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29875711, 'pht': 3726}}" where mtr_portfolio_id = 29875698 and dashboard_run_id = 2839088 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`=29875698 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939342, 0.07492098906161705, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29875698_02-01-2026_06_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29875700, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29875701, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29875702, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29875703, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29875704, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29875705, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29875706, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29875707, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29875708, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29875709, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29875710, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29875711, '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 = 29875852 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': 4301270, 'mtr_portfolio_id': 29875852, 'created_at': datetime.datetime(2026, 1, 2, 6, 33), 'result': '0.04900243563743138', 'result_long': None, 'result_double': None}] Qualite : 0.04900243563743138 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29875852 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29875852_02-01-2026_06_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29875852 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_P29875852_02-01-2026_06_33_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29875855, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29875856, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29875857, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29875858, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29875859, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29875860, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29875861, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29875862, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29875863, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29875864, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29875865, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29875866, 'pht': 3726}}" where mtr_portfolio_id = 29875852 and dashboard_run_id = 2839088 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`=29875852 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939343, 0.04900243563743138, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29875852_02-01-2026_06_33_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29875855, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29875856, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29875857, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29875858, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29875859, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29875860, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29875861, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29875862, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29875863, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29875864, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29875865, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29875866, '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 = 29876194 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': 4301315, 'mtr_portfolio_id': 29876194, 'created_at': datetime.datetime(2026, 1, 2, 6, 52, 31), 'result': '0.05190981045133743', 'result_long': None, 'result_double': None}] Qualite : 0.05190981045133743 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29876194 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29876194_02-01-2026_06_52_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29876194 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_P29876194_02-01-2026_06_52_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 29876199, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29876200, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29876201, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29876202, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29876203, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29876204, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29876205, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29876206, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29876207, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29876208, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29876209, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29876210, 'pht': 3726}}" where mtr_portfolio_id = 29876194 and dashboard_run_id = 2839088 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`=29876194 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939344, 0.05190981045133743, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29876194_02-01-2026_06_52_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 29876199, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29876200, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29876201, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29876202, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29876203, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29876204, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29876205, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29876206, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29876207, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29876208, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29876209, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29876210, '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 = 29876652 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': 4301388, 'mtr_portfolio_id': 29876652, 'created_at': datetime.datetime(2026, 1, 2, 7, 2, 59), 'result': '0.05348336988569866', 'result_long': None, 'result_double': None}] Qualite : 0.05348336988569866 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29876652 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29876652_02-01-2026_07_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29876652 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_P29876652_02-01-2026_07_03_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29876653, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29876654, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29876655, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29876656, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29876657, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29876658, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29876659, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29876660, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29876661, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29876662, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29876663, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29876664, 'pht': 3726}}" where mtr_portfolio_id = 29876652 and dashboard_run_id = 2839088 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`=29876652 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939345, 0.05348336988569866, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29876652_02-01-2026_07_03_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29876653, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29876654, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29876655, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29876656, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29876657, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29876658, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29876659, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29876660, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29876661, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29876662, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29876663, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29876664, '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 = 29876801 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': 4301433, 'mtr_portfolio_id': 29876801, 'created_at': datetime.datetime(2026, 1, 2, 7, 16, 58), 'result': '0.04076281109278468', 'result_long': None, 'result_double': None}] Qualite : 0.04076281109278468 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29876801 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29876801_02-01-2026_07_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29876801 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_P29876801_02-01-2026_07_16_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29876851, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29876852, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29876853, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29876854, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29876855, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29876856, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29876857, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29876858, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29876859, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29876860, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29876861, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29876862, 'pht': 3726}}" where mtr_portfolio_id = 29876801 and dashboard_run_id = 2839088 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`=29876801 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939346, 0.04076281109278468, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29876801_02-01-2026_07_16_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29876851, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29876852, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29876853, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29876854, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29876855, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29876856, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29876857, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29876858, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29876859, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29876860, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29876861, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29876862, '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 = 29877372 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': 4301509, 'mtr_portfolio_id': 29877372, 'created_at': datetime.datetime(2026, 1, 2, 7, 33, 34), 'result': '0.07603382662942415', 'result_long': None, 'result_double': None}] Qualite : 0.07603382662942415 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29877372 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29877372_02-01-2026_07_33_34.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29877372 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_P29877372_02-01-2026_07_33_34.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29877428, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29877429, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29877430, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29877431, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29877432, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29877433, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29877434, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29877435, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29877436, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29877437, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29877438, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29877439, 'pht': 3726}}" where mtr_portfolio_id = 29877372 and dashboard_run_id = 2839088 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`=29877372 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939347, 0.07603382662942415, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29877372_02-01-2026_07_33_34.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29877428, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29877429, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29877430, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29877431, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29877432, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29877433, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29877434, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29877435, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29877436, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29877437, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29877438, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29877439, '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 = 29878166 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': 4301599, 'mtr_portfolio_id': 29878166, 'created_at': datetime.datetime(2026, 1, 2, 7, 48, 59), 'result': '0.05564820976051616', 'result_long': None, 'result_double': None}] Qualite : 0.05564820976051616 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29878166 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29878166_02-01-2026_07_49_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29878166 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_P29878166_02-01-2026_07_49_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29878167, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29878168, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29878169, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29878170, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29878171, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29878172, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29878173, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29878174, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29878175, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29878176, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29878177, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29878178, 'pht': 3726}}" where mtr_portfolio_id = 29878166 and dashboard_run_id = 2839088 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`=29878166 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939348, 0.05564820976051616, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29878166_02-01-2026_07_49_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29878167, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29878168, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29878169, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29878170, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29878171, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29878172, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29878173, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29878174, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29878175, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29878176, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29878177, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29878178, '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 = 29879046 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': 4301685, 'mtr_portfolio_id': 29879046, 'created_at': datetime.datetime(2026, 1, 2, 8, 2, 59), 'result': '0.07583762117707248', 'result_long': None, 'result_double': None}] Qualite : 0.07583762117707248 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29879046 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29879046_02-01-2026_08_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29879046 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_P29879046_02-01-2026_08_02_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29879072, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29879073, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29879074, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29879075, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29879076, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29879077, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29879078, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29879079, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29879080, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29879081, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29879082, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29879083, 'pht': 3726}}" where mtr_portfolio_id = 29879046 and dashboard_run_id = 2839088 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`=29879046 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939349, 0.07583762117707248, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29879046_02-01-2026_08_02_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29879072, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29879073, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29879074, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29879075, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29879076, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29879077, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29879078, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29879079, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29879080, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29879081, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29879082, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29879083, '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 = 29879603 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': 4301764, 'mtr_portfolio_id': 29879603, 'created_at': datetime.datetime(2026, 1, 2, 8, 20, 59), 'result': '0.08415306723980351', 'result_long': None, 'result_double': None}] Qualite : 0.08415306723980351 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29879603 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29879603_02-01-2026_08_21_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29879603 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_P29879603_02-01-2026_08_21_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29879618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29879619, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29879620, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29879621, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29879622, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29879623, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29879624, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29879625, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29879626, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29879627, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29879628, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29879629, 'pht': 3726}}" where mtr_portfolio_id = 29879603 and dashboard_run_id = 2839088 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`=29879603 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939350, 0.08415306723980351, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29879603_02-01-2026_08_21_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29879618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29879619, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29879620, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29879621, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29879622, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29879623, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29879624, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29879625, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29879626, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29879627, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29879628, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29879629, '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 = 29880964 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': 4301941, 'mtr_portfolio_id': 29880964, 'created_at': datetime.datetime(2026, 1, 2, 9, 32, 58), 'result': '0.034355635543217904', 'result_long': None, 'result_double': None}] Qualite : 0.034355635543217904 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29880964 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29880964_02-01-2026_09_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29880964 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_P29880964_02-01-2026_09_32_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29880989, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29880990, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29880991, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29880992, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29880993, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29880994, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29880995, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29880996, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29880997, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29880998, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29880999, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29881000, 'pht': 3726}}" where mtr_portfolio_id = 29880964 and dashboard_run_id = 2839088 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`=29880964 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939351, 0.034355635543217904, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29880964_02-01-2026_09_32_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29880989, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29880990, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29880991, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29880992, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29880993, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29880994, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29880995, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29880996, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29880997, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29880998, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29880999, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29881000, '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 = 29882264 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': 4302074, 'mtr_portfolio_id': 29882264, 'created_at': datetime.datetime(2026, 1, 2, 9, 46, 58), 'result': '0.055925634359195155', 'result_long': None, 'result_double': None}] Qualite : 0.055925634359195155 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29882264 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29882264_02-01-2026_09_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29882264 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_P29882264_02-01-2026_09_46_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29882286, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29882287, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29882288, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29882289, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29882290, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29882291, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29882292, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29882293, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29882294, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29882295, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29882296, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29882297, 'pht': 3726}}" where mtr_portfolio_id = 29882264 and dashboard_run_id = 2839088 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`=29882264 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939352, 0.055925634359195155, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29882264_02-01-2026_09_46_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29882286, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29882287, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29882288, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29882289, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29882290, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29882291, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29882292, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29882293, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29882294, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29882295, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29882296, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29882297, '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 = 29882750 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': 4302114, 'mtr_portfolio_id': 29882750, 'created_at': datetime.datetime(2026, 1, 2, 10, 3), 'result': '0.04812454678514593', 'result_long': None, 'result_double': None}] Qualite : 0.04812454678514593 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29882750 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29882750_02-01-2026_10_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29882750 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_P29882750_02-01-2026_10_03_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29882754, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29882755, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29882756, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29882757, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29882758, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29882759, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29882760, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29882761, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29882762, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29882763, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29882764, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29882765, 'pht': 3726}}" where mtr_portfolio_id = 29882750 and dashboard_run_id = 2839088 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`=29882750 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939353, 0.04812454678514593, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29882750_02-01-2026_10_03_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29882754, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29882755, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29882756, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29882757, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29882758, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29882759, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29882760, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29882761, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29882762, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29882763, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29882764, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29882765, '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 = 29883285 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': 4302179, 'mtr_portfolio_id': 29883285, 'created_at': datetime.datetime(2026, 1, 2, 10, 16, 59), 'result': '0.05391099478832504', 'result_long': None, 'result_double': None}] Qualite : 0.05391099478832504 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29883285 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29883285_02-01-2026_10_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29883285 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_P29883285_02-01-2026_10_17_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29883321, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29883322, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29883323, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29883324, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29883325, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29883326, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29883327, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29883328, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29883329, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29883330, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29883331, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29883332, 'pht': 3726}}" where mtr_portfolio_id = 29883285 and dashboard_run_id = 2839088 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`=29883285 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939354, 0.05391099478832504, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29883285_02-01-2026_10_17_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29883321, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29883322, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29883323, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29883324, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29883325, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29883326, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29883327, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29883328, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29883329, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29883330, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29883331, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29883332, '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 = 29883844 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': 4302271, 'mtr_portfolio_id': 29883844, 'created_at': datetime.datetime(2026, 1, 2, 10, 32, 57), 'result': '0.05451822525507153', 'result_long': None, 'result_double': None}] Qualite : 0.05451822525507153 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29883844 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29883844_02-01-2026_10_32_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29883844 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_P29883844_02-01-2026_10_32_57.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29883853, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29883854, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29883855, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29883856, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29883857, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29883858, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29883859, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29883860, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29883861, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29883862, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29883863, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29883864, 'pht': 3726}}" where mtr_portfolio_id = 29883844 and dashboard_run_id = 2839088 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`=29883844 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939355, 0.05451822525507153, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29883844_02-01-2026_10_32_57.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29883853, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29883854, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29883855, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29883856, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29883857, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29883858, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29883859, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29883860, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29883861, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29883862, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29883863, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29883864, '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 = 29885052 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': 4302410, 'mtr_portfolio_id': 29885052, 'created_at': datetime.datetime(2026, 1, 2, 11, 3), 'result': '0.04917771762162418', 'result_long': None, 'result_double': None}] Qualite : 0.04917771762162418 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29885052 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29885052_02-01-2026_11_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29885052 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_P29885052_02-01-2026_11_03_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29885054, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29885055, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29885056, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29885057, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29885058, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29885059, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29885060, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29885061, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29885062, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29885063, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29885064, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29885065, 'pht': 3726}}" where mtr_portfolio_id = 29885052 and dashboard_run_id = 2839088 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`=29885052 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939356, 0.04917771762162418, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29885052_02-01-2026_11_03_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29885054, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29885055, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29885056, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29885057, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29885058, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29885059, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29885060, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29885061, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29885062, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29885063, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29885064, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29885065, '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 = 29885399 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': 4302470, 'mtr_portfolio_id': 29885399, 'created_at': datetime.datetime(2026, 1, 2, 11, 19, 29), 'result': '0.05354351654812283', 'result_long': None, 'result_double': None}] Qualite : 0.05354351654812283 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29885399 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29885399_02-01-2026_11_19_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29885399 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_P29885399_02-01-2026_11_19_30.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29885444, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29885445, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29885446, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29885447, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29885448, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29885449, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29885450, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29885451, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29885452, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29885453, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29885454, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29885455, 'pht': 3726}}" where mtr_portfolio_id = 29885399 and dashboard_run_id = 2839088 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`=29885399 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939357, 0.05354351654812283, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29885399_02-01-2026_11_19_30.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29885444, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29885445, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29885446, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29885447, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29885448, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29885449, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29885450, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29885451, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29885452, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29885453, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29885454, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29885455, '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 = 29886087 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': 4302556, 'mtr_portfolio_id': 29886087, 'created_at': datetime.datetime(2026, 1, 2, 11, 33, 1), 'result': '0.08963982782625529', 'result_long': None, 'result_double': None}] Qualite : 0.08963982782625529 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29886087 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29886087_02-01-2026_11_33_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29886087 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_P29886087_02-01-2026_11_33_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29886092, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29886093, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29886094, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29886095, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29886096, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29886097, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29886098, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29886099, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29886100, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29886101, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29886102, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29886103, 'pht': 3726}}" where mtr_portfolio_id = 29886087 and dashboard_run_id = 2839088 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`=29886087 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939358, 0.08963982782625529, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29886087_02-01-2026_11_33_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29886092, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29886093, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29886094, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29886095, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29886096, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29886097, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29886098, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29886099, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29886100, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29886101, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29886102, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29886103, '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 = 29886560 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': 4302616, 'mtr_portfolio_id': 29886560, 'created_at': datetime.datetime(2026, 1, 2, 11, 46, 58), 'result': '0.09058900617271963', 'result_long': None, 'result_double': None}] Qualite : 0.09058900617271963 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29886560 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29886560_02-01-2026_11_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29886560 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_P29886560_02-01-2026_11_46_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29886572, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29886573, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29886574, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29886575, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29886576, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29886577, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29886578, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29886579, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29886580, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29886581, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29886582, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29886583, 'pht': 3726}}" where mtr_portfolio_id = 29886560 and dashboard_run_id = 2839090 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`=29886560 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939359, 0.09058900617271963, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29886560_02-01-2026_11_46_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29886572, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29886573, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29886574, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29886575, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29886576, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29886577, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29886578, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29886579, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29886580, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29886581, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29886582, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29886583, '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 = 29887236 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': 4302693, 'mtr_portfolio_id': 29887236, 'created_at': datetime.datetime(2026, 1, 2, 12, 2, 57), 'result': '0.04614894091967786', 'result_long': None, 'result_double': None}] Qualite : 0.04614894091967786 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29887236 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29887236_02-01-2026_12_02_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29887236 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_P29887236_02-01-2026_12_02_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29887240, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29887241, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29887242, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29887243, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29887244, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29887245, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29887246, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29887247, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29887248, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29887249, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29887250, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29887251, 'pht': 3726}}" where mtr_portfolio_id = 29887236 and dashboard_run_id = 2839090 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`=29887236 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939360, 0.04614894091967786, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29887236_02-01-2026_12_02_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29887240, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29887241, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29887242, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29887243, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29887244, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29887245, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29887246, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29887247, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29887248, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29887249, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29887250, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29887251, '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 = 29887673 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': 4302771, 'mtr_portfolio_id': 29887673, 'created_at': datetime.datetime(2026, 1, 2, 12, 17), 'result': '0.053007170289858296', 'result_long': None, 'result_double': None}] Qualite : 0.053007170289858296 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29887673 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29887673_02-01-2026_12_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29887673 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_P29887673_02-01-2026_12_17_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29887690, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29887691, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29887692, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29887693, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29887694, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29887695, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29887696, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29887697, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29887698, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29887699, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29887700, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29887701, 'pht': 3726}}" where mtr_portfolio_id = 29887673 and dashboard_run_id = 2839090 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`=29887673 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18939361, 0.053007170289858296, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29887673_02-01-2026_12_17_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29887690, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29887691, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29887692, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29887693, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29887694, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29887695, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29887696, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29887697, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29887698, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29887699, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29887700, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29887701, '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 = 29888232 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 = 29888232 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 = 29888232 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29888232 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 = 29888232 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 = 29888232 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29888232_02-01-2026_12_18_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29888232 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_P29888232_02-01-2026_12_18_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29888240, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29888241, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29888242, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29888243, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29888244, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29888245, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29888246, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29888247, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29888248, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29888249, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29888250, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29888251, 'pht': 3726}}" where mtr_portfolio_id = 29888232 and dashboard_run_id = 2839090 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29875698,29875852,29876194,29876652,29876801,29877372,29878166,29879046,29879603,29880964,29882264,29882750,29883285,29883844,29885052,29885399,29886087,29886560,29887236,29887673,29888232) result : ((1402107997,), (1402108121,), (1402108122,), (1402108136,), (1402108137,), (1402108139,), (1402108157,), (1402108158,), (1402108174,), (1402108176,), (1402108178,), (1402108195,), (1402108197,), (1402108198,), (1402108199,), (1402108223,), (1402108221,), (1402108243,), (1402108244,), (1402108245,), (1402108246,), (1402108250,), (1402108280,), (1402108282,), (1402108284,), (1402108309,), (1402108310,), (1402108311,), (1402108312,), (1402108316,), (1402108342,), (1402108344,), (1402108346,), (1402108349,), (1402108352,), (1402108355,), (1402108362,), (1402108363,), (1402108364,), (1402108369,), (1402108371,), (1402108372,), (1402108396,), (1402108397,), (1402108398,), (1402108399,), (1402108417,), (1402108419,), (1402108440,), (1402108441,), (1402108442,), (1402108464,), (1402108466,), (1402108489,), (1402108491,), (1402108493,), (1402108495,), (1402108499,), (1402108515,), (1402108517,), (1402108518,), (1402108519,), (1402108546,), (1402108547,), (1402108549,), (1402108552,), (1402108555,), (1402108568,), (1402108570,), (1402108572,), (1402108601,), (1402108603,), (1402108628,), (1402108625,), (1402108626,), (1402108646,), (1402108648,), (1402108665,), (1402108666,), (1402108690,), (1402108691,), (1402108693,), (1402108717,), (1402108718,), (1402108719,), (1402108744,), (1402108746,), (1402108769,), (1402108771,), (1402108774,), (1402108794,), (1402108798,), (1402108801,), (1402108805,), (1402108809,), (1402108819,), (1402108821,), (1402108823,), (1402108846,), (1402108847,), (1402108848,), (1402108849,), (1402108851,), (1402108853,), (1402108872,), (1402108874,), (1402108876,), (1402108897,), (1402108899,), (1402108900,), (1402108902,), (1402108924,), (1402109147,), (1402109145,), (1402109179,), (1402109180,), (1402109198,), (1402109199,), (1402109200,), (1402109221,), (1402109223,), (1402109224,), (1402109237,), (1402109239,), (1402109242,), (1402109245,), (1402109261,), (1402109264,), (1402109268,), (1402109273,), (1402109277,), (1402109308,), (1402109344,), (1402109388,), (1402110195,), (1402110146,), (1402110174,), (1402110184,), (1402110362,), (1402110363,), (1402110364,), (1402110365,), (1402110367,), (1402110382,), (1402110384,), (1402110387,), (1402110391,), (1402110408,), (1402110410,), (1402110412,), (1402110415,), (1402110438,), (1402110441,), (1402110442,), (1402110444,), (1402110616,), (1402110632,), (1402110636,), (1402110638,), (1402110642,), (1402110655,), (1402110657,), (1402110678,), (1402110679,), (1402110680,), (1402110682,), (1402110697,), (1402110699,), (1402110711,), (1402110830,), (1402110835,), (1402110846,), (1402110854,), (1402110883,), (1402110887,), (1402110889,), (1402110902,), (1402110950,), (1402110954,), (1402110977,), (1402110978,), (1402110980,), (1402110982,), (1402110985,), (1402110988,), (1402111007,), (1402111009,), (1402111012,), (1402111015,), (1402111035,), (1402111037,), (1402111039,), (1402111041,), (1402111043,), (1402111079,), (1402111074,), (1402111075,), (1402111077,), (1402111095,), (1402111097,), (1402111104,), (1402111131,), (1402111142,), (1402111174,), (1402111211,), (1402111246,), (1402111324,), (1402111325,), (1402111326,), (1402111328,), (1402111332,), (1402111448,), (1402111463,), (1402111466,), (1402111526,), (1402111568,), (1402111601,), (1402111671,), (1402111677,), (1402111712,), (1402111736,), (1402111737,), (1402111741,), (1402111773,), (1402111775,), (1402111777,), (1402111779,), (1402111783,), (1402111858,), (1402111890,), (1402111901,), (1402111915,), (1402112101,), (1402112143,), (1402112173,), (1402112206,), (1402112304,), (1402112305,), (1402112306,), (1402112323,), (1402112325,), (1402112327,), (1402112329,), (1402112353,), (1402112354,), (1402112356,), (1402112368,), (1402112734,), (1402112736,), (1402112737,), (1402112759,), (1402112790,), (1402113028,), (1402113069,), (1402113083,), (1402113084,), (1402113146,), (1402113153,), (1402113165,), (1402113223,), (1402113213,), (1402113214,), (1402113216,), (1402113219,), (1402113433,), (1402113512,), (1402113520,), (1402113560,), (1402113576,), (1402113658,), (1402113659,), (1402113661,), (1402113684,), (1402113712,), (1402113714,), (1402113717,), (1402113736,), (1402113745,), (1402113967,), (1402113969,), (1402113971,), (1402114131,), (1402114174,), (1402114175,), (1402114216,), (1402114302,), (1402114303,), (1402114305,), (1402114307,), (1402114617,), (1402114644,), (1402114648,), (1402114652,), (1402114687,), (1402114712,), (1402114741,), (1402114743,), (1402114761,), (1402114846,), (1402114848,), (1402114850,), (1402114853,), (1402114867,), (1402114869,), (1402114877,), (1402115241,), (1402115256,), (1402115288,), (1402115306,), (1402115325,), (1402115326,), (1402115328,), (1402115331,), (1402115445,), (1402115447,), (1402115471,), (1402115499,), (1402115500,), (1402115503,), (1402115504,), (1402115508,), (1402115545,), (1402115532,), (1402115534,), (1402115537,), (1402115539,), (1402115542,), (1402115734,), (1402115735,), (1402115767,), (1402116105,), (1402116106,), (1402116108,), (1402116110,), (1402116138,), (1402116139,), (1402116141,), (1402116142,), (1402116162,), (1402116164,), (1402116167,), (1402116186,), (1402116340,), (1402116356,), (1402116357,), (1402116360,), (1402116398,), (1402116400,), (1402116424,), (1402116425,), (1402116426,), (1402116428,), (1402116443,), (1402116445,), (1402116447,), (1402116475,), (1402116476,), (1402116478,), (1402116480,), (1402116612,), (1402116615,), (1402116618,), (1402116642,), (1402116647,), (1402116651,), (1402116635,), (1402116637,), (1402116639,), (1402116679,), (1402116701,), (1402116732,), (1402117153,), (1402117191,), (1402117249,), (1402117315,), (1402117374,), (1402117436,), (1402117879,), (1402117880,), (1402117882,), (1402118318,), (1402118426,), (1402118428,), (1402118429,), (1402118448,), (1402118450,), (1402118479,), (1402118501,), (1402118502,), (1402118504,), (1402118570,), (1402118572,), (1402118592,), (1402118593,), (1402118619,), (1402118625,), (1402118628,), (1402118642,), (1402118644,), (1402118645,), (1402118864,), (1402120314,), (1402120321,), (1402120689,), (1402120721,), (1402120797,), (1402120799,), (1402120821,), (1402121078,), (1402121080,), (1402121298,), (1402121312,), (1402121317,), (1402121329,), (1402121343,), (1402121469,), (1402121471,), (1402121544,), (1402121741,), (1402121742,), (1402121800,), (1402121809,), (1402126312,), (1402126560,), (1402126566,), (1402126568,), (1402126571,), (1402126674,), (1402126688,), (1402126745,), (1402126765,), (1402126771,), (1402126788,), (1402127066,), (1402127092,), (1402127093,), (1402127157,), (1402127162,), (1402127164,), (1402127167,), (1402127170,), (1402127172,), (1402127183,), (1402127184,), (1402127185,), (1402127213,), (1402127216,), (1402127218,), (1402127220,), (1402127223,), (1402127263,), (1402127264,), (1402127265,), (1402127701,), (1402127733,), (1402127766,), (1402127799,), (1402128190,), (1402128224,), (1402128230,), (1402128232,), (1402128408,), (1402128447,), (1402128481,), (1402128505,), (1402128752,), (1402128786,), (1402128829,), (1402128853,), (1402129170,), (1402129134,), (1402129324,), (1402129357,), (1402129408,), (1402129409,), (1402129411,), (1402129414,), (1402129438,), (1402129439,), (1402129441,), (1402129444,), (1402129728,), (1402129758,), (1402129795,), (1402129798,), (1402129801,), (1402129804,), (1402129814,), (1402129815,), (1402129817,), (1402129852,), (1402129853,), (1402129855,), (1402129870,), (1402129871,), (1402129890,), (1402129892,), (1402129894,), (1402129918,), (1402129920,), (1402129923,), (1402129942,), (1402129965,), (1402129967,), (1402129969,), (1402129972,), (1402129975,), (1402130059,), (1402130069,), (1402130079,), (1402130117,), (1402130119,), (1402130120,), (1402130122,), (1402130125,), (1402130890,), (1402130958,), (1402131023,), (1402131069,), (1402131160,), (1402131294,), (1402131356,), (1402131361,), (1402131383,), (1402131679,), (1402131651,), (1402131673,), (1402131676,), (1402131805,), (1402131810,), (1402131812,), (1402131851,), (1402131995,), (1402131996,), (1402131998,), (1402132025,), (1402132026,), (1402132027,), (1402132030,), (1402132061,), (1402132062,), (1402132064,), (1402132067,), (1402132096,), (1402132098,), (1402132100,), (1402132103,), (1402132107,), (1402132138,), (1402132139,), (1402132141,), (1402132262,), (1402132273,), (1402132275,), (1402132278,), (1402132295,), (1402132296,), (1402132297,), (1402132396,), (1402132436,), (1402132470,), (1402132502,), (1402132657,), (1402132697,), (1402132698,), (1402132701,), (1402132714,), (1402132716,), (1402132720,), (1402132770,), (1402132771,), (1402132794,), (1402132795,), (1402132797,), (1402132799,), (1402132802,), (1402132805,), (1402132954,), (1402132987,), (1402133014,), (1402133017,), (1402133063,), (1402133057,), (1402133058,), (1402133059,), (1402133060,), (1402133198,), (1402133200,), (1402133202,), (1402133205,), (1402133223,), (1402133225,), (1402133227,), (1402133229,), (1402133232,), (1402133391,), (1402133398,), (1402133399,), (1402133400,), (1402133403,), (1402133429,), (1402133547,), (1402133550,), (1402133552,), (1402133555,), (1402133558,), (1402133560,), (1402133566,), (1402133568,), (1402133570,), (1402133572,), (1402133574,), (1402133577,), (1402133578,), (1402133581,), (1402133584,), (1402133590,), (1402133593,), (1402133610,), (1402133612,), (1402133614,), (1402133617,), (1402133669,), (1402133670,), (1402133679,), (1402133681,), (1402133684,), (1402133686,), (1402133737,), (1402133739,), (1402133742,), (1402133745,), (1402133798,), (1402133799,), (1402133800,), (1402133802,), (1402133805,), (1402133807,), (1402133828,), (1402133830,), (1402133832,), (1402133835,), (1402133838,), (1402133855,), (1402133856,), (1402133857,), (1402133858,), (1402133862,), (1402133864,), (1402133910,), (1402133912,), (1402133914,), (1402133917,), (1402133921,), (1402133935,), (1402133971,), (1402133973,), (1402134017,), (1402134899,), (1402134929,), (1402134931,), (1402134933,), (1402134935,), (1402134938,), (1402134962,), (1402135006,), (1402135008,), (1402135010,), (1402135044,), (1402135045,), (1402135046,), (1402135048,), (1402135150,), (1402135152,), (1402135154,), (1402135157,), (1402135201,), (1402135202,), (1402135204,), (1402135211,), (1402135292,), (1402135295,), (1402135297,), (1402135316,), (1402135318,), (1402135320,), (1402135323,), (1402135397,), (1402135427,), (1402135458,), (1402136052,), (1402136087,), (1402136124,), (1402136158,), (1402136160,), (1402136163,), (1402136367,), (1402136359,), (1402136362,), (1402136365,), (1402136383,), (1402136386,), (1402136388,), (1402136390,), (1402136393,), (1402136407,), (1402136408,), (1402136409,), (1402136410,), (1402136412,), (1402137035,), (1402137045,), (1402137089,), (1402137175,), (1402137422,), (1402137453,), (1402137487,), (1402137520,), (1402137554,), (1402137930,), (1402137963,), (1402137995,), (1402138028,), (1402138221,), (1402138257,), (1402138294,), (1402138612,), (1402138618,), (1402138626,), (1402138641,), (1402138706,), (1402138708,), (1402138758,), (1402138759,), (1402138760,), (1402138761,), (1402138763,), (1402138765,), (1402138819,), (1402138826,), (1402138828,), (1402138919,), (1402138962,), (1402139009,), (1402139270,), (1402139272,), (1402139273,), (1402139373,), (1402139374,), (1402139480,), (1402139501,), (1402139503,), (1402139545,), (1402139546,), (1402139547,), (1402139549,), (1402139552,), (1402139567,), (1402139572,), (1402139576,), (1402139580,), (1402139583,), (1402140125,), (1402140128,), (1402140130,), (1402140177,), (1402140179,), (1402140183,), (1402140186,), (1402140427,), (1402140430,), (1402140586,), (1402140587,), (1402140588,), (1402140589,), (1402140620,), (1402140622,), (1402140624,), (1402140627,), (1402140682,), (1402140654,), (1402140656,), (1402140709,), (1402140711,), (1402140712,), (1402140715,), (1402140727,), (1402140729,), (1402140732,), (1402140735,), (1402140739,), (1402140760,), (1402140763,), (1402140766,), (1402140767,), (1402140771,), (1402140802,), (1402140804,), (1402140806,), (1402140935,), (1402140988,), (1402140989,), (1402141011,), (1402141012,), (1402141059,), (1402141068,), (1402141075,), (1402141090,), (1402141212,), (1402141244,), (1402141276,), (1402141310,), (1402141344,), (1402141345,), (1402141346,), (1402141461,), (1402141498,), (1402141511,), (1402141525,), (1402141526,), (1402141528,), (1402141530,), (1402141533,), (1402141536,), (1402141593,), (1402141600,), (1402141602,), (1402141611,), (1402141804,), (1402141810,), (1402141812,), (1402141827,), (1402142064,), (1402142062,), (1402142572,), (1402142575,), (1402142578,), (1402142605,), (1402142667,), (1402142677,), (1402142684,), (1402142686,), (1402142807,), (1402142808,), (1402142830,), (1402142835,), (1402142838,), (1402142841,), (1402142865,), (1402143187,), (1402143189,), (1402143192,), (1402143210,), (1402143212,), (1402143236,), (1402143237,), (1402143238,), (1402143240,), (1402143256,), (1402143258,), (1402143260,), (1402143263,), (1402143311,), (1402143312,), (1402143314,), (1402143318,), (1402143324,), (1402143360,), (1402143364,), (1402143367,), (1402143378,), (1402143379,), (1402143558,), (1402143420,), (1402143527,), (1402143964,), (1402144364,), (1402144373,), (1402144395,), (1402144420,), (1402144568,), (1402144603,), (1402144623,), (1402144652,), (1402145039,), (1402145072,), (1402145103,), (1402145415,), (1402145430,), (1402145440,), (1402145442,), (1402145934,), (1402145971,), (1402146196,), (1402146207,), (1402146227,), (1402146238,), (1402146259,), (1402146260,), (1402146261,), (1402146262,), (1402146313,), (1402146471,), (1402146478,), (1402146805,), (1402146807,), (1402146809,), (1402146904,), (1402147135,), (1402147133,), (1402147134,), (1402147151,), (1402147152,), (1402147154,), (1402147157,), (1402147161,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'02012026': {'nb_upload': 7, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29888232]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1402147161, 1402147157, 1402147154, 1402147152, 1402147151] map_info['map_portfolio_photo'] : {29888232: [1402147161, 1402147157, 1402147154, 1402147152, 1402147151, 1402147134, 1402147133]} final : True mtd_id 4302 list_pids : [1402147161, 1402147157, 1402147154, 1402147152, 1402147151] Looping around the photos to save general results len do output : 1 /29888232Didn'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, '4302831') ('4302', '29888232', '1402147161', None, None, None, None, None, '4302831') ('4302', None, None, None, None, None, None, None, '4302831') ('4302', '29888232', '1402147157', None, None, None, None, None, '4302831') ('4302', None, None, None, None, None, None, None, '4302831') ('4302', '29888232', '1402147154', None, None, None, None, None, '4302831') ('4302', None, None, None, None, None, None, None, '4302831') ('4302', '29888232', '1402147152', None, None, None, None, None, '4302831') ('4302', None, None, None, None, None, None, None, '4302831') ('4302', '29888232', '1402147151', None, None, None, None, None, '4302831') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '29888232', 'None', None, None, None, None, '4302831'), ('4302', '29888232', '1402147161', None, None, None, None, None, '4302831'), ('4302', '29888232', '1402147157', None, None, None, None, None, '4302831'), ('4302', '29888232', '1402147154', None, None, None, None, None, '4302831'), ('4302', '29888232', '1402147152', None, None, None, None, None, '4302831'), ('4302', '29888232', '1402147151', None, None, None, None, None, '4302831')] time used for this insertion : 0.014048337936401367 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.682063341140747 time spend to save output : 0.014223098754882812 total time spend for step 5 : 1.6962864398956299 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 (4302831) 1.95user 2.42system 0:07.46elapsed 58%CPU (0avgtext+0avgdata 164708maxresident)k 584inputs+3000outputs (14major+66827minor)pagefaults 0swaps