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 : 1365207 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 (4266240) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4266240) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29671273 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4266240'] with mtr_portfolio_ids : ['29671273'] and first list_photo_ids : [] new path : /proc/1365207/ Name: python3 Umask: 0002 State: R (running) Tgid: 1365207 Ngid: 0 Pid: 1365207 PPid: 1365206 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1365207 NSpid: 1365207 NSpgid: 1363876 NSsid: 1363876 VmPeak: 1113364 kB VmSize: 1113364 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 104900 kB VmRSS: 104900 kB RssAnon: 66300 kB RssFile: 38600 kB RssShmem: 0 kB VmData: 872092 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130476 kB VmPTE: 608 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 47 nonvoluntary_ctxt_switches: 98 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1365207', 'Ngid': '0', 'Pid': '1365207', 'PPid': '1365206', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1365207', 'NSpid': '1365207', 'NSpgid': '1363876', 'NSsid': '1363876', 'VmPeak': '1113364 kB', 'VmSize': '1113364 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '104900 kB', 'VmRSS': '104900 kB', 'RssAnon': '66300 kB', 'RssFile': '38600 kB', 'RssShmem': '0 kB', 'VmData': '872092 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130476 kB', 'VmPTE': '608 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '47', 'nonvoluntary_ctxt_switches': '98'} ('datou_batch_current', '1365207', '1113364', '0', '1113364', '872092', '104900', b'', 'marlene', '4266240') 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 (29671273) 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 (4266240 ) ) 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 (29671273) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1400770019, 'portfolio_id': 29671273}, {'photo_id': 1400770016, 'portfolio_id': 29671273}, {'photo_id': 1400770007, 'portfolio_id': 29671273}, {'photo_id': 1400770004, 'portfolio_id': 29671273}, {'photo_id': 1400770002, 'portfolio_id': 29671273}, {'photo_id': 1400770001, 'portfolio_id': 29671273}, {'photo_id': 1400770000, 'portfolio_id': 29671273}, {'photo_id': 1400769997, 'portfolio_id': 29671273}, {'photo_id': 1400769993, 'portfolio_id': 29671273}, {'photo_id': 1400769979, 'portfolio_id': 29671273}, {'photo_id': 1400769974, 'portfolio_id': 29671273}, {'photo_id': 1400769973, 'portfolio_id': 29671273}, {'photo_id': 1400769966, 'portfolio_id': 29671273}, {'photo_id': 1400769963, 'portfolio_id': 29671273}, {'photo_id': 1400769960, 'portfolio_id': 29671273}, {'photo_id': 1400769948, 'portfolio_id': 29671273}, {'photo_id': 1400769941, 'portfolio_id': 29671273}, {'photo_id': 1400769930, 'portfolio_id': 29671273}, {'photo_id': 1400769915, 'portfolio_id': 29671273}, {'photo_id': 1400769905, 'portfolio_id': 29671273}, {'photo_id': 1400769896, 'portfolio_id': 29671273}, {'photo_id': 1400769892, 'portfolio_id': 29671273}, {'photo_id': 1400769879, 'portfolio_id': 29671273}, {'photo_id': 1400769875, 'portfolio_id': 29671273}, {'photo_id': 1400769871, 'portfolio_id': 29671273}, {'photo_id': 1400769867, 'portfolio_id': 29671273}, {'photo_id': 1400769846, 'portfolio_id': 29671273}, {'photo_id': 1400769709, 'portfolio_id': 29671273}, {'photo_id': 1400769668, 'portfolio_id': 29671273}, {'photo_id': 1400769617, 'portfolio_id': 29671273}, {'photo_id': 1400769574, 'portfolio_id': 29671273}, {'photo_id': 1400769571, 'portfolio_id': 29671273}, {'photo_id': 1400769568, 'portfolio_id': 29671273}, {'photo_id': 1400769385, 'portfolio_id': 29671273}, {'photo_id': 1400769344, 'portfolio_id': 29671273}, {'photo_id': 1400769304, 'portfolio_id': 29671273}, {'photo_id': 1400769266, 'portfolio_id': 29671273}, {'photo_id': 1400768964, 'portfolio_id': 29671273}, {'photo_id': 1400768898, 'portfolio_id': 29671273}, {'photo_id': 1400768830, 'portfolio_id': 29671273}, {'photo_id': 1400768782, 'portfolio_id': 29671273}, {'photo_id': 1400768706, 'portfolio_id': 29671273}, {'photo_id': 1400768679, 'portfolio_id': 29671273}, {'photo_id': 1400768669, 'portfolio_id': 29671273}, {'photo_id': 1400768660, 'portfolio_id': 29671273}, {'photo_id': 1400768594, 'portfolio_id': 29671273}, {'photo_id': 1400768558, 'portfolio_id': 29671273}, {'photo_id': 1400768529, 'portfolio_id': 29671273}, {'photo_id': 1400768482, 'portfolio_id': 29671273}, {'photo_id': 1400768456, 'portfolio_id': 29671273}, {'photo_id': 1400768428, 'portfolio_id': 29671273}, {'photo_id': 1400768228, 'portfolio_id': 29671273}, {'photo_id': 1400768206, 'portfolio_id': 29671273}, {'photo_id': 1400768180, 'portfolio_id': 29671273}, {'photo_id': 1400768152, 'portfolio_id': 29671273}, {'photo_id': 1400768100, 'portfolio_id': 29671273}, {'photo_id': 1400767486, 'portfolio_id': 29671273}, {'photo_id': 1400767268, 'portfolio_id': 29671273}, {'photo_id': 1400767240, 'portfolio_id': 29671273}, {'photo_id': 1400767211, 'portfolio_id': 29671273}, {'photo_id': 1400767184, 'portfolio_id': 29671273}, {'photo_id': 1400767157, 'portfolio_id': 29671273}, {'photo_id': 1400767140, 'portfolio_id': 29671273}, {'photo_id': 1400767136, 'portfolio_id': 29671273}, {'photo_id': 1400767124, 'portfolio_id': 29671273}] map_portfolio_id_photo_id: {29671273: [1400770019, 1400770016, 1400770007, 1400770004, 1400770002, 1400770001, 1400770000, 1400769997, 1400769993, 1400769979, 1400769974, 1400769973, 1400769966, 1400769963, 1400769960, 1400769948, 1400769941, 1400769930, 1400769915, 1400769905, 1400769896, 1400769892, 1400769879, 1400769875, 1400769871, 1400769867, 1400769846, 1400769709, 1400769668, 1400769617, 1400769574, 1400769571, 1400769568, 1400769385, 1400769344, 1400769304, 1400769266, 1400768964, 1400768898, 1400768830, 1400768782, 1400768706, 1400768679, 1400768669, 1400768660, 1400768594, 1400768558, 1400768529, 1400768482, 1400768456, 1400768428, 1400768228, 1400768206, 1400768180, 1400768152, 1400768100, 1400767486, 1400767268, 1400767240, 1400767211, 1400767184, 1400767157, 1400767140, 1400767136, 1400767124]} ##### 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.054329633712768555 #### 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 Dec 24 02:15: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 After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29671273) 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 : 29671273 get user id for portfolio 29671273 get sub ptf for main ptf 29671273, type 3726 and hashtags ['Carton_gris', 'plastique', 'mal_croppe', 'flou', 'kraft', 'environnement', 'autre_refus', 'metal', 'Carton_brun', 'papier', 'cartonnette', 'Teint_Dans_La_Masse'] 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`=29671273 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','plastique','mal_croppe','flou','kraft','environnement','autre_refus','metal','Carton_brun','papier','cartonnette','Teint_Dans_La_Masse')) 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`=29671273 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','plastique','mal_croppe','flou','kraft','environnement','autre_refus','metal','Carton_brun','papier','cartonnette','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_brun': {'main_port_id': 29671273, 'sub_port_id': 29671346, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265299, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 28)}, 'papier': {'main_port_id': 29671273, 'sub_port_id': 29671347, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265300, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 28)}, 'kraft': {'main_port_id': 29671273, 'sub_port_id': 29671348, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265301, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 28)}, 'mal_croppe': {'main_port_id': 29671273, 'sub_port_id': 29671349, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265302, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 28)}, 'cartonnette': {'main_port_id': 29671273, 'sub_port_id': 29671350, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265303, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 28)}, 'metal': {'main_port_id': 29671273, 'sub_port_id': 29671351, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265304, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 28)}, 'flou': {'main_port_id': 29671273, 'sub_port_id': 29671352, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265305, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 28)}, 'plastique': {'main_port_id': 29671273, 'sub_port_id': 29671353, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265306, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 28)}, 'environnement': {'main_port_id': 29671273, 'sub_port_id': 29671354, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265307, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 28)}, 'autre_refus': {'main_port_id': 29671273, 'sub_port_id': 29671355, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265308, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 28)}, 'Carton_gris': {'main_port_id': 29671273, 'sub_port_id': 29671356, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265309, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 29671273, 'sub_port_id': 29671357, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265310, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29671346 , 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=29671273 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 (29671346) result : ((1400769236,), (1400769239,), (1400769566,), (1400769970,), (1400769971,), (1400770052,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29671273) result : ((1400767124,), (1400767136,), (1400767140,), (1400767157,), (1400767184,), (1400767211,), (1400767240,), (1400767268,), (1400767486,), (1400768100,), (1400768152,), (1400768180,), (1400768206,), (1400768228,), (1400768428,), (1400768456,), (1400768482,), (1400768529,), (1400768558,), (1400768594,), (1400768660,), (1400768669,), (1400768679,), (1400768706,), (1400768782,), (1400768830,), (1400768898,), (1400768964,), (1400769266,), (1400769304,), (1400769344,), (1400769385,), (1400769568,), (1400769571,), (1400769574,), (1400769617,), (1400769668,), (1400769709,), (1400769846,), (1400769867,), (1400769871,), (1400769875,), (1400769879,), (1400769892,), (1400769896,), (1400769905,), (1400769915,), (1400769930,), (1400769941,), (1400769948,), (1400769960,), (1400769963,), (1400769966,), (1400769973,), (1400769974,), (1400769979,), (1400769993,), (1400769997,), (1400770000,), (1400770001,), (1400770002,), (1400770004,), (1400770007,), (1400770016,), (1400770019,)) 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 (1400770000,1400768100) 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 29671347 , 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=29671273 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 (29671347) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29671273) result : ((1400767124,), (1400767136,), (1400767140,), (1400767157,), (1400767184,), (1400767211,), (1400767240,), (1400767268,), (1400767486,), (1400768100,), (1400768152,), (1400768180,), (1400768206,), (1400768228,), (1400768428,), (1400768456,), (1400768482,), (1400768529,), (1400768558,), (1400768594,), (1400768660,), (1400768669,), (1400768679,), (1400768706,), (1400768782,), (1400768830,), (1400768898,), (1400768964,), (1400769266,), (1400769304,), (1400769344,), (1400769385,), (1400769568,), (1400769571,), (1400769574,), (1400769617,), (1400769668,), (1400769709,), (1400769846,), (1400769867,), (1400769871,), (1400769875,), (1400769879,), (1400769892,), (1400769896,), (1400769905,), (1400769915,), (1400769930,), (1400769941,), (1400769948,), (1400769960,), (1400769963,), (1400769966,), (1400769973,), (1400769974,), (1400769979,), (1400769993,), (1400769997,), (1400770000,), (1400770001,), (1400770002,), (1400770004,), (1400770007,), (1400770016,), (1400770019,)) 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 (1400770000,1400768100) 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 29671348 , 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=29671273 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 (29671348) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29671273) result : ((1400767124,), (1400767136,), (1400767140,), (1400767157,), (1400767184,), (1400767211,), (1400767240,), (1400767268,), (1400767486,), (1400768100,), (1400768152,), (1400768180,), (1400768206,), (1400768228,), (1400768428,), (1400768456,), (1400768482,), (1400768529,), (1400768558,), (1400768594,), (1400768660,), (1400768669,), (1400768679,), (1400768706,), (1400768782,), (1400768830,), (1400768898,), (1400768964,), (1400769266,), (1400769304,), (1400769344,), (1400769385,), (1400769568,), (1400769571,), (1400769574,), (1400769617,), (1400769668,), (1400769709,), (1400769846,), (1400769867,), (1400769871,), (1400769875,), (1400769879,), (1400769892,), (1400769896,), (1400769905,), (1400769915,), (1400769930,), (1400769941,), (1400769948,), (1400769960,), (1400769963,), (1400769966,), (1400769973,), (1400769974,), (1400769979,), (1400769993,), (1400769997,), (1400770000,), (1400770001,), (1400770002,), (1400770004,), (1400770007,), (1400770016,), (1400770019,)) 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 (1400770000,1400768100) 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 29671349 , 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=29671273 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 (29671349) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29671273) result : ((1400767124,), (1400767136,), (1400767140,), (1400767157,), (1400767184,), (1400767211,), (1400767240,), (1400767268,), (1400767486,), (1400768100,), (1400768152,), (1400768180,), (1400768206,), (1400768228,), (1400768428,), (1400768456,), (1400768482,), (1400768529,), (1400768558,), (1400768594,), (1400768660,), (1400768669,), (1400768679,), (1400768706,), (1400768782,), (1400768830,), (1400768898,), (1400768964,), (1400769266,), (1400769304,), (1400769344,), (1400769385,), (1400769568,), (1400769571,), (1400769574,), (1400769617,), (1400769668,), (1400769709,), (1400769846,), (1400769867,), (1400769871,), (1400769875,), (1400769879,), (1400769892,), (1400769896,), (1400769905,), (1400769915,), (1400769930,), (1400769941,), (1400769948,), (1400769960,), (1400769963,), (1400769966,), (1400769973,), (1400769974,), (1400769979,), (1400769993,), (1400769997,), (1400770000,), (1400770001,), (1400770002,), (1400770004,), (1400770007,), (1400770016,), (1400770019,)) 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 (1400770000,1400768100) 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 29671350 , 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=29671273 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 (29671350) result : ((1400769969,), (1400769978,), (1400770048,), (1400770049,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29671273) result : ((1400767124,), (1400767136,), (1400767140,), (1400767157,), (1400767184,), (1400767211,), (1400767240,), (1400767268,), (1400767486,), (1400768100,), (1400768152,), (1400768180,), (1400768206,), (1400768228,), (1400768428,), (1400768456,), (1400768482,), (1400768529,), (1400768558,), (1400768594,), (1400768660,), (1400768669,), (1400768679,), (1400768706,), (1400768782,), (1400768830,), (1400768898,), (1400768964,), (1400769266,), (1400769304,), (1400769344,), (1400769385,), (1400769568,), (1400769571,), (1400769574,), (1400769617,), (1400769668,), (1400769709,), (1400769846,), (1400769867,), (1400769871,), (1400769875,), (1400769879,), (1400769892,), (1400769896,), (1400769905,), (1400769915,), (1400769930,), (1400769941,), (1400769948,), (1400769960,), (1400769963,), (1400769966,), (1400769973,), (1400769974,), (1400769979,), (1400769993,), (1400769997,), (1400770000,), (1400770001,), (1400770002,), (1400770004,), (1400770007,), (1400770016,), (1400770019,)) 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 (1400770000,1400768100) 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 29671351 , 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=29671273 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 (29671351) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29671273) result : ((1400767124,), (1400767136,), (1400767140,), (1400767157,), (1400767184,), (1400767211,), (1400767240,), (1400767268,), (1400767486,), (1400768100,), (1400768152,), (1400768180,), (1400768206,), (1400768228,), (1400768428,), (1400768456,), (1400768482,), (1400768529,), (1400768558,), (1400768594,), (1400768660,), (1400768669,), (1400768679,), (1400768706,), (1400768782,), (1400768830,), (1400768898,), (1400768964,), (1400769266,), (1400769304,), (1400769344,), (1400769385,), (1400769568,), (1400769571,), (1400769574,), (1400769617,), (1400769668,), (1400769709,), (1400769846,), (1400769867,), (1400769871,), (1400769875,), (1400769879,), (1400769892,), (1400769896,), (1400769905,), (1400769915,), (1400769930,), (1400769941,), (1400769948,), (1400769960,), (1400769963,), (1400769966,), (1400769973,), (1400769974,), (1400769979,), (1400769993,), (1400769997,), (1400770000,), (1400770001,), (1400770002,), (1400770004,), (1400770007,), (1400770016,), (1400770019,)) 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 (1400770000,1400768100) 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 29671352 , 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=29671273 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 (29671352) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29671273) result : ((1400767124,), (1400767136,), (1400767140,), (1400767157,), (1400767184,), (1400767211,), (1400767240,), (1400767268,), (1400767486,), (1400768100,), (1400768152,), (1400768180,), (1400768206,), (1400768228,), (1400768428,), (1400768456,), (1400768482,), (1400768529,), (1400768558,), (1400768594,), (1400768660,), (1400768669,), (1400768679,), (1400768706,), (1400768782,), (1400768830,), (1400768898,), (1400768964,), (1400769266,), (1400769304,), (1400769344,), (1400769385,), (1400769568,), (1400769571,), (1400769574,), (1400769617,), (1400769668,), (1400769709,), (1400769846,), (1400769867,), (1400769871,), (1400769875,), (1400769879,), (1400769892,), (1400769896,), (1400769905,), (1400769915,), (1400769930,), (1400769941,), (1400769948,), (1400769960,), (1400769963,), (1400769966,), (1400769973,), (1400769974,), (1400769979,), (1400769993,), (1400769997,), (1400770000,), (1400770001,), (1400770002,), (1400770004,), (1400770007,), (1400770016,), (1400770019,)) 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 (1400770000,1400768100) 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 29671353 , 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=29671273 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 (29671353) result : ((1400770053,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29671273) result : ((1400767124,), (1400767136,), (1400767140,), (1400767157,), (1400767184,), (1400767211,), (1400767240,), (1400767268,), (1400767486,), (1400768100,), (1400768152,), (1400768180,), (1400768206,), (1400768228,), (1400768428,), (1400768456,), (1400768482,), (1400768529,), (1400768558,), (1400768594,), (1400768660,), (1400768669,), (1400768679,), (1400768706,), (1400768782,), (1400768830,), (1400768898,), (1400768964,), (1400769266,), (1400769304,), (1400769344,), (1400769385,), (1400769568,), (1400769571,), (1400769574,), (1400769617,), (1400769668,), (1400769709,), (1400769846,), (1400769867,), (1400769871,), (1400769875,), (1400769879,), (1400769892,), (1400769896,), (1400769905,), (1400769915,), (1400769930,), (1400769941,), (1400769948,), (1400769960,), (1400769963,), (1400769966,), (1400769973,), (1400769974,), (1400769979,), (1400769993,), (1400769997,), (1400770000,), (1400770001,), (1400770002,), (1400770004,), (1400770007,), (1400770016,), (1400770019,)) 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 (1400770000,1400768100) 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 29671354 , 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=29671273 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 (29671354) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29671273) result : ((1400767124,), (1400767136,), (1400767140,), (1400767157,), (1400767184,), (1400767211,), (1400767240,), (1400767268,), (1400767486,), (1400768100,), (1400768152,), (1400768180,), (1400768206,), (1400768228,), (1400768428,), (1400768456,), (1400768482,), (1400768529,), (1400768558,), (1400768594,), (1400768660,), (1400768669,), (1400768679,), (1400768706,), (1400768782,), (1400768830,), (1400768898,), (1400768964,), (1400769266,), (1400769304,), (1400769344,), (1400769385,), (1400769568,), (1400769571,), (1400769574,), (1400769617,), (1400769668,), (1400769709,), (1400769846,), (1400769867,), (1400769871,), (1400769875,), (1400769879,), (1400769892,), (1400769896,), (1400769905,), (1400769915,), (1400769930,), (1400769941,), (1400769948,), (1400769960,), (1400769963,), (1400769966,), (1400769973,), (1400769974,), (1400769979,), (1400769993,), (1400769997,), (1400770000,), (1400770001,), (1400770002,), (1400770004,), (1400770007,), (1400770016,), (1400770019,)) 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 (1400770000,1400768100) 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 29671355 , 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=29671273 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 (29671355) result : ((1400769220,), (1400769223,), (1400769977,), (1400770043,), (1400770044,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29671273) result : ((1400767124,), (1400767136,), (1400767140,), (1400767157,), (1400767184,), (1400767211,), (1400767240,), (1400767268,), (1400767486,), (1400768100,), (1400768152,), (1400768180,), (1400768206,), (1400768228,), (1400768428,), (1400768456,), (1400768482,), (1400768529,), (1400768558,), (1400768594,), (1400768660,), (1400768669,), (1400768679,), (1400768706,), (1400768782,), (1400768830,), (1400768898,), (1400768964,), (1400769266,), (1400769304,), (1400769344,), (1400769385,), (1400769568,), (1400769571,), (1400769574,), (1400769617,), (1400769668,), (1400769709,), (1400769846,), (1400769867,), (1400769871,), (1400769875,), (1400769879,), (1400769892,), (1400769896,), (1400769905,), (1400769915,), (1400769930,), (1400769941,), (1400769948,), (1400769960,), (1400769963,), (1400769966,), (1400769973,), (1400769974,), (1400769979,), (1400769993,), (1400769997,), (1400770000,), (1400770001,), (1400770002,), (1400770004,), (1400770007,), (1400770016,), (1400770019,)) 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 (1400770000,1400768100) 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 29671356 , 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=29671273 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 (29671356) result : ((1400769564,), (1400770046,), (1400770047,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29671273) result : ((1400767124,), (1400767136,), (1400767140,), (1400767157,), (1400767184,), (1400767211,), (1400767240,), (1400767268,), (1400767486,), (1400768100,), (1400768152,), (1400768180,), (1400768206,), (1400768228,), (1400768428,), (1400768456,), (1400768482,), (1400768529,), (1400768558,), (1400768594,), (1400768660,), (1400768669,), (1400768679,), (1400768706,), (1400768782,), (1400768830,), (1400768898,), (1400768964,), (1400769266,), (1400769304,), (1400769344,), (1400769385,), (1400769568,), (1400769571,), (1400769574,), (1400769617,), (1400769668,), (1400769709,), (1400769846,), (1400769867,), (1400769871,), (1400769875,), (1400769879,), (1400769892,), (1400769896,), (1400769905,), (1400769915,), (1400769930,), (1400769941,), (1400769948,), (1400769960,), (1400769963,), (1400769966,), (1400769973,), (1400769974,), (1400769979,), (1400769993,), (1400769997,), (1400770000,), (1400770001,), (1400770002,), (1400770004,), (1400770007,), (1400770016,), (1400770019,)) 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 (1400770000,1400768100) 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 29671357 , 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=29671273 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 (29671357) result : ((1400769207,), (1400769563,), (1400769968,), (1400769975,), (1400769976,), (1400770040,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29671273) result : ((1400767124,), (1400767136,), (1400767140,), (1400767157,), (1400767184,), (1400767211,), (1400767240,), (1400767268,), (1400767486,), (1400768100,), (1400768152,), (1400768180,), (1400768206,), (1400768228,), (1400768428,), (1400768456,), (1400768482,), (1400768529,), (1400768558,), (1400768594,), (1400768660,), (1400768669,), (1400768679,), (1400768706,), (1400768782,), (1400768830,), (1400768898,), (1400768964,), (1400769266,), (1400769304,), (1400769344,), (1400769385,), (1400769568,), (1400769571,), (1400769574,), (1400769617,), (1400769668,), (1400769709,), (1400769846,), (1400769867,), (1400769871,), (1400769875,), (1400769879,), (1400769892,), (1400769896,), (1400769905,), (1400769915,), (1400769930,), (1400769941,), (1400769948,), (1400769960,), (1400769963,), (1400769966,), (1400769973,), (1400769974,), (1400769979,), (1400769993,), (1400769997,), (1400770000,), (1400770001,), (1400770002,), (1400770004,), (1400770007,), (1400770016,), (1400770019,)) 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 (1400770000,1400768100) 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`=29671273 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','plastique','mal_croppe','flou','kraft','environnement','autre_refus','metal','Carton_brun','papier','cartonnette','Teint_Dans_La_Masse')) 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`=29671273 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','plastique','mal_croppe','flou','kraft','environnement','autre_refus','metal','Carton_brun','papier','cartonnette','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_brun': {'main_port_id': 29671273, 'sub_port_id': 29671359, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265311, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 37)}, 'papier': {'main_port_id': 29671273, 'sub_port_id': 29671360, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265312, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 37)}, 'kraft': {'main_port_id': 29671273, 'sub_port_id': 29671361, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265313, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 37)}, 'mal_croppe': {'main_port_id': 29671273, 'sub_port_id': 29671362, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265314, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 37)}, 'cartonnette': {'main_port_id': 29671273, 'sub_port_id': 29671363, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265315, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 37)}, 'metal': {'main_port_id': 29671273, 'sub_port_id': 29671364, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265316, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 37)}, 'flou': {'main_port_id': 29671273, 'sub_port_id': 29671365, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265317, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 37)}, 'plastique': {'main_port_id': 29671273, 'sub_port_id': 29671366, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265318, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 37)}, 'environnement': {'main_port_id': 29671273, 'sub_port_id': 29671367, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265319, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 37)}, 'autre_refus': {'main_port_id': 29671273, 'sub_port_id': 29671368, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265320, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 37)}, 'Carton_gris': {'main_port_id': 29671273, 'sub_port_id': 29671369, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265321, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 5, 37), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 37)}, 'Teint_Dans_La_Masse': {'main_port_id': 29671273, 'sub_port_id': 29671370, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20265322, 'last_updated_at': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 2, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 2, 5, 37)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29671359,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29671346 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29671360,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29671347 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29671361,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29671348 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29671362,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29671349 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29671363,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29671350 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29671364,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29671351 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29671365,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29671352 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29671366,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29671353 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29671367,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29671354 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29671368,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29671355 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29671369,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29671356 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29671370,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29671357 lien utilise dans velours : https://marlene.fotonower.com/velours/29671359,29671360,29671361,29671362,29671363,29671364,29671365,29671366,29671367,29671368,29671369,29671370?tags=Carton_brun,papier,kraft,mal_croppe,cartonnette,metal,flou,plastique,environnement,autre_refus,Carton_gris,Teint_Dans_La_Masse After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29671273]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1400770019, 1400770016, 1400770007, 1400770004, 1400770002, 1400770001, 1400770000, 1400769997, 1400769993] map_info['map_portfolio_photo'] : {29671273: [1400770019, 1400770016, 1400770007, 1400770004, 1400770002, 1400770001, 1400770000, 1400769997, 1400769993, 1400769979, 1400769974, 1400769973, 1400769966, 1400769963, 1400769960, 1400769948, 1400769941, 1400769930, 1400769915, 1400769905, 1400769896, 1400769892, 1400769879, 1400769875, 1400769871, 1400769867, 1400769846, 1400769709, 1400769668, 1400769617, 1400769574, 1400769571, 1400769568, 1400769385, 1400769344, 1400769304, 1400769266, 1400768964, 1400768898, 1400768830, 1400768782, 1400768706, 1400768679, 1400768669, 1400768660, 1400768594, 1400768558, 1400768529, 1400768482, 1400768456, 1400768428, 1400768228, 1400768206, 1400768180, 1400768152, 1400768100, 1400767486, 1400767268, 1400767240, 1400767211, 1400767184, 1400767157, 1400767140, 1400767136, 1400767124]} final : False mtd_id 4302 list_pids : [1400770019, 1400770016, 1400770007, 1400770004, 1400770002, 1400770001, 1400770000, 1400769997, 1400769993] Looping around the photos to save general results len do output : 1 /29671273. 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, '4266240') ('4302', '29671273', '1400770019', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770016', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770007', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770004', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770002', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770001', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770000', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400769997', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400769993', None, None, None, None, None, '4266240') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '29671273', "{'Carton_brun': 29671346, 'papier': 29671347, 'kraft': 29671348, 'mal_croppe': 29671349, 'cartonnette': 29671350, 'metal': 29671351, 'flou': 29671352, 'plastique': 29671353, 'environnement': 29671354, 'autre_refus': 29671355, 'Carton_gris': 29671356, 'Teint_Dans_La_Masse': 29671357}", None, None, None, None, '4266240'), ('4302', '29671273', '1400770019', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400770016', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400770007', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400770004', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400770002', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400770001', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400770000', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400769997', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400769993', None, None, None, None, None, '4266240')] time used for this insertion : 0.03875327110290527 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.6289784908294678 time spend to save output : 0.03906059265136719 total time spend for step 1 : 1.668039083480835 step2:final Wed Dec 24 02:15: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 ! 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 (29671273) 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 29671273 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1400767124,1400767140,1400767136,1400767268,1400767240,1400767211,1400767184,1400767157,1400767486,1400768228,1400768706,1400768206,1400768679,1400768180,1400768669,1400768152,1400768660,1400768594,1400768100,1400768558,1400768529,1400768482,1400768456,1400768428,1400768964,1400768898,1400768830,1400768782,1400769385,1400769344,1400769304,1400769266,1400769709,1400769668,1400769617,1400769574,1400769571,1400769568,1400769879,1400769875,1400769871,1400769867,1400769846,1400769915,1400769979,1400769905,1400769974,1400769896,1400769973,1400769892,1400769966,1400769963,1400769960,1400769948,1400769941,1400769930,1400770004,1400770002,1400770001,1400770000,1400769997,1400769993,1400770019,1400770016,1400770007); 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([29671273]) Inside saveOutput : final : False verbose : True original output for save of step final : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ('0.03979191254571074',), 1400770004: ('0.03979191254571074',), 1400770002: ('0.03979191254571074',), 1400770001: ('0.03979191254571074',), 1400770000: ('0.03979191254571074',), 1400769997: ('0.03979191254571074',), 1400769993: ('0.03979191254571074',)} new output for save of step final : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ('0.03979191254571074',), 1400770004: ('0.03979191254571074',), 1400770002: ('0.03979191254571074',), 1400770001: ('0.03979191254571074',), 1400770000: ('0.03979191254571074',), 1400769997: ('0.03979191254571074',), 1400769993: ('0.03979191254571074',)} [1400770019, 1400770016, 1400770007, 1400770004, 1400770002, 1400770001, 1400770000, 1400769997, 1400769993] map_info['map_portfolio_photo'] : {29671273: [1400770019, 1400770016, 1400770007, 1400770004, 1400770002, 1400770001, 1400770000, 1400769997, 1400769993, 1400769979, 1400769974, 1400769973, 1400769966, 1400769963, 1400769960, 1400769948, 1400769941, 1400769930, 1400769915, 1400769905, 1400769896, 1400769892, 1400769879, 1400769875, 1400769871, 1400769867, 1400769846, 1400769709, 1400769668, 1400769617, 1400769574, 1400769571, 1400769568, 1400769385, 1400769344, 1400769304, 1400769266, 1400768964, 1400768898, 1400768830, 1400768782, 1400768706, 1400768679, 1400768669, 1400768660, 1400768594, 1400768558, 1400768529, 1400768482, 1400768456, 1400768428, 1400768228, 1400768206, 1400768180, 1400768152, 1400768100, 1400767486, 1400767268, 1400767240, 1400767211, 1400767184, 1400767157, 1400767140, 1400767136, 1400767124]} final : False mtd_id 4302 list_pids : [1400770019, 1400770016, 1400770007, 1400770004, 1400770002, 1400770001, 1400770000, 1400769997, 1400769993] Looping around the photos to save general results len do output : 9 /1400770019.Didn't retrieve data . /1400770016.Didn't retrieve data . /1400770007.Didn't retrieve data . /1400770004.Didn't retrieve data . /1400770002.Didn't retrieve data . /1400770001.Didn't retrieve data . /1400770000.Didn't retrieve data . /1400769997.Didn't retrieve data . /1400769993.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, '4266240') ('4302', '29671273', '1400770019', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770016', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770007', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770004', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770002', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770001', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770000', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400769997', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400769993', None, None, None, None, None, '4266240') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 27 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '29671273', '1400770019', '0.03979191254571074', None, None, None, None, '4266240'), ('4302', '29671273', '1400770016', '0.03979191254571074', None, None, None, None, '4266240'), ('4302', '29671273', '1400770007', '0.03979191254571074', None, None, None, None, '4266240'), ('4302', '29671273', '1400770004', '0.03979191254571074', None, None, None, None, '4266240'), ('4302', '29671273', '1400770002', '0.03979191254571074', None, None, None, None, '4266240'), ('4302', '29671273', '1400770001', '0.03979191254571074', None, None, None, None, '4266240'), ('4302', '29671273', '1400770000', '0.03979191254571074', None, None, None, None, '4266240'), ('4302', '29671273', '1400769997', '0.03979191254571074', None, None, None, None, '4266240'), ('4302', '29671273', '1400769993', '0.03979191254571074', None, None, None, None, '4266240')] time used for this insertion : 0.03862190246582031 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.23636198043823242 time spend to save output : 0.03911757469177246 total time spend for step 2 : 0.2754795551300049 step3:velours_tree Wed Dec 24 02:15:02 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 : {29671273: [{'Carton_brun': 29671346, 'papier': 29671347, 'kraft': 29671348, 'mal_croppe': 29671349, 'cartonnette': 29671350, 'metal': 29671351, 'flou': 29671352, 'plastique': 29671353, 'environnement': 29671354, 'autre_refus': 29671355, 'Carton_gris': 29671356, 'Teint_Dans_La_Masse': 29671357}]} input_args_next_step : {29671273: ()} output_args : {29671273: [{'Carton_brun': 29671346, 'papier': 29671347, 'kraft': 29671348, 'mal_croppe': 29671349, 'cartonnette': 29671350, 'metal': 29671351, 'flou': 29671352, 'plastique': 29671353, 'environnement': 29671354, 'autre_refus': 29671355, 'Carton_gris': 29671356, 'Teint_Dans_La_Masse': 29671357}]} args : 29671273 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'Carton_brun': 29671346, 'papier': 29671347, 'kraft': 29671348, 'mal_croppe': 29671349, 'cartonnette': 29671350, 'metal': 29671351, 'flou': 29671352, 'plastique': 29671353, 'environnement': 29671354, 'autre_refus': 29671355, 'Carton_gris': 29671356, 'Teint_Dans_La_Masse': 29671357},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29671273) 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([29671273]) 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.2807319164276123 time spend to save output : 7.319450378417969e-05 total time spend for step 3 : 0.2808051109313965 step4:send_mail_cod Wed Dec 24 02:15:02 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 : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ('0.03979191254571074',), 1400770004: ('0.03979191254571074',), 1400770002: ('0.03979191254571074',), 1400770001: ('0.03979191254571074',), 1400770000: ('0.03979191254571074',), 1400769997: ('0.03979191254571074',), 1400769993: ('0.03979191254571074',)} input_args_next_step : {1400770019: ()} output_args : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ('0.03979191254571074',), 1400770004: ('0.03979191254571074',), 1400770002: ('0.03979191254571074',), 1400770001: ('0.03979191254571074',), 1400770000: ('0.03979191254571074',), 1400769997: ('0.03979191254571074',), 1400769993: ('0.03979191254571074',)} args : 1400770019 depend.output_id : 0 input_args_next_step : {1400770019: ('0.03979191254571074',), 1400770016: ()} output_args : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ('0.03979191254571074',), 1400770004: ('0.03979191254571074',), 1400770002: ('0.03979191254571074',), 1400770001: ('0.03979191254571074',), 1400770000: ('0.03979191254571074',), 1400769997: ('0.03979191254571074',), 1400769993: ('0.03979191254571074',)} args : 1400770016 depend.output_id : 0 input_args_next_step : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ()} output_args : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ('0.03979191254571074',), 1400770004: ('0.03979191254571074',), 1400770002: ('0.03979191254571074',), 1400770001: ('0.03979191254571074',), 1400770000: ('0.03979191254571074',), 1400769997: ('0.03979191254571074',), 1400769993: ('0.03979191254571074',)} args : 1400770007 depend.output_id : 0 input_args_next_step : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ('0.03979191254571074',), 1400770004: ()} output_args : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ('0.03979191254571074',), 1400770004: ('0.03979191254571074',), 1400770002: ('0.03979191254571074',), 1400770001: ('0.03979191254571074',), 1400770000: ('0.03979191254571074',), 1400769997: ('0.03979191254571074',), 1400769993: ('0.03979191254571074',)} args : 1400770004 depend.output_id : 0 input_args_next_step : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ('0.03979191254571074',), 1400770004: ('0.03979191254571074',), 1400770002: ()} output_args : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ('0.03979191254571074',), 1400770004: ('0.03979191254571074',), 1400770002: ('0.03979191254571074',), 1400770001: ('0.03979191254571074',), 1400770000: ('0.03979191254571074',), 1400769997: ('0.03979191254571074',), 1400769993: ('0.03979191254571074',)} args : 1400770002 depend.output_id : 0 input_args_next_step : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ('0.03979191254571074',), 1400770004: ('0.03979191254571074',), 1400770002: ('0.03979191254571074',), 1400770001: ()} output_args : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ('0.03979191254571074',), 1400770004: ('0.03979191254571074',), 1400770002: ('0.03979191254571074',), 1400770001: ('0.03979191254571074',), 1400770000: ('0.03979191254571074',), 1400769997: ('0.03979191254571074',), 1400769993: ('0.03979191254571074',)} args : 1400770001 depend.output_id : 0 input_args_next_step : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ('0.03979191254571074',), 1400770004: ('0.03979191254571074',), 1400770002: ('0.03979191254571074',), 1400770001: ('0.03979191254571074',), 1400770000: ()} output_args : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ('0.03979191254571074',), 1400770004: ('0.03979191254571074',), 1400770002: ('0.03979191254571074',), 1400770001: ('0.03979191254571074',), 1400770000: ('0.03979191254571074',), 1400769997: ('0.03979191254571074',), 1400769993: ('0.03979191254571074',)} args : 1400770000 depend.output_id : 0 input_args_next_step : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ('0.03979191254571074',), 1400770004: ('0.03979191254571074',), 1400770002: ('0.03979191254571074',), 1400770001: ('0.03979191254571074',), 1400770000: ('0.03979191254571074',), 1400769997: ()} output_args : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ('0.03979191254571074',), 1400770004: ('0.03979191254571074',), 1400770002: ('0.03979191254571074',), 1400770001: ('0.03979191254571074',), 1400770000: ('0.03979191254571074',), 1400769997: ('0.03979191254571074',), 1400769993: ('0.03979191254571074',)} args : 1400769997 depend.output_id : 0 input_args_next_step : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ('0.03979191254571074',), 1400770004: ('0.03979191254571074',), 1400770002: ('0.03979191254571074',), 1400770001: ('0.03979191254571074',), 1400770000: ('0.03979191254571074',), 1400769997: ('0.03979191254571074',), 1400769993: ()} output_args : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ('0.03979191254571074',), 1400770004: ('0.03979191254571074',), 1400770002: ('0.03979191254571074',), 1400770001: ('0.03979191254571074',), 1400770000: ('0.03979191254571074',), 1400769997: ('0.03979191254571074',), 1400769993: ('0.03979191254571074',)} args : 1400769993 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 : {29671273: [{'Carton_brun': 29671346, 'papier': 29671347, 'kraft': 29671348, 'mal_croppe': 29671349, 'cartonnette': 29671350, 'metal': 29671351, 'flou': 29671352, 'plastique': 29671353, 'environnement': 29671354, 'autre_refus': 29671355, 'Carton_gris': 29671356, 'Teint_Dans_La_Masse': 29671357}]} input_args_next_step : {1400770019: ('0.03979191254571074',), 1400770016: ('0.03979191254571074',), 1400770007: ('0.03979191254571074',), 1400770004: ('0.03979191254571074',), 1400770002: ('0.03979191254571074',), 1400770001: ('0.03979191254571074',), 1400770000: ('0.03979191254571074',), 1400769997: ('0.03979191254571074',), 1400769993: ('0.03979191254571074',), 29671273: ()} output_args : {29671273: [{'Carton_brun': 29671346, 'papier': 29671347, 'kraft': 29671348, 'mal_croppe': 29671349, 'cartonnette': 29671350, 'metal': 29671351, 'flou': 29671352, 'plastique': 29671353, 'environnement': 29671354, 'autre_refus': 29671355, 'Carton_gris': 29671356, 'Teint_Dans_La_Masse': 29671357}]} args : 29671273 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :10, first value : ('0.03979191254571074',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29671273) 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 (1400770019,1400770016,1400770007,1400770004,1400770002,1400770001,1400770000,1400769997,1400769993) Found this number of photos: 9 ##### Call download_photos : nb_thread : 5 begin to download photo : 1400769993 begin to download photo : 1400770000 begin to download photo : 1400770002 begin to download photo : 1400770007 begin to download photo : 1400770019 download finish for photo 1400770002 begin to download photo : 1400770004 download finish for photo 1400770000 begin to download photo : 1400770001 download finish for photo 1400770019 download finish for photo 1400770007 begin to download photo : 1400770016 download finish for photo 1400769993 begin to download photo : 1400769997 download finish for photo 1400770001 download finish for photo 1400770004 download finish for photo 1400770016 download finish for photo 1400769997 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette296713481766538902/ imagette296713491766538902/ length of list_filenames : 9 ; length of list_pids : 9 ; length of list_args : 9 results_Auto_P29671273_24-12-2025_02_15_02.pdf 29671348 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=29671348 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette296713481766538902 29671349 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=29671349 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette296713491766538902 29671350 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=29671350 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1400769969: '1766538667_3594937_1400769266_405369cc5782d206f32aa86286ab2416_rle_crop_4079652070_0.png', 1400769978: '1766538687_3595361_1400768898_307e331f2d95e46760e38b442a7b4a8a_rle_crop_4079652163_0.png', 1400770048: '1766538806_3601495_1400769668_88a4365ee22485c114ac5379035427e2_rle_crop_4079652685_0.png', 1400770049: '1766538806_3601495_1400769574_fec5101aa1e2b0da40eca13200f1330f_rle_crop_4079652700_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/55b360f4491c3d19d151b5e7db32272f_52112241.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/c803153aed8831e94151099fe0c4d547_71682445.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/3007113aff9fc345ea6c7ca9a65446df_6543371.png change filename to text .imagette296713501766538902/ imagette296713501766538902/1766538806_3601495_1400769668_88a4365ee22485c114ac5379035427e2_rle_crop_4079652685_0.png.png imagette296713501766538902/1766538806_3601495_1400769574_fec5101aa1e2b0da40eca13200f1330f_rle_crop_4079652700_0.png.png imagette296713501766538902/1766538687_3595361_1400768898_307e331f2d95e46760e38b442a7b4a8a_rle_crop_4079652163_0.png.png imagette296713501766538902/1766538667_3594937_1400769266_405369cc5782d206f32aa86286ab2416_rle_crop_4079652070_0.png.png imagette296713511766538903/ imagette296713521766538903/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/0e8c8da3ea3d3573ddd5fb671d140eb8_87172278.png imagette296713501766538902 29671351 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=29671351 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette296713511766538903 29671352 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=29671352 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette296713521766538903 29671353 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=29671353 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1400770053: '1766538806_3601495_1400769571_64dad4e0c12fc3e481a9df145c5581d5_rle_crop_4079652711_0.png'} change filename to text .imagette296713531766538903/ imagette296713531766538903/1766538806_3601495_1400769571_64dad4e0c12fc3e481a9df145c5581d5_rle_crop_4079652711_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/9cdfde692a4426c9cc4860617db05367_50069752.png imagette296713531766538903 29671355 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=29671355 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1400769220: '1766538387_3579298_1400767211_e8f8a35b43152f935a4b3d2a9d6a0bd1_rle_crop_4079651116_0.png', 1400769223: '1766538387_3579298_1400767157_62dc488ef8a32f5c4daad272fe2b8896_rle_crop_4079651139_0.png', 1400769977: '1766538687_3595361_1400768898_307e331f2d95e46760e38b442a7b4a8a_rle_crop_4079652162_0.png', 1400770043: '1766538806_3601495_1400769568_3acc4a6816f44fcc18a73624f8413b7f_rle_crop_4079652722_0.png', 1400770044: '1766538806_3601495_1400769568_3acc4a6816f44fcc18a73624f8413b7f_rle_crop_4079652723_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/aaf34be26c00d865a38ef48e64be69a8_28487782.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/89ac13446a58a3451e33787e6e7a5bf7_87871170.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/78077e54e4bafbc544181f1c04eb4330_29879565.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/d018a71b556b91aab32c00ee3476f483_1339908.png change filename to text .imagette296713551766538903/ imagette296713551766538903/1766538806_3601495_1400769568_3acc4a6816f44fcc18a73624f8413b7f_rle_crop_4079652722_0.png.png imagette296713551766538903/1766538387_3579298_1400767211_e8f8a35b43152f935a4b3d2a9d6a0bd1_rle_crop_4079651116_0.png.png imagette296713551766538903/1766538387_3579298_1400767157_62dc488ef8a32f5c4daad272fe2b8896_rle_crop_4079651139_0.png.png imagette296713551766538903/1766538806_3601495_1400769568_3acc4a6816f44fcc18a73624f8413b7f_rle_crop_4079652723_0.png.png imagette296713551766538903/1766538687_3595361_1400768898_307e331f2d95e46760e38b442a7b4a8a_rle_crop_4079652162_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/f744ae728b74a37fcfc7a942c9fb6a7e_94601739.png imagette296713551766538903 29671346 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=29671346 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1400769236: '1766538387_3579298_1400767240_3086527a5e5b650e4ebcbcae645c7c70_rle_crop_4079651107_0.png', 1400769239: '1766538387_3579298_1400767157_62dc488ef8a32f5c4daad272fe2b8896_rle_crop_4079651138_0.png', 1400769566: '1766538428_3581513_1400767124_91640b18694d73f57977d6bbe5e030b8_rle_crop_4079651374_0.png', 1400769970: '1766538667_3594937_1400769304_4e7cdbcf99f17188de611ebf0748760b_rle_crop_4079652061_0.png', 1400769971: '1766538667_3594937_1400769266_405369cc5782d206f32aa86286ab2416_rle_crop_4079652076_0.png', 1400770052: '1766538806_3601495_1400769568_3acc4a6816f44fcc18a73624f8413b7f_rle_crop_4079652727_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/3a4c2ee6ba27e7424ae199b5ea4abeba_60678271.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/80157f79874b9122778dd0b37d3c59af_46764202.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/7e0ae6055b32c8639ebf3a4c4e7bf023_59544771.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/99f2396408e2b9a4d9a3e366c2aa990c_84551888.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/d526e9a5766ec2f72f03692f2a23d1f6_91103672.png change filename to text .imagette296713461766538903/ imagette296713461766538903/1766538428_3581513_1400767124_91640b18694d73f57977d6bbe5e030b8_rle_crop_4079651374_0.png.png imagette296713461766538903/1766538387_3579298_1400767240_3086527a5e5b650e4ebcbcae645c7c70_rle_crop_4079651107_0.png.png imagette296713461766538903/1766538667_3594937_1400769304_4e7cdbcf99f17188de611ebf0748760b_rle_crop_4079652061_0.png.png imagette296713461766538903/1766538667_3594937_1400769266_405369cc5782d206f32aa86286ab2416_rle_crop_4079652076_0.png.png imagette296713461766538903/1766538387_3579298_1400767157_62dc488ef8a32f5c4daad272fe2b8896_rle_crop_4079651138_0.png.png imagette296713461766538903/1766538806_3601495_1400769568_3acc4a6816f44fcc18a73624f8413b7f_rle_crop_4079652727_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/2a0ceba7020215556aade23971cbf481_27837740.png imagette296713461766538903 29671356 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=29671356 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1400769564: '1766538428_3581513_1400767268_2a5ba16514ea273d80cc64e3aab25b1c_rle_crop_4079651333_0.png', 1400770046: '1766538806_3601495_1400769571_64dad4e0c12fc3e481a9df145c5581d5_rle_crop_4079652709_0.png', 1400770047: '1766538806_3601495_1400769568_3acc4a6816f44fcc18a73624f8413b7f_rle_crop_4079652725_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/e2a4ff922e9628c83d9b69dfc20105c7_4346457.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/0388d110e73923f48ad8cbcd0a4321a9_54876820.png change filename to text .imagette296713561766538904/ imagette296713561766538904/1766538806_3601495_1400769571_64dad4e0c12fc3e481a9df145c5581d5_rle_crop_4079652709_0.png.png imagette296713561766538904/1766538806_3601495_1400769568_3acc4a6816f44fcc18a73624f8413b7f_rle_crop_4079652725_0.png.png imagette296713561766538904/1766538428_3581513_1400767268_2a5ba16514ea273d80cc64e3aab25b1c_rle_crop_4079651333_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/70b180b611f8a4ae0b9a87dcf1261809_56121793.png imagette296713561766538904 29671357 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=29671357 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1400769207: '1766538387_3579298_1400767240_3086527a5e5b650e4ebcbcae645c7c70_rle_crop_4079651109_0.png', 1400769563: '1766538428_3581513_1400767124_91640b18694d73f57977d6bbe5e030b8_rle_crop_4079651373_0.png', 1400769968: '1766538667_3594937_1400769266_405369cc5782d206f32aa86286ab2416_rle_crop_4079652072_0.png', 1400769975: '1766538687_3595361_1400768830_390e759102161f2c9950973045c6ed86_rle_crop_4079652178_0.png', 1400769976: '1766538687_3595361_1400768782_fbcf5f1850324af7f2d4ca12f8966a85_rle_crop_4079652191_0.png', 1400770040: '1766538806_3601495_1400769571_64dad4e0c12fc3e481a9df145c5581d5_rle_crop_4079652714_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/af228fb594176a7ec1e5d54319f6e669_6221612.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/96a7bde09ec2b31093d1345062006ed5_79363550.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/88a89827c205eaf14eb30215d42828e7_2149262.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/2c4dc0cf138907695b86ad79dd3ec4c8_5971869.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/1b2a036e4b2a3f4cfe3cf63407b37af6_37422515.png change filename to text .imagette296713571766538904/ imagette296713571766538904/1766538667_3594937_1400769266_405369cc5782d206f32aa86286ab2416_rle_crop_4079652072_0.png.png imagette296713571766538904/1766538806_3601495_1400769571_64dad4e0c12fc3e481a9df145c5581d5_rle_crop_4079652714_0.png.png imagette296713571766538904/1766538387_3579298_1400767240_3086527a5e5b650e4ebcbcae645c7c70_rle_crop_4079651109_0.png.png imagette296713571766538904/1766538687_3595361_1400768830_390e759102161f2c9950973045c6ed86_rle_crop_4079652178_0.png.png imagette296713571766538904/1766538687_3595361_1400768782_fbcf5f1850324af7f2d4ca12f8966a85_rle_crop_4079652191_0.png.png imagette296713571766538904/1766538428_3581513_1400767124_91640b18694d73f57977d6bbe5e030b8_rle_crop_4079651373_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/087a66d1cac07e729f0908086a2517f8_97420652.png imagette296713571766538904 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=29671273 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/29671359,29671360,29671361,29671362,29671363,29671364,29671365,29671366,29671367,29671368,29671369,29671370?tags=Carton_brun,papier,kraft,mal_croppe,cartonnette,metal,flou,plastique,environnement,autre_refus,Carton_gris,Teint_Dans_La_Masse your option no_mail is active, we will not send the real mail to your client args[1400770019] : ('0.03979191254571074',) no score found for photo 1400770019 We are sending mail with results at report@fotonower.com args[1400770016] : ('0.03979191254571074',) no score found for photo 1400770016 We are sending mail with results at report@fotonower.com args[1400770007] : ('0.03979191254571074',) no score found for photo 1400770007 We are sending mail with results at report@fotonower.com args[1400770004] : ('0.03979191254571074',) no score found for photo 1400770004 We are sending mail with results at report@fotonower.com args[1400770002] : ('0.03979191254571074',) no score found for photo 1400770002 We are sending mail with results at report@fotonower.com args[1400770001] : ('0.03979191254571074',) no score found for photo 1400770001 We are sending mail with results at report@fotonower.com args[1400770000] : ('0.03979191254571074',) no score found for photo 1400770000 We are sending mail with results at report@fotonower.com args[1400769997] : ('0.03979191254571074',) no score found for photo 1400769997 We are sending mail with results at report@fotonower.com args[1400769993] : ('0.03979191254571074',) no score found for photo 1400769993 We are sending mail with results at report@fotonower.com refus_total : 0.03979191254571074 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=29671273 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_P29671273_24-12-2025_02_15_02.pdf results_Auto_P29671273_24-12-2025_02_15_02.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29671273_24-12-2025_02_15_02.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','29671273','results_Auto_P29671273_24-12-2025_02_15_02.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29671273_24-12-2025_02_15_02.pdf','pdf','','0.16','0.03979191254571074') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29671273]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1400770019, 1400770016, 1400770007, 1400770004, 1400770002, 1400770001, 1400770000, 1400769997, 1400769993] map_info['map_portfolio_photo'] : {29671273: [1400770019, 1400770016, 1400770007, 1400770004, 1400770002, 1400770001, 1400770000, 1400769997, 1400769993, 1400769979, 1400769974, 1400769973, 1400769966, 1400769963, 1400769960, 1400769948, 1400769941, 1400769930, 1400769915, 1400769905, 1400769896, 1400769892, 1400769879, 1400769875, 1400769871, 1400769867, 1400769846, 1400769709, 1400769668, 1400769617, 1400769574, 1400769571, 1400769568, 1400769385, 1400769344, 1400769304, 1400769266, 1400768964, 1400768898, 1400768830, 1400768782, 1400768706, 1400768679, 1400768669, 1400768660, 1400768594, 1400768558, 1400768529, 1400768482, 1400768456, 1400768428, 1400768228, 1400768206, 1400768180, 1400768152, 1400768100, 1400767486, 1400767268, 1400767240, 1400767211, 1400767184, 1400767157, 1400767140, 1400767136, 1400767124]} final : False mtd_id 4302 list_pids : [1400770019, 1400770016, 1400770007, 1400770004, 1400770002, 1400770001, 1400770000, 1400769997, 1400769993] 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, '4266240') ('4302', '29671273', '1400770019', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770016', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770007', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770004', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770002', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770001', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770000', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400769997', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400769993', None, None, None, None, None, '4266240') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '29671273', '1400770019', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400770016', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400770007', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400770004', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400770002', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400770001', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400770000', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400769997', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400769993', None, None, None, None, None, '4266240')] time used for this insertion : 0.04720163345336914 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.7688422203063965 time spend to save output : 0.047393798828125 total time spend for step 4 : 3.8162360191345215 step5:split_time_score Wed Dec 24 02:15:06 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 : ['29671273'] 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 : [('29671273',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29671273) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1400770019: {'path': 'temp/1766538902_1365207_1400770019_ff689dd5258c0467d541a2a89cbb70ac.jpg', 'extension': 'jpg'}, 1400770000: {'path': 'temp/1766538902_1365207_1400770000_71df84c17c3e9a003269f9cdaf9f8ad7.jpg', 'extension': 'jpg'}, 1400770001: {'path': 'temp/1766538902_1365207_1400770001_fefc0c96436890948cf7368317e2364a.jpg', 'extension': 'jpg'}, 1400770002: {'path': 'temp/1766538902_1365207_1400770002_e3ee707ff59b2f227f1c785249126f67.jpg', 'extension': 'jpg'}, 1400770004: {'path': 'temp/1766538902_1365207_1400770004_b994a591e71da0d21f405a0d5e381dea.jpg', 'extension': 'jpg'}, 1400770007: {'path': 'temp/1766538902_1365207_1400770007_b5318ff9dfc47358c387a5db8451d309.jpg', 'extension': 'jpg'}, 1400770016: {'path': 'temp/1766538902_1365207_1400770016_625d0bf886ed25f3ad208d01a8cd4eec.jpg', 'extension': 'jpg'}, 1400769993: {'path': 'temp/1766538902_1365207_1400769993_ca7704d623509d91f057f0ca93e9a1e2.jpg', 'extension': 'jpg'}, 1400769997: {'path': 'temp/1766538902_1365207_1400769997_b695d7332db8a614c02d999e51e991c0.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 = 29671273; (('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 = 29671273 group by h (('02', 65),) 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=29671273 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 (29671273) 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 (29671273) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 24122025 29671273 Nombre de photos uploadées : 65 / 23040 (0%) 24122025 29671273 Nombre de photos taguées (types de déchets): 0 / 65 (0%) 24122025 29671273 Nombre de photos taguées (volume) : 0 / 65 (0%) [{'photo_id': 1400767124, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/91640b18694d73f57977d6bbe5e030b8.jpg', 'username': None, 'uploaded_at': 1766538063, 'text': 'image_24122025_02_00_14_010192m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1400767140, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/bdfad9a0dd5d998880508908e4b67f53.jpg', 'username': None, 'uploaded_at': 1766538083, 'text': 'image_24122025_02_00_24_010139m0.jpg 2e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1400767136, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/1943b925170d11750a07d833a0e678a8.jpg', 'username': None, 'uploaded_at': 1766538083, 'text': 'image_24122025_02_00_34_010135m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1400767268, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/2a5ba16514ea273d80cc64e3aab25b1c.jpg', 'username': None, 'uploaded_at': 1766538127, 'text': 'image_24122025_02_00_55_010137m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 4.5299530029296875e-06 elapsed_time : order_list_meta_photo_and_scores 5.7220458984375e-06 ????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0029647350311279297 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 29671273, '2025-12-24' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-12-24' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2781885,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.5407102108001709 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= 2781885 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2781885, 'dashboard_run_id': 2788856, 'mtr_portfolio_id': 29668057, 'dashboard_result_id': 18678159, '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_P29668057_24-12-2025_00_19_31.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29668063, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29668064, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29668065, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29668066, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29668067, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29668068, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29668069, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29668070, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29668071, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29668072, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29668073, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29668074, 'pht': 3726}}"}, {'dashboat_entry_day': 2781885, 'dashboard_run_id': 2788856, 'mtr_portfolio_id': 29668522, 'dashboard_result_id': 18678160, '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_P29668522_24-12-2025_00_33_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29668525, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29668526, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29668527, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29668528, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29668529, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29668530, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29668531, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29668532, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29668533, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29668534, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29668535, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29668536, 'pht': 3726}}"}, {'dashboat_entry_day': 2781885, 'dashboard_run_id': 2788856, 'mtr_portfolio_id': 29668997, 'dashboard_result_id': 18678161, '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_P29668997_24-12-2025_00_49_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29669004, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29669005, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29669006, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29669007, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29669008, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29669009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29669010, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29669011, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29669012, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29669013, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29669014, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29669015, 'pht': 3726}}"}, {'dashboat_entry_day': 2781885, 'dashboard_run_id': 2788856, 'mtr_portfolio_id': 29669483, 'dashboard_result_id': 18678162, '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_P29669483_24-12-2025_01_03_03.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29669490, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29669491, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29669492, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29669493, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29669494, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29669495, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29669496, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29669497, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29669498, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29669500, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29669501, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29669502, 'pht': 3726}}"}, {'dashboat_entry_day': 2781885, 'dashboard_run_id': 2788856, 'mtr_portfolio_id': 29670440, 'dashboard_result_id': 18678163, '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_P29670440_24-12-2025_01_27_04.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 29670442, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29670443, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29670444, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29670445, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29670446, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29670447, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29670448, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29670449, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29670450, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29670451, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29670452, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29670453, 'pht': 3726}}"}, {'dashboat_entry_day': 2781885, 'dashboard_run_id': 2788856, 'mtr_portfolio_id': 29670567, 'dashboard_result_id': 18678164, '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_P29670567_24-12-2025_01_47_03.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29670569, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29670570, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29670571, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29670572, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29670573, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29670574, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29670575, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29670576, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29670577, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29670578, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29670579, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29670580, 'pht': 3726}}"}, {'dashboat_entry_day': 2781885, 'dashboard_run_id': 2788856, 'mtr_portfolio_id': 29670856, 'dashboard_result_id': 18678165, '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_P29670856_24-12-2025_02_04_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29670861, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29670862, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29670863, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29670864, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29670865, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29670866, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29670867, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29670868, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29670869, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29670870, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29670871, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29670872, 'pht': 3726}}"}, {'dashboat_entry_day': 2781885, 'dashboard_run_id': 2788856, 'mtr_portfolio_id': 29671273, 'dashboard_result_id': 18678166, '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_P29671273_24-12-2025_02_13_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29671346, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29671347, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29671348, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29671349, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29671350, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29671351, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29671352, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29671353, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29671354, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29671355, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29671356, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29671357, '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 = 29668057 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': 4265770, 'mtr_portfolio_id': 29668057, 'created_at': datetime.datetime(2025, 12, 24, 0, 19, 31), 'result': '0.06135353829280031', 'result_long': None, 'result_double': None}] Qualite : 0.06135353829280031 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29668057 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29668057_24-12-2025_00_19_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29668057 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_P29668057_24-12-2025_00_19_31.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29668063, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29668064, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29668065, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29668066, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29668067, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29668068, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29668069, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29668070, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29668071, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29668072, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29668073, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29668074, 'pht': 3726}}" where mtr_portfolio_id = 29668057 and dashboard_run_id = 2788856 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`=29668057 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18678159, 0.06135353829280031, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29668057_24-12-2025_00_19_31.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29668063, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29668064, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29668065, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29668066, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29668067, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29668068, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29668069, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29668070, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29668071, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29668072, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29668073, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29668074, '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 = 29668522 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': 4265831, 'mtr_portfolio_id': 29668522, 'created_at': datetime.datetime(2025, 12, 24, 0, 33, 3), 'result': '0.05424920509000451', 'result_long': None, 'result_double': None}] Qualite : 0.05424920509000451 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29668522 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29668522_24-12-2025_00_33_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29668522 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_P29668522_24-12-2025_00_33_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29668525, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29668526, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29668527, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29668528, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29668529, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29668530, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29668531, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29668532, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29668533, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29668534, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29668535, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29668536, 'pht': 3726}}" where mtr_portfolio_id = 29668522 and dashboard_run_id = 2788856 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`=29668522 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18678160, 0.05424920509000451, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29668522_24-12-2025_00_33_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29668525, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29668526, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29668527, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29668528, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29668529, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29668530, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29668531, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29668532, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29668533, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29668534, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29668535, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29668536, '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 = 29668997 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': 4265902, 'mtr_portfolio_id': 29668997, 'created_at': datetime.datetime(2025, 12, 24, 0, 49, 2), 'result': '0.028189047341204393', 'result_long': None, 'result_double': None}] Qualite : 0.028189047341204393 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29668997 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29668997_24-12-2025_00_49_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29668997 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_P29668997_24-12-2025_00_49_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29669004, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29669005, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29669006, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29669007, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29669008, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29669009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29669010, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29669011, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29669012, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29669013, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29669014, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29669015, 'pht': 3726}}" where mtr_portfolio_id = 29668997 and dashboard_run_id = 2788856 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`=29668997 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18678161, 0.028189047341204393, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29668997_24-12-2025_00_49_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29669004, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29669005, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29669006, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29669007, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29669008, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29669009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29669010, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29669011, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29669012, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29669013, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29669014, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29669015, '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 = 29669483 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': 4265972, 'mtr_portfolio_id': 29669483, 'created_at': datetime.datetime(2025, 12, 24, 1, 3, 2), 'result': '0.039287696512471944', 'result_long': None, 'result_double': None}] Qualite : 0.039287696512471944 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29669483 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29669483_24-12-2025_01_03_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29669483 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_P29669483_24-12-2025_01_03_03.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29669490, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29669491, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29669492, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29669493, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29669494, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29669495, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29669496, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29669497, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29669498, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29669500, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29669501, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29669502, 'pht': 3726}}" where mtr_portfolio_id = 29669483 and dashboard_run_id = 2788856 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`=29669483 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18678162, 0.039287696512471944, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29669483_24-12-2025_01_03_03.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29669490, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29669491, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29669492, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29669493, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29669494, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29669495, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29669496, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29669497, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29669498, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29669500, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29669501, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29669502, '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 = 29670440 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 = 29670440 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 = 29670440 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29670440 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 = 29670440 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 = 29670440 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29670440_24-12-2025_01_27_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29670440 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_P29670440_24-12-2025_01_27_04.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 29670442, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29670443, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29670444, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29670445, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29670446, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29670447, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29670448, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29670449, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29670450, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29670451, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29670452, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29670453, 'pht': 3726}}" where mtr_portfolio_id = 29670440 and dashboard_run_id = 2788858 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 = 29670567 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': 4266119, 'mtr_portfolio_id': 29670567, 'created_at': datetime.datetime(2025, 12, 24, 1, 47, 3), 'result': '0.037633975953310125', 'result_long': None, 'result_double': None}] Qualite : 0.037633975953310125 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29670567 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29670567_24-12-2025_01_47_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29670567 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_P29670567_24-12-2025_01_47_03.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29670569, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29670570, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29670571, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29670572, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29670573, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29670574, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29670575, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29670576, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29670577, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29670578, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29670579, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29670580, 'pht': 3726}}" where mtr_portfolio_id = 29670567 and dashboard_run_id = 2788858 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`=29670567 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18678164, 0.037633975953310125, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29670567_24-12-2025_01_47_03.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29670569, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29670570, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29670571, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29670572, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29670573, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29670574, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29670575, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29670576, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29670577, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29670578, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29670579, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29670580, '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 = 29670856 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': 4266155, 'mtr_portfolio_id': 29670856, 'created_at': datetime.datetime(2025, 12, 24, 2, 4, 31), 'result': '0.07641640149739097', 'result_long': None, 'result_double': None}] Qualite : 0.07641640149739097 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29670856 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29670856_24-12-2025_02_04_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29670856 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_P29670856_24-12-2025_02_04_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29670861, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29670862, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29670863, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29670864, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29670865, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29670866, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29670867, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29670868, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29670869, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29670870, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29670871, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29670872, 'pht': 3726}}" where mtr_portfolio_id = 29670856 and dashboard_run_id = 2788858 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`=29670856 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18678165, 0.07641640149739097, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29670856_24-12-2025_02_04_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29670861, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29670862, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29670863, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29670864, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29670865, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29670866, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29670867, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29670868, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29670869, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29670870, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29670871, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29670872, '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 = 29671273 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': 4266240, 'mtr_portfolio_id': 29671273, 'created_at': datetime.datetime(2025, 12, 24, 2, 15, 2), 'result': '0.03979191254571074', 'result_long': None, 'result_double': None}] Qualite : 0.03979191254571074 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29671273 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29671273_24-12-2025_02_15_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29671273 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_P29671273_24-12-2025_02_15_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29671346, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29671347, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29671348, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29671349, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29671350, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29671351, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29671352, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29671353, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29671354, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29671355, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29671356, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29671357, 'pht': 3726}}" where mtr_portfolio_id = 29671273 and dashboard_run_id = 2788858 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`=29671273 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18678166, 0.03979191254571074, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29671273_24-12-2025_02_15_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29671346, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29671347, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29671348, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29671349, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29671350, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29671351, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29671352, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29671353, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29671354, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29671355, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29671356, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29671357, '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 (29668057,29668522,29668997,29669483,29670440,29670567,29670856,29671273) result : ((1400757182,), (1400757200,), (1400757201,), (1400757219,), (1400757222,), (1400757225,), (1400757229,), (1400757233,), (1400757235,), (1400757291,), (1400757316,), (1400757349,), (1400757377,), (1400757746,), (1400757819,), (1400757890,), (1400757967,), (1400758048,), (1400758117,), (1400758458,), (1400758524,), (1400758596,), (1400758705,), (1400758733,), (1400758760,), (1400758785,), (1400759140,), (1400759145,), (1400759284,), (1400759286,), (1400759288,), (1400759291,), (1400759295,), (1400759299,), (1400759375,), (1400759403,), (1400759434,), (1400759459,), (1400759715,), (1400759753,), (1400759789,), (1400759925,), (1400759927,), (1400759938,), (1400759965,), (1400760110,), (1400760118,), (1400760120,), (1400760144,), (1400760148,), (1400760152,), (1400760155,), (1400760368,), (1400760397,), (1400760424,), (1400760451,), (1400760481,), (1400760511,), (1400760514,), (1400760517,), (1400760521,), (1400760525,), (1400760530,), (1400760537,), (1400760539,), (1400760555,), (1400760546,), (1400760549,), (1400760552,), (1400760570,), (1400760573,), (1400760578,), (1400760581,), (1400760587,), (1400760590,), (1400760617,), (1400760620,), (1400760622,), (1400760668,), (1400760698,), (1400760726,), (1400760758,), (1400760868,), (1400760871,), (1400760873,), (1400760876,), (1400760902,), (1400761049,), (1400761051,), (1400761053,), (1400761055,), (1400761057,), (1400761059,), (1400761079,), (1400761085,), (1400761088,), (1400761091,), (1400761101,), (1400761103,), (1400761105,), (1400761107,), (1400761110,), (1400761116,), (1400761119,), (1400761121,), (1400761136,), (1400761138,), (1400761141,), (1400761143,), (1400761147,), (1400761150,), (1400761161,), (1400761164,), (1400761168,), (1400761172,), (1400761178,), (1400761181,), (1400761197,), (1400761201,), (1400761204,), (1400761213,), (1400761218,), (1400761228,), (1400761254,), (1400761281,), (1400761316,), (1400761624,), (1400761628,), (1400761633,), (1400761676,), (1400761703,), (1400761715,), (1400761917,), (1400761949,), (1400761978,), (1400761984,), (1400761987,), (1400762060,), (1400762070,), (1400762540,), (1400762554,), (1400762557,), (1400762466,), (1400762498,), (1400762529,), (1400762534,), (1400762538,), (1400762570,), (1400762581,), (1400762583,), (1400762585,), (1400762587,), (1400762597,), (1400762598,), (1400762601,), (1400762605,), (1400762621,), (1400762623,), (1400762625,), (1400762654,), (1400762675,), (1400762703,), (1400762731,), (1400762761,), (1400762788,), (1400762795,), (1400762797,), (1400762799,), (1400762812,), (1400762815,), (1400762818,), (1400762820,), (1400762822,), (1400762824,), (1400762835,), (1400762838,), (1400762840,), (1400762842,), (1400762864,), (1400762866,), (1400762869,), (1400762876,), (1400762881,), (1400762957,), (1400762961,), (1400762965,), (1400762969,), (1400762973,), (1400762975,), (1400762988,), (1400762997,), (1400763003,), (1400763005,), (1400763021,), (1400763023,), (1400763025,), (1400763027,), (1400763030,), (1400763033,), (1400763051,), (1400763054,), (1400763057,), (1400763059,), (1400763062,), (1400763085,), (1400763088,), (1400763090,), (1400763092,), (1400763095,), (1400763098,), (1400763113,), (1400763120,), (1400763125,), (1400763147,), (1400763152,), (1400763156,), (1400763160,), (1400763163,), (1400763165,), (1400763198,), (1400763201,), (1400763204,), (1400763222,), (1400763239,), (1400763246,), (1400763248,), (1400763250,), (1400763253,), (1400763281,), (1400763190,), (1400763192,), (1400763195,), (1400763263,), (1400763266,), (1400763268,), (1400763276,), (1400763292,), (1400763341,), (1400763403,), (1400763450,), (1400763453,), (1400763474,), (1400763522,), (1400763528,), (1400763617,), (1400763620,), (1400763622,), (1400763626,), (1400763628,), (1400763631,), (1400763649,), (1400763653,), (1400763657,), (1400763663,), (1400763668,), (1400763670,), (1400763687,), (1400763692,), (1400763697,), (1400763728,), (1400763755,), (1400763758,), (1400763784,), (1400763790,), (1400763794,), (1400763798,), (1400763802,), (1400763804,), (1400763807,), (1400763822,), (1400763845,), (1400763848,), (1400763851,), (1400763870,), (1400763880,), (1400763890,), (1400763918,), (1400763922,), (1400763925,), (1400763930,), (1400763934,), (1400763949,), (1400765524,), (1400765721,), (1400765913,), (1400765916,), (1400765918,), (1400765937,), (1400765940,), (1400765944,), (1400765948,), (1400765972,), (1400765976,), (1400765995,), (1400765999,), (1400766004,), (1400766009,), (1400766026,), (1400766030,), (1400766034,), (1400766038,), (1400766054,), (1400766058,), (1400766061,), (1400766087,), (1400766089,), (1400766091,), (1400766094,), (1400766098,), (1400766102,), (1400766112,), (1400766115,), (1400766118,), (1400766121,), (1400766150,), (1400766154,), (1400766155,), (1400766158,), (1400766160,), (1400766175,), (1400766177,), (1400766178,), (1400766201,), (1400766210,), (1400766213,), (1400766216,), (1400766218,), (1400766220,), (1400766238,), (1400766241,), (1400766244,), (1400766248,), (1400766252,), (1400766256,), (1400766272,), (1400766274,), (1400766276,), (1400766295,), (1400766298,), (1400766301,), (1400766357,), (1400766340,), (1400766347,), (1400766355,), (1400766373,), (1400766375,), (1400766377,), (1400766381,), (1400766402,), (1400766412,), (1400766415,), (1400766441,), (1400766445,), (1400766449,), (1400766453,), (1400766477,), (1400766479,), (1400766481,), (1400766500,), (1400766504,), (1400766509,), (1400766515,), (1400766519,), (1400766521,), (1400766544,), (1400766548,), (1400766551,), (1400766567,), (1400766569,), (1400766571,), (1400766574,), (1400766601,), (1400766604,), (1400766607,), (1400766610,), (1400766632,), (1400766636,), (1400766640,), (1400766644,), (1400766648,), (1400766651,), (1400766654,), (1400766670,), (1400766673,), (1400766676,), (1400766678,), (1400766681,), (1400766684,), (1400766692,), (1400766695,), (1400766698,), (1400766702,), (1400766738,), (1400766741,), (1400766744,), (1400766748,), (1400766752,), (1400766756,), (1400766923,), (1400766958,), (1400766989,), (1400767018,), (1400767143,), (1400767124,), (1400767136,), (1400767140,), (1400767157,), (1400767184,), (1400767211,), (1400767240,), (1400767268,), (1400767486,), (1400768100,), (1400768152,), (1400768180,), (1400768206,), (1400768228,), (1400768428,), (1400768456,), (1400768482,), (1400768529,), (1400768558,), (1400768594,), (1400768660,), (1400768669,), (1400768679,), (1400768706,), (1400768782,), (1400768830,), (1400768898,), (1400768964,), (1400769266,), (1400769304,), (1400769344,), (1400769385,), (1400769568,), (1400769571,), (1400769574,), (1400769617,), (1400769668,), (1400769709,), (1400769846,), (1400769867,), (1400769871,), (1400769875,), (1400769879,), (1400769892,), (1400769896,), (1400769905,), (1400769915,), (1400769930,), (1400769941,), (1400769948,), (1400769960,), (1400769963,), (1400769966,), (1400769973,), (1400769974,), (1400769979,), (1400769993,), (1400769997,), (1400770000,), (1400770001,), (1400770002,), (1400770004,), (1400770007,), (1400770016,), (1400770019,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'24122025': {'nb_upload': 65, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29671273]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1400770019, 1400770016, 1400770007, 1400770004, 1400770002, 1400770001, 1400770000, 1400769997, 1400769993] map_info['map_portfolio_photo'] : {29671273: [1400770019, 1400770016, 1400770007, 1400770004, 1400770002, 1400770001, 1400770000, 1400769997, 1400769993, 1400769979, 1400769974, 1400769973, 1400769966, 1400769963, 1400769960, 1400769948, 1400769941, 1400769930, 1400769915, 1400769905, 1400769896, 1400769892, 1400769879, 1400769875, 1400769871, 1400769867, 1400769846, 1400769709, 1400769668, 1400769617, 1400769574, 1400769571, 1400769568, 1400769385, 1400769344, 1400769304, 1400769266, 1400768964, 1400768898, 1400768830, 1400768782, 1400768706, 1400768679, 1400768669, 1400768660, 1400768594, 1400768558, 1400768529, 1400768482, 1400768456, 1400768428, 1400768228, 1400768206, 1400768180, 1400768152, 1400768100, 1400767486, 1400767268, 1400767240, 1400767211, 1400767184, 1400767157, 1400767140, 1400767136, 1400767124]} final : True mtd_id 4302 list_pids : [1400770019, 1400770016, 1400770007, 1400770004, 1400770002, 1400770001, 1400770000, 1400769997, 1400769993] Looping around the photos to save general results len do output : 1 /29671273Didn'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, '4266240') ('4302', '29671273', '1400770019', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770016', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770007', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770004', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770002', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770001', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400770000', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400769997', None, None, None, None, None, '4266240') ('4302', None, None, None, None, None, None, None, '4266240') ('4302', '29671273', '1400769993', None, None, None, None, None, '4266240') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '29671273', 'None', None, None, None, None, '4266240'), ('4302', '29671273', '1400770019', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400770016', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400770007', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400770004', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400770002', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400770001', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400770000', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400769997', None, None, None, None, None, '4266240'), ('4302', '29671273', '1400769993', None, None, None, None, None, '4266240')] time used for this insertion : 0.038866281509399414 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.1773900985717773 time spend to save output : 0.03912663459777832 total time spend for step 5 : 2.2165167331695557 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 (4266240) 2.13user 2.42system 0:12.47elapsed 36%CPU (0avgtext+0avgdata 166524maxresident)k 272inputs+9016outputs (0major+67390minor)pagefaults 0swaps