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 : 1125556 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 (4020989) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4020989) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28342486 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4020989'] with mtr_portfolio_ids : ['28342486'] and first list_photo_ids : [] new path : /proc/1125556/ Name: python3 Umask: 0002 State: R (running) Tgid: 1125556 Ngid: 0 Pid: 1125556 PPid: 1125553 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1125556 NSpid: 1125556 NSpgid: 1124716 NSsid: 1124716 VmPeak: 1106908 kB VmSize: 1106888 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98408 kB VmRSS: 98408 kB RssAnon: 59896 kB RssFile: 38512 kB RssShmem: 0 kB VmData: 865640 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 532 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: 37 nonvoluntary_ctxt_switches: 135 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1125556', 'Ngid': '0', 'Pid': '1125556', 'PPid': '1125553', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1125556', 'NSpid': '1125556', 'NSpgid': '1124716', 'NSsid': '1124716', 'VmPeak': '1106908 kB', 'VmSize': '1106888 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98408 kB', 'VmRSS': '98408 kB', 'RssAnon': '59896 kB', 'RssFile': '38512 kB', 'RssShmem': '0 kB', 'VmData': '865640 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '532 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': '37', 'nonvoluntary_ctxt_switches': '135'} ('datou_batch_current', '1125556', '1106908', '0', '1106888', '865640', '98408', b'', 'marlene', '4020989') 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 (28342486) 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 (4020989 ) ) 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 (28342486) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1393331120, 'portfolio_id': 28342486}, {'photo_id': 1393331088, 'portfolio_id': 28342486}, {'photo_id': 1393331058, 'portfolio_id': 28342486}, {'photo_id': 1393331016, 'portfolio_id': 28342486}, {'photo_id': 1393330856, 'portfolio_id': 28342486}, {'photo_id': 1393330852, 'portfolio_id': 28342486}, {'photo_id': 1393330850, 'portfolio_id': 28342486}, {'photo_id': 1393330849, 'portfolio_id': 28342486}, {'photo_id': 1393330846, 'portfolio_id': 28342486}, {'photo_id': 1393330817, 'portfolio_id': 28342486}, {'photo_id': 1393330813, 'portfolio_id': 28342486}, {'photo_id': 1393330810, 'portfolio_id': 28342486}, {'photo_id': 1393330808, 'portfolio_id': 28342486}, {'photo_id': 1393330806, 'portfolio_id': 28342486}, {'photo_id': 1393330782, 'portfolio_id': 28342486}, {'photo_id': 1393330779, 'portfolio_id': 28342486}, {'photo_id': 1393330775, 'portfolio_id': 28342486}, {'photo_id': 1393330773, 'portfolio_id': 28342486}, {'photo_id': 1393330770, 'portfolio_id': 28342486}, {'photo_id': 1393330768, 'portfolio_id': 28342486}, {'photo_id': 1393330693, 'portfolio_id': 28342486}, {'photo_id': 1393330691, 'portfolio_id': 28342486}, {'photo_id': 1393330689, 'portfolio_id': 28342486}, {'photo_id': 1393330668, 'portfolio_id': 28342486}, {'photo_id': 1393330667, 'portfolio_id': 28342486}, {'photo_id': 1393330665, 'portfolio_id': 28342486}] map_portfolio_id_photo_id: {28342486: [1393331120, 1393331088, 1393331058, 1393331016, 1393330856, 1393330852, 1393330850, 1393330849, 1393330846, 1393330817, 1393330813, 1393330810, 1393330808, 1393330806, 1393330782, 1393330779, 1393330775, 1393330773, 1393330770, 1393330768, 1393330693, 1393330691, 1393330689, 1393330668, 1393330667, 1393330665]} ##### 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.016524076461791992 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Sat Nov 8 02:52:29 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28342486) 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 : 28342486 get user id for portfolio 28342486 get sub ptf for main ptf 28342486, type 3726 and hashtags ['papier', 'cartonnette', 'Teint_Dans_La_Masse', 'environnement', 'kraft', 'plastique', 'mal_croppe', 'metal', 'autre_refus', 'Carton_brun', 'Carton_gris', 'flou'] 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`=28342486 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','cartonnette','Teint_Dans_La_Masse','environnement','kraft','plastique','mal_croppe','metal','autre_refus','Carton_brun','Carton_gris','flou')) 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`=28342486 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','cartonnette','Teint_Dans_La_Masse','environnement','kraft','plastique','mal_croppe','metal','autre_refus','Carton_brun','Carton_gris','flou')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 28342486, 'sub_port_id': 28342513, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188457, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 27)}, 'cartonnette': {'main_port_id': 28342486, 'sub_port_id': 28342514, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188458, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 28342486, 'sub_port_id': 28342515, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188459, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 27)}, 'environnement': {'main_port_id': 28342486, 'sub_port_id': 28342516, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188460, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 27)}, 'kraft': {'main_port_id': 28342486, 'sub_port_id': 28342517, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188461, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 27)}, 'papier': {'main_port_id': 28342486, 'sub_port_id': 28342518, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188462, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 27)}, 'autre_refus': {'main_port_id': 28342486, 'sub_port_id': 28342519, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188463, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 27)}, 'plastique': {'main_port_id': 28342486, 'sub_port_id': 28342520, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188464, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 27)}, 'metal': {'main_port_id': 28342486, 'sub_port_id': 28342521, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188465, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 27)}, 'Carton_brun': {'main_port_id': 28342486, 'sub_port_id': 28342522, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188466, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 27)}, 'mal_croppe': {'main_port_id': 28342486, 'sub_port_id': 28342523, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188467, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 27)}, 'flou': {'main_port_id': 28342486, 'sub_port_id': 28342524, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188468, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28342513 , 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=28342486 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 (28342513) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28342486) result : ((1393330665,), (1393330667,), (1393330668,), (1393330689,), (1393330691,), (1393330693,), (1393330768,), (1393330770,), (1393330773,), (1393330775,), (1393330779,), (1393330782,), (1393330806,), (1393330808,), (1393330810,), (1393330813,), (1393330817,), (1393330846,), (1393330849,), (1393330850,), (1393330852,), (1393330856,), (1393331016,), (1393331058,), (1393331088,), (1393331120,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28342514 , 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=28342486 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 (28342514) result : ((1393330839,), (1393330840,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28342486) result : ((1393330665,), (1393330667,), (1393330668,), (1393330689,), (1393330691,), (1393330693,), (1393330768,), (1393330770,), (1393330773,), (1393330775,), (1393330779,), (1393330782,), (1393330806,), (1393330808,), (1393330810,), (1393330813,), (1393330817,), (1393330846,), (1393330849,), (1393330850,), (1393330852,), (1393330856,), (1393331016,), (1393331058,), (1393331088,), (1393331120,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28342515 , 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=28342486 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 (28342515) result : ((1393330836,), (1393330837,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28342486) result : ((1393330665,), (1393330667,), (1393330668,), (1393330689,), (1393330691,), (1393330693,), (1393330768,), (1393330770,), (1393330773,), (1393330775,), (1393330779,), (1393330782,), (1393330806,), (1393330808,), (1393330810,), (1393330813,), (1393330817,), (1393330846,), (1393330849,), (1393330850,), (1393330852,), (1393330856,), (1393331016,), (1393331058,), (1393331088,), (1393331120,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28342516 , 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=28342486 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 (28342516) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28342486) result : ((1393330665,), (1393330667,), (1393330668,), (1393330689,), (1393330691,), (1393330693,), (1393330768,), (1393330770,), (1393330773,), (1393330775,), (1393330779,), (1393330782,), (1393330806,), (1393330808,), (1393330810,), (1393330813,), (1393330817,), (1393330846,), (1393330849,), (1393330850,), (1393330852,), (1393330856,), (1393331016,), (1393331058,), (1393331088,), (1393331120,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28342517 , 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=28342486 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 (28342517) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28342486) result : ((1393330665,), (1393330667,), (1393330668,), (1393330689,), (1393330691,), (1393330693,), (1393330768,), (1393330770,), (1393330773,), (1393330775,), (1393330779,), (1393330782,), (1393330806,), (1393330808,), (1393330810,), (1393330813,), (1393330817,), (1393330846,), (1393330849,), (1393330850,), (1393330852,), (1393330856,), (1393331016,), (1393331058,), (1393331088,), (1393331120,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28342518 , 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=28342486 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 (28342518) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28342486) result : ((1393330665,), (1393330667,), (1393330668,), (1393330689,), (1393330691,), (1393330693,), (1393330768,), (1393330770,), (1393330773,), (1393330775,), (1393330779,), (1393330782,), (1393330806,), (1393330808,), (1393330810,), (1393330813,), (1393330817,), (1393330846,), (1393330849,), (1393330850,), (1393330852,), (1393330856,), (1393331016,), (1393331058,), (1393331088,), (1393331120,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28342519 , 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=28342486 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 (28342519) result : ((1393330838,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28342486) result : ((1393330665,), (1393330667,), (1393330668,), (1393330689,), (1393330691,), (1393330693,), (1393330768,), (1393330770,), (1393330773,), (1393330775,), (1393330779,), (1393330782,), (1393330806,), (1393330808,), (1393330810,), (1393330813,), (1393330817,), (1393330846,), (1393330849,), (1393330850,), (1393330852,), (1393330856,), (1393331016,), (1393331058,), (1393331088,), (1393331120,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28342520 , 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=28342486 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 (28342520) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28342486) result : ((1393330665,), (1393330667,), (1393330668,), (1393330689,), (1393330691,), (1393330693,), (1393330768,), (1393330770,), (1393330773,), (1393330775,), (1393330779,), (1393330782,), (1393330806,), (1393330808,), (1393330810,), (1393330813,), (1393330817,), (1393330846,), (1393330849,), (1393330850,), (1393330852,), (1393330856,), (1393331016,), (1393331058,), (1393331088,), (1393331120,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28342521 , 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=28342486 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 (28342521) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28342486) result : ((1393330665,), (1393330667,), (1393330668,), (1393330689,), (1393330691,), (1393330693,), (1393330768,), (1393330770,), (1393330773,), (1393330775,), (1393330779,), (1393330782,), (1393330806,), (1393330808,), (1393330810,), (1393330813,), (1393330817,), (1393330846,), (1393330849,), (1393330850,), (1393330852,), (1393330856,), (1393331016,), (1393331058,), (1393331088,), (1393331120,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28342522 , 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=28342486 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 (28342522) result : ((1393330843,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28342486) result : ((1393330665,), (1393330667,), (1393330668,), (1393330689,), (1393330691,), (1393330693,), (1393330768,), (1393330770,), (1393330773,), (1393330775,), (1393330779,), (1393330782,), (1393330806,), (1393330808,), (1393330810,), (1393330813,), (1393330817,), (1393330846,), (1393330849,), (1393330850,), (1393330852,), (1393330856,), (1393331016,), (1393331058,), (1393331088,), (1393331120,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28342523 , 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=28342486 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 (28342523) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28342486) result : ((1393330665,), (1393330667,), (1393330668,), (1393330689,), (1393330691,), (1393330693,), (1393330768,), (1393330770,), (1393330773,), (1393330775,), (1393330779,), (1393330782,), (1393330806,), (1393330808,), (1393330810,), (1393330813,), (1393330817,), (1393330846,), (1393330849,), (1393330850,), (1393330852,), (1393330856,), (1393331016,), (1393331058,), (1393331088,), (1393331120,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28342524 , 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=28342486 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 (28342524) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28342486) result : ((1393330665,), (1393330667,), (1393330668,), (1393330689,), (1393330691,), (1393330693,), (1393330768,), (1393330770,), (1393330773,), (1393330775,), (1393330779,), (1393330782,), (1393330806,), (1393330808,), (1393330810,), (1393330813,), (1393330817,), (1393330846,), (1393330849,), (1393330850,), (1393330852,), (1393330856,), (1393331016,), (1393331058,), (1393331088,), (1393331120,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=28342486 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','cartonnette','Teint_Dans_La_Masse','environnement','kraft','plastique','mal_croppe','metal','autre_refus','Carton_brun','Carton_gris','flou')) 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`=28342486 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','cartonnette','Teint_Dans_La_Masse','environnement','kraft','plastique','mal_croppe','metal','autre_refus','Carton_brun','Carton_gris','flou')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 28342486, 'sub_port_id': 28342531, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188469, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 33)}, 'cartonnette': {'main_port_id': 28342486, 'sub_port_id': 28342533, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188470, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 33)}, 'Teint_Dans_La_Masse': {'main_port_id': 28342486, 'sub_port_id': 28342535, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188471, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 33)}, 'environnement': {'main_port_id': 28342486, 'sub_port_id': 28342537, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188472, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 33)}, 'kraft': {'main_port_id': 28342486, 'sub_port_id': 28342539, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188473, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 33)}, 'papier': {'main_port_id': 28342486, 'sub_port_id': 28342541, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188474, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 33)}, 'autre_refus': {'main_port_id': 28342486, 'sub_port_id': 28342543, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188475, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 33)}, 'plastique': {'main_port_id': 28342486, 'sub_port_id': 28342545, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188476, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 33)}, 'metal': {'main_port_id': 28342486, 'sub_port_id': 28342547, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188477, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 33)}, 'Carton_brun': {'main_port_id': 28342486, 'sub_port_id': 28342549, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188478, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 33)}, 'mal_croppe': {'main_port_id': 28342486, 'sub_port_id': 28342551, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188479, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 47, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 33)}, 'flou': {'main_port_id': 28342486, 'sub_port_id': 28342553, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19188480, 'last_updated_at': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 8, 2, 50, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 8, 2, 47, 33)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28342531,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28342513 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28342533,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28342514 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28342535,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28342515 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28342537,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28342516 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28342539,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28342517 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28342541,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28342518 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28342543,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28342519 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28342545,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28342520 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28342547,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28342521 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28342549,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28342522 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28342551,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28342523 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28342553,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28342524 lien utilise dans velours : https://marlene.fotonower.com/velours/28342531,28342533,28342535,28342537,28342539,28342541,28342543,28342545,28342547,28342549,28342551,28342553?tags=Carton_gris,cartonnette,Teint_Dans_La_Masse,environnement,kraft,papier,autre_refus,plastique,metal,Carton_brun,mal_croppe,flou After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28342486]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1393331120, 1393331088, 1393331058, 1393331016, 1393330856, 1393330852, 1393330850, 1393330849, 1393330846] map_info['map_portfolio_photo'] : {28342486: [1393331120, 1393331088, 1393331058, 1393331016, 1393330856, 1393330852, 1393330850, 1393330849, 1393330846, 1393330817, 1393330813, 1393330810, 1393330808, 1393330806, 1393330782, 1393330779, 1393330775, 1393330773, 1393330770, 1393330768, 1393330693, 1393330691, 1393330689, 1393330668, 1393330667, 1393330665]} final : False mtd_id 4302 list_pids : [1393331120, 1393331088, 1393331058, 1393331016, 1393330856, 1393330852, 1393330850, 1393330849, 1393330846] Looping around the photos to save general results len do output : 1 /28342486. 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, '4020989') ('4302', '28342486', '1393331120', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393331088', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393331058', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393331016', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330856', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330852', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330850', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330849', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330846', None, None, None, None, None, '4020989') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '28342486', "{'Carton_gris': 28342513, 'cartonnette': 28342514, 'Teint_Dans_La_Masse': 28342515, 'environnement': 28342516, 'kraft': 28342517, 'papier': 28342518, 'autre_refus': 28342519, 'plastique': 28342520, 'metal': 28342521, 'Carton_brun': 28342522, 'mal_croppe': 28342523, 'flou': 28342524}", None, None, None, None, '4020989'), ('4302', '28342486', '1393331120', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393331088', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393331058', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393331016', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393330856', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393330852', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393330850', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393330849', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393330846', None, None, None, None, None, '4020989')] time used for this insertion : 0.01270151138305664 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5314652919769287 time spend to save output : 0.01287984848022461 total time spend for step 1 : 1.5443451404571533 step2:final Sat Nov 8 02:52:30 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28342486) 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 28342486 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1393330668,1393330667,1393330665,1393330693,1393330691,1393330689,1393330782,1393330779,1393330775,1393330773,1393330770,1393330768,1393330817,1393330813,1393330810,1393330808,1393330806,1393330856,1393330852,1393330850,1393330849,1393330846,1393331120,1393331088,1393331058,1393331016); 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([28342486]) Inside saveOutput : final : False verbose : True original output for save of step final : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ('0.061469995930335745',), 1393331016: ('0.061469995930335745',), 1393330856: ('0.061469995930335745',), 1393330852: ('0.061469995930335745',), 1393330850: ('0.061469995930335745',), 1393330849: ('0.061469995930335745',), 1393330846: ('0.061469995930335745',)} new output for save of step final : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ('0.061469995930335745',), 1393331016: ('0.061469995930335745',), 1393330856: ('0.061469995930335745',), 1393330852: ('0.061469995930335745',), 1393330850: ('0.061469995930335745',), 1393330849: ('0.061469995930335745',), 1393330846: ('0.061469995930335745',)} [1393331120, 1393331088, 1393331058, 1393331016, 1393330856, 1393330852, 1393330850, 1393330849, 1393330846] map_info['map_portfolio_photo'] : {28342486: [1393331120, 1393331088, 1393331058, 1393331016, 1393330856, 1393330852, 1393330850, 1393330849, 1393330846, 1393330817, 1393330813, 1393330810, 1393330808, 1393330806, 1393330782, 1393330779, 1393330775, 1393330773, 1393330770, 1393330768, 1393330693, 1393330691, 1393330689, 1393330668, 1393330667, 1393330665]} final : False mtd_id 4302 list_pids : [1393331120, 1393331088, 1393331058, 1393331016, 1393330856, 1393330852, 1393330850, 1393330849, 1393330846] Looping around the photos to save general results len do output : 9 /1393331120.Didn't retrieve data . /1393331088.Didn't retrieve data . /1393331058.Didn't retrieve data . /1393331016.Didn't retrieve data . /1393330856.Didn't retrieve data . /1393330852.Didn't retrieve data . /1393330850.Didn't retrieve data . /1393330849.Didn't retrieve data . /1393330846.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, '4020989') ('4302', '28342486', '1393331120', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393331088', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393331058', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393331016', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330856', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330852', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330850', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330849', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330846', None, None, None, None, None, '4020989') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 27 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '28342486', '1393331120', '0.061469995930335745', None, None, None, None, '4020989'), ('4302', '28342486', '1393331088', '0.061469995930335745', None, None, None, None, '4020989'), ('4302', '28342486', '1393331058', '0.061469995930335745', None, None, None, None, '4020989'), ('4302', '28342486', '1393331016', '0.061469995930335745', None, None, None, None, '4020989'), ('4302', '28342486', '1393330856', '0.061469995930335745', None, None, None, None, '4020989'), ('4302', '28342486', '1393330852', '0.061469995930335745', None, None, None, None, '4020989'), ('4302', '28342486', '1393330850', '0.061469995930335745', None, None, None, None, '4020989'), ('4302', '28342486', '1393330849', '0.061469995930335745', None, None, None, None, '4020989'), ('4302', '28342486', '1393330846', '0.061469995930335745', None, None, None, None, '4020989')] time used for this insertion : 0.01586627960205078 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06358599662780762 time spend to save output : 0.0161745548248291 total time spend for step 2 : 0.07976055145263672 step3:velours_tree Sat Nov 8 02:52:30 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {28342486: [{'Carton_gris': 28342513, 'cartonnette': 28342514, 'Teint_Dans_La_Masse': 28342515, 'environnement': 28342516, 'kraft': 28342517, 'papier': 28342518, 'autre_refus': 28342519, 'plastique': 28342520, 'metal': 28342521, 'Carton_brun': 28342522, 'mal_croppe': 28342523, 'flou': 28342524}]} input_args_next_step : {28342486: ()} output_args : {28342486: [{'Carton_gris': 28342513, 'cartonnette': 28342514, 'Teint_Dans_La_Masse': 28342515, 'environnement': 28342516, 'kraft': 28342517, 'papier': 28342518, 'autre_refus': 28342519, 'plastique': 28342520, 'metal': 28342521, 'Carton_brun': 28342522, 'mal_croppe': 28342523, 'flou': 28342524}]} args : 28342486 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'Carton_gris': 28342513, 'cartonnette': 28342514, 'Teint_Dans_La_Masse': 28342515, 'environnement': 28342516, 'kraft': 28342517, 'papier': 28342518, 'autre_refus': 28342519, 'plastique': 28342520, 'metal': 28342521, 'Carton_brun': 28342522, 'mal_croppe': 28342523, 'flou': 28342524},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28342486) 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([28342486]) 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.2970082759857178 time spend to save output : 7.128715515136719e-05 total time spend for step 3 : 0.29707956314086914 step4:send_mail_cod Sat Nov 8 02:52:31 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ('0.061469995930335745',), 1393331016: ('0.061469995930335745',), 1393330856: ('0.061469995930335745',), 1393330852: ('0.061469995930335745',), 1393330850: ('0.061469995930335745',), 1393330849: ('0.061469995930335745',), 1393330846: ('0.061469995930335745',)} input_args_next_step : {1393331120: ()} output_args : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ('0.061469995930335745',), 1393331016: ('0.061469995930335745',), 1393330856: ('0.061469995930335745',), 1393330852: ('0.061469995930335745',), 1393330850: ('0.061469995930335745',), 1393330849: ('0.061469995930335745',), 1393330846: ('0.061469995930335745',)} args : 1393331120 depend.output_id : 0 input_args_next_step : {1393331120: ('0.061469995930335745',), 1393331088: ()} output_args : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ('0.061469995930335745',), 1393331016: ('0.061469995930335745',), 1393330856: ('0.061469995930335745',), 1393330852: ('0.061469995930335745',), 1393330850: ('0.061469995930335745',), 1393330849: ('0.061469995930335745',), 1393330846: ('0.061469995930335745',)} args : 1393331088 depend.output_id : 0 input_args_next_step : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ()} output_args : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ('0.061469995930335745',), 1393331016: ('0.061469995930335745',), 1393330856: ('0.061469995930335745',), 1393330852: ('0.061469995930335745',), 1393330850: ('0.061469995930335745',), 1393330849: ('0.061469995930335745',), 1393330846: ('0.061469995930335745',)} args : 1393331058 depend.output_id : 0 input_args_next_step : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ('0.061469995930335745',), 1393331016: ()} output_args : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ('0.061469995930335745',), 1393331016: ('0.061469995930335745',), 1393330856: ('0.061469995930335745',), 1393330852: ('0.061469995930335745',), 1393330850: ('0.061469995930335745',), 1393330849: ('0.061469995930335745',), 1393330846: ('0.061469995930335745',)} args : 1393331016 depend.output_id : 0 input_args_next_step : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ('0.061469995930335745',), 1393331016: ('0.061469995930335745',), 1393330856: ()} output_args : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ('0.061469995930335745',), 1393331016: ('0.061469995930335745',), 1393330856: ('0.061469995930335745',), 1393330852: ('0.061469995930335745',), 1393330850: ('0.061469995930335745',), 1393330849: ('0.061469995930335745',), 1393330846: ('0.061469995930335745',)} args : 1393330856 depend.output_id : 0 input_args_next_step : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ('0.061469995930335745',), 1393331016: ('0.061469995930335745',), 1393330856: ('0.061469995930335745',), 1393330852: ()} output_args : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ('0.061469995930335745',), 1393331016: ('0.061469995930335745',), 1393330856: ('0.061469995930335745',), 1393330852: ('0.061469995930335745',), 1393330850: ('0.061469995930335745',), 1393330849: ('0.061469995930335745',), 1393330846: ('0.061469995930335745',)} args : 1393330852 depend.output_id : 0 input_args_next_step : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ('0.061469995930335745',), 1393331016: ('0.061469995930335745',), 1393330856: ('0.061469995930335745',), 1393330852: ('0.061469995930335745',), 1393330850: ()} output_args : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ('0.061469995930335745',), 1393331016: ('0.061469995930335745',), 1393330856: ('0.061469995930335745',), 1393330852: ('0.061469995930335745',), 1393330850: ('0.061469995930335745',), 1393330849: ('0.061469995930335745',), 1393330846: ('0.061469995930335745',)} args : 1393330850 depend.output_id : 0 input_args_next_step : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ('0.061469995930335745',), 1393331016: ('0.061469995930335745',), 1393330856: ('0.061469995930335745',), 1393330852: ('0.061469995930335745',), 1393330850: ('0.061469995930335745',), 1393330849: ()} output_args : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ('0.061469995930335745',), 1393331016: ('0.061469995930335745',), 1393330856: ('0.061469995930335745',), 1393330852: ('0.061469995930335745',), 1393330850: ('0.061469995930335745',), 1393330849: ('0.061469995930335745',), 1393330846: ('0.061469995930335745',)} args : 1393330849 depend.output_id : 0 input_args_next_step : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ('0.061469995930335745',), 1393331016: ('0.061469995930335745',), 1393330856: ('0.061469995930335745',), 1393330852: ('0.061469995930335745',), 1393330850: ('0.061469995930335745',), 1393330849: ('0.061469995930335745',), 1393330846: ()} output_args : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ('0.061469995930335745',), 1393331016: ('0.061469995930335745',), 1393330856: ('0.061469995930335745',), 1393330852: ('0.061469995930335745',), 1393330850: ('0.061469995930335745',), 1393330849: ('0.061469995930335745',), 1393330846: ('0.061469995930335745',)} args : 1393330846 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 : {28342486: [{'Carton_gris': 28342513, 'cartonnette': 28342514, 'Teint_Dans_La_Masse': 28342515, 'environnement': 28342516, 'kraft': 28342517, 'papier': 28342518, 'autre_refus': 28342519, 'plastique': 28342520, 'metal': 28342521, 'Carton_brun': 28342522, 'mal_croppe': 28342523, 'flou': 28342524}]} input_args_next_step : {1393331120: ('0.061469995930335745',), 1393331088: ('0.061469995930335745',), 1393331058: ('0.061469995930335745',), 1393331016: ('0.061469995930335745',), 1393330856: ('0.061469995930335745',), 1393330852: ('0.061469995930335745',), 1393330850: ('0.061469995930335745',), 1393330849: ('0.061469995930335745',), 1393330846: ('0.061469995930335745',), 28342486: ()} output_args : {28342486: [{'Carton_gris': 28342513, 'cartonnette': 28342514, 'Teint_Dans_La_Masse': 28342515, 'environnement': 28342516, 'kraft': 28342517, 'papier': 28342518, 'autre_refus': 28342519, 'plastique': 28342520, 'metal': 28342521, 'Carton_brun': 28342522, 'mal_croppe': 28342523, 'flou': 28342524}]} args : 28342486 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :10, first value : ('0.061469995930335745',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28342486) 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 (1393331120,1393331088,1393331058,1393331016,1393330856,1393330852,1393330850,1393330849,1393330846) Found this number of photos: 9 ##### Call download_photos : nb_thread : 5 begin to download photo : 1393330846 begin to download photo : 1393330850 begin to download photo : 1393330856 begin to download photo : 1393331058 begin to download photo : 1393331120 download finish for photo 1393330856 begin to download photo : 1393331016 download finish for photo 1393331058 begin to download photo : 1393331088 download finish for photo 1393330850 begin to download photo : 1393330852 download finish for photo 1393331120 download finish for photo 1393330846 begin to download photo : 1393330849 download finish for photo 1393330852 download finish for photo 1393330849 download finish for photo 1393331016 download finish for photo 1393331088 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 9 ; length of list_pids : 9 ; length of list_args : 9 results_Auto_P28342486_08-11-2025_02_52_31.pdf 28342514 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=28342514 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1393330839: '1762566547_1134883_1393330668_1454f83af51a740068683091e0dda920_rle_crop_4026681628_0.png', 1393330840: '1762566547_1134883_1393330665_85347e7cd5bfe62a85055d5cc80e510a_rle_crop_4026681873_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/dcf28bcd345808d72065b8f8eb3ea5be_35130806.png change filename to text .imagette283425141762566751/ imagette283425141762566751/1762566547_1134883_1393330668_1454f83af51a740068683091e0dda920_rle_crop_4026681628_0.png.png imagette283425141762566751/1762566547_1134883_1393330665_85347e7cd5bfe62a85055d5cc80e510a_rle_crop_4026681873_0.png.png imagette283425171762566751/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/f6a4eda820c772557f292d4bb7a82fc7_21283544.png imagette283425141762566751 28342517 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=28342517 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette283425171762566751 28342519 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=28342519 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1393330838: '1762566547_1134883_1393330667_1bf922d61de102de7bd74e189094e497_rle_crop_4026681643_0.png'} change filename to text .imagette283425191762566751/ imagette283425191762566751/1762566547_1134883_1393330667_1bf922d61de102de7bd74e189094e497_rle_crop_4026681643_0.png.png imagette283425201762566751/ imagette283425211762566751/ imagette283425231762566751/ imagette283425241762566751/ imagette283425131762566751/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/04a1011bb018687a11fe8d1a41460ecb_79812102.png imagette283425191762566751 28342520 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=28342520 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette283425201762566751 28342521 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=28342521 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette283425211762566751 28342523 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=28342523 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette283425231762566751 28342524 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=28342524 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette283425241762566751 28342513 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=28342513 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette283425131762566751 28342515 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=28342515 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1393330836: '1762566547_1134883_1393330668_1454f83af51a740068683091e0dda920_rle_crop_4026681627_0.png', 1393330837: '1762566547_1134883_1393330665_85347e7cd5bfe62a85055d5cc80e510a_rle_crop_4026681878_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/36ad4cf5b8f17f7e3d6ae198ae5298be_62346738.png change filename to text .imagette283425151762566751/ imagette283425151762566751/1762566547_1134883_1393330665_85347e7cd5bfe62a85055d5cc80e510a_rle_crop_4026681878_0.png.png imagette283425151762566751/1762566547_1134883_1393330668_1454f83af51a740068683091e0dda920_rle_crop_4026681627_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/86ffe0f28292aa95d46bfb096220bda9_23156258.png imagette283425151762566751 28342522 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=28342522 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1393330843: '1762566547_1134883_1393330668_1454f83af51a740068683091e0dda920_rle_crop_4026681624_0.png'} change filename to text .imagette283425221762566752/ imagette283425221762566752/1762566547_1134883_1393330668_1454f83af51a740068683091e0dda920_rle_crop_4026681624_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/a91c973f292c1d21dd8b8e46f673d2a4_18774521.png imagette283425221762566752 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=28342486 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/28342531,28342533,28342535,28342537,28342539,28342541,28342543,28342545,28342547,28342549,28342551,28342553?tags=Carton_gris,cartonnette,Teint_Dans_La_Masse,environnement,kraft,papier,autre_refus,plastique,metal,Carton_brun,mal_croppe,flou your option no_mail is active, we will not send the real mail to your client args[1393331120] : ('0.061469995930335745',) no score found for photo 1393331120 We are sending mail with results at report@fotonower.com args[1393331088] : ('0.061469995930335745',) no score found for photo 1393331088 We are sending mail with results at report@fotonower.com args[1393331058] : ('0.061469995930335745',) no score found for photo 1393331058 We are sending mail with results at report@fotonower.com args[1393331016] : ('0.061469995930335745',) no score found for photo 1393331016 We are sending mail with results at report@fotonower.com args[1393330856] : ('0.061469995930335745',) no score found for photo 1393330856 We are sending mail with results at report@fotonower.com args[1393330852] : ('0.061469995930335745',) no score found for photo 1393330852 We are sending mail with results at report@fotonower.com args[1393330850] : ('0.061469995930335745',) no score found for photo 1393330850 We are sending mail with results at report@fotonower.com args[1393330849] : ('0.061469995930335745',) no score found for photo 1393330849 We are sending mail with results at report@fotonower.com args[1393330846] : ('0.061469995930335745',) no score found for photo 1393330846 We are sending mail with results at report@fotonower.com refus_total : 0.061469995930335745 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=28342486 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_P28342486_08-11-2025_02_52_31.pdf results_Auto_P28342486_08-11-2025_02_52_31.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28342486_08-11-2025_02_52_31.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','28342486','results_Auto_P28342486_08-11-2025_02_52_31.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28342486_08-11-2025_02_52_31.pdf','pdf','','0.1','0.061469995930335745') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28342486]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1393331120, 1393331088, 1393331058, 1393331016, 1393330856, 1393330852, 1393330850, 1393330849, 1393330846] map_info['map_portfolio_photo'] : {28342486: [1393331120, 1393331088, 1393331058, 1393331016, 1393330856, 1393330852, 1393330850, 1393330849, 1393330846, 1393330817, 1393330813, 1393330810, 1393330808, 1393330806, 1393330782, 1393330779, 1393330775, 1393330773, 1393330770, 1393330768, 1393330693, 1393330691, 1393330689, 1393330668, 1393330667, 1393330665]} final : False mtd_id 4302 list_pids : [1393331120, 1393331088, 1393331058, 1393331016, 1393330856, 1393330852, 1393330850, 1393330849, 1393330846] 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, '4020989') ('4302', '28342486', '1393331120', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393331088', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393331058', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393331016', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330856', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330852', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330850', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330849', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330846', None, None, None, None, None, '4020989') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '28342486', '1393331120', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393331088', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393331058', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393331016', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393330856', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393330852', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393330850', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393330849', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393330846', None, None, None, None, None, '4020989')] time used for this insertion : 0.012659549713134766 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.916121482849121 time spend to save output : 0.012961149215698242 total time spend for step 4 : 1.9290826320648193 step5:split_time_score Sat Nov 8 02:52:33 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['28342486'] 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 : [('28342486',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28342486) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1393331120: {'path': 'temp/1762566751_1125556_1393331120_06f8d4ce6cba40efe96fb44cca24ba5e.jpg', 'extension': 'jpg'}, 1393330850: {'path': 'temp/1762566751_1125556_1393330850_e8336a8dbd68ea636bcc333ec2f92dcb.jpg', 'extension': 'jpg'}, 1393330852: {'path': 'temp/1762566751_1125556_1393330852_91004f8eaa97b23493f2f5bc721c9329.jpg', 'extension': 'jpg'}, 1393330846: {'path': 'temp/1762566751_1125556_1393330846_8765aa57340684b6c5ad88a691db44b3.jpg', 'extension': 'jpg'}, 1393330849: {'path': 'temp/1762566751_1125556_1393330849_3b45409e33648b98dc0fd6817b46f7a7.jpg', 'extension': 'jpg'}, 1393330856: {'path': 'temp/1762566751_1125556_1393330856_05554afaa777781394e8023f7d845507.jpg', 'extension': 'jpg'}, 1393331016: {'path': 'temp/1762566751_1125556_1393331016_901ff51c141212ea2c91d0ade1fb47de.jpg', 'extension': 'jpg'}, 1393331058: {'path': 'temp/1762566751_1125556_1393331058_b95db77724e6ef0108b334ff71d4a5b5.jpg', 'extension': 'jpg'}, 1393331088: {'path': 'temp/1762566751_1125556_1393331088_36324dbd05c3eb0cd0bb61f49b90b95f.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 = 28342486; (('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 = 28342486 group by h (('02', 26),) 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=28342486 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 (28342486) 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 (28342486) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 08112025 28342486 Nombre de photos uploadées : 26 / 23040 (0%) 08112025 28342486 Nombre de photos taguées (types de déchets): 0 / 26 (0%) 08112025 28342486 Nombre de photos taguées (volume) : 0 / 26 (0%) [{'photo_id': 1393330668, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/1454f83af51a740068683091e0dda920.jpg', 'username': None, 'uploaded_at': 1762566367, 'text': 'image_08112025_02_45_03_010154m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1393330667, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/1bf922d61de102de7bd74e189094e497.jpg', 'username': None, 'uploaded_at': 1762566367, 'text': 'image_08112025_02_45_13_010141m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1393330665, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/85347e7cd5bfe62a85055d5cc80e510a.jpg', 'username': None, 'uploaded_at': 1762566367, 'text': 'image_08112025_02_45_23_010137m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1393330693, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/8/a3e31345598dede833d60acce1afeca9.jpg', 'username': None, 'uploaded_at': 1762566427, 'text': 'image_08112025_02_45_53_9125.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.0994415283203125e-06 elapsed_time : order_list_meta_photo_and_scores 7.867813110351562e-06 ?????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0014414787292480469 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 28342486, '2025-11-08' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-11-08' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2540024,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.21326684951782227 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= 2540024 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548038, 'mtr_portfolio_id': 28336003, 'dashboard_result_id': 17029643, '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_P28336003_08-11-2025_00_17_28.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28336011, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28336012, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28336013, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28336014, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28336015, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28336016, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28336017, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28336018, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28336019, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28336020, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28336021, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28336022, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548038, 'mtr_portfolio_id': 28336481, 'dashboard_result_id': 17029644, '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_P28336481_08-11-2025_00_32_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28336486, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28336487, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28336488, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28336489, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28336490, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28336491, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28336492, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28336493, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28336494, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28336495, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28336496, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28336497, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548038, 'mtr_portfolio_id': 28337035, 'dashboard_result_id': 17029645, '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_P28337035_08-11-2025_00_46_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28337096, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28337097, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28337098, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28337099, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28337100, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28337101, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28337102, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28337103, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28337104, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28337105, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28337106, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28337107, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548038, 'mtr_portfolio_id': 28337671, 'dashboard_result_id': 17029646, '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_P28337671_08-11-2025_01_02_30.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28337732, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28337733, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28337734, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28337735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28337736, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28337737, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28337738, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28337739, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28337740, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28337741, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28337742, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28337743, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548038, 'mtr_portfolio_id': 28339415, 'dashboard_result_id': 17029647, '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_P28339415_08-11-2025_01_48_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28339417, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28339418, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28339419, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28339420, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28339421, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28339422, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28339423, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28339424, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28339425, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28339426, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28339427, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28339428, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548038, 'mtr_portfolio_id': 28339875, 'dashboard_result_id': 17029648, '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_P28339875_08-11-2025_02_01_02.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28339896, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28339897, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28339898, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28339899, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28339900, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28339901, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28339902, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28339903, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28339904, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28339905, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28339906, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28339907, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548038, 'mtr_portfolio_id': 28340539, 'dashboard_result_id': 17029649, '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_P28340539_08-11-2025_02_16_57.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28340546, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28340547, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28340548, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28340549, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28340550, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28340551, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28340552, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28340553, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28340554, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28340555, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28340556, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28340557, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548038, 'mtr_portfolio_id': 28341213, 'dashboard_result_id': 17029650, '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_P28341213_08-11-2025_02_34_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28341222, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28341223, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28341224, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28341225, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28341226, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28341227, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28341228, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28341229, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28341230, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28341231, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28341232, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28341233, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548038, 'mtr_portfolio_id': 28341967, 'dashboard_result_id': 17029651, '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_P28341967_08-11-2025_02_46_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28341980, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28341981, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28341982, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28341983, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28341984, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28341985, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28341986, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28341987, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28341988, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28341989, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28341990, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28341992, 'pht': 3726}}"}, {'dashboat_entry_day': 2540024, 'dashboard_run_id': 2548038, 'mtr_portfolio_id': 28342486, 'dashboard_result_id': 17029652, '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_P28342486_08-11-2025_02_50_33.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28342513, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28342514, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28342515, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28342516, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28342517, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28342518, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28342519, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28342520, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28342521, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28342522, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28342523, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28342524, '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 = 28336003 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': 4020370, 'mtr_portfolio_id': 28336003, 'created_at': datetime.datetime(2025, 11, 8, 0, 17, 28), 'result': '0.04019632894827077', 'result_long': None, 'result_double': None}] Qualite : 0.04019632894827077 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28336003 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28336003_08-11-2025_00_17_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28336003 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_P28336003_08-11-2025_00_17_28.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28336011, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28336012, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28336013, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28336014, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28336015, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28336016, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28336017, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28336018, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28336019, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28336020, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28336021, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28336022, 'pht': 3726}}" where mtr_portfolio_id = 28336003 and dashboard_run_id = 2548038 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`=28336003 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17029643, 0.04019632894827077, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28336003_08-11-2025_00_17_28.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28336011, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28336012, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28336013, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28336014, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28336015, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28336016, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28336017, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28336018, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28336019, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28336020, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28336021, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28336022, '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 = 28336481 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': 4020414, 'mtr_portfolio_id': 28336481, 'created_at': datetime.datetime(2025, 11, 8, 0, 32, 58), 'result': '0.03956901961259934', 'result_long': None, 'result_double': None}] Qualite : 0.03956901961259934 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28336481 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28336481_08-11-2025_00_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28336481 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_P28336481_08-11-2025_00_32_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28336486, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28336487, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28336488, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28336489, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28336490, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28336491, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28336492, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28336493, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28336494, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28336495, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28336496, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28336497, 'pht': 3726}}" where mtr_portfolio_id = 28336481 and dashboard_run_id = 2548038 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`=28336481 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17029644, 0.03956901961259934, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28336481_08-11-2025_00_32_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28336486, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28336487, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28336488, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28336489, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28336490, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28336491, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28336492, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28336493, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28336494, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28336495, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28336496, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28336497, '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 = 28337035 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': 4020479, 'mtr_portfolio_id': 28337035, 'created_at': datetime.datetime(2025, 11, 8, 0, 46, 57), 'result': '0.03564186648367525', 'result_long': None, 'result_double': None}] Qualite : 0.03564186648367525 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28337035 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28337035_08-11-2025_00_46_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28337035 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_P28337035_08-11-2025_00_46_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28337096, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28337097, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28337098, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28337099, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28337100, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28337101, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28337102, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28337103, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28337104, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28337105, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28337106, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28337107, 'pht': 3726}}" where mtr_portfolio_id = 28337035 and dashboard_run_id = 2548038 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`=28337035 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17029645, 0.03564186648367525, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28337035_08-11-2025_00_46_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28337096, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28337097, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28337098, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28337099, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28337100, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28337101, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28337102, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28337103, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28337104, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28337105, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28337106, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28337107, '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 = 28337671 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': 4020549, 'mtr_portfolio_id': 28337671, 'created_at': datetime.datetime(2025, 11, 8, 1, 2, 30), 'result': '0.0375088666914562', 'result_long': None, 'result_double': None}] Qualite : 0.0375088666914562 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28337671 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28337671_08-11-2025_01_02_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28337671 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_P28337671_08-11-2025_01_02_30.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28337732, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28337733, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28337734, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28337735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28337736, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28337737, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28337738, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28337739, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28337740, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28337741, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28337742, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28337743, 'pht': 3726}}" where mtr_portfolio_id = 28337671 and dashboard_run_id = 2548038 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`=28337671 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17029646, 0.0375088666914562, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28337671_08-11-2025_01_02_30.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28337732, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28337733, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28337734, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28337735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28337736, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28337737, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28337738, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28337739, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28337740, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28337741, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28337742, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28337743, '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 = 28339415 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': 4020699, 'mtr_portfolio_id': 28339415, 'created_at': datetime.datetime(2025, 11, 8, 1, 48, 59), 'result': '0.05205984190432125', 'result_long': None, 'result_double': None}] Qualite : 0.05205984190432125 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28339415 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28339415_08-11-2025_01_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28339415 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_P28339415_08-11-2025_01_48_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28339417, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28339418, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28339419, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28339420, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28339421, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28339422, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28339423, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28339424, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28339425, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28339426, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28339427, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28339428, 'pht': 3726}}" where mtr_portfolio_id = 28339415 and dashboard_run_id = 2548038 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`=28339415 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17029647, 0.05205984190432125, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28339415_08-11-2025_01_48_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28339417, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28339418, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28339419, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28339420, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28339421, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28339422, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28339423, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28339424, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28339425, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28339426, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28339427, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28339428, '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 = 28339875 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': 4020735, 'mtr_portfolio_id': 28339875, 'created_at': datetime.datetime(2025, 11, 8, 2, 3), 'result': '0.04140678272944849', 'result_long': None, 'result_double': None}] Qualite : 0.04140678272944849 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28339875 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28339875_08-11-2025_02_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28339875 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_P28339875_08-11-2025_02_03_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28339896, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28339897, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28339898, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28339899, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28339900, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28339901, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28339902, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28339903, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28339904, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28339905, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28339906, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28339907, 'pht': 3726}}" where mtr_portfolio_id = 28339875 and dashboard_run_id = 2548038 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`=28339875 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17029648, 0.04140678272944849, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28339875_08-11-2025_02_03_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28339896, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28339897, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28339898, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28339899, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28339900, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28339901, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28339902, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28339903, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28339904, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28339905, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28339906, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28339907, '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 = 28340539 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': 4020797, 'mtr_portfolio_id': 28340539, 'created_at': datetime.datetime(2025, 11, 8, 2, 16, 57), 'result': '0.05072146864932478', 'result_long': None, 'result_double': None}] Qualite : 0.05072146864932478 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28340539 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28340539_08-11-2025_02_16_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28340539 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_P28340539_08-11-2025_02_16_57.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28340546, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28340547, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28340548, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28340549, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28340550, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28340551, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28340552, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28340553, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28340554, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28340555, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28340556, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28340557, 'pht': 3726}}" where mtr_portfolio_id = 28340539 and dashboard_run_id = 2548038 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`=28340539 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17029649, 0.05072146864932478, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28340539_08-11-2025_02_16_57.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28340546, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28340547, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28340548, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28340549, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28340550, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28340551, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28340552, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28340553, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28340554, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28340555, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28340556, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28340557, '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 = 28341213 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': 4020872, 'mtr_portfolio_id': 28341213, 'created_at': datetime.datetime(2025, 11, 8, 2, 34, 58), 'result': '0.04714598692392764', 'result_long': None, 'result_double': None}] Qualite : 0.04714598692392764 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28341213 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28341213_08-11-2025_02_34_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28341213 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_P28341213_08-11-2025_02_34_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28341222, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28341223, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28341224, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28341225, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28341226, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28341227, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28341228, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28341229, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28341230, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28341231, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28341232, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28341233, 'pht': 3726}}" where mtr_portfolio_id = 28341213 and dashboard_run_id = 2548038 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`=28341213 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17029650, 0.04714598692392764, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28341213_08-11-2025_02_34_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28341222, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28341223, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28341224, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28341225, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28341226, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28341227, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28341228, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28341229, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28341230, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28341231, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28341232, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28341233, '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 = 28341967 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': 4020945, 'mtr_portfolio_id': 28341967, 'created_at': datetime.datetime(2025, 11, 8, 2, 46, 59), 'result': '0.04329548973262093', 'result_long': None, 'result_double': None}] Qualite : 0.04329548973262093 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28341967 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28341967_08-11-2025_02_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28341967 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_P28341967_08-11-2025_02_46_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28341980, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28341981, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28341982, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28341983, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28341984, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28341985, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28341986, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28341987, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28341988, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28341989, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28341990, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28341992, 'pht': 3726}}" where mtr_portfolio_id = 28341967 and dashboard_run_id = 2548038 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`=28341967 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17029651, 0.04329548973262093, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28341967_08-11-2025_02_46_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28341980, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28341981, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28341982, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28341983, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28341984, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28341985, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28341986, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28341987, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28341988, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28341989, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28341990, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28341992, '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 = 28342486 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': 4020989, 'mtr_portfolio_id': 28342486, 'created_at': datetime.datetime(2025, 11, 8, 2, 52, 30), 'result': '0.061469995930335745', 'result_long': None, 'result_double': None}] Qualite : 0.061469995930335745 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28342486 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28342486_08-11-2025_02_52_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28342486 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_P28342486_08-11-2025_02_52_31.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28342513, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28342514, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28342515, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28342516, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28342517, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28342518, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28342519, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28342520, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28342521, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28342522, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28342523, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28342524, 'pht': 3726}}" where mtr_portfolio_id = 28342486 and dashboard_run_id = 2548038 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`=28342486 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17029652, 0.061469995930335745, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28342486_08-11-2025_02_52_31.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28342513, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28342514, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28342515, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28342516, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28342517, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28342518, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28342519, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28342520, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28342521, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28342522, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28342523, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28342524, '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 (28336003,28336481,28337035,28337671,28339415,28339875,28340539,28341213,28341967,28342486) result : ((1393294530,), (1393294539,), (1393294562,), (1393294691,), (1393294724,), (1393294758,), (1393294793,), (1393294834,), (1393295403,), (1393295465,), (1393295525,), (1393295559,), (1393295753,), (1393295757,), (1393295790,), (1393295824,), (1393295863,), (1393296048,), (1393296080,), (1393296089,), (1393296153,), (1393296156,), (1393296160,), (1393296162,), (1393296164,), (1393296166,), (1393296191,), (1393296193,), (1393296267,), (1393296301,), (1393296332,), (1393296367,), (1393296405,), (1393296440,), (1393296792,), (1393296825,), (1393296860,), (1393296895,), (1393296941,), (1393297513,), (1393297554,), (1393297592,), (1393298019,), (1393298046,), (1393298050,), (1393298280,), (1393298283,), (1393298286,), (1393298289,), (1393298355,), (1393298388,), (1393298423,), (1393298818,), (1393298848,), (1393299117,), (1393299131,), (1393299146,), (1393299214,), (1393299212,), (1393299213,), (1393299255,), (1393299256,), (1393299257,), (1393299260,), (1393299535,), (1393299566,), (1393299571,), (1393299871,), (1393299910,), (1393299944,), (1393300249,), (1393300253,), (1393300255,), (1393300257,), (1393300260,), (1393300543,), (1393300547,), (1393300550,), (1393300554,), (1393300559,), (1393300590,), (1393300592,), (1393300593,), (1393300595,), (1393300598,), (1393300630,), (1393300631,), (1393300632,), (1393300634,), (1393300638,), (1393300642,), (1393300691,), (1393300693,), (1393300694,), (1393300724,), (1393300760,), (1393300793,), (1393300828,), (1393300861,), (1393300900,), (1393301025,), (1393301058,), (1393301193,), (1393301224,), (1393301269,), (1393301326,), (1393301410,), (1393301491,), (1393301916,), (1393302013,), (1393302108,), (1393302194,), (1393302285,), (1393302344,), (1393302888,), (1393302926,), (1393302962,), (1393302998,), (1393303031,), (1393303062,), (1393303248,), (1393303320,), (1393303472,), (1393303506,), (1393303536,), (1393303540,), (1393303543,), (1393303583,), (1393303585,), (1393303587,), (1393303588,), (1393303617,), (1393303648,), (1393304007,), (1393304011,), (1393304086,), (1393304109,), (1393304120,), (1393304123,), (1393304129,), (1393303942,), (1393303964,), (1393303994,), (1393304002,), (1393304159,), (1393304171,), (1393304183,), (1393304312,), (1393304313,), (1393304314,), (1393304316,), (1393304319,), (1393304424,), (1393304431,), (1393304436,), (1393304440,), (1393304444,), (1393304453,), (1393304455,), (1393304457,), (1393304466,), (1393304474,), (1393304484,), (1393304495,), (1393304498,), (1393304501,), (1393304510,), (1393304531,), (1393304536,), (1393304540,), (1393304554,), (1393304562,), (1393304567,), (1393304570,), (1393304600,), (1393304624,), (1393304635,), (1393304642,), (1393304646,), (1393304707,), (1393304739,), (1393304772,), (1393304814,), (1393304849,), (1393304885,), (1393305003,), (1393305047,), (1393305136,), (1393305138,), (1393305163,), (1393305189,), (1393305223,), (1393305397,), (1393305400,), (1393305402,), (1393305405,), (1393305410,), (1393305450,), (1393305643,), (1393305678,), (1393305712,), (1393305734,), (1393305742,), (1393305802,), (1393305803,), (1393305805,), (1393305808,), (1393305828,), (1393305833,), (1393305838,), (1393305842,), (1393305854,), (1393306107,), (1393306132,), (1393306162,), (1393306178,), (1393306192,), (1393306204,), (1393306241,), (1393306239,), (1393306240,), (1393306264,), (1393306267,), (1393306268,), (1393306270,), (1393306273,), (1393306274,), (1393306351,), (1393306353,), (1393306355,), (1393306362,), (1393306401,), (1393306846,), (1393306879,), (1393306893,), (1393306895,), (1393306898,), (1393307097,), (1393307121,), (1393307130,), (1393307134,), (1393307141,), (1393307382,), (1393307413,), (1393307499,), (1393307502,), (1393307504,), (1393307506,), (1393307509,), (1393307543,), (1393307544,), (1393307545,), (1393307548,), (1393307551,), (1393307634,), (1393307698,), (1393307700,), (1393307754,), (1393307757,), (1393307760,), (1393307763,), (1393308022,), (1393308069,), (1393308497,), (1393308500,), (1393308503,), (1393308507,), (1393308509,), (1393308511,), (1393308534,), (1393317017,), (1393317049,), (1393317402,), (1393317432,), (1393317462,), (1393317493,), (1393317500,), (1393317722,), (1393317725,), (1393317728,), (1393317751,), (1393317957,), (1393317959,), (1393317961,), (1393318152,), (1393318161,), (1393318162,), (1393318164,), (1393318166,), (1393318184,), (1393318313,), (1393318346,), (1393318383,), (1393318530,), (1393318568,), (1393318600,), (1393318631,), (1393318668,), (1393318949,), (1393318951,), (1393318952,), (1393318970,), (1393318978,), (1393319279,), (1393319299,), (1393319300,), (1393319309,), (1393319585,), (1393319615,), (1393319642,), (1393319676,), (1393319707,), (1393319760,), (1393319986,), (1393320047,), (1393320123,), (1393320181,), (1393320415,), (1393320595,), (1393320626,), (1393320662,), (1393320698,), (1393320731,), (1393320888,), (1393320889,), (1393320891,), (1393320893,), (1393320905,), (1393320907,), (1393320909,), (1393320910,), (1393320930,), (1393321069,), (1393320928,), (1393320929,), (1393320956,), (1393320972,), (1393320973,), (1393320980,), (1393320983,), (1393320986,), (1393321033,), (1393321034,), (1393321086,), (1393321088,), (1393321091,), (1393321399,), (1393321430,), (1393321460,), (1393321687,), (1393321766,), (1393321811,), (1393321815,), (1393322039,), (1393322040,), (1393322041,), (1393322069,), (1393322071,), (1393322075,), (1393322172,), (1393322209,), (1393322231,), (1393322236,), (1393322249,), (1393322282,), (1393322331,), (1393322332,), (1393322333,), (1393322334,), (1393322336,), (1393322352,), (1393322353,), (1393322354,), (1393322368,), (1393322494,), (1393322526,), (1393322559,), (1393322593,), (1393322630,), (1393322663,), (1393322755,), (1393322761,), (1393322850,), (1393322852,), (1393322873,), (1393322892,), (1393322896,), (1393322999,), (1393323001,), (1393323005,), (1393323022,), (1393323055,), (1393323206,), (1393323239,), (1393323270,), (1393323417,), (1393323406,), (1393323409,), (1393323411,), (1393323413,), (1393323688,), (1393323726,), (1393323761,), (1393323805,), (1393323824,), (1393323867,), (1393324151,), (1393324153,), (1393324168,), (1393324191,), (1393324274,), (1393324276,), (1393324278,), (1393324279,), (1393324310,), (1393324324,), (1393324579,), (1393324580,), (1393324581,), (1393324583,), (1393324587,), (1393324607,), (1393324609,), (1393324612,), (1393324616,), (1393324620,), (1393324621,), (1393324666,), (1393324669,), (1393324672,), (1393324678,), (1393324680,), (1393324696,), (1393324698,), (1393324701,), (1393324712,), (1393324719,), (1393324879,), (1393324908,), (1393324939,), (1393324971,), (1393324975,), (1393324978,), (1393325242,), (1393325300,), (1393325371,), (1393325404,), (1393325437,), (1393325659,), (1393325721,), (1393326108,), (1393326120,), (1393326131,), (1393326139,), (1393326303,), (1393326306,), (1393326309,), (1393326417,), (1393326435,), (1393326436,), (1393326462,), (1393326573,), (1393326574,), (1393326603,), (1393326595,), (1393326597,), (1393326599,), (1393326708,), (1393326810,), (1393326811,), (1393326812,), (1393326840,), (1393326842,), (1393326844,), (1393326847,), (1393326851,), (1393326901,), (1393326931,), (1393326966,), (1393327203,), (1393327204,), (1393327205,), (1393327208,), (1393327212,), (1393327216,), (1393327234,), (1393327237,), (1393327286,), (1393327288,), (1393327289,), (1393327291,), (1393327294,), (1393327564,), (1393327566,), (1393327568,), (1393327571,), (1393327576,), (1393327731,), (1393327733,), (1393327757,), (1393327794,), (1393327827,), (1393327841,), (1393327842,), (1393327843,), (1393328121,), (1393328122,), (1393328123,), (1393328125,), (1393328128,), (1393328342,), (1393328352,), (1393328355,), (1393328357,), (1393328361,), (1393328426,), (1393328460,), (1393328492,), (1393328647,), (1393328749,), (1393328736,), (1393328737,), (1393328740,), (1393328745,), (1393328793,), (1393328796,), (1393328799,), (1393328802,), (1393328804,), (1393328807,), (1393328832,), (1393328840,), (1393328843,), (1393328845,), (1393328945,), (1393328949,), (1393329214,), (1393329215,), (1393329238,), (1393329296,), (1393329298,), (1393329345,), (1393329355,), (1393329360,), (1393329365,), (1393329368,), (1393329380,), (1393329592,), (1393329625,), (1393329644,), (1393329647,), (1393329765,), (1393329767,), (1393329940,), (1393329941,), (1393329959,), (1393330014,), (1393330054,), (1393330172,), (1393330178,), (1393330180,), (1393330183,), (1393330185,), (1393330201,), (1393330203,), (1393330204,), (1393330205,), (1393330266,), (1393330267,), (1393330508,), (1393330518,), (1393330521,), (1393330530,), (1393330568,), (1393330669,), (1393330665,), (1393330667,), (1393330668,), (1393330689,), (1393330691,), (1393330693,), (1393330768,), (1393330770,), (1393330773,), (1393330775,), (1393330779,), (1393330782,), (1393330806,), (1393330808,), (1393330810,), (1393330813,), (1393330817,), (1393330846,), (1393330849,), (1393330850,), (1393330852,), (1393330856,), (1393331016,), (1393331058,), (1393331088,), (1393331120,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'08112025': {'nb_upload': 26, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28342486]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1393331120, 1393331088, 1393331058, 1393331016, 1393330856, 1393330852, 1393330850, 1393330849, 1393330846] map_info['map_portfolio_photo'] : {28342486: [1393331120, 1393331088, 1393331058, 1393331016, 1393330856, 1393330852, 1393330850, 1393330849, 1393330846, 1393330817, 1393330813, 1393330810, 1393330808, 1393330806, 1393330782, 1393330779, 1393330775, 1393330773, 1393330770, 1393330768, 1393330693, 1393330691, 1393330689, 1393330668, 1393330667, 1393330665]} final : True mtd_id 4302 list_pids : [1393331120, 1393331088, 1393331058, 1393331016, 1393330856, 1393330852, 1393330850, 1393330849, 1393330846] Looping around the photos to save general results len do output : 1 /28342486Didn'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, '4020989') ('4302', '28342486', '1393331120', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393331088', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393331058', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393331016', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330856', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330852', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330850', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330849', None, None, None, None, None, '4020989') ('4302', None, None, None, None, None, None, None, '4020989') ('4302', '28342486', '1393330846', None, None, None, None, None, '4020989') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '28342486', 'None', None, None, None, None, '4020989'), ('4302', '28342486', '1393331120', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393331088', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393331058', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393331016', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393330856', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393330852', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393330850', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393330849', None, None, None, None, None, '4020989'), ('4302', '28342486', '1393330846', None, None, None, None, None, '4020989')] time used for this insertion : 0.01689934730529785 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.8768696784973145 time spend to save output : 0.01711273193359375 total time spend for step 5 : 0.8939824104309082 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 (4020989) 2.26user 2.31system 0:09.16elapsed 50%CPU (0avgtext+0avgdata 158956maxresident)k 120inputs+5712outputs (0major+77133minor)pagefaults 0swaps