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 : 2219024 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 (4320307) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4320307) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 30006862 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4320307'] with mtr_portfolio_ids : ['30006862'] and first list_photo_ids : [] new path : /proc/2219024/ Name: python3 Umask: 0002 State: R (running) Tgid: 2219024 Ngid: 0 Pid: 2219024 PPid: 2219023 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2219024 NSpid: 2219024 NSpgid: 2217828 NSsid: 2217828 VmPeak: 1113368 kB VmSize: 1113368 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 106260 kB VmRSS: 106260 kB RssAnon: 66296 kB RssFile: 39964 kB RssShmem: 0 kB VmData: 872096 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130476 kB VmPTE: 608 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: 43 nonvoluntary_ctxt_switches: 90 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2219024', 'Ngid': '0', 'Pid': '2219024', 'PPid': '2219023', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2219024', 'NSpid': '2219024', 'NSpgid': '2217828', 'NSsid': '2217828', 'VmPeak': '1113368 kB', 'VmSize': '1113368 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '106260 kB', 'VmRSS': '106260 kB', 'RssAnon': '66296 kB', 'RssFile': '39964 kB', 'RssShmem': '0 kB', 'VmData': '872096 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130476 kB', 'VmPTE': '608 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': '43', 'nonvoluntary_ctxt_switches': '90'} ('datou_batch_current', '2219024', '1113368', '0', '1113368', '872096', '106260', b'', 'marlene', '4320307') 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 (30006862) 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 (4320307 ) ) 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 (30006862) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1402745049, 'portfolio_id': 30006862}, {'photo_id': 1402745047, 'portfolio_id': 30006862}, {'photo_id': 1402745045, 'portfolio_id': 30006862}, {'photo_id': 1402745044, 'portfolio_id': 30006862}, {'photo_id': 1402745006, 'portfolio_id': 30006862}, {'photo_id': 1402745002, 'portfolio_id': 30006862}, {'photo_id': 1402744998, 'portfolio_id': 30006862}, {'photo_id': 1402744993, 'portfolio_id': 30006862}, {'photo_id': 1402744990, 'portfolio_id': 30006862}, {'photo_id': 1402744988, 'portfolio_id': 30006862}, {'photo_id': 1402744956, 'portfolio_id': 30006862}, {'photo_id': 1402744954, 'portfolio_id': 30006862}, {'photo_id': 1402744951, 'portfolio_id': 30006862}, {'photo_id': 1402744944, 'portfolio_id': 30006862}, {'photo_id': 1402744903, 'portfolio_id': 30006862}, {'photo_id': 1402744900, 'portfolio_id': 30006862}, {'photo_id': 1402744898, 'portfolio_id': 30006862}, {'photo_id': 1402744885, 'portfolio_id': 30006862}, {'photo_id': 1402744882, 'portfolio_id': 30006862}, {'photo_id': 1402744879, 'portfolio_id': 30006862}, {'photo_id': 1402744876, 'portfolio_id': 30006862}, {'photo_id': 1402744873, 'portfolio_id': 30006862}, {'photo_id': 1402744853, 'portfolio_id': 30006862}, {'photo_id': 1402744849, 'portfolio_id': 30006862}, {'photo_id': 1402744845, 'portfolio_id': 30006862}, {'photo_id': 1402744841, 'portfolio_id': 30006862}, {'photo_id': 1402744834, 'portfolio_id': 30006862}, {'photo_id': 1402744774, 'portfolio_id': 30006862}, {'photo_id': 1402744772, 'portfolio_id': 30006862}, {'photo_id': 1402744770, 'portfolio_id': 30006862}, {'photo_id': 1402744768, 'portfolio_id': 30006862}, {'photo_id': 1402744746, 'portfolio_id': 30006862}, {'photo_id': 1402744744, 'portfolio_id': 30006862}] map_portfolio_id_photo_id: {30006862: [1402745049, 1402745047, 1402745045, 1402745044, 1402745006, 1402745002, 1402744998, 1402744993, 1402744990, 1402744988, 1402744956, 1402744954, 1402744951, 1402744944, 1402744903, 1402744900, 1402744898, 1402744885, 1402744882, 1402744879, 1402744876, 1402744873, 1402744853, 1402744849, 1402744845, 1402744841, 1402744834, 1402744774, 1402744772, 1402744770, 1402744768, 1402744746, 1402744744]} ##### 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.019093751907348633 #### 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 Wed Jan 7 04:38:58 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 (30006862) 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 : 30006862 get user id for portfolio 30006862 get sub ptf for main ptf 30006862, type 3726 and hashtags ['mal_croppe', 'Carton_gris', 'metal', 'Teint_Dans_La_Masse', 'Carton_brun', 'cartonnette', 'environnement', 'flou', 'papier', 'plastique', 'kraft', 'autre_refus'] 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`=30006862 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','Carton_gris','metal','Teint_Dans_La_Masse','Carton_brun','cartonnette','environnement','flou','papier','plastique','kraft','autre_refus')) 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`=30006862 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','Carton_gris','metal','Teint_Dans_La_Masse','Carton_brun','cartonnette','environnement','flou','papier','plastique','kraft','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 30006862, 'sub_port_id': 30006912, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537209, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 27)}, 'metal': {'main_port_id': 30006862, 'sub_port_id': 30006913, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537210, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 27)}, 'cartonnette': {'main_port_id': 30006862, 'sub_port_id': 30006914, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537211, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 27)}, 'kraft': {'main_port_id': 30006862, 'sub_port_id': 30006915, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537212, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 27)}, 'mal_croppe': {'main_port_id': 30006862, 'sub_port_id': 30006916, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537213, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 27)}, 'papier': {'main_port_id': 30006862, 'sub_port_id': 30006917, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537214, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 27)}, 'environnement': {'main_port_id': 30006862, 'sub_port_id': 30006918, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537215, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 27)}, 'plastique': {'main_port_id': 30006862, 'sub_port_id': 30006919, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537216, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 27)}, 'autre_refus': {'main_port_id': 30006862, 'sub_port_id': 30006920, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537217, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 27)}, 'Carton_brun': {'main_port_id': 30006862, 'sub_port_id': 30006921, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537218, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 27)}, 'Carton_gris': {'main_port_id': 30006862, 'sub_port_id': 30006922, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537219, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 27)}, 'flou': {'main_port_id': 30006862, 'sub_port_id': 30006923, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537220, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 36, 57), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 30006912 , 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=30006862 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 (30006912) result : ((1402745009,), (1402745010,), (1402745011,), (1402745012,), (1402745013,), (1402745014,), (1402745018,), (1402745019,), (1402745020,), (1402745035,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (30006862) result : ((1402744744,), (1402744746,), (1402744768,), (1402744770,), (1402744772,), (1402744774,), (1402744834,), (1402744841,), (1402744845,), (1402744849,), (1402744853,), (1402744873,), (1402744876,), (1402744879,), (1402744882,), (1402744885,), (1402744898,), (1402744900,), (1402744903,), (1402744944,), (1402744951,), (1402744954,), (1402744956,), (1402744988,), (1402744990,), (1402744993,), (1402744998,), (1402745002,), (1402745006,), (1402745044,), (1402745045,), (1402745047,), (1402745049,)) 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 (1402744900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 30006913 , 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=30006862 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 (30006913) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (30006862) result : ((1402744744,), (1402744746,), (1402744768,), (1402744770,), (1402744772,), (1402744774,), (1402744834,), (1402744841,), (1402744845,), (1402744849,), (1402744853,), (1402744873,), (1402744876,), (1402744879,), (1402744882,), (1402744885,), (1402744898,), (1402744900,), (1402744903,), (1402744944,), (1402744951,), (1402744954,), (1402744956,), (1402744988,), (1402744990,), (1402744993,), (1402744998,), (1402745002,), (1402745006,), (1402745044,), (1402745045,), (1402745047,), (1402745049,)) 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 (1402744900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 30006914 , 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=30006862 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 (30006914) result : ((1402745027,), (1402745028,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (30006862) result : ((1402744744,), (1402744746,), (1402744768,), (1402744770,), (1402744772,), (1402744774,), (1402744834,), (1402744841,), (1402744845,), (1402744849,), (1402744853,), (1402744873,), (1402744876,), (1402744879,), (1402744882,), (1402744885,), (1402744898,), (1402744900,), (1402744903,), (1402744944,), (1402744951,), (1402744954,), (1402744956,), (1402744988,), (1402744990,), (1402744993,), (1402744998,), (1402745002,), (1402745006,), (1402745044,), (1402745045,), (1402745047,), (1402745049,)) 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 (1402744900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 30006915 , 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=30006862 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 (30006915) result : ((1402745040,), (1402745041,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (30006862) result : ((1402744744,), (1402744746,), (1402744768,), (1402744770,), (1402744772,), (1402744774,), (1402744834,), (1402744841,), (1402744845,), (1402744849,), (1402744853,), (1402744873,), (1402744876,), (1402744879,), (1402744882,), (1402744885,), (1402744898,), (1402744900,), (1402744903,), (1402744944,), (1402744951,), (1402744954,), (1402744956,), (1402744988,), (1402744990,), (1402744993,), (1402744998,), (1402745002,), (1402745006,), (1402745044,), (1402745045,), (1402745047,), (1402745049,)) 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 (1402744900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 30006916 , 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=30006862 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 (30006916) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (30006862) result : ((1402744744,), (1402744746,), (1402744768,), (1402744770,), (1402744772,), (1402744774,), (1402744834,), (1402744841,), (1402744845,), (1402744849,), (1402744853,), (1402744873,), (1402744876,), (1402744879,), (1402744882,), (1402744885,), (1402744898,), (1402744900,), (1402744903,), (1402744944,), (1402744951,), (1402744954,), (1402744956,), (1402744988,), (1402744990,), (1402744993,), (1402744998,), (1402745002,), (1402745006,), (1402745044,), (1402745045,), (1402745047,), (1402745049,)) 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 (1402744900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 30006917 , 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=30006862 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 (30006917) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (30006862) result : ((1402744744,), (1402744746,), (1402744768,), (1402744770,), (1402744772,), (1402744774,), (1402744834,), (1402744841,), (1402744845,), (1402744849,), (1402744853,), (1402744873,), (1402744876,), (1402744879,), (1402744882,), (1402744885,), (1402744898,), (1402744900,), (1402744903,), (1402744944,), (1402744951,), (1402744954,), (1402744956,), (1402744988,), (1402744990,), (1402744993,), (1402744998,), (1402745002,), (1402745006,), (1402745044,), (1402745045,), (1402745047,), (1402745049,)) 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 (1402744900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 30006918 , 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=30006862 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 (30006918) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (30006862) result : ((1402744744,), (1402744746,), (1402744768,), (1402744770,), (1402744772,), (1402744774,), (1402744834,), (1402744841,), (1402744845,), (1402744849,), (1402744853,), (1402744873,), (1402744876,), (1402744879,), (1402744882,), (1402744885,), (1402744898,), (1402744900,), (1402744903,), (1402744944,), (1402744951,), (1402744954,), (1402744956,), (1402744988,), (1402744990,), (1402744993,), (1402744998,), (1402745002,), (1402745006,), (1402745044,), (1402745045,), (1402745047,), (1402745049,)) 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 (1402744900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 30006919 , 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=30006862 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 (30006919) result : ((1402745030,), (1402745031,), (1402745032,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (30006862) result : ((1402744744,), (1402744746,), (1402744768,), (1402744770,), (1402744772,), (1402744774,), (1402744834,), (1402744841,), (1402744845,), (1402744849,), (1402744853,), (1402744873,), (1402744876,), (1402744879,), (1402744882,), (1402744885,), (1402744898,), (1402744900,), (1402744903,), (1402744944,), (1402744951,), (1402744954,), (1402744956,), (1402744988,), (1402744990,), (1402744993,), (1402744998,), (1402745002,), (1402745006,), (1402745044,), (1402745045,), (1402745047,), (1402745049,)) 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 (1402744900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 30006920 , 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=30006862 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 (30006920) result : ((1402745016,), (1402745017,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (30006862) result : ((1402744744,), (1402744746,), (1402744768,), (1402744770,), (1402744772,), (1402744774,), (1402744834,), (1402744841,), (1402744845,), (1402744849,), (1402744853,), (1402744873,), (1402744876,), (1402744879,), (1402744882,), (1402744885,), (1402744898,), (1402744900,), (1402744903,), (1402744944,), (1402744951,), (1402744954,), (1402744956,), (1402744988,), (1402744990,), (1402744993,), (1402744998,), (1402745002,), (1402745006,), (1402745044,), (1402745045,), (1402745047,), (1402745049,)) 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 (1402744900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 30006921 , 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=30006862 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 (30006921) result : ((1402745039,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (30006862) result : ((1402744744,), (1402744746,), (1402744768,), (1402744770,), (1402744772,), (1402744774,), (1402744834,), (1402744841,), (1402744845,), (1402744849,), (1402744853,), (1402744873,), (1402744876,), (1402744879,), (1402744882,), (1402744885,), (1402744898,), (1402744900,), (1402744903,), (1402744944,), (1402744951,), (1402744954,), (1402744956,), (1402744988,), (1402744990,), (1402744993,), (1402744998,), (1402745002,), (1402745006,), (1402745044,), (1402745045,), (1402745047,), (1402745049,)) 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 (1402744900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 30006922 , 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=30006862 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 (30006922) result : ((1402745022,), (1402745023,), (1402745024,), (1402745025,), (1402745037,), (1402745038,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (30006862) result : ((1402744744,), (1402744746,), (1402744768,), (1402744770,), (1402744772,), (1402744774,), (1402744834,), (1402744841,), (1402744845,), (1402744849,), (1402744853,), (1402744873,), (1402744876,), (1402744879,), (1402744882,), (1402744885,), (1402744898,), (1402744900,), (1402744903,), (1402744944,), (1402744951,), (1402744954,), (1402744956,), (1402744988,), (1402744990,), (1402744993,), (1402744998,), (1402745002,), (1402745006,), (1402745044,), (1402745045,), (1402745047,), (1402745049,)) 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 (1402744900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 30006923 , 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=30006862 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 (30006923) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (30006862) result : ((1402744744,), (1402744746,), (1402744768,), (1402744770,), (1402744772,), (1402744774,), (1402744834,), (1402744841,), (1402744845,), (1402744849,), (1402744853,), (1402744873,), (1402744876,), (1402744879,), (1402744882,), (1402744885,), (1402744898,), (1402744900,), (1402744903,), (1402744944,), (1402744951,), (1402744954,), (1402744956,), (1402744988,), (1402744990,), (1402744993,), (1402744998,), (1402745002,), (1402745006,), (1402745044,), (1402745045,), (1402745047,), (1402745049,)) 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 (1402744900) and cspi.crop_hashtag_id = chi.id; 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`=30006862 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','Carton_gris','metal','Teint_Dans_La_Masse','Carton_brun','cartonnette','environnement','flou','papier','plastique','kraft','autre_refus')) 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`=30006862 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','Carton_gris','metal','Teint_Dans_La_Masse','Carton_brun','cartonnette','environnement','flou','papier','plastique','kraft','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 30006862, 'sub_port_id': 30006924, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537221, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 33)}, 'metal': {'main_port_id': 30006862, 'sub_port_id': 30006925, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537222, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 33)}, 'cartonnette': {'main_port_id': 30006862, 'sub_port_id': 30006926, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537223, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 33)}, 'kraft': {'main_port_id': 30006862, 'sub_port_id': 30006927, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537224, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 33)}, 'mal_croppe': {'main_port_id': 30006862, 'sub_port_id': 30006928, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537225, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 33)}, 'papier': {'main_port_id': 30006862, 'sub_port_id': 30006929, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537226, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 33)}, 'environnement': {'main_port_id': 30006862, 'sub_port_id': 30006930, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537227, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 33)}, 'plastique': {'main_port_id': 30006862, 'sub_port_id': 30006931, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537228, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 33)}, 'autre_refus': {'main_port_id': 30006862, 'sub_port_id': 30006932, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537229, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 33)}, 'Carton_brun': {'main_port_id': 30006862, 'sub_port_id': 30006933, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537230, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 33)}, 'Carton_gris': {'main_port_id': 30006862, 'sub_port_id': 30006934, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537231, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 33, 33), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 33)}, 'flou': {'main_port_id': 30006862, 'sub_port_id': 30006935, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20537232, 'last_updated_at': datetime.datetime(2026, 1, 7, 4, 36, 58), 'last_updated_at_desc': datetime.datetime(2026, 1, 7, 4, 36, 58), 'last_updated_at_asc': datetime.datetime(2026, 1, 7, 4, 33, 33)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 30006924,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 30006912 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 30006925,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 30006913 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 30006926,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 30006914 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 30006927,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 30006915 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 30006928,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 30006916 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 30006929,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 30006917 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 30006930,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 30006918 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 30006931,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 30006919 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 30006932,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 30006920 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 30006933,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 30006921 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 30006934,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 30006922 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 30006935,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 30006923 lien utilise dans velours : https://marlene.fotonower.com/velours/30006924,30006925,30006926,30006927,30006928,30006929,30006930,30006931,30006932,30006933,30006934,30006935?tags=Teint_Dans_La_Masse,metal,cartonnette,kraft,mal_croppe,papier,environnement,plastique,autre_refus,Carton_brun,Carton_gris,flou After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([30006862]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1402745049, 1402745047, 1402745045, 1402745044, 1402745006, 1402745002, 1402744998, 1402744993, 1402744990, 1402744988] map_info['map_portfolio_photo'] : {30006862: [1402745049, 1402745047, 1402745045, 1402745044, 1402745006, 1402745002, 1402744998, 1402744993, 1402744990, 1402744988, 1402744956, 1402744954, 1402744951, 1402744944, 1402744903, 1402744900, 1402744898, 1402744885, 1402744882, 1402744879, 1402744876, 1402744873, 1402744853, 1402744849, 1402744845, 1402744841, 1402744834, 1402744774, 1402744772, 1402744770, 1402744768, 1402744746, 1402744744]} final : False mtd_id 4302 list_pids : [1402745049, 1402745047, 1402745045, 1402745044, 1402745006, 1402745002, 1402744998, 1402744993, 1402744990, 1402744988] Looping around the photos to save general results len do output : 1 /30006862. 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, '4320307') ('4302', '30006862', '1402745049', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745047', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745045', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745044', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745006', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745002', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402744998', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402744993', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402744990', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402744988', None, None, None, None, None, '4320307') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 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, '30006862', "{'Teint_Dans_La_Masse': 30006912, 'metal': 30006913, 'cartonnette': 30006914, 'kraft': 30006915, 'mal_croppe': 30006916, 'papier': 30006917, 'environnement': 30006918, 'plastique': 30006919, 'autre_refus': 30006920, 'Carton_brun': 30006921, 'Carton_gris': 30006922, 'flou': 30006923}", None, None, None, None, '4320307'), ('4302', '30006862', '1402745049', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402745047', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402745045', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402745044', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402745006', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402745002', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402744998', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402744993', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402744990', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402744988', None, None, None, None, None, '4320307')] time used for this insertion : 0.016632080078125 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.572990894317627 time spend to save output : 0.01688408851623535 total time spend for step 1 : 0.5898749828338623 step2:final Wed Jan 7 04:38:58 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 (30006862) 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 30006862 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1402744746,1402744744,1402744774,1402744772,1402744770,1402744768,1402744853,1402744849,1402744845,1402744841,1402744834,1402744885,1402744882,1402744879,1402744876,1402744873,1402744903,1402744900,1402744898,1402744956,1402744954,1402744951,1402744944,1402745006,1402745002,1402744998,1402744993,1402744990,1402744988,1402745049,1402745047,1402745045,1402745044); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([30006862]) Inside saveOutput : final : False verbose : True original output for save of step final : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ('0.10701599553175228',), 1402745002: ('0.10701599553175228',), 1402744998: ('0.10701599553175228',), 1402744993: ('0.10701599553175228',), 1402744990: ('0.10701599553175228',), 1402744988: ('0.10701599553175228',)} new output for save of step final : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ('0.10701599553175228',), 1402745002: ('0.10701599553175228',), 1402744998: ('0.10701599553175228',), 1402744993: ('0.10701599553175228',), 1402744990: ('0.10701599553175228',), 1402744988: ('0.10701599553175228',)} [1402745049, 1402745047, 1402745045, 1402745044, 1402745006, 1402745002, 1402744998, 1402744993, 1402744990, 1402744988] map_info['map_portfolio_photo'] : {30006862: [1402745049, 1402745047, 1402745045, 1402745044, 1402745006, 1402745002, 1402744998, 1402744993, 1402744990, 1402744988, 1402744956, 1402744954, 1402744951, 1402744944, 1402744903, 1402744900, 1402744898, 1402744885, 1402744882, 1402744879, 1402744876, 1402744873, 1402744853, 1402744849, 1402744845, 1402744841, 1402744834, 1402744774, 1402744772, 1402744770, 1402744768, 1402744746, 1402744744]} final : False mtd_id 4302 list_pids : [1402745049, 1402745047, 1402745045, 1402745044, 1402745006, 1402745002, 1402744998, 1402744993, 1402744990, 1402744988] Looping around the photos to save general results len do output : 10 /1402745049.Didn't retrieve data . /1402745047.Didn't retrieve data . /1402745045.Didn't retrieve data . /1402745044.Didn't retrieve data . /1402745006.Didn't retrieve data . /1402745002.Didn't retrieve data . /1402744998.Didn't retrieve data . /1402744993.Didn't retrieve data . /1402744990.Didn't retrieve data . /1402744988.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, '4320307') ('4302', '30006862', '1402745049', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745047', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745045', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745044', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745006', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745002', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402744998', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402744993', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402744990', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402744988', None, None, None, None, None, '4320307') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 30 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', '30006862', '1402745049', '0.10701599553175228', None, None, None, None, '4320307'), ('4302', '30006862', '1402745047', '0.10701599553175228', None, None, None, None, '4320307'), ('4302', '30006862', '1402745045', '0.10701599553175228', None, None, None, None, '4320307'), ('4302', '30006862', '1402745044', '0.10701599553175228', None, None, None, None, '4320307'), ('4302', '30006862', '1402745006', '0.10701599553175228', None, None, None, None, '4320307'), ('4302', '30006862', '1402745002', '0.10701599553175228', None, None, None, None, '4320307'), ('4302', '30006862', '1402744998', '0.10701599553175228', None, None, None, None, '4320307'), ('4302', '30006862', '1402744993', '0.10701599553175228', None, None, None, None, '4320307'), ('4302', '30006862', '1402744990', '0.10701599553175228', None, None, None, None, '4320307'), ('4302', '30006862', '1402744988', '0.10701599553175228', None, None, None, None, '4320307')] time used for this insertion : 0.015459060668945312 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07797956466674805 time spend to save output : 0.015972137451171875 total time spend for step 2 : 0.09395170211791992 step3:velours_tree Wed Jan 7 04:38: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 : {30006862: [{'Teint_Dans_La_Masse': 30006912, 'metal': 30006913, 'cartonnette': 30006914, 'kraft': 30006915, 'mal_croppe': 30006916, 'papier': 30006917, 'environnement': 30006918, 'plastique': 30006919, 'autre_refus': 30006920, 'Carton_brun': 30006921, 'Carton_gris': 30006922, 'flou': 30006923}]} input_args_next_step : {30006862: ()} output_args : {30006862: [{'Teint_Dans_La_Masse': 30006912, 'metal': 30006913, 'cartonnette': 30006914, 'kraft': 30006915, 'mal_croppe': 30006916, 'papier': 30006917, 'environnement': 30006918, 'plastique': 30006919, 'autre_refus': 30006920, 'Carton_brun': 30006921, 'Carton_gris': 30006922, 'flou': 30006923}]} args : 30006862 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'Teint_Dans_La_Masse': 30006912, 'metal': 30006913, 'cartonnette': 30006914, 'kraft': 30006915, 'mal_croppe': 30006916, 'papier': 30006917, 'environnement': 30006918, 'plastique': 30006919, 'autre_refus': 30006920, 'Carton_brun': 30006921, 'Carton_gris': 30006922, 'flou': 30006923},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (30006862) 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([30006862]) 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.2896847724914551 time spend to save output : 4.935264587402344e-05 total time spend for step 3 : 0.2897341251373291 step4:send_mail_cod Wed Jan 7 04:38: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 : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ('0.10701599553175228',), 1402745002: ('0.10701599553175228',), 1402744998: ('0.10701599553175228',), 1402744993: ('0.10701599553175228',), 1402744990: ('0.10701599553175228',), 1402744988: ('0.10701599553175228',)} input_args_next_step : {1402745049: ()} output_args : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ('0.10701599553175228',), 1402745002: ('0.10701599553175228',), 1402744998: ('0.10701599553175228',), 1402744993: ('0.10701599553175228',), 1402744990: ('0.10701599553175228',), 1402744988: ('0.10701599553175228',)} args : 1402745049 depend.output_id : 0 input_args_next_step : {1402745049: ('0.10701599553175228',), 1402745047: ()} output_args : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ('0.10701599553175228',), 1402745002: ('0.10701599553175228',), 1402744998: ('0.10701599553175228',), 1402744993: ('0.10701599553175228',), 1402744990: ('0.10701599553175228',), 1402744988: ('0.10701599553175228',)} args : 1402745047 depend.output_id : 0 input_args_next_step : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ()} output_args : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ('0.10701599553175228',), 1402745002: ('0.10701599553175228',), 1402744998: ('0.10701599553175228',), 1402744993: ('0.10701599553175228',), 1402744990: ('0.10701599553175228',), 1402744988: ('0.10701599553175228',)} args : 1402745045 depend.output_id : 0 input_args_next_step : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ()} output_args : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ('0.10701599553175228',), 1402745002: ('0.10701599553175228',), 1402744998: ('0.10701599553175228',), 1402744993: ('0.10701599553175228',), 1402744990: ('0.10701599553175228',), 1402744988: ('0.10701599553175228',)} args : 1402745044 depend.output_id : 0 input_args_next_step : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ()} output_args : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ('0.10701599553175228',), 1402745002: ('0.10701599553175228',), 1402744998: ('0.10701599553175228',), 1402744993: ('0.10701599553175228',), 1402744990: ('0.10701599553175228',), 1402744988: ('0.10701599553175228',)} args : 1402745006 depend.output_id : 0 input_args_next_step : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ('0.10701599553175228',), 1402745002: ()} output_args : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ('0.10701599553175228',), 1402745002: ('0.10701599553175228',), 1402744998: ('0.10701599553175228',), 1402744993: ('0.10701599553175228',), 1402744990: ('0.10701599553175228',), 1402744988: ('0.10701599553175228',)} args : 1402745002 depend.output_id : 0 input_args_next_step : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ('0.10701599553175228',), 1402745002: ('0.10701599553175228',), 1402744998: ()} output_args : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ('0.10701599553175228',), 1402745002: ('0.10701599553175228',), 1402744998: ('0.10701599553175228',), 1402744993: ('0.10701599553175228',), 1402744990: ('0.10701599553175228',), 1402744988: ('0.10701599553175228',)} args : 1402744998 depend.output_id : 0 input_args_next_step : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ('0.10701599553175228',), 1402745002: ('0.10701599553175228',), 1402744998: ('0.10701599553175228',), 1402744993: ()} output_args : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ('0.10701599553175228',), 1402745002: ('0.10701599553175228',), 1402744998: ('0.10701599553175228',), 1402744993: ('0.10701599553175228',), 1402744990: ('0.10701599553175228',), 1402744988: ('0.10701599553175228',)} args : 1402744993 depend.output_id : 0 input_args_next_step : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ('0.10701599553175228',), 1402745002: ('0.10701599553175228',), 1402744998: ('0.10701599553175228',), 1402744993: ('0.10701599553175228',), 1402744990: ()} output_args : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ('0.10701599553175228',), 1402745002: ('0.10701599553175228',), 1402744998: ('0.10701599553175228',), 1402744993: ('0.10701599553175228',), 1402744990: ('0.10701599553175228',), 1402744988: ('0.10701599553175228',)} args : 1402744990 depend.output_id : 0 input_args_next_step : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ('0.10701599553175228',), 1402745002: ('0.10701599553175228',), 1402744998: ('0.10701599553175228',), 1402744993: ('0.10701599553175228',), 1402744990: ('0.10701599553175228',), 1402744988: ()} output_args : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ('0.10701599553175228',), 1402745002: ('0.10701599553175228',), 1402744998: ('0.10701599553175228',), 1402744993: ('0.10701599553175228',), 1402744990: ('0.10701599553175228',), 1402744988: ('0.10701599553175228',)} args : 1402744988 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 : {30006862: [{'Teint_Dans_La_Masse': 30006912, 'metal': 30006913, 'cartonnette': 30006914, 'kraft': 30006915, 'mal_croppe': 30006916, 'papier': 30006917, 'environnement': 30006918, 'plastique': 30006919, 'autre_refus': 30006920, 'Carton_brun': 30006921, 'Carton_gris': 30006922, 'flou': 30006923}]} input_args_next_step : {1402745049: ('0.10701599553175228',), 1402745047: ('0.10701599553175228',), 1402745045: ('0.10701599553175228',), 1402745044: ('0.10701599553175228',), 1402745006: ('0.10701599553175228',), 1402745002: ('0.10701599553175228',), 1402744998: ('0.10701599553175228',), 1402744993: ('0.10701599553175228',), 1402744990: ('0.10701599553175228',), 1402744988: ('0.10701599553175228',), 30006862: ()} output_args : {30006862: [{'Teint_Dans_La_Masse': 30006912, 'metal': 30006913, 'cartonnette': 30006914, 'kraft': 30006915, 'mal_croppe': 30006916, 'papier': 30006917, 'environnement': 30006918, 'plastique': 30006919, 'autre_refus': 30006920, 'Carton_brun': 30006921, 'Carton_gris': 30006922, 'flou': 30006923}]} args : 30006862 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 :11, first value : ('0.10701599553175228',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (30006862) 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 (1402745049,1402745047,1402745045,1402745044,1402745006,1402745002,1402744998,1402744993,1402744990,1402744988) Found this number of photos: 10 ##### Call download_photos : nb_thread : 5 begin to download photo : 1402744988 begin to download photo : 1402744998 begin to download photo : 1402745044 begin to download photo : 1402745049 download finish for photo 1402745044 download finish for photo 1402745049 begin to download photo : 1402745045 download finish for photo 1402744998 begin to download photo : 1402745002 download finish for photo 1402744988 begin to download photo : 1402744990 download finish for photo 1402745045 begin to download photo : 1402745047 download finish for photo 1402745002 begin to download photo : 1402745006 download finish for photo 1402744990 begin to download photo : 1402744993 download finish for photo 1402745047 download finish for photo 1402745006 download finish for photo 1402744993 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette300069131767757139/ length of list_filenames : 10 ; length of list_pids : 10 ; length of list_args : 10 results_Auto_P30006862_07-01-2026_04_38_59.pdf 30006913 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=30006913 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette300069131767757139 30006914 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=30006914 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1402745027: '1767756988_2302849_1402744845_e78162f0ffaf59c58ce3affe0a8983a5_rle_crop_4092345001_0.png', 1402745028: '1767757028_2307157_1402744768_e1314b688492c244d3ce3a765e7c6da2_rle_crop_4092345069_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/0aeed8fb5d0f819212b61ec8031520c5_99905385.png change filename to text .imagette300069141767757139/ imagette300069141767757139/1767756988_2302849_1402744845_e78162f0ffaf59c58ce3affe0a8983a5_rle_crop_4092345001_0.png.png imagette300069141767757139/1767757028_2307157_1402744768_e1314b688492c244d3ce3a765e7c6da2_rle_crop_4092345069_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/63c686f436482a296692efd10d90da0f_80149685.png imagette300069141767757139 30006915 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=30006915 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1402745040: '1767757047_2307566_1402744746_e6e18bd6ff0582c50390326e4360e760_rle_crop_4092345170_0.png', 1402745041: '1767757047_2307566_1402744744_94a861ab5ff23e31314f8332512b7d1e_rle_crop_4092345193_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/625170d7ad50d4b06ad28df7f7324946_69504778.png change filename to text .imagette300069151767757139/ imagette300069151767757139/1767757047_2307566_1402744744_94a861ab5ff23e31314f8332512b7d1e_rle_crop_4092345193_0.png.png imagette300069151767757139/1767757047_2307566_1402744746_e6e18bd6ff0582c50390326e4360e760_rle_crop_4092345170_0.png.png imagette300069161767757140/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/943d40226bc92c67bb0b91a003a5919b_1967303.png imagette300069151767757139 30006916 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=30006916 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette300069161767757140 30006919 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=30006919 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1402745030: '1767757028_2307157_1402744853_4e5c6cf565301b6f2ee398fd28f0f393_rle_crop_4092345027_0.png', 1402745031: '1767757028_2307157_1402744770_b8212872a3d14f989e3103cfe82129c4_rle_crop_4092345060_0.png', 1402745032: '1767757028_2307157_1402744768_e1314b688492c244d3ce3a765e7c6da2_rle_crop_4092345072_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/545e321e5fa01b1c7b88169fe41cd09d_29219290.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/f793cfbde8310d2858f8064f741a6b45_21449627.png change filename to text .imagette300069191767757140/ imagette300069191767757140/1767757028_2307157_1402744768_e1314b688492c244d3ce3a765e7c6da2_rle_crop_4092345072_0.png.png imagette300069191767757140/1767757028_2307157_1402744770_b8212872a3d14f989e3103cfe82129c4_rle_crop_4092345060_0.png.png imagette300069191767757140/1767757028_2307157_1402744853_4e5c6cf565301b6f2ee398fd28f0f393_rle_crop_4092345027_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/9bf11a7d820c8783689ebab032cad204_69354347.png imagette300069191767757140 30006920 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=30006920 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1402745016: '1767756988_2302849_1402744845_e78162f0ffaf59c58ce3affe0a8983a5_rle_crop_4092345006_0.png', 1402745017: '1767756988_2302849_1402744841_500524e83d88796f67bea7006c9932db_rle_crop_4092345014_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/20036f9cf1d27c56765d7da82bf2ae3e_14171817.png change filename to text .imagette300069201767757140/ imagette300069201767757140/1767756988_2302849_1402744845_e78162f0ffaf59c58ce3affe0a8983a5_rle_crop_4092345006_0.png.png imagette300069201767757140/1767756988_2302849_1402744841_500524e83d88796f67bea7006c9932db_rle_crop_4092345014_0.png.png imagette300069231767757140/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/fb0b7046dbc4d88c0920ff93be1e80e2_58972202.png imagette300069201767757140 30006923 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=30006923 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette300069231767757140 30006912 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=30006912 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1402745009: '1767756988_2302849_1402744849_184d5f192e37bd302043aa8ffdefa07b_rle_crop_4092344994_0.png', 1402745010: '1767756988_2302849_1402744845_e78162f0ffaf59c58ce3affe0a8983a5_rle_crop_4092345010_0.png', 1402745011: '1767756988_2302849_1402744845_e78162f0ffaf59c58ce3affe0a8983a5_rle_crop_4092345008_0.png', 1402745012: '1767756988_2302849_1402744845_e78162f0ffaf59c58ce3affe0a8983a5_rle_crop_4092345009_0.png', 1402745013: '1767756988_2302849_1402744841_500524e83d88796f67bea7006c9932db_rle_crop_4092345024_0.png', 1402745014: '1767756988_2302849_1402744834_6b382a3b4f480cdaea22f26f38bb51ad_rle_crop_4092345044_0.png', 1402745018: '1767757028_2307157_1402744853_4e5c6cf565301b6f2ee398fd28f0f393_rle_crop_4092345031_0.png', 1402745019: '1767757028_2307157_1402744853_4e5c6cf565301b6f2ee398fd28f0f393_rle_crop_4092345032_0.png', 1402745020: '1767757028_2307157_1402744853_4e5c6cf565301b6f2ee398fd28f0f393_rle_crop_4092345033_0.png', 1402745035: '1767757047_2307566_1402744744_94a861ab5ff23e31314f8332512b7d1e_rle_crop_4092345196_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/4d76be5648c043fbf17053d071b9a881_16562319.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/d43d8fb718f133d2add5c13a8c2799d7_35919900.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/727af6ececccc86c19b9c5a8d932461f_82664625.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/a99a7123726e406d5b962284f0eeb896_76319378.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/8ad93946ca27309315d2b03f4d51f3db_99334732.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/7dbff12c31fe16eddc026d896757e3e5_64804937.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/09adec1c0a3b53e34d857699629d4abd_21318454.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/b0f4590cfdab853ff1441fb837c72588_34098990.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/515952f20574e6f9859af3b5e26a0660_52200608.png change filename to text .imagette300069121767757140/ imagette300069121767757140/1767757028_2307157_1402744853_4e5c6cf565301b6f2ee398fd28f0f393_rle_crop_4092345031_0.png.png imagette300069121767757140/1767757028_2307157_1402744853_4e5c6cf565301b6f2ee398fd28f0f393_rle_crop_4092345033_0.png.png imagette300069121767757140/1767756988_2302849_1402744834_6b382a3b4f480cdaea22f26f38bb51ad_rle_crop_4092345044_0.png.png imagette300069121767757140/1767756988_2302849_1402744849_184d5f192e37bd302043aa8ffdefa07b_rle_crop_4092344994_0.png.png imagette300069121767757140/1767756988_2302849_1402744845_e78162f0ffaf59c58ce3affe0a8983a5_rle_crop_4092345010_0.png.png imagette300069121767757140/1767756988_2302849_1402744845_e78162f0ffaf59c58ce3affe0a8983a5_rle_crop_4092345008_0.png.png imagette300069121767757140/1767757028_2307157_1402744853_4e5c6cf565301b6f2ee398fd28f0f393_rle_crop_4092345032_0.png.png imagette300069121767757140/1767756988_2302849_1402744841_500524e83d88796f67bea7006c9932db_rle_crop_4092345024_0.png.png imagette300069121767757140/1767756988_2302849_1402744845_e78162f0ffaf59c58ce3affe0a8983a5_rle_crop_4092345009_0.png.png imagette300069121767757140/1767757047_2307566_1402744744_94a861ab5ff23e31314f8332512b7d1e_rle_crop_4092345196_0.png.png wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/d305c6c28501d263081bf82514549f9c_22905659.png imagette300069121767757140 30006921 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=30006921 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1402745039: '1767757047_2307566_1402744746_e6e18bd6ff0582c50390326e4360e760_rle_crop_4092345174_0.png'} change filename to text .imagette300069211767757141/ imagette300069211767757141/1767757047_2307566_1402744746_e6e18bd6ff0582c50390326e4360e760_rle_crop_4092345174_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/d4816c9713cd586bf38f2286139ee21c_24566103.png imagette300069211767757141 30006922 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=30006922 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1402745022: '1767756988_2302849_1402744845_e78162f0ffaf59c58ce3affe0a8983a5_rle_crop_4092344998_0.png', 1402745023: '1767756988_2302849_1402744845_e78162f0ffaf59c58ce3affe0a8983a5_rle_crop_4092345004_0.png', 1402745024: '1767756988_2302849_1402744841_500524e83d88796f67bea7006c9932db_rle_crop_4092345017_0.png', 1402745025: '1767757028_2307157_1402744768_e1314b688492c244d3ce3a765e7c6da2_rle_crop_4092345074_0.png', 1402745037: '1767757047_2307566_1402744746_e6e18bd6ff0582c50390326e4360e760_rle_crop_4092345173_0.png', 1402745038: '1767757047_2307566_1402744746_e6e18bd6ff0582c50390326e4360e760_rle_crop_4092345175_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/86c81acb3c8ccabb7618f81911f67af6_71127109.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/8692aa26f3f793deabe65b95192dae54_53666823.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/7273ae34519f3159303708f427088ced_64431460.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/996c4ae5575008617b018d807695474b_17154555.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/172828cf37c35a855a1a436ee7321711_75082061.png change filename to text .imagette300069221767757141/ imagette300069221767757141/1767757047_2307566_1402744746_e6e18bd6ff0582c50390326e4360e760_rle_crop_4092345173_0.png.png imagette300069221767757141/1767756988_2302849_1402744841_500524e83d88796f67bea7006c9932db_rle_crop_4092345017_0.png.png imagette300069221767757141/1767757028_2307157_1402744768_e1314b688492c244d3ce3a765e7c6da2_rle_crop_4092345074_0.png.png imagette300069221767757141/1767756988_2302849_1402744845_e78162f0ffaf59c58ce3affe0a8983a5_rle_crop_4092345004_0.png.png imagette300069221767757141/1767756988_2302849_1402744845_e78162f0ffaf59c58ce3affe0a8983a5_rle_crop_4092344998_0.png.png imagette300069221767757141/1767757047_2307566_1402744746_e6e18bd6ff0582c50390326e4360e760_rle_crop_4092345175_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/b09a542a3bb9fa4650cc67bc5b8249c9_43177342.png imagette300069221767757141 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=30006862 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/30006924,30006925,30006926,30006927,30006928,30006929,30006930,30006931,30006932,30006933,30006934,30006935?tags=Teint_Dans_La_Masse,metal,cartonnette,kraft,mal_croppe,papier,environnement,plastique,autre_refus,Carton_brun,Carton_gris,flou your option no_mail is active, we will not send the real mail to your client args[1402745049] : ('0.10701599553175228',) no score found for photo 1402745049 We are sending mail with results at report@fotonower.com args[1402745047] : ('0.10701599553175228',) no score found for photo 1402745047 We are sending mail with results at report@fotonower.com args[1402745045] : ('0.10701599553175228',) no score found for photo 1402745045 We are sending mail with results at report@fotonower.com args[1402745044] : ('0.10701599553175228',) no score found for photo 1402745044 We are sending mail with results at report@fotonower.com args[1402745006] : ('0.10701599553175228',) no score found for photo 1402745006 We are sending mail with results at report@fotonower.com args[1402745002] : ('0.10701599553175228',) no score found for photo 1402745002 We are sending mail with results at report@fotonower.com args[1402744998] : ('0.10701599553175228',) no score found for photo 1402744998 We are sending mail with results at report@fotonower.com args[1402744993] : ('0.10701599553175228',) no score found for photo 1402744993 We are sending mail with results at report@fotonower.com args[1402744990] : ('0.10701599553175228',) no score found for photo 1402744990 We are sending mail with results at report@fotonower.com args[1402744988] : ('0.10701599553175228',) no score found for photo 1402744988 We are sending mail with results at report@fotonower.com refus_total : 0.10701599553175228 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=30006862 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_P30006862_07-01-2026_04_38_59.pdf results_Auto_P30006862_07-01-2026_04_38_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30006862_07-01-2026_04_38_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','30006862','results_Auto_P30006862_07-01-2026_04_38_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30006862_07-01-2026_04_38_59.pdf','pdf','','0.18','0.10701599553175228') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([30006862]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1402745049, 1402745047, 1402745045, 1402745044, 1402745006, 1402745002, 1402744998, 1402744993, 1402744990, 1402744988] map_info['map_portfolio_photo'] : {30006862: [1402745049, 1402745047, 1402745045, 1402745044, 1402745006, 1402745002, 1402744998, 1402744993, 1402744990, 1402744988, 1402744956, 1402744954, 1402744951, 1402744944, 1402744903, 1402744900, 1402744898, 1402744885, 1402744882, 1402744879, 1402744876, 1402744873, 1402744853, 1402744849, 1402744845, 1402744841, 1402744834, 1402744774, 1402744772, 1402744770, 1402744768, 1402744746, 1402744744]} final : False mtd_id 4302 list_pids : [1402745049, 1402745047, 1402745045, 1402745044, 1402745006, 1402745002, 1402744998, 1402744993, 1402744990, 1402744988] 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, '4320307') ('4302', '30006862', '1402745049', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745047', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745045', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745044', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745006', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745002', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402744998', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402744993', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402744990', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402744988', None, None, None, None, None, '4320307') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '30006862', '1402745049', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402745047', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402745045', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402745044', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402745006', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402745002', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402744998', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402744993', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402744990', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402744988', None, None, None, None, None, '4320307')] time used for this insertion : 0.015737533569335938 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.6848244667053223 time spend to save output : 0.015944480895996094 total time spend for step 4 : 3.7007689476013184 step5:split_time_score Wed Jan 7 04:39:03 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 : ['30006862'] 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 : [('30006862',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (30006862) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1402745049: {'path': 'temp/1767757139_2219024_1402745049_d4b9a4239aa9c49ca158eb79ebc2bdde.jpg', 'extension': 'jpg'}, 1402745044: {'path': 'temp/1767757139_2219024_1402745044_3a63862a70b92473aeeff843e491a43f.jpg', 'extension': 'jpg'}, 1402745045: {'path': 'temp/1767757139_2219024_1402745045_8c7a731fbd78f0675a63b50a87157ec3.jpg', 'extension': 'jpg'}, 1402745047: {'path': 'temp/1767757139_2219024_1402745047_5ff648a70fec65f839b35546d8981fe8.jpg', 'extension': 'jpg'}, 1402744998: {'path': 'temp/1767757139_2219024_1402744998_183c5f0305dc8106130e5c384856bad7.jpg', 'extension': 'jpg'}, 1402745002: {'path': 'temp/1767757139_2219024_1402745002_43627f58b35a677216c5597f81f3c87e.jpg', 'extension': 'jpg'}, 1402745006: {'path': 'temp/1767757139_2219024_1402745006_afe1ea176e9311b5ddbc0c54c710eda8.jpg', 'extension': 'jpg'}, 1402744988: {'path': 'temp/1767757139_2219024_1402744988_fa84fbc2c5863caf1f0d9a99dc083f69.jpg', 'extension': 'jpg'}, 1402744990: {'path': 'temp/1767757139_2219024_1402744990_cdc6d098caaaf92635b4897277dc90ca.jpg', 'extension': 'jpg'}, 1402744993: {'path': 'temp/1767757139_2219024_1402744993_b3b0c25277553c422cfe642ef793c156.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 = 30006862; (('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 = 30006862 group by h (('04', 33),) 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=30006862 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 (30006862) 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 (30006862) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 07012026 30006862 Nombre de photos uploadées : 33 / 23040 (0%) 07012026 30006862 Nombre de photos taguées (types de déchets): 0 / 33 (0%) 07012026 30006862 Nombre de photos taguées (volume) : 0 / 33 (0%) [{'photo_id': 1402744746, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/e6e18bd6ff0582c50390326e4360e760.jpg', 'username': None, 'uploaded_at': 1767756668, 'text': 'image_07012026_04_30_13_10144.jpg'}, {'photo_id': 1402744744, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/94a861ab5ff23e31314f8332512b7d1e.jpg', 'username': None, 'uploaded_at': 1767756668, 'text': 'image_07012026_04_30_24_10136.jpg'}, {'photo_id': 1402744774, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/783fd8bcc38b88da8a3ccd23f6f66ed7.jpg', 'username': None, 'uploaded_at': 1767756727, 'text': 'image_07012026_04_30_34_10136.jpg'}, {'photo_id': 1402744772, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/7/6fdc371b258e5ad3f88054e269677b63.jpg', 'username': None, 'uploaded_at': 1767756727, 'text': 'image_07012026_04_31_13_10138.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.6689300537109375e-06 elapsed_time : order_list_meta_photo_and_scores 5.4836273193359375e-06 ????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0015597343444824219 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 30006862, '2026-01-07' ) 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-07' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2854728,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.2716031074523926 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= 2854728 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2854728, 'dashboard_run_id': 2861956, 'mtr_portfolio_id': 29999365, 'dashboard_result_id': 19091039, '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_P29999365_07-01-2026_00_16_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29999367, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29999368, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29999369, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29999370, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29999371, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29999372, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29999373, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29999374, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29999375, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29999376, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29999377, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29999378, 'pht': 3726}}"}, {'dashboat_entry_day': 2854728, 'dashboard_run_id': 2861956, 'mtr_portfolio_id': 29999670, 'dashboard_result_id': 19091040, '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_P29999670_07-01-2026_00_35_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29999676, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29999677, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29999678, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29999679, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29999680, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29999681, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29999682, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29999683, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29999684, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29999685, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29999686, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29999687, 'pht': 3726}}"}, {'dashboat_entry_day': 2854728, 'dashboard_run_id': 2861956, 'mtr_portfolio_id': 30000240, 'dashboard_result_id': 19091041, '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_P30000240_07-01-2026_00_48_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 30000241, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30000242, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30000243, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30000244, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30000245, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30000246, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30000247, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30000248, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30000249, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30000250, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30000251, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30000252, 'pht': 3726}}"}, {'dashboat_entry_day': 2854728, 'dashboard_run_id': 2861956, 'mtr_portfolio_id': 30000381, 'dashboard_result_id': 19091042, '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_P30000381_07-01-2026_01_02_31.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30000389, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30000390, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30000391, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30000392, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30000393, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30000394, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30000395, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30000396, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30000397, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30000398, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30000399, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30000400, 'pht': 3726}}"}, {'dashboat_entry_day': 2854728, 'dashboard_run_id': 2861956, 'mtr_portfolio_id': 30001385, 'dashboard_result_id': 19091043, '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_P30001385_07-01-2026_01_47_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30001388, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30001389, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30001390, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30001391, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30001392, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30001393, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30001394, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30001395, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30001396, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30001397, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30001398, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30001399, 'pht': 3726}}"}, {'dashboat_entry_day': 2854728, 'dashboard_run_id': 2861956, 'mtr_portfolio_id': 30001625, 'dashboard_result_id': 19091044, '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_P30001625_07-01-2026_02_03_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30001629, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30001630, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30001631, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30001632, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30001633, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30001634, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30001635, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30001636, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30001637, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30001638, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30001639, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30001640, 'pht': 3726}}"}, {'dashboat_entry_day': 2854728, 'dashboard_run_id': 2861956, 'mtr_portfolio_id': 30001993, 'dashboard_result_id': 19091045, '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_P30001993_07-01-2026_02_17_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30002015, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30002016, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30002017, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30002018, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30002019, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30002020, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30002021, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30002022, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30002023, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30002024, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30002025, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30002026, 'pht': 3726}}"}, {'dashboat_entry_day': 2854728, 'dashboard_run_id': 2861956, 'mtr_portfolio_id': 30002683, 'dashboard_result_id': 19091046, '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_P30002683_07-01-2026_02_33_29.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30002709, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30002710, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30002711, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30002712, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30002713, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30002714, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30002715, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30002716, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30002717, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30002718, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30002719, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30002720, 'pht': 3726}}"}, {'dashboat_entry_day': 2854728, 'dashboard_run_id': 2861956, 'mtr_portfolio_id': 30003176, 'dashboard_result_id': 19091047, '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_P30003176_07-01-2026_02_47_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30003180, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30003181, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30003182, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30003183, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30003184, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30003185, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30003186, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30003187, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30003188, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30003189, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30003190, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30003191, 'pht': 3726}}"}, {'dashboat_entry_day': 2854728, 'dashboard_run_id': 2861956, 'mtr_portfolio_id': 30003654, 'dashboard_result_id': 19091048, '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_P30003654_07-01-2026_03_02_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30003661, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30003662, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30003663, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30003664, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30003666, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30003667, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30003668, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30003669, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30003670, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30003671, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30003672, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30003673, 'pht': 3726}}"}, {'dashboat_entry_day': 2854728, 'dashboard_run_id': 2861956, 'mtr_portfolio_id': 30004058, 'dashboard_result_id': 19091049, '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_P30004058_07-01-2026_03_17_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 30004096, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30004097, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30004098, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30004099, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30004100, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30004101, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30004102, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30004103, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30004104, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30004105, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30004106, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30004107, 'pht': 3726}}"}, {'dashboat_entry_day': 2854728, 'dashboard_run_id': 2861956, 'mtr_portfolio_id': 30004504, 'dashboard_result_id': 19091050, '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_P30004504_07-01-2026_03_33_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30004511, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30004512, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30004513, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30004514, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30004515, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30004516, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30004517, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30004518, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30004519, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30004520, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30004521, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30004522, 'pht': 3726}}"}, {'dashboat_entry_day': 2854728, 'dashboard_run_id': 2861956, 'mtr_portfolio_id': 30005091, 'dashboard_result_id': 19091051, '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_P30005091_07-01-2026_03_51_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30005124, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30005125, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30005126, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30005127, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30005128, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30005129, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30005130, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30005131, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30005132, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30005133, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30005134, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30005135, 'pht': 3726}}"}, {'dashboat_entry_day': 2854728, 'dashboard_run_id': 2861956, 'mtr_portfolio_id': 30005616, 'dashboard_result_id': 19091052, '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_P30005616_07-01-2026_04_03_33.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 30005617, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30005618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30005619, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30005620, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30005621, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30005622, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30005623, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30005624, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30005625, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30005626, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30005627, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30005628, 'pht': 3726}}"}, {'dashboat_entry_day': 2854728, 'dashboard_run_id': 2861956, 'mtr_portfolio_id': 30005785, 'dashboard_result_id': 19091053, '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_P30005785_07-01-2026_04_18_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 30005830, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30005831, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30005832, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30005833, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30005834, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30005835, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30005836, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30005837, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30005838, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30005839, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30005840, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30005841, 'pht': 3726}}"}, {'dashboat_entry_day': 2854728, 'dashboard_run_id': 2861956, 'mtr_portfolio_id': 30006433, 'dashboard_result_id': 19091054, '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_P30006433_07-01-2026_04_33_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 30006459, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30006460, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30006461, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30006462, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30006463, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30006464, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30006465, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30006466, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30006467, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30006468, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30006469, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30006470, 'pht': 3726}}"}, {'dashboat_entry_day': 2854728, 'dashboard_run_id': 2861956, 'mtr_portfolio_id': 30006862, 'dashboard_result_id': 19091055, '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_P30006862_07-01-2026_04_36_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30006912, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30006913, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30006914, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30006915, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30006916, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30006917, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30006918, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30006919, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30006920, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30006921, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30006922, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30006923, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29999365 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': 4319217, 'mtr_portfolio_id': 29999365, 'created_at': datetime.datetime(2026, 1, 7, 0, 16, 58), 'result': '0.03556487967171043', 'result_long': None, 'result_double': None}] Qualite : 0.03556487967171043 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29999365 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29999365_07-01-2026_00_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29999365 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_P29999365_07-01-2026_00_16_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29999367, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29999368, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29999369, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29999370, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29999371, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29999372, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29999373, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29999374, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29999375, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29999376, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29999377, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29999378, 'pht': 3726}}" where mtr_portfolio_id = 29999365 and dashboard_run_id = 2861956 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`=29999365 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (19091039, 0.03556487967171043, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29999365_07-01-2026_00_16_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29999367, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29999368, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29999369, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29999370, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29999371, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29999372, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29999373, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29999374, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29999375, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29999376, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29999377, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29999378, '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 = 29999670 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': 4319241, 'mtr_portfolio_id': 29999670, 'created_at': datetime.datetime(2026, 1, 7, 0, 35), 'result': '0.07220360950194565', 'result_long': None, 'result_double': None}] Qualite : 0.07220360950194565 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29999670 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29999670_07-01-2026_00_35_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29999670 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_P29999670_07-01-2026_00_35_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29999676, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29999677, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29999678, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29999679, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29999680, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29999681, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29999682, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29999683, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29999684, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29999685, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29999686, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29999687, 'pht': 3726}}" where mtr_portfolio_id = 29999670 and dashboard_run_id = 2861956 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`=29999670 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (19091040, 0.07220360950194565, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29999670_07-01-2026_00_35_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29999676, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29999677, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29999678, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29999679, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29999680, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29999681, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29999682, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29999683, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29999684, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29999685, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29999686, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29999687, '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 = 30000240 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': 4319321, 'mtr_portfolio_id': 30000240, 'created_at': datetime.datetime(2026, 1, 7, 0, 48, 59), 'result': '0.08740129110559802', 'result_long': None, 'result_double': None}] Qualite : 0.08740129110559802 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 30000240 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30000240_07-01-2026_00_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 30000240 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_P30000240_07-01-2026_00_48_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 30000241, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30000242, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30000243, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30000244, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30000245, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30000246, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30000247, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30000248, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30000249, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30000250, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30000251, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30000252, 'pht': 3726}}" where mtr_portfolio_id = 30000240 and dashboard_run_id = 2861956 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`=30000240 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (19091041, 0.08740129110559802, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30000240_07-01-2026_00_48_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 30000241, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30000242, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30000243, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30000244, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30000245, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30000246, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30000247, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30000248, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30000249, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30000250, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30000251, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30000252, '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 = 30000381 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': 4319352, 'mtr_portfolio_id': 30000381, 'created_at': datetime.datetime(2026, 1, 7, 1, 2, 31), 'result': '0.03941804582502747', 'result_long': None, 'result_double': None}] Qualite : 0.03941804582502747 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 30000381 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30000381_07-01-2026_01_02_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 30000381 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_P30000381_07-01-2026_01_02_31.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30000389, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30000390, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30000391, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30000392, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30000393, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30000394, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30000395, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30000396, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30000397, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30000398, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30000399, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30000400, 'pht': 3726}}" where mtr_portfolio_id = 30000381 and dashboard_run_id = 2861956 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`=30000381 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (19091042, 0.03941804582502747, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30000381_07-01-2026_01_02_31.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30000389, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30000390, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30000391, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30000392, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30000393, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30000394, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30000395, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30000396, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30000397, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30000398, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30000399, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30000400, '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 = 30001385 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': 4319516, 'mtr_portfolio_id': 30001385, 'created_at': datetime.datetime(2026, 1, 7, 1, 47), 'result': '0.03810687232726498', 'result_long': None, 'result_double': None}] Qualite : 0.03810687232726498 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 30001385 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30001385_07-01-2026_01_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 30001385 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_P30001385_07-01-2026_01_47_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30001388, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30001389, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30001390, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30001391, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30001392, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30001393, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30001394, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30001395, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30001396, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30001397, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30001398, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30001399, 'pht': 3726}}" where mtr_portfolio_id = 30001385 and dashboard_run_id = 2861956 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`=30001385 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (19091043, 0.03810687232726498, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30001385_07-01-2026_01_47_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30001388, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30001389, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30001390, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30001391, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30001392, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30001393, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30001394, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30001395, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30001396, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30001397, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30001398, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30001399, '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 = 30001625 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': 4319549, 'mtr_portfolio_id': 30001625, 'created_at': datetime.datetime(2026, 1, 7, 2, 3), 'result': '0.07216863145607044', 'result_long': None, 'result_double': None}] Qualite : 0.07216863145607044 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 30001625 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30001625_07-01-2026_02_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 30001625 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_P30001625_07-01-2026_02_03_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30001629, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30001630, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30001631, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30001632, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30001633, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30001634, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30001635, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30001636, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30001637, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30001638, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30001639, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30001640, 'pht': 3726}}" where mtr_portfolio_id = 30001625 and dashboard_run_id = 2861956 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`=30001625 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (19091044, 0.07216863145607044, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30001625_07-01-2026_02_03_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30001629, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30001630, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30001631, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30001632, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30001633, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30001634, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30001635, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30001636, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30001637, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30001638, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30001639, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30001640, '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 = 30001993 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': 4319642, 'mtr_portfolio_id': 30001993, 'created_at': datetime.datetime(2026, 1, 7, 2, 17, 1), 'result': '0.06528625286761691', 'result_long': None, 'result_double': None}] Qualite : 0.06528625286761691 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 30001993 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30001993_07-01-2026_02_17_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 30001993 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_P30001993_07-01-2026_02_17_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30002015, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30002016, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30002017, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30002018, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30002019, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30002020, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30002021, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30002022, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30002023, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30002024, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30002025, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30002026, 'pht': 3726}}" where mtr_portfolio_id = 30001993 and dashboard_run_id = 2861956 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`=30001993 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (19091045, 0.06528625286761691, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30001993_07-01-2026_02_17_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30002015, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30002016, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30002017, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30002018, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30002019, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30002020, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30002021, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30002022, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30002023, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30002024, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30002025, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30002026, '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 = 30002683 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': 4319707, 'mtr_portfolio_id': 30002683, 'created_at': datetime.datetime(2026, 1, 7, 2, 33, 29), 'result': '0.07765632558480265', 'result_long': None, 'result_double': None}] Qualite : 0.07765632558480265 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 30002683 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30002683_07-01-2026_02_33_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 30002683 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_P30002683_07-01-2026_02_33_29.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30002709, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30002710, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30002711, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30002712, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30002713, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30002714, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30002715, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30002716, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30002717, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30002718, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30002719, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30002720, 'pht': 3726}}" where mtr_portfolio_id = 30002683 and dashboard_run_id = 2861956 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`=30002683 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (19091046, 0.07765632558480265, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30002683_07-01-2026_02_33_29.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30002709, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30002710, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30002711, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30002712, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30002713, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30002714, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30002715, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30002716, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30002717, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30002718, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30002719, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30002720, '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 = 30003176 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': 4319777, 'mtr_portfolio_id': 30003176, 'created_at': datetime.datetime(2026, 1, 7, 2, 47), 'result': '0.044114730773132466', 'result_long': None, 'result_double': None}] Qualite : 0.044114730773132466 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 30003176 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30003176_07-01-2026_02_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 30003176 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_P30003176_07-01-2026_02_47_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30003180, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30003181, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30003182, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30003183, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30003184, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30003185, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30003186, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30003187, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30003188, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30003189, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30003190, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30003191, 'pht': 3726}}" where mtr_portfolio_id = 30003176 and dashboard_run_id = 2861956 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`=30003176 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (19091047, 0.044114730773132466, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30003176_07-01-2026_02_47_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30003180, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30003181, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30003182, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30003183, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30003184, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30003185, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30003186, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30003187, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30003188, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30003189, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30003190, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30003191, '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 = 30003654 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': 4319843, 'mtr_portfolio_id': 30003654, 'created_at': datetime.datetime(2026, 1, 7, 3, 2, 58), 'result': '0.06394247453701923', 'result_long': None, 'result_double': None}] Qualite : 0.06394247453701923 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 30003654 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30003654_07-01-2026_03_02_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 30003654 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_P30003654_07-01-2026_03_02_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30003661, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30003662, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30003663, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30003664, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30003666, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30003667, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30003668, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30003669, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30003670, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30003671, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30003672, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30003673, 'pht': 3726}}" where mtr_portfolio_id = 30003654 and dashboard_run_id = 2861956 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`=30003654 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (19091048, 0.06394247453701923, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30003654_07-01-2026_03_02_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30003661, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30003662, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30003663, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30003664, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30003666, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30003667, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30003668, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30003669, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30003670, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30003671, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30003672, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30003673, '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 = 30004058 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': 4319913, 'mtr_portfolio_id': 30004058, 'created_at': datetime.datetime(2026, 1, 7, 3, 17), 'result': '0.09987282248169799', 'result_long': None, 'result_double': None}] Qualite : 0.09987282248169799 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 30004058 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30004058_07-01-2026_03_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 30004058 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_P30004058_07-01-2026_03_17_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 30004096, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30004097, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30004098, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30004099, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30004100, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30004101, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30004102, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30004103, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30004104, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30004105, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30004106, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30004107, 'pht': 3726}}" where mtr_portfolio_id = 30004058 and dashboard_run_id = 2861956 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`=30004058 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (19091049, 0.09987282248169799, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30004058_07-01-2026_03_17_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 30004096, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30004097, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30004098, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30004099, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30004100, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30004101, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30004102, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30004103, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30004104, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30004105, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30004106, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30004107, '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 = 30004504 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': 4319960, 'mtr_portfolio_id': 30004504, 'created_at': datetime.datetime(2026, 1, 7, 3, 33), 'result': '0.046834477536035035', 'result_long': None, 'result_double': None}] Qualite : 0.046834477536035035 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 30004504 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30004504_07-01-2026_03_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 30004504 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_P30004504_07-01-2026_03_33_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30004511, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30004512, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30004513, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30004514, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30004515, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30004516, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30004517, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30004518, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30004519, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30004520, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30004521, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30004522, 'pht': 3726}}" where mtr_portfolio_id = 30004504 and dashboard_run_id = 2861956 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`=30004504 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (19091050, 0.046834477536035035, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30004504_07-01-2026_03_33_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30004511, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30004512, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30004513, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30004514, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30004515, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30004516, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30004517, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30004518, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30004519, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30004520, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30004521, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30004522, '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 = 30005091 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': 4320058, 'mtr_portfolio_id': 30005091, 'created_at': datetime.datetime(2026, 1, 7, 3, 51, 1), 'result': '0.0946171304832479', 'result_long': None, 'result_double': None}] Qualite : 0.0946171304832479 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 30005091 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30005091_07-01-2026_03_51_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 30005091 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_P30005091_07-01-2026_03_51_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30005124, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30005125, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30005126, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30005127, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30005128, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30005129, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30005130, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30005131, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30005132, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30005133, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30005134, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30005135, 'pht': 3726}}" where mtr_portfolio_id = 30005091 and dashboard_run_id = 2861956 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`=30005091 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (19091051, 0.0946171304832479, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30005091_07-01-2026_03_51_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30005124, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30005125, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30005126, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30005127, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30005128, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30005129, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30005130, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30005131, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30005132, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30005133, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30005134, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30005135, '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 = 30005616 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': 4320123, 'mtr_portfolio_id': 30005616, 'created_at': datetime.datetime(2026, 1, 7, 4, 3, 32), 'result': '0.035495190939393295', 'result_long': None, 'result_double': None}] Qualite : 0.035495190939393295 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 30005616 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30005616_07-01-2026_04_03_33.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 30005616 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_P30005616_07-01-2026_04_03_33.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 30005617, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30005618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30005619, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30005620, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30005621, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30005622, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30005623, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30005624, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30005625, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30005626, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30005627, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30005628, 'pht': 3726}}" where mtr_portfolio_id = 30005616 and dashboard_run_id = 2861958 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`=30005616 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (19091052, 0.035495190939393295, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30005616_07-01-2026_04_03_33.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 30005617, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30005618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30005619, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30005620, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30005621, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30005622, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30005623, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30005624, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30005625, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30005626, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30005627, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30005628, '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 = 30005785 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': 4320178, 'mtr_portfolio_id': 30005785, 'created_at': datetime.datetime(2026, 1, 7, 4, 18, 30), 'result': '0.05172600959154643', 'result_long': None, 'result_double': None}] Qualite : 0.05172600959154643 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 30005785 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30005785_07-01-2026_04_18_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 30005785 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_P30005785_07-01-2026_04_18_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 30005830, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30005831, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30005832, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30005833, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30005834, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30005835, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30005836, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30005837, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30005838, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30005839, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30005840, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30005841, 'pht': 3726}}" where mtr_portfolio_id = 30005785 and dashboard_run_id = 2861958 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`=30005785 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (19091053, 0.05172600959154643, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30005785_07-01-2026_04_18_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 30005830, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30005831, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30005832, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30005833, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30005834, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30005835, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30005836, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30005837, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30005838, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30005839, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30005840, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30005841, '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 = 30006433 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': 4320248, 'mtr_portfolio_id': 30006433, 'created_at': datetime.datetime(2026, 1, 7, 4, 32, 59), 'result': '0.055159853290600094', 'result_long': None, 'result_double': None}] Qualite : 0.055159853290600094 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 30006433 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30006433_07-01-2026_04_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 30006433 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_P30006433_07-01-2026_04_33_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 30006459, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30006460, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30006461, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30006462, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30006463, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30006464, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30006465, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30006466, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30006467, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30006468, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30006469, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30006470, 'pht': 3726}}" where mtr_portfolio_id = 30006433 and dashboard_run_id = 2861958 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`=30006433 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (19091054, 0.055159853290600094, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30006433_07-01-2026_04_33_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 30006459, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30006460, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30006461, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30006462, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30006463, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30006464, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30006465, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30006466, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30006467, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30006468, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30006469, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30006470, '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 = 30006862 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': 4320307, 'mtr_portfolio_id': 30006862, 'created_at': datetime.datetime(2026, 1, 7, 4, 38, 59), 'result': '0.10701599553175228', 'result_long': None, 'result_double': None}] Qualite : 0.10701599553175228 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 30006862 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30006862_07-01-2026_04_38_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 30006862 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_P30006862_07-01-2026_04_38_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30006912, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30006913, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30006914, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30006915, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30006916, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30006917, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30006918, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30006919, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30006920, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30006921, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30006922, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30006923, 'pht': 3726}}" where mtr_portfolio_id = 30006862 and dashboard_run_id = 2861958 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`=30006862 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (19091055, 0.10701599553175228, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P30006862_07-01-2026_04_38_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 30006912, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 30006913, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 30006914, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 30006915, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 30006916, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 30006917, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 30006918, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 30006919, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 30006920, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 30006921, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 30006922, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 30006923, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29999365,29999670,30000240,30000381,30001385,30001625,30001993,30002683,30003176,30003654,30004058,30004504,30005091,30005616,30005785,30006433,30006862) result : ((1402725806,), (1402725885,), (1402725888,), (1402725954,), (1402725956,), (1402725957,), (1402725959,), (1402726002,), (1402726004,), (1402726006,), (1402726033,), (1402726034,), (1402726036,), (1402726038,), (1402726054,), (1402726055,), (1402726058,), (1402726060,), (1402726064,), (1402726067,), (1402726080,), (1402726081,), (1402726086,), (1402726091,), (1402726189,), (1402726205,), (1402726236,), (1402726249,), (1402726250,), (1402726251,), (1402726261,), (1402726451,), (1402726452,), (1402726482,), (1402726520,), (1402726557,), (1402726579,), (1402726590,), (1402726591,), (1402726592,), (1402726656,), (1402726658,), (1402726661,), (1402726663,), (1402726666,), (1402726670,), (1402726677,), (1402726679,), (1402726680,), (1402726682,), (1402726683,), (1402726684,), (1402726686,), (1402726688,), (1402726692,), (1402726695,), (1402726734,), (1402726726,), (1402726727,), (1402726728,), (1402726730,), (1402726746,), (1402726747,), (1402726748,), (1402726790,), (1402726791,), (1402726793,), (1402726794,), (1402726837,), (1402726838,), (1402726839,), (1402726841,), (1402726844,), (1402726927,), (1402726931,), (1402726933,), (1402726935,), (1402726948,), (1402726949,), (1402726950,), (1402727047,), (1402727048,), (1402727049,), (1402727052,), (1402727055,), (1402727058,), (1402727061,), (1402727062,), (1402727063,), (1402727084,), (1402727085,), (1402727087,), (1402727104,), (1402727105,), (1402727129,), (1402727140,), (1402727149,), (1402727152,), (1402727156,), (1402727227,), (1402727229,), (1402727363,), (1402727462,), (1402727384,), (1402727476,), (1402727537,), (1402727538,), (1402727555,), (1402727556,), (1402727558,), (1402727562,), (1402727565,), (1402727568,), (1402727571,), (1402727572,), (1402727574,), (1402727575,), (1402727583,), (1402727584,), (1402727585,), (1402727601,), (1402727602,), (1402727603,), (1402727604,), (1402727607,), (1402727620,), (1402727621,), (1402727623,), (1402727624,), (1402727625,), (1402727626,), (1402727639,), (1402727640,), (1402727641,), (1402727677,), (1402727670,), (1402727671,), (1402727673,), (1402727674,), (1402727687,), (1402727688,), (1402727690,), (1402727693,), (1402727696,), (1402727712,), (1402727713,), (1402727716,), (1402728061,), (1402728094,), (1402728127,), (1402728140,), (1402728144,), (1402728287,), (1402728320,), (1402728338,), (1402728340,), (1402728363,), (1402728391,), (1402728392,), (1402728393,), (1402728394,), (1402728398,), (1402728412,), (1402728413,), (1402728415,), (1402728425,), (1402728426,), (1402728427,), (1402728428,), (1402728431,), (1402728433,), (1402728452,), (1402728453,), (1402728454,), (1402728456,), (1402728470,), (1402728473,), (1402728475,), (1402728478,), (1402728482,), (1402728484,), (1402728496,), (1402728497,), (1402728498,), (1402728506,), (1402728507,), (1402728508,), (1402728509,), (1402728523,), (1402728524,), (1402728525,), (1402728526,), (1402728529,), (1402728536,), (1402728539,), (1402728542,), (1402728546,), (1402728549,), (1402728557,), (1402732292,), (1402732293,), (1402732328,), (1402732356,), (1402732359,), (1402732365,), (1402732369,), (1402732374,), (1402732548,), (1402732549,), (1402732550,), (1402732552,), (1402732556,), (1402732572,), (1402732582,), (1402732593,), (1402732594,), (1402732596,), (1402732597,), (1402732627,), (1402732628,), (1402732629,), (1402732653,), (1402732682,), (1402732711,), (1402732712,), (1402732713,), (1402732716,), (1402732719,), (1402732722,), (1402732731,), (1402732732,), (1402732733,), (1402732734,), (1402732751,), (1402732752,), (1402732754,), (1402732765,), (1402732766,), (1402732770,), (1402732771,), (1402732774,), (1402732776,), (1402732803,), (1402732793,), (1402732795,), (1402732798,), (1402732800,), (1402732809,), (1402732811,), (1402732814,), (1402732839,), (1402732845,), (1402732847,), (1402732850,), (1402732853,), (1402732865,), (1402732866,), (1402732867,), (1402732868,), (1402732872,), (1402732900,), (1402732901,), (1402732903,), (1402732916,), (1402732917,), (1402732919,), (1402732920,), (1402732923,), (1402732925,), (1402732957,), (1402732958,), (1402732959,), (1402732960,), (1402732963,), (1402732966,), (1402732976,), (1402732978,), (1402732997,), (1402732999,), (1402733001,), (1402733002,), (1402733005,), (1402733008,), (1402733019,), (1402733021,), (1402733023,), (1402733036,), (1402733038,), (1402733040,), (1402733044,), (1402733046,), (1402733079,), (1402733081,), (1402733101,), (1402733105,), (1402733110,), (1402733118,), (1402733119,), (1402733122,), (1402733123,), (1402733125,), (1402733126,), (1402733129,), (1402733131,), (1402733177,), (1402733140,), (1402733141,), (1402733142,), (1402733143,), (1402733147,), (1402733499,), (1402733531,), (1402733569,), (1402733994,), (1402734111,), (1402734241,), (1402734359,), (1402734465,), (1402734573,), (1402734885,), (1402734967,), (1402735029,), (1402735095,), (1402735161,), (1402735242,), (1402735613,), (1402735648,), (1402735676,), (1402735677,), (1402735951,), (1402735987,), (1402736022,), (1402736023,), (1402736049,), (1402736290,), (1402736304,), (1402736314,), (1402736348,), (1402736363,), (1402736366,), (1402736615,), (1402736652,), (1402737048,), (1402737050,), (1402737055,), (1402737058,), (1402737280,), (1402737287,), (1402737289,), (1402737311,), (1402737354,), (1402737409,), (1402737410,), (1402737411,), (1402737412,), (1402737424,), (1402737425,), (1402737426,), (1402737428,), (1402737432,), (1402737458,), (1402737460,), (1402737462,), (1402737464,), (1402737467,), (1402737489,), (1402737496,), (1402737510,), (1402737511,), (1402737513,), (1402737514,), (1402737547,), (1402737539,), (1402737540,), (1402737542,), (1402737544,), (1402737569,), (1402737571,), (1402737572,), (1402737573,), (1402737577,), (1402737581,), (1402737602,), (1402737603,), (1402737624,), (1402737625,), (1402737626,), (1402737628,), (1402737665,), (1402737696,), (1402737697,), (1402737698,), (1402737713,), (1402737714,), (1402737716,), (1402737718,), (1402737721,), (1402737740,), (1402737758,), (1402737759,), (1402737760,), (1402737761,), (1402737785,), (1402737786,), (1402737797,), (1402737799,), (1402737802,), (1402737806,), (1402737811,), (1402737816,), (1402737827,), (1402737828,), (1402737829,), (1402737831,), (1402737835,), (1402737854,), (1402737855,), (1402737856,), (1402737857,), (1402737887,), (1402737890,), (1402737891,), (1402737893,), (1402737917,), (1402737905,), (1402737906,), (1402737907,), (1402737910,), (1402737914,), (1402737939,), (1402737946,), (1402737947,), (1402737949,), (1402737953,), (1402737956,), (1402737971,), (1402737972,), (1402737973,), (1402737975,), (1402737979,), (1402737982,), (1402737994,), (1402738013,), (1402738014,), (1402738015,), (1402738017,), (1402738021,), (1402738037,), (1402738044,), (1402738050,), (1402738052,), (1402738055,), (1402738067,), (1402738068,), (1402738070,), (1402738072,), (1402738075,), (1402738099,), (1402738105,), (1402738114,), (1402738116,), (1402738118,), (1402738121,), (1402738123,), (1402738125,), (1402738149,), (1402738150,), (1402738151,), (1402738153,), (1402738157,), (1402738159,), (1402738171,), (1402738172,), (1402738173,), (1402738175,), (1402738209,), (1402738211,), (1402738213,), (1402738224,), (1402738226,), (1402738227,), (1402738230,), (1402738245,), (1402738247,), (1402738249,), (1402738252,), (1402738256,), (1402738263,), (1402738266,), (1402738268,), (1402738271,), (1402738275,), (1402738277,), (1402738298,), (1402738295,), (1402738297,), (1402738308,), (1402738309,), (1402738310,), (1402738311,), (1402738315,), (1402738318,), (1402738328,), (1402738330,), (1402738332,), (1402738335,), (1402738350,), (1402738353,), (1402738357,), (1402738388,), (1402738389,), (1402738391,), (1402738393,), (1402738403,), (1402738405,), (1402738409,), (1402738414,), (1402738418,), (1402738423,), (1402738436,), (1402738437,), (1402738438,), (1402738439,), (1402738441,), (1402738444,), (1402738447,), (1402738451,), (1402738456,), (1402738470,), (1402738471,), (1402738497,), (1402738498,), (1402738499,), (1402738501,), (1402738505,), (1402738507,), (1402738520,), (1402738521,), (1402738523,), (1402738525,), (1402738528,), (1402738541,), (1402738542,), (1402738544,), (1402738555,), (1402738557,), (1402738558,), (1402738562,), (1402738565,), (1402738592,), (1402738593,), (1402738595,), (1402738597,), (1402738613,), (1402738617,), (1402738621,), (1402738625,), (1402738628,), (1402738630,), (1402738662,), (1402738648,), (1402738651,), (1402738654,), (1402738658,), (1402738672,), (1402738674,), (1402738677,), (1402738680,), (1402738683,), (1402738686,), (1402738705,), (1402738714,), (1402738715,), (1402738717,), (1402738749,), (1402738751,), (1402738752,), (1402738755,), (1402738766,), (1402738767,), (1402738768,), (1402738769,), (1402738772,), (1402738785,), (1402738786,), (1402738787,), (1402738788,), (1402738813,), (1402738814,), (1402738815,), (1402738816,), (1402738819,), (1402738850,), (1402738851,), (1402738852,), (1402738854,), (1402738857,), (1402738859,), (1402738873,), (1402738874,), (1402738876,), (1402738878,), (1402738890,), (1402738892,), (1402738893,), (1402738907,), (1402738909,), (1402738911,), (1402738913,), (1402738915,), (1402738938,), (1402738940,), (1402738943,), (1402738945,), (1402738948,), (1402738950,), (1402738960,), (1402738962,), (1402738986,), (1402738988,), (1402738990,), (1402738992,), (1402739017,), (1402739019,), (1402739021,), (1402739054,), (1402739051,), (1402739052,), (1402739053,), (1402739064,), (1402739065,), (1402739094,), (1402739095,), (1402739097,), (1402739099,), (1402739101,), (1402739134,), (1402739135,), (1402739136,), (1402739138,), (1402739142,), (1402739170,), (1402739171,), (1402739172,), (1402739174,), (1402739178,), (1402739195,), (1402739196,), (1402739198,), (1402739199,), (1402739203,), (1402739232,), (1402739233,), (1402739235,), (1402739237,), (1402739240,), (1402739255,), (1402739256,), (1402739257,), (1402739259,), (1402739284,), (1402739291,), (1402739292,), (1402739294,), (1402739312,), (1402739326,), (1402739327,), (1402739331,), (1402739334,), (1402739357,), (1402739358,), (1402739359,), (1402739361,), (1402739365,), (1402739368,), (1402739378,), (1402739379,), (1402739380,), (1402739381,), (1402739385,), (1402739389,), (1402739414,), (1402739417,), (1402739419,), (1402739430,), (1402739431,), (1402739432,), (1402739433,), (1402739460,), (1402739463,), (1402739465,), (1402739467,), (1402739501,), (1402739491,), (1402739493,), (1402739494,), (1402739497,), (1402739519,), (1402739523,), (1402739525,), (1402739526,), (1402739540,), (1402739541,), (1402739542,), (1402739544,), (1402739547,), (1402739566,), (1402739568,), (1402739570,), (1402739573,), (1402739576,), (1402739579,), (1402739586,), (1402739587,), (1402739589,), (1402739606,), (1402739607,), (1402739609,), (1402739610,), (1402739614,), (1402739643,), (1402739646,), (1402739648,), (1402739653,), (1402739657,), (1402739672,), (1402739673,), (1402739675,), (1402739685,), (1402739686,), (1402739687,), (1402739688,), (1402739690,), (1402739692,), (1402739719,), (1402739720,), (1402739722,), (1402739724,), (1402739727,), (1402739729,), (1402739748,), (1402739751,), (1402739752,), (1402739754,), (1402739757,), (1402739759,), (1402739788,), (1402739789,), (1402739790,), (1402739793,), (1402739796,), (1402739798,), (1402739808,), (1402739972,), (1402739971,), (1402739994,), (1402740019,), (1402740020,), (1402740040,), (1402740041,), (1402740042,), (1402740045,), (1402740048,), (1402740051,), (1402740056,), (1402740057,), (1402740058,), (1402740059,), (1402740060,), (1402740061,), (1402740064,), (1402740083,), (1402740084,), (1402740086,), (1402740087,), (1402740102,), (1402740103,), (1402740104,), (1402740105,), (1402740116,), (1402740117,), (1402740118,), (1402740119,), (1402740128,), (1402740130,), (1402740132,), (1402740136,), (1402740140,), (1402740157,), (1402740158,), (1402740159,), (1402740160,), (1402740163,), (1402740645,), (1402740648,), (1402740651,), (1402740674,), (1402740709,), (1402740763,), (1402741047,), (1402741093,), (1402741125,), (1402741664,), (1402741344,), (1402741414,), (1402741489,), (1402741595,), (1402742243,), (1402742305,), (1402742364,), (1402742432,), (1402742476,), (1402742511,), (1402742774,), (1402742786,), (1402742789,), (1402742793,), (1402743290,), (1402743324,), (1402743334,), (1402743335,), (1402743517,), (1402743546,), (1402743562,), (1402743608,), (1402743648,), (1402743682,), (1402743837,), (1402743849,), (1402743859,), (1402743862,), (1402743884,), (1402743886,), (1402743888,), (1402743891,), (1402743911,), (1402743913,), (1402743915,), (1402743918,), (1402743921,), (1402743939,), (1402743941,), (1402743943,), (1402743946,), (1402743983,), (1402743985,), (1402743987,), (1402743990,), (1402743994,), (1402743995,), (1402744015,), (1402744017,), (1402744020,), (1402744024,), (1402744027,), (1402744049,), (1402744051,), (1402744053,), (1402744062,), (1402744090,), (1402744092,), (1402744095,), (1402744097,), (1402744098,), (1402744100,), (1402744129,), (1402744131,), (1402744133,), (1402744136,), (1402744139,), (1402744140,), (1402744153,), (1402744155,), (1402744205,), (1402744246,), (1402744196,), (1402744202,), (1402744241,), (1402744242,), (1402744243,), (1402744285,), (1402744287,), (1402744289,), (1402744319,), (1402744321,), (1402744324,), (1402744326,), (1402744356,), (1402744358,), (1402744360,), (1402744363,), (1402744379,), (1402744381,), (1402744383,), (1402744417,), (1402744418,), (1402744419,), (1402744421,), (1402744424,), (1402744427,), (1402744438,), (1402744439,), (1402744442,), (1402744445,), (1402744448,), (1402744452,), (1402744476,), (1402744484,), (1402744486,), (1402744488,), (1402744489,), (1402744491,), (1402744498,), (1402744501,), (1402744504,), (1402744511,), (1402744519,), (1402744528,), (1402744529,), (1402744531,), (1402744532,), (1402744565,), (1402744566,), (1402744567,), (1402744569,), (1402744573,), (1402744574,), (1402744590,), (1402744591,), (1402744592,), (1402744595,), (1402744598,), (1402744601,), (1402744626,), (1402744637,), (1402744665,), (1402744666,), (1402744667,), (1402744668,), (1402744671,), (1402744674,), (1402744707,), (1402744712,), (1402744713,), (1402744714,), (1402744718,), (1402744722,), (1402744748,), (1402744744,), (1402744746,), (1402744768,), (1402744770,), (1402744772,), (1402744774,), (1402744834,), (1402744841,), (1402744845,), (1402744849,), (1402744853,), (1402744873,), (1402744876,), (1402744879,), (1402744882,), (1402744885,), (1402744898,), (1402744900,), (1402744903,), (1402744944,), (1402744951,), (1402744954,), (1402744956,), (1402744988,), (1402744990,), (1402744993,), (1402744998,), (1402745002,), (1402745006,), (1402745044,), (1402745045,), (1402745047,), (1402745049,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'07012026': {'nb_upload': 33, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([30006862]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1402745049, 1402745047, 1402745045, 1402745044, 1402745006, 1402745002, 1402744998, 1402744993, 1402744990, 1402744988] map_info['map_portfolio_photo'] : {30006862: [1402745049, 1402745047, 1402745045, 1402745044, 1402745006, 1402745002, 1402744998, 1402744993, 1402744990, 1402744988, 1402744956, 1402744954, 1402744951, 1402744944, 1402744903, 1402744900, 1402744898, 1402744885, 1402744882, 1402744879, 1402744876, 1402744873, 1402744853, 1402744849, 1402744845, 1402744841, 1402744834, 1402744774, 1402744772, 1402744770, 1402744768, 1402744746, 1402744744]} final : True mtd_id 4302 list_pids : [1402745049, 1402745047, 1402745045, 1402745044, 1402745006, 1402745002, 1402744998, 1402744993, 1402744990, 1402744988] Looping around the photos to save general results len do output : 1 /30006862Didn'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, '4320307') ('4302', '30006862', '1402745049', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745047', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745045', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745044', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745006', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402745002', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402744998', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402744993', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402744990', None, None, None, None, None, '4320307') ('4302', None, None, None, None, None, None, None, '4320307') ('4302', '30006862', '1402744988', None, None, None, None, None, '4320307') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 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, '30006862', 'None', None, None, None, None, '4320307'), ('4302', '30006862', '1402745049', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402745047', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402745045', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402745044', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402745006', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402745002', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402744998', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402744993', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402744990', None, None, None, None, None, '4320307'), ('4302', '30006862', '1402744988', None, None, None, None, None, '4320307')] time used for this insertion : 0.014881372451782227 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5440199375152588 time spend to save output : 0.015091180801391602 total time spend for step 5 : 1.5591111183166504 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 (4320307) 2.13user 2.45system 0:09.37elapsed 48%CPU (0avgtext+0avgdata 167060maxresident)k 456inputs+10384outputs (6major+67176minor)pagefaults 0swaps