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 : 2344295 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 (3946875) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3946875) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27836830 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3946875'] with mtr_portfolio_ids : ['27836830'] and first list_photo_ids : [] new path : /proc/2344295/ Name: python3 Umask: 0002 State: R (running) Tgid: 2344295 Ngid: 0 Pid: 2344295 PPid: 2344294 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2344295 NSpid: 2344295 NSpgid: 2342323 NSsid: 2342323 VmPeak: 1106868 kB VmSize: 1106868 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97220 kB VmRSS: 97220 kB RssAnon: 59836 kB RssFile: 37384 kB RssShmem: 0 kB VmData: 865620 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 600 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: 54 nonvoluntary_ctxt_switches: 82 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2344295', 'Ngid': '0', 'Pid': '2344295', 'PPid': '2344294', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2344295', 'NSpid': '2344295', 'NSpgid': '2342323', 'NSsid': '2342323', 'VmPeak': '1106868 kB', 'VmSize': '1106868 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97220 kB', 'VmRSS': '97220 kB', 'RssAnon': '59836 kB', 'RssFile': '37384 kB', 'RssShmem': '0 kB', 'VmData': '865620 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '600 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': '54', 'nonvoluntary_ctxt_switches': '82'} ('datou_batch_current', '2344295', '1106868', '0', '1106868', '865620', '97220', b'', 'marlene', '3946875') 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 (27836830) 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 (3946875 ) ) 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 (27836830) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1389619009, 'portfolio_id': 27836830}, {'photo_id': 1389619002, 'portfolio_id': 27836830}, {'photo_id': 1389619000, 'portfolio_id': 27836830}, {'photo_id': 1389618999, 'portfolio_id': 27836830}, {'photo_id': 1389618979, 'portfolio_id': 27836830}, {'photo_id': 1389618971, 'portfolio_id': 27836830}, {'photo_id': 1389618883, 'portfolio_id': 27836830}, {'photo_id': 1389618876, 'portfolio_id': 27836830}, {'photo_id': 1389618802, 'portfolio_id': 27836830}, {'photo_id': 1389618800, 'portfolio_id': 27836830}, {'photo_id': 1389618799, 'portfolio_id': 27836830}, {'photo_id': 1389618423, 'portfolio_id': 27836830}, {'photo_id': 1389618410, 'portfolio_id': 27836830}, {'photo_id': 1389618408, 'portfolio_id': 27836830}, {'photo_id': 1389618405, 'portfolio_id': 27836830}, {'photo_id': 1389618375, 'portfolio_id': 27836830}, {'photo_id': 1389618294, 'portfolio_id': 27836830}, {'photo_id': 1389618290, 'portfolio_id': 27836830}, {'photo_id': 1389618288, 'portfolio_id': 27836830}, {'photo_id': 1389617208, 'portfolio_id': 27836830}, {'photo_id': 1389617187, 'portfolio_id': 27836830}, {'photo_id': 1389617185, 'portfolio_id': 27836830}, {'photo_id': 1389617182, 'portfolio_id': 27836830}, {'photo_id': 1389617178, 'portfolio_id': 27836830}, {'photo_id': 1389617168, 'portfolio_id': 27836830}, {'photo_id': 1389616428, 'portfolio_id': 27836830}, {'photo_id': 1389616413, 'portfolio_id': 27836830}, {'photo_id': 1389616411, 'portfolio_id': 27836830}, {'photo_id': 1389616410, 'portfolio_id': 27836830}, {'photo_id': 1389616396, 'portfolio_id': 27836830}, {'photo_id': 1389616371, 'portfolio_id': 27836830}, {'photo_id': 1389616370, 'portfolio_id': 27836830}, {'photo_id': 1389616368, 'portfolio_id': 27836830}, {'photo_id': 1389615946, 'portfolio_id': 27836830}, {'photo_id': 1389615944, 'portfolio_id': 27836830}, {'photo_id': 1389615942, 'portfolio_id': 27836830}] map_portfolio_id_photo_id: {27836830: [1389619009, 1389619002, 1389619000, 1389618999, 1389618979, 1389618971, 1389618883, 1389618876, 1389618802, 1389618800, 1389618799, 1389618423, 1389618410, 1389618408, 1389618405, 1389618375, 1389618294, 1389618290, 1389618288, 1389617208, 1389617187, 1389617185, 1389617182, 1389617178, 1389617168, 1389616428, 1389616413, 1389616411, 1389616410, 1389616396, 1389616371, 1389616370, 1389616368, 1389615946, 1389615944, 1389615942]} ##### 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.05143618583679199 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Wed Oct 15 18:10:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27836830) 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 : 27836830 get user id for portfolio 27836830 get sub ptf for main ptf 27836830, type 3726 and hashtags ['Teint_Dans_La_Masse', 'cartonnette', 'flou', 'plastique', 'Carton_gris', 'Carton_brun', 'kraft', 'autre_refus', 'metal', 'papier', 'mal_croppe', 'environnement'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27836830 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','cartonnette','flou','plastique','Carton_gris','Carton_brun','kraft','autre_refus','metal','papier','mal_croppe','environnement')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27836830 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','cartonnette','flou','plastique','Carton_gris','Carton_brun','kraft','autre_refus','metal','papier','mal_croppe','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 27836830, 'sub_port_id': 27836832, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784622, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 4, 59)}, 'metal': {'main_port_id': 27836830, 'sub_port_id': 27836833, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784623, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 4, 59)}, 'environnement': {'main_port_id': 27836830, 'sub_port_id': 27836834, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784624, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 4, 59)}, 'plastique': {'main_port_id': 27836830, 'sub_port_id': 27836835, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784625, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 4, 59)}, 'flou': {'main_port_id': 27836830, 'sub_port_id': 27836836, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784626, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 4, 59)}, 'autre_refus': {'main_port_id': 27836830, 'sub_port_id': 27836837, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784627, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 4, 59)}, 'Carton_gris': {'main_port_id': 27836830, 'sub_port_id': 27836838, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784628, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 4, 59)}, 'cartonnette': {'main_port_id': 27836830, 'sub_port_id': 27836839, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784629, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 4, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 27836830, 'sub_port_id': 27836840, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784630, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 4, 59)}, 'kraft': {'main_port_id': 27836830, 'sub_port_id': 27836841, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784631, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 4, 59)}, 'Carton_brun': {'main_port_id': 27836830, 'sub_port_id': 27836842, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784632, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 4, 59)}, 'mal_croppe': {'main_port_id': 27836830, 'sub_port_id': 27836843, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784633, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 4, 59)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27836832 , 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=27836830 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 (27836832) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27836830) result : ((1389615942,), (1389615944,), (1389615946,), (1389616368,), (1389616370,), (1389616371,), (1389616396,), (1389616410,), (1389616411,), (1389616413,), (1389616428,), (1389617168,), (1389617178,), (1389617182,), (1389617185,), (1389617187,), (1389617208,), (1389618288,), (1389618290,), (1389618294,), (1389618375,), (1389618405,), (1389618408,), (1389618410,), (1389618423,), (1389618799,), (1389618800,), (1389618802,), (1389618876,), (1389618883,), (1389618971,), (1389618979,), (1389618999,), (1389619000,), (1389619002,), (1389619009,)) 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 (1389619000,1389618800) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27836833 , 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=27836830 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 (27836833) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27836830) result : ((1389615942,), (1389615944,), (1389615946,), (1389616368,), (1389616370,), (1389616371,), (1389616396,), (1389616410,), (1389616411,), (1389616413,), (1389616428,), (1389617168,), (1389617178,), (1389617182,), (1389617185,), (1389617187,), (1389617208,), (1389618288,), (1389618290,), (1389618294,), (1389618375,), (1389618405,), (1389618408,), (1389618410,), (1389618423,), (1389618799,), (1389618800,), (1389618802,), (1389618876,), (1389618883,), (1389618971,), (1389618979,), (1389618999,), (1389619000,), (1389619002,), (1389619009,)) 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 (1389619000,1389618800) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27836834 , 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=27836830 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 (27836834) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27836830) result : ((1389615942,), (1389615944,), (1389615946,), (1389616368,), (1389616370,), (1389616371,), (1389616396,), (1389616410,), (1389616411,), (1389616413,), (1389616428,), (1389617168,), (1389617178,), (1389617182,), (1389617185,), (1389617187,), (1389617208,), (1389618288,), (1389618290,), (1389618294,), (1389618375,), (1389618405,), (1389618408,), (1389618410,), (1389618423,), (1389618799,), (1389618800,), (1389618802,), (1389618876,), (1389618883,), (1389618971,), (1389618979,), (1389618999,), (1389619000,), (1389619002,), (1389619009,)) 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 (1389619000,1389618800) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27836835 , 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=27836830 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 (27836835) result : ((1389619007,), (1389619030,), (1389619031,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27836830) result : ((1389615942,), (1389615944,), (1389615946,), (1389616368,), (1389616370,), (1389616371,), (1389616396,), (1389616410,), (1389616411,), (1389616413,), (1389616428,), (1389617168,), (1389617178,), (1389617182,), (1389617185,), (1389617187,), (1389617208,), (1389618288,), (1389618290,), (1389618294,), (1389618375,), (1389618405,), (1389618408,), (1389618410,), (1389618423,), (1389618799,), (1389618800,), (1389618802,), (1389618876,), (1389618883,), (1389618971,), (1389618979,), (1389618999,), (1389619000,), (1389619002,), (1389619009,)) 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 (1389619000,1389618800) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27836836 , 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=27836830 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 (27836836) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27836830) result : ((1389615942,), (1389615944,), (1389615946,), (1389616368,), (1389616370,), (1389616371,), (1389616396,), (1389616410,), (1389616411,), (1389616413,), (1389616428,), (1389617168,), (1389617178,), (1389617182,), (1389617185,), (1389617187,), (1389617208,), (1389618288,), (1389618290,), (1389618294,), (1389618375,), (1389618405,), (1389618408,), (1389618410,), (1389618423,), (1389618799,), (1389618800,), (1389618802,), (1389618876,), (1389618883,), (1389618971,), (1389618979,), (1389618999,), (1389619000,), (1389619002,), (1389619009,)) 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 (1389619000,1389618800) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27836837 , 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=27836830 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 (27836837) result : ((1389616385,), (1389616386,), (1389616387,), (1389616388,), (1389616759,), (1389619003,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27836830) result : ((1389615942,), (1389615944,), (1389615946,), (1389616368,), (1389616370,), (1389616371,), (1389616396,), (1389616410,), (1389616411,), (1389616413,), (1389616428,), (1389617168,), (1389617178,), (1389617182,), (1389617185,), (1389617187,), (1389617208,), (1389618288,), (1389618290,), (1389618294,), (1389618375,), (1389618405,), (1389618408,), (1389618410,), (1389618423,), (1389618799,), (1389618800,), (1389618802,), (1389618876,), (1389618883,), (1389618971,), (1389618979,), (1389618999,), (1389619000,), (1389619002,), (1389619009,)) 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 (1389619000,1389618800) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27836838 , 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=27836830 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 (27836838) result : ((1389616389,), (1389616390,), (1389616391,), (1389616392,), (1389616432,), (1389616760,), (1389616761,), (1389616762,), (1389616763,), (1389619027,), (1389619028,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27836830) result : ((1389615942,), (1389615944,), (1389615946,), (1389616368,), (1389616370,), (1389616371,), (1389616396,), (1389616410,), (1389616411,), (1389616413,), (1389616428,), (1389617168,), (1389617178,), (1389617182,), (1389617185,), (1389617187,), (1389617208,), (1389618288,), (1389618290,), (1389618294,), (1389618375,), (1389618405,), (1389618408,), (1389618410,), (1389618423,), (1389618799,), (1389618800,), (1389618802,), (1389618876,), (1389618883,), (1389618971,), (1389618979,), (1389618999,), (1389619000,), (1389619002,), (1389619009,)) 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 (1389619000,1389618800) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27836839 , 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=27836830 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 (27836839) result : ((1389616393,), (1389616394,), (1389616776,), (1389616778,), (1389619005,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27836830) result : ((1389615942,), (1389615944,), (1389615946,), (1389616368,), (1389616370,), (1389616371,), (1389616396,), (1389616410,), (1389616411,), (1389616413,), (1389616428,), (1389617168,), (1389617178,), (1389617182,), (1389617185,), (1389617187,), (1389617208,), (1389618288,), (1389618290,), (1389618294,), (1389618375,), (1389618405,), (1389618408,), (1389618410,), (1389618423,), (1389618799,), (1389618800,), (1389618802,), (1389618876,), (1389618883,), (1389618971,), (1389618979,), (1389618999,), (1389619000,), (1389619002,), (1389619009,)) 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 (1389619000,1389618800) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27836840 , 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=27836830 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 (27836840) result : ((1389616383,), (1389616384,), (1389619026,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27836830) result : ((1389615942,), (1389615944,), (1389615946,), (1389616368,), (1389616370,), (1389616371,), (1389616396,), (1389616410,), (1389616411,), (1389616413,), (1389616428,), (1389617168,), (1389617178,), (1389617182,), (1389617185,), (1389617187,), (1389617208,), (1389618288,), (1389618290,), (1389618294,), (1389618375,), (1389618405,), (1389618408,), (1389618410,), (1389618423,), (1389618799,), (1389618800,), (1389618802,), (1389618876,), (1389618883,), (1389618971,), (1389618979,), (1389618999,), (1389619000,), (1389619002,), (1389619009,)) 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 (1389619000,1389618800) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27836841 , 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=27836830 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 (27836841) result : ((1389619032,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27836830) result : ((1389615942,), (1389615944,), (1389615946,), (1389616368,), (1389616370,), (1389616371,), (1389616396,), (1389616410,), (1389616411,), (1389616413,), (1389616428,), (1389617168,), (1389617178,), (1389617182,), (1389617185,), (1389617187,), (1389617208,), (1389618288,), (1389618290,), (1389618294,), (1389618375,), (1389618405,), (1389618408,), (1389618410,), (1389618423,), (1389618799,), (1389618800,), (1389618802,), (1389618876,), (1389618883,), (1389618971,), (1389618979,), (1389618999,), (1389619000,), (1389619002,), (1389619009,)) 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 (1389619000,1389618800) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27836842 , 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=27836830 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 (27836842) result : ((1389616787,), (1389619006,), (1389619029,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27836830) result : ((1389615942,), (1389615944,), (1389615946,), (1389616368,), (1389616370,), (1389616371,), (1389616396,), (1389616410,), (1389616411,), (1389616413,), (1389616428,), (1389617168,), (1389617178,), (1389617182,), (1389617185,), (1389617187,), (1389617208,), (1389618288,), (1389618290,), (1389618294,), (1389618375,), (1389618405,), (1389618408,), (1389618410,), (1389618423,), (1389618799,), (1389618800,), (1389618802,), (1389618876,), (1389618883,), (1389618971,), (1389618979,), (1389618999,), (1389619000,), (1389619002,), (1389619009,)) 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 (1389619000,1389618800) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27836843 , 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=27836830 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 (27836843) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27836830) result : ((1389615942,), (1389615944,), (1389615946,), (1389616368,), (1389616370,), (1389616371,), (1389616396,), (1389616410,), (1389616411,), (1389616413,), (1389616428,), (1389617168,), (1389617178,), (1389617182,), (1389617185,), (1389617187,), (1389617208,), (1389618288,), (1389618290,), (1389618294,), (1389618375,), (1389618405,), (1389618408,), (1389618410,), (1389618423,), (1389618799,), (1389618800,), (1389618802,), (1389618876,), (1389618883,), (1389618971,), (1389618979,), (1389618999,), (1389619000,), (1389619002,), (1389619009,)) 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 (1389619000,1389618800) and cspi.crop_hashtag_id = chi.id; To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27836830 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','cartonnette','flou','plastique','Carton_gris','Carton_brun','kraft','autre_refus','metal','papier','mal_croppe','environnement')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27836830 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','cartonnette','flou','plastique','Carton_gris','Carton_brun','kraft','autre_refus','metal','papier','mal_croppe','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 27836830, 'sub_port_id': 27836844, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784634, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 5, 5)}, 'metal': {'main_port_id': 27836830, 'sub_port_id': 27836845, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784635, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 5, 5)}, 'environnement': {'main_port_id': 27836830, 'sub_port_id': 27836846, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784636, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 5, 5)}, 'plastique': {'main_port_id': 27836830, 'sub_port_id': 27836847, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784637, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 5, 5)}, 'flou': {'main_port_id': 27836830, 'sub_port_id': 27836848, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784638, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 5, 5)}, 'autre_refus': {'main_port_id': 27836830, 'sub_port_id': 27836849, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784639, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 5, 5)}, 'Carton_gris': {'main_port_id': 27836830, 'sub_port_id': 27836850, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784640, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 5, 5)}, 'cartonnette': {'main_port_id': 27836830, 'sub_port_id': 27836851, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784641, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 5, 5)}, 'Teint_Dans_La_Masse': {'main_port_id': 27836830, 'sub_port_id': 27836852, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784642, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 5, 5)}, 'kraft': {'main_port_id': 27836830, 'sub_port_id': 27836853, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784643, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 5, 5)}, 'Carton_brun': {'main_port_id': 27836830, 'sub_port_id': 27836854, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784644, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 5, 5), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 5, 5)}, 'mal_croppe': {'main_port_id': 27836830, 'sub_port_id': 27836855, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18784645, 'last_updated_at': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 18, 9, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 18, 5, 5)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27836844,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27836832 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27836845,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27836833 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27836846,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27836834 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27836847,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27836835 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27836848,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27836836 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27836849,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27836837 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27836850,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27836838 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27836851,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27836839 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27836852,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27836840 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27836853,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27836841 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27836854,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27836842 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27836855,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27836843 lien utilise dans velours : https://marlene.fotonower.com/velours/27836844,27836845,27836846,27836847,27836848,27836849,27836850,27836851,27836852,27836853,27836854,27836855?tags=papier,metal,environnement,plastique,flou,autre_refus,Carton_gris,cartonnette,Teint_Dans_La_Masse,kraft,Carton_brun,mal_croppe After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27836830]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1389619009, 1389619002, 1389619000, 1389618999, 1389618979, 1389618971, 1389618883, 1389618876, 1389618802, 1389618800, 1389618799] map_info['map_portfolio_photo'] : {27836830: [1389619009, 1389619002, 1389619000, 1389618999, 1389618979, 1389618971, 1389618883, 1389618876, 1389618802, 1389618800, 1389618799, 1389618423, 1389618410, 1389618408, 1389618405, 1389618375, 1389618294, 1389618290, 1389618288, 1389617208, 1389617187, 1389617185, 1389617182, 1389617178, 1389617168, 1389616428, 1389616413, 1389616411, 1389616410, 1389616396, 1389616371, 1389616370, 1389616368, 1389615946, 1389615944, 1389615942]} final : False mtd_id 4302 list_pids : [1389619009, 1389619002, 1389619000, 1389618999, 1389618979, 1389618971, 1389618883, 1389618876, 1389618802, 1389618800, 1389618799] Looping around the photos to save general results len do output : 1 /27836830. 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, '3946875') ('4302', '27836830', '1389619009', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389619002', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389619000', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618999', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618979', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618971', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618883', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618876', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618802', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618800', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618799', None, None, None, None, None, '3946875') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 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, '27836830', "{'papier': 27836832, 'metal': 27836833, 'environnement': 27836834, 'plastique': 27836835, 'flou': 27836836, 'autre_refus': 27836837, 'Carton_gris': 27836838, 'cartonnette': 27836839, 'Teint_Dans_La_Masse': 27836840, 'kraft': 27836841, 'Carton_brun': 27836842, 'mal_croppe': 27836843}", None, None, None, None, '3946875'), ('4302', '27836830', '1389619009', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389619002', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389619000', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618999', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618979', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618971', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618883', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618876', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618802', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618800', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618799', None, None, None, None, None, '3946875')] time used for this insertion : 0.03757810592651367 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.7505743503570557 time spend to save output : 0.03795003890991211 total time spend for step 1 : 1.7885243892669678 step2:final Wed Oct 15 18:11:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! 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 (27836830) 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 27836830 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1389615946,1389615944,1389615942,1389616371,1389616370,1389616368,1389616396,1389618375,1389616428,1389618294,1389616413,1389618290,1389616411,1389618288,1389616410,1389617208,1389617187,1389617185,1389617182,1389617178,1389617168,1389618423,1389618410,1389618408,1389618405,1389618883,1389618876,1389618802,1389618800,1389618799,1389619009,1389619002,1389619000,1389618999,1389618979,1389618971); 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([27836830]) Inside saveOutput : final : False verbose : True original output for save of step final : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ('0.06127610646686162',), 1389618876: ('0.06127610646686162',), 1389618802: ('0.06127610646686162',), 1389618800: ('0.06127610646686162',), 1389618799: ('0.06127610646686162',)} new output for save of step final : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ('0.06127610646686162',), 1389618876: ('0.06127610646686162',), 1389618802: ('0.06127610646686162',), 1389618800: ('0.06127610646686162',), 1389618799: ('0.06127610646686162',)} [1389619009, 1389619002, 1389619000, 1389618999, 1389618979, 1389618971, 1389618883, 1389618876, 1389618802, 1389618800, 1389618799] map_info['map_portfolio_photo'] : {27836830: [1389619009, 1389619002, 1389619000, 1389618999, 1389618979, 1389618971, 1389618883, 1389618876, 1389618802, 1389618800, 1389618799, 1389618423, 1389618410, 1389618408, 1389618405, 1389618375, 1389618294, 1389618290, 1389618288, 1389617208, 1389617187, 1389617185, 1389617182, 1389617178, 1389617168, 1389616428, 1389616413, 1389616411, 1389616410, 1389616396, 1389616371, 1389616370, 1389616368, 1389615946, 1389615944, 1389615942]} final : False mtd_id 4302 list_pids : [1389619009, 1389619002, 1389619000, 1389618999, 1389618979, 1389618971, 1389618883, 1389618876, 1389618802, 1389618800, 1389618799] Looping around the photos to save general results len do output : 11 /1389619009.Didn't retrieve data . /1389619002.Didn't retrieve data . /1389619000.Didn't retrieve data . /1389618999.Didn't retrieve data . /1389618979.Didn't retrieve data . /1389618971.Didn't retrieve data . /1389618883.Didn't retrieve data . /1389618876.Didn't retrieve data . /1389618802.Didn't retrieve data . /1389618800.Didn't retrieve data . /1389618799.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, '3946875') ('4302', '27836830', '1389619009', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389619002', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389619000', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618999', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618979', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618971', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618883', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618876', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618802', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618800', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618799', None, None, None, None, None, '3946875') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 33 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', '27836830', '1389619009', '0.06127610646686162', None, None, None, None, '3946875'), ('4302', '27836830', '1389619002', '0.06127610646686162', None, None, None, None, '3946875'), ('4302', '27836830', '1389619000', '0.06127610646686162', None, None, None, None, '3946875'), ('4302', '27836830', '1389618999', '0.06127610646686162', None, None, None, None, '3946875'), ('4302', '27836830', '1389618979', '0.06127610646686162', None, None, None, None, '3946875'), ('4302', '27836830', '1389618971', '0.06127610646686162', None, None, None, None, '3946875'), ('4302', '27836830', '1389618883', '0.06127610646686162', None, None, None, None, '3946875'), ('4302', '27836830', '1389618876', '0.06127610646686162', None, None, None, None, '3946875'), ('4302', '27836830', '1389618802', '0.06127610646686162', None, None, None, None, '3946875'), ('4302', '27836830', '1389618800', '0.06127610646686162', None, None, None, None, '3946875'), ('4302', '27836830', '1389618799', '0.06127610646686162', None, None, None, None, '3946875')] time used for this insertion : 0.036902666091918945 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.24241900444030762 time spend to save output : 0.03754711151123047 total time spend for step 2 : 0.2799661159515381 step3:velours_tree Wed Oct 15 18:11:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {27836830: [{'papier': 27836832, 'metal': 27836833, 'environnement': 27836834, 'plastique': 27836835, 'flou': 27836836, 'autre_refus': 27836837, 'Carton_gris': 27836838, 'cartonnette': 27836839, 'Teint_Dans_La_Masse': 27836840, 'kraft': 27836841, 'Carton_brun': 27836842, 'mal_croppe': 27836843}]} input_args_next_step : {27836830: ()} output_args : {27836830: [{'papier': 27836832, 'metal': 27836833, 'environnement': 27836834, 'plastique': 27836835, 'flou': 27836836, 'autre_refus': 27836837, 'Carton_gris': 27836838, 'cartonnette': 27836839, 'Teint_Dans_La_Masse': 27836840, 'kraft': 27836841, 'Carton_brun': 27836842, 'mal_croppe': 27836843}]} args : 27836830 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'papier': 27836832, 'metal': 27836833, 'environnement': 27836834, 'plastique': 27836835, 'flou': 27836836, 'autre_refus': 27836837, 'Carton_gris': 27836838, 'cartonnette': 27836839, 'Teint_Dans_La_Masse': 27836840, 'kraft': 27836841, 'Carton_brun': 27836842, 'mal_croppe': 27836843},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27836830) 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([27836830]) 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.399000883102417 time spend to save output : 8.463859558105469e-05 total time spend for step 3 : 0.39908552169799805 step4:send_mail_cod Wed Oct 15 18:11:01 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 : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ('0.06127610646686162',), 1389618876: ('0.06127610646686162',), 1389618802: ('0.06127610646686162',), 1389618800: ('0.06127610646686162',), 1389618799: ('0.06127610646686162',)} input_args_next_step : {1389619009: ()} output_args : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ('0.06127610646686162',), 1389618876: ('0.06127610646686162',), 1389618802: ('0.06127610646686162',), 1389618800: ('0.06127610646686162',), 1389618799: ('0.06127610646686162',)} args : 1389619009 depend.output_id : 0 input_args_next_step : {1389619009: ('0.06127610646686162',), 1389619002: ()} output_args : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ('0.06127610646686162',), 1389618876: ('0.06127610646686162',), 1389618802: ('0.06127610646686162',), 1389618800: ('0.06127610646686162',), 1389618799: ('0.06127610646686162',)} args : 1389619002 depend.output_id : 0 input_args_next_step : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ()} output_args : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ('0.06127610646686162',), 1389618876: ('0.06127610646686162',), 1389618802: ('0.06127610646686162',), 1389618800: ('0.06127610646686162',), 1389618799: ('0.06127610646686162',)} args : 1389619000 depend.output_id : 0 input_args_next_step : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ()} output_args : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ('0.06127610646686162',), 1389618876: ('0.06127610646686162',), 1389618802: ('0.06127610646686162',), 1389618800: ('0.06127610646686162',), 1389618799: ('0.06127610646686162',)} args : 1389618999 depend.output_id : 0 input_args_next_step : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ()} output_args : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ('0.06127610646686162',), 1389618876: ('0.06127610646686162',), 1389618802: ('0.06127610646686162',), 1389618800: ('0.06127610646686162',), 1389618799: ('0.06127610646686162',)} args : 1389618979 depend.output_id : 0 input_args_next_step : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ()} output_args : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ('0.06127610646686162',), 1389618876: ('0.06127610646686162',), 1389618802: ('0.06127610646686162',), 1389618800: ('0.06127610646686162',), 1389618799: ('0.06127610646686162',)} args : 1389618971 depend.output_id : 0 input_args_next_step : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ()} output_args : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ('0.06127610646686162',), 1389618876: ('0.06127610646686162',), 1389618802: ('0.06127610646686162',), 1389618800: ('0.06127610646686162',), 1389618799: ('0.06127610646686162',)} args : 1389618883 depend.output_id : 0 input_args_next_step : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ('0.06127610646686162',), 1389618876: ()} output_args : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ('0.06127610646686162',), 1389618876: ('0.06127610646686162',), 1389618802: ('0.06127610646686162',), 1389618800: ('0.06127610646686162',), 1389618799: ('0.06127610646686162',)} args : 1389618876 depend.output_id : 0 input_args_next_step : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ('0.06127610646686162',), 1389618876: ('0.06127610646686162',), 1389618802: ()} output_args : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ('0.06127610646686162',), 1389618876: ('0.06127610646686162',), 1389618802: ('0.06127610646686162',), 1389618800: ('0.06127610646686162',), 1389618799: ('0.06127610646686162',)} args : 1389618802 depend.output_id : 0 input_args_next_step : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ('0.06127610646686162',), 1389618876: ('0.06127610646686162',), 1389618802: ('0.06127610646686162',), 1389618800: ()} output_args : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ('0.06127610646686162',), 1389618876: ('0.06127610646686162',), 1389618802: ('0.06127610646686162',), 1389618800: ('0.06127610646686162',), 1389618799: ('0.06127610646686162',)} args : 1389618800 depend.output_id : 0 input_args_next_step : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ('0.06127610646686162',), 1389618876: ('0.06127610646686162',), 1389618802: ('0.06127610646686162',), 1389618800: ('0.06127610646686162',), 1389618799: ()} output_args : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ('0.06127610646686162',), 1389618876: ('0.06127610646686162',), 1389618802: ('0.06127610646686162',), 1389618800: ('0.06127610646686162',), 1389618799: ('0.06127610646686162',)} args : 1389618799 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 : {27836830: [{'papier': 27836832, 'metal': 27836833, 'environnement': 27836834, 'plastique': 27836835, 'flou': 27836836, 'autre_refus': 27836837, 'Carton_gris': 27836838, 'cartonnette': 27836839, 'Teint_Dans_La_Masse': 27836840, 'kraft': 27836841, 'Carton_brun': 27836842, 'mal_croppe': 27836843}]} input_args_next_step : {1389619009: ('0.06127610646686162',), 1389619002: ('0.06127610646686162',), 1389619000: ('0.06127610646686162',), 1389618999: ('0.06127610646686162',), 1389618979: ('0.06127610646686162',), 1389618971: ('0.06127610646686162',), 1389618883: ('0.06127610646686162',), 1389618876: ('0.06127610646686162',), 1389618802: ('0.06127610646686162',), 1389618800: ('0.06127610646686162',), 1389618799: ('0.06127610646686162',), 27836830: ()} output_args : {27836830: [{'papier': 27836832, 'metal': 27836833, 'environnement': 27836834, 'plastique': 27836835, 'flou': 27836836, 'autre_refus': 27836837, 'Carton_gris': 27836838, 'cartonnette': 27836839, 'Teint_Dans_La_Masse': 27836840, 'kraft': 27836841, 'Carton_brun': 27836842, 'mal_croppe': 27836843}]} args : 27836830 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 :12, first value : ('0.06127610646686162',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27836830) 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 (1389619009,1389619002,1389619000,1389618999,1389618979,1389618971,1389618883,1389618876,1389618802,1389618800,1389618799) Found this number of photos: 11 ##### Call download_photos : nb_thread : 5 begin to download photo : 1389618799 begin to download photo : 1389618876 begin to download photo : 1389618979 begin to download photo : 1389619002 download finish for photo 1389618876 begin to download photo : 1389618883 download finish for photo 1389619002 begin to download photo : 1389619009 download finish for photo 1389618979 begin to download photo : 1389618999 download finish for photo 1389618799 begin to download photo : 1389618800 download finish for photo 1389618883 begin to download photo : 1389618971 download finish for photo 1389618999 begin to download photo : 1389619000 download finish for photo 1389618800 begin to download photo : 1389618802 download finish for photo 1389619009 download finish for photo 1389618971 download finish for photo 1389618802 download finish for photo 1389619000 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette278368331760544661/ length of list_filenames : 11 ; length of list_pids : 11 ; length of list_args : 11 results_Auto_P27836830_15-10-2025_18_11_01.pdf 27836833 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=27836833 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette278368331760544661 27836835 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=27836835 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1389619007: '1760544545_2277698_1389618405_b9d1f53ac0b081b607331abda72498bf_rle_crop_3998983715_0.png', 1389619030: '1760544567_2278137_1389617182_554db9f7fd0ce089163740868053ce37_rle_crop_3998983959_0.png', 1389619031: '1760544567_2278137_1389617178_a17dceb56531711f509cb5aba2324322_rle_crop_3998983972_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/c9ac6ae948ab5a18b8f5220eceaf8f99_54860325.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/dd36e622d1cbd36bbfde3448b5265e6f_782896.png change filename to text .imagette278368351760544661/ imagette278368351760544661/1760544567_2278137_1389617178_a17dceb56531711f509cb5aba2324322_rle_crop_3998983972_0.png.png imagette278368351760544661/1760544545_2277698_1389618405_b9d1f53ac0b081b607331abda72498bf_rle_crop_3998983715_0.png.png imagette278368351760544661/1760544567_2278137_1389617182_554db9f7fd0ce089163740868053ce37_rle_crop_3998983959_0.png.png imagette278368361760544661/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/eb936db6122fce592220a85a84bc7fe7_63042686.png imagette278368351760544661 27836836 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=27836836 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette278368361760544661 27836837 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=27836837 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1389616385: '1760544206_2261219_1389615946_8736836a0cf3fbb6593db009dbb95fc4_rle_crop_3998976351_0.png', 1389616386: '1760544206_2261219_1389615946_8736836a0cf3fbb6593db009dbb95fc4_rle_crop_3998976349_0.png', 1389616387: '1760544206_2261219_1389615942_e3843cf8bdfa680335763a3221c9f63e_rle_crop_3998976379_0.png', 1389616388: '1760544206_2261219_1389615942_e3843cf8bdfa680335763a3221c9f63e_rle_crop_3998976383_0.png', 1389616759: '1760544326_2267047_1389616396_7af1d8b75b29635492e7439a2e9c09ad_rle_crop_3998978866_0.png', 1389619003: '1760544545_2277698_1389618410_33dba4bf1649ee0224d0a03ff8280cfa_rle_crop_3998983673_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/f4665262a63f4f48012fa43ea961ea8b_57819563.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/4f1d7e026a7cefa28fab787daf8faf7a_32535104.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/870685d7a20c8d02774769b5a07289c6_53657307.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/6ba2737a7a18574d67d271ebb327bcce_51942337.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/381de0a46d1f0cd8fec7541786fc8ec2_33411327.png change filename to text .imagette278368371760544661/ imagette278368371760544661/1760544206_2261219_1389615946_8736836a0cf3fbb6593db009dbb95fc4_rle_crop_3998976351_0.png.png imagette278368371760544661/1760544206_2261219_1389615946_8736836a0cf3fbb6593db009dbb95fc4_rle_crop_3998976349_0.png.png imagette278368371760544661/1760544545_2277698_1389618410_33dba4bf1649ee0224d0a03ff8280cfa_rle_crop_3998983673_0.png.png imagette278368371760544661/1760544206_2261219_1389615942_e3843cf8bdfa680335763a3221c9f63e_rle_crop_3998976383_0.png.png imagette278368371760544661/1760544206_2261219_1389615942_e3843cf8bdfa680335763a3221c9f63e_rle_crop_3998976379_0.png.png imagette278368371760544661/1760544326_2267047_1389616396_7af1d8b75b29635492e7439a2e9c09ad_rle_crop_3998978866_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/aa9fbf863cc2136b3947447f7d11e6e3_63395603.png imagette278368371760544661 27836839 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=27836839 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1389616393: '1760544206_2261219_1389615944_1c3567cdc69192339ca1b6c9bb0d0ccf_rle_crop_3998976370_0.png', 1389616394: '1760544206_2261219_1389615942_e3843cf8bdfa680335763a3221c9f63e_rle_crop_3998976382_0.png', 1389616776: '1760544326_2267047_1389616368_fd1592a0f5cf74433a987c0edc22cae0_rle_crop_3998978893_0.png', 1389616778: '1760544326_2267047_1389616368_fd1592a0f5cf74433a987c0edc22cae0_rle_crop_3998978898_0.png', 1389619005: '1760544545_2277698_1389618405_b9d1f53ac0b081b607331abda72498bf_rle_crop_3998983706_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/2d14e17ca60111801d46bdcc64357af9_68916571.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/26022a746c02cbe74beaf17a865882d9_2198394.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/f4a18767cd7bc016949b9fbc7d805d42_25679201.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/4285928b9d0de57eaff829e33f2aba31_27422921.png change filename to text .imagette278368391760544662/ imagette278368391760544662/1760544206_2261219_1389615942_e3843cf8bdfa680335763a3221c9f63e_rle_crop_3998976382_0.png.png imagette278368391760544662/1760544206_2261219_1389615944_1c3567cdc69192339ca1b6c9bb0d0ccf_rle_crop_3998976370_0.png.png imagette278368391760544662/1760544326_2267047_1389616368_fd1592a0f5cf74433a987c0edc22cae0_rle_crop_3998978898_0.png.png imagette278368391760544662/1760544545_2277698_1389618405_b9d1f53ac0b081b607331abda72498bf_rle_crop_3998983706_0.png.png imagette278368391760544662/1760544326_2267047_1389616368_fd1592a0f5cf74433a987c0edc22cae0_rle_crop_3998978893_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/4ea10d14e627b16f5a834d0077ff9b6a_36139734.png imagette278368391760544662 27836841 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=27836841 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1389619032: '1760544567_2278137_1389617187_d8f17da95a54c766c84095f1fb838aff_rle_crop_3998983920_0.png'} change filename to text .imagette278368411760544662/ imagette278368411760544662/1760544567_2278137_1389617187_d8f17da95a54c766c84095f1fb838aff_rle_crop_3998983920_0.png.png imagette278368431760544662/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/737e96a67652c1c9bc47850c9b04bca8_52812938.png imagette278368411760544662 27836843 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=27836843 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette278368431760544662 27836838 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=27836838 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1389616389: '1760544206_2261219_1389615946_8736836a0cf3fbb6593db009dbb95fc4_rle_crop_3998976354_0.png', 1389616390: '1760544206_2261219_1389615946_8736836a0cf3fbb6593db009dbb95fc4_rle_crop_3998976352_0.png', 1389616391: '1760544206_2261219_1389615946_8736836a0cf3fbb6593db009dbb95fc4_rle_crop_3998976347_0.png', 1389616392: '1760544206_2261219_1389615944_1c3567cdc69192339ca1b6c9bb0d0ccf_rle_crop_3998976366_0.png', 1389616432: '1760544306_2266583_1389616371_b0db23723322daf3011815ae3f38db2a_rle_crop_3998978761_0.png', 1389616760: '1760544326_2267047_1389616396_7af1d8b75b29635492e7439a2e9c09ad_rle_crop_3998978863_0.png', 1389616761: '1760544326_2267047_1389616370_e5571c0e622736d72735cf45230592c3_rle_crop_3998978883_0.png', 1389616762: '1760544326_2267047_1389616368_fd1592a0f5cf74433a987c0edc22cae0_rle_crop_3998978894_0.png', 1389616763: '1760544326_2267047_1389616368_fd1592a0f5cf74433a987c0edc22cae0_rle_crop_3998978899_0.png', 1389619027: '1760544567_2278137_1389617182_554db9f7fd0ce089163740868053ce37_rle_crop_3998983951_0.png', 1389619028: '1760544567_2278137_1389617182_554db9f7fd0ce089163740868053ce37_rle_crop_3998983955_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/e53564274acad74ed50f4fa121d2fcfd_80359772.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/47496ab120911876ec52acd6188631e2_69269653.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/af9418ecb7f5d873b966f58b1815a26b_17101445.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/1d36878c2305ea23361bdf4ea0cce8dc_99875869.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/ece3a5b21144fab518490e0c25c42c4a_90659754.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/5d4909deadb5bee3ea16a49b81ba72d9_49180811.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/188157f3beaa6ac490b910c4bdb4cb5d_79944900.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/bb59acfe1163e997a3811432199f11c6_30988208.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/07b7f5df2c3a07bb24cb63d1b5d2db0a_59775273.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/4022c5acd32dc5c549951c99a900355c_50180743.png change filename to text .imagette278368381760544662/ imagette278368381760544662/1760544326_2267047_1389616368_fd1592a0f5cf74433a987c0edc22cae0_rle_crop_3998978894_0.png.png imagette278368381760544662/1760544567_2278137_1389617182_554db9f7fd0ce089163740868053ce37_rle_crop_3998983955_0.png.png imagette278368381760544662/1760544206_2261219_1389615944_1c3567cdc69192339ca1b6c9bb0d0ccf_rle_crop_3998976366_0.png.png imagette278368381760544662/1760544326_2267047_1389616368_fd1592a0f5cf74433a987c0edc22cae0_rle_crop_3998978899_0.png.png imagette278368381760544662/1760544326_2267047_1389616396_7af1d8b75b29635492e7439a2e9c09ad_rle_crop_3998978863_0.png.png imagette278368381760544662/1760544206_2261219_1389615946_8736836a0cf3fbb6593db009dbb95fc4_rle_crop_3998976347_0.png.png imagette278368381760544662/1760544306_2266583_1389616371_b0db23723322daf3011815ae3f38db2a_rle_crop_3998978761_0.png.png imagette278368381760544662/1760544567_2278137_1389617182_554db9f7fd0ce089163740868053ce37_rle_crop_3998983951_0.png.png imagette278368381760544662/1760544206_2261219_1389615946_8736836a0cf3fbb6593db009dbb95fc4_rle_crop_3998976354_0.png.png imagette278368381760544662/1760544206_2261219_1389615946_8736836a0cf3fbb6593db009dbb95fc4_rle_crop_3998976352_0.png.png imagette278368381760544662/1760544326_2267047_1389616370_e5571c0e622736d72735cf45230592c3_rle_crop_3998978883_0.png.png wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/eaf3d1eae3b02176743758b253e64b8d_35343595.png imagette278368381760544662 27836840 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=27836840 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1389616383: '1760544206_2261219_1389615946_8736836a0cf3fbb6593db009dbb95fc4_rle_crop_3998976357_0.png', 1389616384: '1760544206_2261219_1389615944_1c3567cdc69192339ca1b6c9bb0d0ccf_rle_crop_3998976368_0.png', 1389619026: '1760544567_2278137_1389617187_d8f17da95a54c766c84095f1fb838aff_rle_crop_3998983923_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/422c9c9aa7445083f0c008e8c0387990_42964053.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/8c80d26751ae69f5ca4f6d78e6709776_99064058.png change filename to text .imagette278368401760544663/ imagette278368401760544663/1760544567_2278137_1389617187_d8f17da95a54c766c84095f1fb838aff_rle_crop_3998983923_0.png.png imagette278368401760544663/1760544206_2261219_1389615946_8736836a0cf3fbb6593db009dbb95fc4_rle_crop_3998976357_0.png.png imagette278368401760544663/1760544206_2261219_1389615944_1c3567cdc69192339ca1b6c9bb0d0ccf_rle_crop_3998976368_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/827a1ee59eea13db4dbdda0d1cd1f012_78431943.png imagette278368401760544663 27836842 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=27836842 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1389616787: '1760544326_2267047_1389616396_7af1d8b75b29635492e7439a2e9c09ad_rle_crop_3998978865_0.png', 1389619006: '1760544545_2277698_1389618405_b9d1f53ac0b081b607331abda72498bf_rle_crop_3998983707_0.png', 1389619029: '1760544567_2278137_1389617187_d8f17da95a54c766c84095f1fb838aff_rle_crop_3998983926_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/8e2e8639395eba78e659b8a3fa91a056_77957497.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/b5c776346cf19fa2e9171b995971d5b5_49526485.png change filename to text .imagette278368421760544663/ imagette278368421760544663/1760544326_2267047_1389616396_7af1d8b75b29635492e7439a2e9c09ad_rle_crop_3998978865_0.png.png imagette278368421760544663/1760544567_2278137_1389617187_d8f17da95a54c766c84095f1fb838aff_rle_crop_3998983926_0.png.png imagette278368421760544663/1760544545_2277698_1389618405_b9d1f53ac0b081b607331abda72498bf_rle_crop_3998983707_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/23e3db99d01a1903a5e152890611a217_22232373.png imagette278368421760544663 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=27836830 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/27836844,27836845,27836846,27836847,27836848,27836849,27836850,27836851,27836852,27836853,27836854,27836855?tags=papier,metal,environnement,plastique,flou,autre_refus,Carton_gris,cartonnette,Teint_Dans_La_Masse,kraft,Carton_brun,mal_croppe your option no_mail is active, we will not send the real mail to your client args[1389619009] : ('0.06127610646686162',) no score found for photo 1389619009 We are sending mail with results at report@fotonower.com args[1389619002] : ('0.06127610646686162',) no score found for photo 1389619002 We are sending mail with results at report@fotonower.com args[1389619000] : ('0.06127610646686162',) no score found for photo 1389619000 We are sending mail with results at report@fotonower.com args[1389618999] : ('0.06127610646686162',) no score found for photo 1389618999 We are sending mail with results at report@fotonower.com args[1389618979] : ('0.06127610646686162',) no score found for photo 1389618979 We are sending mail with results at report@fotonower.com args[1389618971] : ('0.06127610646686162',) no score found for photo 1389618971 We are sending mail with results at report@fotonower.com args[1389618883] : ('0.06127610646686162',) no score found for photo 1389618883 We are sending mail with results at report@fotonower.com args[1389618876] : ('0.06127610646686162',) no score found for photo 1389618876 We are sending mail with results at report@fotonower.com args[1389618802] : ('0.06127610646686162',) no score found for photo 1389618802 We are sending mail with results at report@fotonower.com args[1389618800] : ('0.06127610646686162',) no score found for photo 1389618800 We are sending mail with results at report@fotonower.com args[1389618799] : ('0.06127610646686162',) no score found for photo 1389618799 We are sending mail with results at report@fotonower.com refus_total : 0.06127610646686162 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=27836830 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_P27836830_15-10-2025_18_11_01.pdf results_Auto_P27836830_15-10-2025_18_11_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27836830_15-10-2025_18_11_01.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','27836830','results_Auto_P27836830_15-10-2025_18_11_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27836830_15-10-2025_18_11_01.pdf','pdf','','0.19','0.06127610646686162') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27836830]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1389619009, 1389619002, 1389619000, 1389618999, 1389618979, 1389618971, 1389618883, 1389618876, 1389618802, 1389618800, 1389618799] map_info['map_portfolio_photo'] : {27836830: [1389619009, 1389619002, 1389619000, 1389618999, 1389618979, 1389618971, 1389618883, 1389618876, 1389618802, 1389618800, 1389618799, 1389618423, 1389618410, 1389618408, 1389618405, 1389618375, 1389618294, 1389618290, 1389618288, 1389617208, 1389617187, 1389617185, 1389617182, 1389617178, 1389617168, 1389616428, 1389616413, 1389616411, 1389616410, 1389616396, 1389616371, 1389616370, 1389616368, 1389615946, 1389615944, 1389615942]} final : False mtd_id 4302 list_pids : [1389619009, 1389619002, 1389619000, 1389618999, 1389618979, 1389618971, 1389618883, 1389618876, 1389618802, 1389618800, 1389618799] 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, '3946875') ('4302', '27836830', '1389619009', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389619002', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389619000', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618999', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618979', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618971', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618883', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618876', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618802', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618800', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618799', None, None, None, None, None, '3946875') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '27836830', '1389619009', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389619002', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389619000', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618999', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618979', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618971', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618883', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618876', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618802', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618800', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618799', None, None, None, None, None, '3946875')] time used for this insertion : 0.038335561752319336 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.607081890106201 time spend to save output : 0.0387880802154541 total time spend for step 4 : 4.645869970321655 step5:split_time_score Wed Oct 15 18:11:05 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 : ['27836830'] 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 : [('27836830',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27836830) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1389619002: {'path': 'temp/1760544661_2344295_1389619002_dc677c3e337df80548402838acef45a0.jpg', 'extension': 'jpg'}, 1389619009: {'path': 'temp/1760544661_2344295_1389619009_6a8327d482f29aa6a08e231356813c5d.jpg', 'extension': 'jpg'}, 1389618876: {'path': 'temp/1760544661_2344295_1389618876_d7be3e9aca34c571f8c6288860786041.jpg', 'extension': 'jpg'}, 1389618883: {'path': 'temp/1760544661_2344295_1389618883_7b1ec4dd72b7ee8f6cd2f494f9354a31.jpg', 'extension': 'jpg'}, 1389618971: {'path': 'temp/1760544661_2344295_1389618971_cad43e46442e81ed07dacd87cabfd7dd.jpg', 'extension': 'jpg'}, 1389618799: {'path': 'temp/1760544661_2344295_1389618799_7ff72a502565341e19d3fba12f0f3c8d.jpg', 'extension': 'jpg'}, 1389618800: {'path': 'temp/1760544661_2344295_1389618800_09bb8f50d37a382c4f50ae4312cb160c.jpg', 'extension': 'jpg'}, 1389618802: {'path': 'temp/1760544661_2344295_1389618802_3a763205c7e50627d21c04151b5d1545.jpg', 'extension': 'jpg'}, 1389618979: {'path': 'temp/1760544661_2344295_1389618979_61a5edfd146ab736e93820a28bc5dfd0.jpg', 'extension': 'jpg'}, 1389618999: {'path': 'temp/1760544661_2344295_1389618999_af20d4eba88c4dcf268cdc6a426f3183.jpg', 'extension': 'jpg'}, 1389619000: {'path': 'temp/1760544661_2344295_1389619000_dc724c6d3ea414dfb3785d34d34b4309.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 = 27836830; (('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 = 27836830 group by h (('18', 36),) 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=27836830 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 (27836830) 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 (27836830) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 15102025 27836830 Nombre de photos uploadées : 36 / 23040 (0%) 15102025 27836830 Nombre de photos taguées (types de déchets): 0 / 36 (0%) 15102025 27836830 Nombre de photos taguées (volume) : 0 / 36 (0%) [{'photo_id': 1389615946, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/8736836a0cf3fbb6593db009dbb95fc4.jpg', 'username': None, 'uploaded_at': 1760544127, 'text': 'image_15102025_18_01_24_009128m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1389615944, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/1c3567cdc69192339ca1b6c9bb0d0ccf.jpg', 'username': None, 'uploaded_at': 1760544127, 'text': 'image_15102025_18_01_34_010152m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1389615942, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/e3843cf8bdfa680335763a3221c9f63e.jpg', 'username': None, 'uploaded_at': 1760544127, 'text': 'image_15102025_18_01_44_010141m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1389616371, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/b0db23723322daf3011815ae3f38db2a.jpg', 'username': None, 'uploaded_at': 1760544187, 'text': 'image_15102025_18_01_54_010141m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 6.198883056640625e-06 elapsed_time : order_list_meta_photo_and_scores 1.8835067749023438e-05 ???????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0013675689697265625 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 27836830, '2025-10-15' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2450453,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.6468913555145264 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= 2450453 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2450453, 'dashboard_run_id': 2463585, 'mtr_portfolio_id': 27818432, 'dashboard_result_id': 16422824, '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_P27818432_15-10-2025_06_06_06.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27818433, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27818434, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27818435, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27818436, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27818437, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27818438, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27818439, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27818440, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27818441, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27818442, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27818443, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27818444, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2463585, 'mtr_portfolio_id': 27818482, 'dashboard_result_id': 16422825, '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_P27818482_15-10-2025_06_06_34.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27818486, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27818487, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27818488, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27818489, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27818490, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27818491, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27818492, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27818493, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27818494, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27818495, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27818496, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27818497, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2463585, 'mtr_portfolio_id': 27818873, 'dashboard_result_id': 16422826, '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_P27818873_15-10-2025_06_07_34.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27818878, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27818879, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27818880, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27818881, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27818882, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27818883, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27818884, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27818885, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27818886, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27818887, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27818888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27818889, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2463585, 'mtr_portfolio_id': 27819596, 'dashboard_result_id': 16422827, '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_P27819596_15-10-2025_06_08_05.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27819599, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27819600, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27819601, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27819602, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27819603, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27819604, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27819605, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27819606, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27819607, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27819608, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27819609, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27819610, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2463585, 'mtr_portfolio_id': 27820246, 'dashboard_result_id': 16422828, '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_P27820246_15-10-2025_06_08_35.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27820247, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27820248, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27820249, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27820250, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27820251, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27820252, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27820253, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27820254, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27820255, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27820256, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27820257, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27820258, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2463585, 'mtr_portfolio_id': 27820351, 'dashboard_result_id': 16422829, '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_P27820351_15-10-2025_06_09_33.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27820378, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27820379, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27820380, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27820381, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27820382, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27820383, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27820384, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27820385, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27820386, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27820387, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27820388, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27820389, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2463585, 'mtr_portfolio_id': 27820632, 'dashboard_result_id': 16422830, '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_P27820632_15-10-2025_06_10_04.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27820661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27820662, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27820663, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27820664, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27820665, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27820666, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27820667, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27820668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27820669, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27820670, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27820671, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27820672, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2463585, 'mtr_portfolio_id': 27820994, 'dashboard_result_id': 16422831, '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_P27820994_15-10-2025_06_11_05.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27821000, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27821001, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27821002, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27821003, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27821004, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27821005, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27821006, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27821007, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27821008, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27821009, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27821010, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27821011, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2463585, 'mtr_portfolio_id': 27821801, 'dashboard_result_id': 16422832, '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_P27821801_15-10-2025_05_49_27.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27821802, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27821803, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27821804, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27821805, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27821806, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27821807, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27821808, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27821809, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27821810, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27821811, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27821812, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27821813, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2463585, 'mtr_portfolio_id': 27821853, 'dashboard_result_id': 16422833, '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_P27821853_15-10-2025_06_03_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27821855, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27821856, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27821857, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27821858, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27821859, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27821860, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27821861, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27821862, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27821863, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27821864, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27821865, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27821866, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2463585, 'mtr_portfolio_id': 27822193, 'dashboard_result_id': 16422835, '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_P27822193_15-10-2025_06_19_03.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27822198, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27822199, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27822200, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27822201, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27822202, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27822203, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27822204, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27822205, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27822206, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27822207, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27822208, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27822209, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2463585, 'mtr_portfolio_id': 27822707, 'dashboard_result_id': 16422836, '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_P27822707_15-10-2025_06_33_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27822731, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27822732, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27822733, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27822734, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27822735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27822736, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27822737, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27822738, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27822739, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27822740, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27822741, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27822742, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2463585, 'mtr_portfolio_id': 27823105, 'dashboard_result_id': 16422837, '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_P27823105_15-10-2025_07_59_33.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27823137, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27823138, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27823139, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27823140, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27823141, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27823142, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27823143, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27823144, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27823145, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27823146, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27823147, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27823148, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2463585, 'mtr_portfolio_id': 27834475, 'dashboard_result_id': 16422838, '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_P27834475_15-10-2025_16_51_04.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27834476, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27834477, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27834478, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27834479, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27834480, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27834481, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27834482, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27834483, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27834484, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27834485, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27834486, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27834487, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2463585, 'mtr_portfolio_id': 27834822, 'dashboard_result_id': 16422839, '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_P27834822_15-10-2025_17_03_37.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27834823, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27834824, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27834825, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27834826, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27834827, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27834828, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27834829, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27834830, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27834831, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27834832, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27834833, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27834834, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2463585, 'mtr_portfolio_id': 27835066, 'dashboard_result_id': 16422840, '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_P27835066_15-10-2025_17_25_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27835071, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27835072, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27835073, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27835074, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27835075, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27835076, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27835077, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27835078, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27835079, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27835080, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27835082, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27835083, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2463585, 'mtr_portfolio_id': 27836024, 'dashboard_result_id': 16422842, '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_P27836024_15-10-2025_18_03_08.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27836025, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27836026, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27836027, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27836028, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27836029, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27836030, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27836031, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27836032, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27836033, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27836034, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27836035, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27836036, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2463585, 'mtr_portfolio_id': 27836453, 'dashboard_result_id': 16422843, '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_P27836453_15-10-2025_17_45_08.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27836454, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27836455, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27836456, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27836457, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27836458, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27836459, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27836460, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27836461, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27836462, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27836463, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27836464, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27836465, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2463585, 'mtr_portfolio_id': 27836830, 'dashboard_result_id': 16422844, '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_P27836830_15-10-2025_18_09_03.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27836832, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27836833, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27836834, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27836835, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27836836, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27836837, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27836838, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27836839, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27836840, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27836841, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27836842, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27836843, '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 = 27818432 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': 3944650, 'mtr_portfolio_id': 27818432, 'created_at': datetime.datetime(2025, 10, 15, 6, 6, 5), 'result': '0.05544326831338731', 'result_long': None, 'result_double': None}] Qualite : 0.05544326831338731 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27818432 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27818432_15-10-2025_06_06_06.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27818432 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_P27818432_15-10-2025_06_06_06.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27818433, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27818434, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27818435, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27818436, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27818437, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27818438, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27818439, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27818440, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27818441, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27818442, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27818443, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27818444, 'pht': 3726}}" where mtr_portfolio_id = 27818432 and dashboard_run_id = 2463585 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`=27818432 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16422824, 0.05544326831338731, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27818432_15-10-2025_06_06_06.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27818433, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27818434, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27818435, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27818436, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27818437, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27818438, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27818439, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27818440, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27818441, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27818442, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27818443, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27818444, '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 = 27818482 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': 3944651, 'mtr_portfolio_id': 27818482, 'created_at': datetime.datetime(2025, 10, 15, 6, 6, 30), 'result': '0.03591790016127145', 'result_long': None, 'result_double': None}] Qualite : 0.03591790016127145 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27818482 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27818482_15-10-2025_06_06_34.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27818482 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_P27818482_15-10-2025_06_06_34.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27818486, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27818487, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27818488, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27818489, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27818490, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27818491, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27818492, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27818493, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27818494, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27818495, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27818496, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27818497, 'pht': 3726}}" where mtr_portfolio_id = 27818482 and dashboard_run_id = 2463585 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`=27818482 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16422825, 0.03591790016127145, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27818482_15-10-2025_06_06_34.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27818486, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27818487, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27818488, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27818489, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27818490, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27818491, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27818492, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27818493, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27818494, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27818495, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27818496, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27818497, '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 = 27818873 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': 3944652, 'mtr_portfolio_id': 27818873, 'created_at': datetime.datetime(2025, 10, 15, 6, 7, 31), 'result': '0.053092943552620155', 'result_long': None, 'result_double': None}] Qualite : 0.053092943552620155 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27818873 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27818873_15-10-2025_06_07_34.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27818873 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_P27818873_15-10-2025_06_07_34.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27818878, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27818879, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27818880, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27818881, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27818882, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27818883, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27818884, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27818885, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27818886, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27818887, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27818888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27818889, 'pht': 3726}}" where mtr_portfolio_id = 27818873 and dashboard_run_id = 2463585 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`=27818873 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16422826, 0.053092943552620155, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27818873_15-10-2025_06_07_34.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27818878, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27818879, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27818880, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27818881, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27818882, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27818883, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27818884, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27818885, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27818886, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27818887, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27818888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27818889, '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 = 27819596 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': 3944653, 'mtr_portfolio_id': 27819596, 'created_at': datetime.datetime(2025, 10, 15, 6, 8, 3), 'result': '0.044617789794046306', 'result_long': None, 'result_double': None}] Qualite : 0.044617789794046306 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27819596 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27819596_15-10-2025_06_08_05.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27819596 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_P27819596_15-10-2025_06_08_05.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27819599, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27819600, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27819601, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27819602, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27819603, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27819604, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27819605, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27819606, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27819607, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27819608, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27819609, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27819610, 'pht': 3726}}" where mtr_portfolio_id = 27819596 and dashboard_run_id = 2463585 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`=27819596 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16422827, 0.044617789794046306, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27819596_15-10-2025_06_08_05.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27819599, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27819600, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27819601, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27819602, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27819603, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27819604, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27819605, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27819606, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27819607, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27819608, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27819609, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27819610, '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 = 27820246 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': 3944654, 'mtr_portfolio_id': 27820246, 'created_at': datetime.datetime(2025, 10, 15, 6, 8, 34), 'result': '0.0508651783352559', 'result_long': None, 'result_double': None}] Qualite : 0.0508651783352559 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27820246 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27820246_15-10-2025_06_08_35.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27820246 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_P27820246_15-10-2025_06_08_35.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27820247, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27820248, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27820249, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27820250, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27820251, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27820252, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27820253, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27820254, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27820255, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27820256, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27820257, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27820258, 'pht': 3726}}" where mtr_portfolio_id = 27820246 and dashboard_run_id = 2463585 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`=27820246 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16422828, 0.0508651783352559, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27820246_15-10-2025_06_08_35.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27820247, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27820248, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27820249, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27820250, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27820251, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27820252, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27820253, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27820254, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27820255, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27820256, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27820257, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27820258, '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 = 27820351 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': 3944655, 'mtr_portfolio_id': 27820351, 'created_at': datetime.datetime(2025, 10, 15, 6, 9, 31), 'result': '0.048644203198791335', 'result_long': None, 'result_double': None}] Qualite : 0.048644203198791335 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27820351 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27820351_15-10-2025_06_09_33.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27820351 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_P27820351_15-10-2025_06_09_33.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27820378, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27820379, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27820380, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27820381, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27820382, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27820383, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27820384, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27820385, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27820386, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27820387, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27820388, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27820389, 'pht': 3726}}" where mtr_portfolio_id = 27820351 and dashboard_run_id = 2463585 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`=27820351 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16422829, 0.048644203198791335, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27820351_15-10-2025_06_09_33.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27820378, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27820379, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27820380, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27820381, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27820382, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27820383, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27820384, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27820385, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27820386, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27820387, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27820388, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27820389, '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 = 27820632 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': 3944656, 'mtr_portfolio_id': 27820632, 'created_at': datetime.datetime(2025, 10, 15, 6, 10, 1), 'result': '0.0576768016220554', 'result_long': None, 'result_double': None}] Qualite : 0.0576768016220554 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27820632 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27820632_15-10-2025_06_10_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27820632 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_P27820632_15-10-2025_06_10_04.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27820661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27820662, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27820663, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27820664, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27820665, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27820666, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27820667, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27820668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27820669, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27820670, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27820671, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27820672, 'pht': 3726}}" where mtr_portfolio_id = 27820632 and dashboard_run_id = 2463585 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`=27820632 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16422830, 0.0576768016220554, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27820632_15-10-2025_06_10_04.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27820661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27820662, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27820663, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27820664, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27820665, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27820666, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27820667, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27820668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27820669, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27820670, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27820671, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27820672, '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 = 27820994 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': 3944657, 'mtr_portfolio_id': 27820994, 'created_at': datetime.datetime(2025, 10, 15, 6, 11, 2), 'result': '0.04285134157784997', 'result_long': None, 'result_double': None}] Qualite : 0.04285134157784997 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27820994 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27820994_15-10-2025_06_11_05.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27820994 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_P27820994_15-10-2025_06_11_05.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27821000, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27821001, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27821002, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27821003, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27821004, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27821005, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27821006, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27821007, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27821008, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27821009, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27821010, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27821011, 'pht': 3726}}" where mtr_portfolio_id = 27820994 and dashboard_run_id = 2463585 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`=27820994 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16422831, 0.04285134157784997, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27820994_15-10-2025_06_11_05.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27821000, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27821001, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27821002, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27821003, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27821004, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27821005, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27821006, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27821007, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27821008, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27821009, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27821010, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27821011, '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 = 27821801 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': 3944730, 'mtr_portfolio_id': 27821801, 'created_at': datetime.datetime(2025, 10, 15, 5, 49, 26), 'result': '0.015510548282426711', 'result_long': None, 'result_double': None}] Qualite : 0.015510548282426711 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27821801 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27821801_15-10-2025_05_49_27.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27821801 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_P27821801_15-10-2025_05_49_27.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27821802, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27821803, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27821804, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27821805, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27821806, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27821807, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27821808, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27821809, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27821810, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27821811, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27821812, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27821813, 'pht': 3726}}" where mtr_portfolio_id = 27821801 and dashboard_run_id = 2463585 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`=27821801 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16422832, 0.015510548282426711, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27821801_15-10-2025_05_49_27.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27821802, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27821803, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27821804, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27821805, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27821806, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27821807, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27821808, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27821809, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27821810, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27821811, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27821812, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27821813, '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 = 27821853 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': 3944738, 'mtr_portfolio_id': 27821853, 'created_at': datetime.datetime(2025, 10, 15, 6, 3, 30), 'result': '0.04620731920449827', 'result_long': None, 'result_double': None}] Qualite : 0.04620731920449827 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27821853 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27821853_15-10-2025_06_03_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27821853 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_P27821853_15-10-2025_06_03_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27821855, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27821856, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27821857, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27821858, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27821859, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27821860, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27821861, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27821862, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27821863, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27821864, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27821865, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27821866, 'pht': 3726}}" where mtr_portfolio_id = 27821853 and dashboard_run_id = 2463585 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`=27821853 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16422833, 0.04620731920449827, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27821853_15-10-2025_06_03_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27821855, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27821856, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27821857, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27821858, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27821859, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27821860, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27821861, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27821862, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27821863, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27821864, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27821865, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27821866, '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 = 27822193 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': 3944793, 'mtr_portfolio_id': 27822193, 'created_at': datetime.datetime(2025, 10, 15, 6, 19, 3), 'result': '0.042539943747026215', 'result_long': None, 'result_double': None}] Qualite : 0.042539943747026215 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27822193 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27822193_15-10-2025_06_19_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27822193 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_P27822193_15-10-2025_06_19_03.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27822198, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27822199, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27822200, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27822201, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27822202, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27822203, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27822204, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27822205, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27822206, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27822207, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27822208, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27822209, 'pht': 3726}}" where mtr_portfolio_id = 27822193 and dashboard_run_id = 2463585 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`=27822193 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16422835, 0.042539943747026215, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27822193_15-10-2025_06_19_03.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27822198, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27822199, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27822200, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27822201, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27822202, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27822203, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27822204, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27822205, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27822206, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27822207, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27822208, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27822209, '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 = 27822707 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': 3944870, 'mtr_portfolio_id': 27822707, 'created_at': datetime.datetime(2025, 10, 15, 6, 33, 1), 'result': '0.0558267165472251', 'result_long': None, 'result_double': None}] Qualite : 0.0558267165472251 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27822707 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27822707_15-10-2025_06_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27822707 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_P27822707_15-10-2025_06_33_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27822731, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27822732, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27822733, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27822734, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27822735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27822736, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27822737, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27822738, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27822739, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27822740, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27822741, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27822742, 'pht': 3726}}" where mtr_portfolio_id = 27822707 and dashboard_run_id = 2463585 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`=27822707 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16422836, 0.0558267165472251, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27822707_15-10-2025_06_33_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27822731, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27822732, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27822733, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27822734, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27822735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27822736, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27822737, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27822738, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27822739, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27822740, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27822741, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27822742, '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 = 27823105 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': 3944952, 'mtr_portfolio_id': 27823105, 'created_at': datetime.datetime(2025, 10, 15, 7, 59, 33), 'result': '0.056218202327586536', 'result_long': None, 'result_double': None}] Qualite : 0.056218202327586536 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27823105 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27823105_15-10-2025_07_59_33.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27823105 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_P27823105_15-10-2025_07_59_33.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27823137, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27823138, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27823139, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27823140, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27823141, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27823142, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27823143, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27823144, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27823145, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27823146, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27823147, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27823148, 'pht': 3726}}" where mtr_portfolio_id = 27823105 and dashboard_run_id = 2463585 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`=27823105 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16422837, 0.056218202327586536, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27823105_15-10-2025_07_59_33.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27823137, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27823138, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27823139, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27823140, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27823141, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27823142, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27823143, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27823144, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27823145, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27823146, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27823147, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27823148, '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 = 27834475 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': 3946622, 'mtr_portfolio_id': 27834475, 'created_at': datetime.datetime(2025, 10, 15, 16, 51, 3), 'result': '0.029395392353123793', 'result_long': None, 'result_double': None}] Qualite : 0.029395392353123793 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27834475 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27834475_15-10-2025_16_51_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27834475 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_P27834475_15-10-2025_16_51_04.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27834476, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27834477, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27834478, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27834479, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27834480, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27834481, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27834482, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27834483, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27834484, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27834485, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27834486, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27834487, 'pht': 3726}}" where mtr_portfolio_id = 27834475 and dashboard_run_id = 2463585 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`=27834475 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16422838, 0.029395392353123793, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27834475_15-10-2025_16_51_04.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27834476, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27834477, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27834478, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27834479, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27834480, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27834481, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27834482, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27834483, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27834484, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27834485, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27834486, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27834487, '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 = 27834822 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': 3946660, 'mtr_portfolio_id': 27834822, 'created_at': datetime.datetime(2025, 10, 15, 17, 3, 36), 'result': '0.06758046713286116', 'result_long': None, 'result_double': None}] Qualite : 0.06758046713286116 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27834822 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27834822_15-10-2025_17_03_37.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27834822 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_P27834822_15-10-2025_17_03_37.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27834823, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27834824, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27834825, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27834826, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27834827, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27834828, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27834829, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27834830, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27834831, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27834832, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27834833, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27834834, 'pht': 3726}}" where mtr_portfolio_id = 27834822 and dashboard_run_id = 2463585 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`=27834822 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16422839, 0.06758046713286116, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27834822_15-10-2025_17_03_37.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27834823, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27834824, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27834825, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27834826, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27834827, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27834828, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27834829, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27834830, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27834831, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27834832, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27834833, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27834834, '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 = 27835066 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': 3946701, 'mtr_portfolio_id': 27835066, 'created_at': datetime.datetime(2025, 10, 15, 17, 25, 3), 'result': '0.04634305409620517', 'result_long': None, 'result_double': None}] Qualite : 0.04634305409620517 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27835066 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27835066_15-10-2025_17_25_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27835066 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_P27835066_15-10-2025_17_25_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27835071, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27835072, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27835073, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27835074, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27835075, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27835076, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27835077, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27835078, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27835079, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27835080, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27835082, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27835083, 'pht': 3726}}" where mtr_portfolio_id = 27835066 and dashboard_run_id = 2463585 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`=27835066 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16422840, 0.04634305409620517, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27835066_15-10-2025_17_25_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27835071, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27835072, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27835073, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27835074, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27835075, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27835076, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27835077, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27835078, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27835079, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27835080, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27835082, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27835083, '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 = 27836024 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': 3946774, 'mtr_portfolio_id': 27836024, 'created_at': datetime.datetime(2025, 10, 15, 18, 3, 7), 'result': '0.032285443654389546', 'result_long': None, 'result_double': None}] Qualite : 0.032285443654389546 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27836024 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27836024_15-10-2025_18_03_08.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27836024 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_P27836024_15-10-2025_18_03_08.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27836025, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27836026, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27836027, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27836028, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27836029, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27836030, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27836031, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27836032, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27836033, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27836034, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27836035, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27836036, 'pht': 3726}}" where mtr_portfolio_id = 27836024 and dashboard_run_id = 2463585 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`=27836024 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16422842, 0.032285443654389546, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27836024_15-10-2025_18_03_08.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27836025, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27836026, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27836027, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27836028, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27836029, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27836030, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27836031, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27836032, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27836033, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27836034, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27836035, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27836036, '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 = 27836453 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27836453 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 27836453 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27836453 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27836453 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27836453 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27836453_15-10-2025_17_45_08.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27836453 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_P27836453_15-10-2025_17_45_08.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27836454, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27836455, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27836456, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27836457, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27836458, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27836459, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27836460, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27836461, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27836462, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27836463, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27836464, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27836465, 'pht': 3726}}" where mtr_portfolio_id = 27836453 and dashboard_run_id = 2463585 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 = 27836830 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': 3946875, 'mtr_portfolio_id': 27836830, 'created_at': datetime.datetime(2025, 10, 15, 18, 11), 'result': '0.06127610646686162', 'result_long': None, 'result_double': None}] Qualite : 0.06127610646686162 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27836830 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27836830_15-10-2025_18_11_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27836830 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_P27836830_15-10-2025_18_11_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27836832, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27836833, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27836834, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27836835, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27836836, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27836837, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27836838, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27836839, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27836840, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27836841, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27836842, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27836843, 'pht': 3726}}" where mtr_portfolio_id = 27836830 and dashboard_run_id = 2463583 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`=27836830 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16422844, 0.06127610646686162, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27836830_15-10-2025_18_11_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27836832, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27836833, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27836834, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27836835, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27836836, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27836837, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27836838, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27836839, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27836840, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27836841, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27836842, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27836843, '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 (27818432,27818482,27818873,27819596,27820246,27820351,27820632,27820994,27821801,27821853,27822193,27822707,27823105,27834475,27834822,27835066,27836024,27836453,27836830) result : ((1389500533,), (1389500687,), (1389500688,), (1389500689,), (1389500719,), (1389500721,), (1389500723,), (1389500726,), (1389500728,), (1389500776,), (1389500779,), (1389500781,), (1389500782,), (1389500783,), (1389500784,), (1389500756,), (1389500760,), (1389500767,), (1389500772,), (1389500785,), (1389500789,), (1389500793,), (1389500795,), (1389500801,), (1389500802,), (1389500804,), (1389500807,), (1389500810,), (1389500818,), (1389500861,), (1389500862,), (1389500864,), (1389500867,), (1389500870,), (1389500873,), (1389500878,), (1389500880,), (1389500881,), (1389500903,), (1389500905,), (1389500907,), (1389500909,), (1389500910,), (1389500911,), (1389500919,), (1389500920,), (1389500923,), (1389500924,), (1389500927,), (1389500928,), (1389500948,), (1389500949,), (1389500950,), (1389500953,), (1389500957,), (1389500960,), (1389500971,), (1389500972,), (1389500974,), (1389500977,), (1389500980,), (1389500983,), (1389500988,), (1389500989,), (1389500990,), (1389500991,), (1389500992,), (1389500996,), (1389501000,), (1389501005,), (1389501012,), (1389501039,), (1389501042,), (1389501044,), (1389501047,), (1389501050,), (1389501053,), (1389501061,), (1389501062,), (1389501063,), (1389501065,), (1389501083,), (1389501084,), (1389501086,), (1389501089,), (1389501092,), (1389501095,), (1389501127,), (1389501128,), (1389501130,), (1389501156,), (1389501157,), (1389501159,), (1389501162,), (1389501165,), (1389501167,), (1389501172,), (1389501177,), (1389501179,), (1389501183,), (1389501188,), (1389501194,), (1389501228,), (1389501221,), (1389501222,), (1389501223,), (1389501225,), (1389501237,), (1389501238,), (1389501239,), (1389501241,), (1389501244,), (1389501273,), (1389501276,), (1389501277,), (1389501279,), (1389501282,), (1389501285,), (1389501327,), (1389501328,), (1389501330,), (1389501333,), (1389501359,), (1389501360,), (1389501361,), (1389501363,), (1389501367,), (1389501369,), (1389501377,), (1389501378,), (1389501380,), (1389501385,), (1389501388,), (1389501390,), (1389501409,), (1389501411,), (1389501421,), (1389501427,), (1389501428,), (1389501429,), (1389501433,), (1389501435,), (1389501438,), (1389501440,), (1389501444,), (1389501445,), (1389501446,), (1389501448,), (1389501451,), (1389501453,), (1389501484,), (1389501504,), (1389501509,), (1389501511,), (1389501514,), (1389501517,), (1389501536,), (1389501537,), (1389501538,), (1389501540,), (1389501567,), (1389501568,), (1389501569,), (1389501572,), (1389501576,), (1389501578,), (1389501585,), (1389501586,), (1389501587,), (1389501589,), (1389501776,), (1389501934,), (1389501935,), (1389501936,), (1389501938,), (1389501955,), (1389501958,), (1389501961,), (1389501963,), (1389501967,), (1389501972,), (1389501977,), (1389502017,), (1389504900,), (1389504898,), (1389504920,), (1389504922,), (1389504923,), (1389504926,), (1389504929,), (1389504932,), (1389504962,), (1389504963,), (1389504965,), (1389504968,), (1389504971,), (1389504974,), (1389504979,), (1389504980,), (1389505005,), (1389505012,), (1389505013,), (1389505014,), (1389505015,), (1389505017,), (1389505026,), (1389505027,), (1389505031,), (1389505033,), (1389505036,), (1389505038,), (1389505040,), (1389505051,), (1389505053,), (1389505054,), (1389505055,), (1389505056,), (1389505061,), (1389505062,), (1389505247,), (1389512777,), (1389512872,), (1389513090,), (1389513148,), (1389513149,), (1389513150,), (1389513167,), (1389513168,), (1389513170,), (1389513172,), (1389513175,), (1389513179,), (1389513276,), (1389513247,), (1389513260,), (1389513274,), (1389513275,), (1389513301,), (1389513303,), (1389513304,), (1389513306,), (1389513310,), (1389513318,), (1389513319,), (1389513320,), (1389513333,), (1389513334,), (1389513335,), (1389513360,), (1389513361,), (1389513363,), (1389513365,), (1389513377,), (1389513379,), (1389513383,), (1389513388,), (1389513398,), (1389513401,), (1389513406,), (1389513407,), (1389513408,), (1389513410,), (1389513431,), (1389513432,), (1389513433,), (1389513435,), (1389513438,), (1389513444,), (1389513464,), (1389513465,), (1389513466,), (1389513469,), (1389513482,), (1389513483,), (1389513487,), (1389513491,), (1389513498,), (1389513500,), (1389513506,), (1389513511,), (1389513513,), (1389513523,), (1389513514,), (1389513515,), (1389513516,), (1389513519,), (1389513533,), (1389513534,), (1389513535,), (1389513538,), (1389513565,), (1389513566,), (1389513567,), (1389513569,), (1389513572,), (1389513587,), (1389513588,), (1389513589,), (1389513591,), (1389513595,), (1389513623,), (1389513624,), (1389513626,), (1389513641,), (1389513642,), (1389513644,), (1389513646,), (1389513673,), (1389513674,), (1389513676,), (1389513679,), (1389513682,), (1389513691,), (1389513692,), (1389513693,), (1389513696,), (1389513700,), (1389513724,), (1389513725,), (1389513726,), (1389513728,), (1389513741,), (1389513742,), (1389513744,), (1389513748,), (1389513755,), (1389513760,), (1389513768,), (1389513769,), (1389513770,), (1389513771,), (1389513774,), (1389513777,), (1389513779,), (1389513782,), (1389513785,), (1389513789,), (1389513790,), (1389513791,), (1389513829,), (1389513830,), (1389513831,), (1389513837,), (1389513840,), (1389513843,), (1389514624,), (1389514957,), (1389514961,), (1389514964,), (1389514966,), (1389515238,), (1389515225,), (1389515227,), (1389515229,), (1389515233,), (1389515265,), (1389515267,), (1389515269,), (1389515273,), (1389515285,), (1389515287,), (1389515289,), (1389515451,), (1389515728,), (1389515732,), (1389515929,), (1389515931,), (1389515968,), (1389515973,), (1389515978,), (1389515981,), (1389515993,), (1389515995,), (1389515999,), (1389516004,), (1389516007,), (1389516013,), (1389516026,), (1389516028,), (1389516030,), (1389516033,), (1389516035,), (1389516040,), (1389516045,), (1389516049,), (1389516051,), (1389516053,), (1389516054,), (1389516065,), (1389516067,), (1389516069,), (1389516072,), (1389516096,), (1389516098,), (1389516101,), (1389516105,), (1389516118,), (1389516120,), (1389516123,), (1389516128,), (1389516132,), (1389516139,), (1389516151,), (1389516153,), (1389516155,), (1389516169,), (1389516173,), (1389516177,), (1389516183,), (1389516187,), (1389516190,), (1389518757,), (1389519610,), (1389519627,), (1389519632,), (1389519633,), (1389519635,), (1389519646,), (1389519660,), (1389519662,), (1389519686,), (1389519679,), (1389519680,), (1389519681,), (1389519683,), (1389519697,), (1389519698,), (1389519700,), (1389519715,), (1389519716,), (1389519717,), (1389519719,), (1389519722,), (1389519726,), (1389519741,), (1389519743,), (1389519746,), (1389519750,), (1389519753,), (1389519762,), (1389519763,), (1389519764,), (1389519766,), (1389519769,), (1389519782,), (1389519783,), (1389519784,), (1389519786,), (1389519790,), (1389519816,), (1389519818,), (1389519821,), (1389519823,), (1389519827,), (1389519835,), (1389519837,), (1389519838,), (1389519840,), (1389519842,), (1389519852,), (1389519878,), (1389519880,), (1389519881,), (1389519883,), (1389519903,), (1389519906,), (1389519909,), (1389519912,), (1389519922,), (1389519929,), (1389519933,), (1389519935,), (1389519937,), (1389519940,), (1389519946,), (1389519949,), (1389519952,), (1389519954,), (1389519956,), (1389519962,), (1389519965,), (1389519967,), (1389519970,), (1389519973,), (1389519978,), (1389519997,), (1389520000,), (1389520002,), (1389520006,), (1389520308,), (1389520311,), (1389520314,), (1389520317,), (1389520320,), (1389520325,), (1389520331,), (1389520333,), (1389520334,), (1389520335,), (1389521412,), (1389520349,), (1389520353,), (1389520823,), (1389521365,), (1389521427,), (1389521428,), (1389521626,), (1389521637,), (1389521667,), (1389522074,), (1389522081,), (1389522104,), (1389522131,), (1389522135,), (1389522161,), (1389522165,), (1389522167,), (1389522171,), (1389522175,), (1389522178,), (1389522183,), (1389522185,), (1389522189,), (1389522193,), (1389522209,), (1389522216,), (1389522221,), (1389522225,), (1389522228,), (1389522231,), (1389522235,), (1389522239,), (1389522241,), (1389522243,), (1389522245,), (1389522246,), (1389522252,), (1389522254,), (1389522256,), (1389522259,), (1389522262,), (1389522287,), (1389522288,), (1389522289,), (1389522292,), (1389522296,), (1389522304,), (1389522305,), (1389522306,), (1389522309,), (1389522315,), (1389522321,), (1389522324,), (1389522325,), (1389522329,), (1389522335,), (1389522337,), (1389522341,), (1389522342,), (1389522343,), (1389522345,), (1389522386,), (1389522387,), (1389522388,), (1389522390,), (1389522393,), (1389522408,), (1389522409,), (1389522410,), (1389522412,), (1389522414,), (1389522440,), (1389522443,), (1389522444,), (1389522446,), (1389522449,), (1389522452,), (1389522462,), (1389522463,), (1389522466,), (1389522472,), (1389522479,), (1389522481,), (1389522487,), (1389522494,), (1389522495,), (1389522496,), (1389522512,), (1389522499,), (1389522501,), (1389522504,), (1389522507,), (1389522510,), (1389522518,), (1389522519,), (1389522520,), (1389522522,), (1389522563,), (1389522565,), (1389522566,), (1389522568,), (1389522571,), (1389522587,), (1389522588,), (1389522589,), (1389522591,), (1389522594,), (1389522626,), (1389522628,), (1389522630,), (1389522632,), (1389522635,), (1389522645,), (1389522648,), (1389522649,), (1389522651,), (1389522659,), (1389522678,), (1389522680,), (1389522681,), (1389522683,), (1389522686,), (1389522694,), (1389522695,), (1389522696,), (1389522698,), (1389522701,), (1389522704,), (1389522735,), (1389522737,), (1389522738,), (1389522741,), (1389522756,), (1389522765,), (1389522767,), (1389522770,), (1389522776,), (1389522780,), (1389522785,), (1389522787,), (1389522788,), (1389522789,), (1389522792,), (1389522794,), (1389522797,), (1389522800,), (1389522807,), (1389522808,), (1389522810,), (1389522812,), (1389522815,), (1389522822,), (1389522843,), (1389522845,), (1389522847,), (1389522855,), (1389522856,), (1389522857,), (1389522859,), (1389522862,), (1389522865,), (1389522890,), (1389522892,), (1389522893,), (1389522895,), (1389522934,), (1389522909,), (1389522912,), (1389522918,), (1389522925,), (1389522930,), (1389522951,), (1389522953,), (1389522955,), (1389522957,), (1389522969,), (1389522970,), (1389522971,), (1389522974,), (1389522984,), (1389522988,), (1389523009,), (1389523011,), (1389523012,), (1389523015,), (1389523019,), (1389523030,), (1389523032,), (1389523034,), (1389523037,), (1389523047,), (1389523049,), (1389523055,), (1389523059,), (1389527864,), (1389594501,), (1389595115,), (1389595117,), (1389595306,), (1389595307,), (1389595308,), (1389595310,), (1389595314,), (1389595328,), (1389595329,), (1389595330,), (1389595348,), (1389595350,), (1389595352,), (1389597367,), (1389598080,), (1389598241,), (1389598243,), (1389598272,), (1389598279,), (1389598296,), (1389598299,), (1389598302,), (1389598333,), (1389598334,), (1389598335,), (1389598337,), (1389598342,), (1389598363,), (1389598366,), (1389598368,), (1389598371,), (1389598374,), (1389598377,), (1389598382,), (1389598383,), (1389598385,), (1389598387,), (1389598390,), (1389598393,), (1389598403,), (1389598465,), (1389598473,), (1389598475,), (1389598479,), (1389598483,), (1389598486,), (1389598519,), (1389598524,), (1389598529,), (1389598542,), (1389598543,), (1389598949,), (1389598950,), (1389598953,), (1389598954,), (1389598972,), (1389598973,), (1389599177,), (1389599108,), (1389599123,), (1389599156,), (1389601671,), (1389601674,), (1389601677,), (1389601693,), (1389601969,), (1389601971,), (1389602034,), (1389602037,), (1389602516,), (1389602583,), (1389602585,), (1389603834,), (1389603836,), (1389604063,), (1389604065,), (1389604816,), (1389604970,), (1389604978,), (1389604986,), (1389604991,), (1389604994,), (1389605020,), (1389605021,), (1389605150,), (1389605234,), (1389605236,), (1389605239,), (1389605242,), (1389605245,), (1389605250,), (1389605252,), (1389605255,), (1389605258,), (1389605303,), (1389605305,), (1389605308,), (1389605311,), (1389605314,), (1389605318,), (1389605321,), (1389605322,), (1389605324,), (1389605325,), (1389605327,), (1389605330,), (1389605333,), (1389605625,), (1389605629,), (1389607994,), (1389606795,), (1389607991,), (1389607992,), (1389608525,), (1389608620,), (1389608621,), (1389608659,), (1389608677,), (1389608706,), (1389608798,), (1389608799,), (1389608802,), (1389608804,), (1389608808,), (1389608811,), (1389608816,), (1389608817,), (1389608818,), (1389608821,), (1389608881,), (1389608884,), (1389608886,), (1389615950,), (1389609268,), (1389612246,), (1389615942,), (1389615944,), (1389615946,), (1389616368,), (1389616370,), (1389616371,), (1389616396,), (1389616410,), (1389616411,), (1389616413,), (1389616428,), (1389617168,), (1389617178,), (1389617182,), (1389617185,), (1389617187,), (1389617208,), (1389618288,), (1389618290,), (1389618294,), (1389618375,), (1389618405,), (1389618408,), (1389618410,), (1389618423,), (1389618799,), (1389618800,), (1389618802,), (1389618876,), (1389618883,), (1389618971,), (1389618979,), (1389618999,), (1389619000,), (1389619002,), (1389619009,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'15102025': {'nb_upload': 36, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27836830]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1389619009, 1389619002, 1389619000, 1389618999, 1389618979, 1389618971, 1389618883, 1389618876, 1389618802, 1389618800, 1389618799] map_info['map_portfolio_photo'] : {27836830: [1389619009, 1389619002, 1389619000, 1389618999, 1389618979, 1389618971, 1389618883, 1389618876, 1389618802, 1389618800, 1389618799, 1389618423, 1389618410, 1389618408, 1389618405, 1389618375, 1389618294, 1389618290, 1389618288, 1389617208, 1389617187, 1389617185, 1389617182, 1389617178, 1389617168, 1389616428, 1389616413, 1389616411, 1389616410, 1389616396, 1389616371, 1389616370, 1389616368, 1389615946, 1389615944, 1389615942]} final : True mtd_id 4302 list_pids : [1389619009, 1389619002, 1389619000, 1389618999, 1389618979, 1389618971, 1389618883, 1389618876, 1389618802, 1389618800, 1389618799] Looping around the photos to save general results len do output : 1 /27836830Didn'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, '3946875') ('4302', '27836830', '1389619009', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389619002', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389619000', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618999', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618979', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618971', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618883', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618876', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618802', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618800', None, None, None, None, None, '3946875') ('4302', None, None, None, None, None, None, None, '3946875') ('4302', '27836830', '1389618799', None, None, None, None, None, '3946875') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 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, '27836830', 'None', None, None, None, None, '3946875'), ('4302', '27836830', '1389619009', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389619002', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389619000', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618999', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618979', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618971', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618883', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618876', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618802', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618800', None, None, None, None, None, '3946875'), ('4302', '27836830', '1389618799', None, None, None, None, None, '3946875')] time used for this insertion : 0.03732872009277344 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.866763353347778 time spend to save output : 0.037644386291503906 total time spend for step 5 : 4.904407739639282 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 (3946875) 2.34user 2.43system 0:16.15elapsed 29%CPU (0avgtext+0avgdata 158536maxresident)k 12592inputs+11840outputs (116major+76652minor)pagefaults 0swaps