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 : 324669 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 (3545157) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3545157) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26016100 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3545157'] with mtr_portfolio_ids : ['26016100'] and first list_photo_ids : [] new path : /proc/324669/ Name: python3 Umask: 0002 State: R (running) Tgid: 324669 Ngid: 0 Pid: 324669 PPid: 324668 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 324669 NSpid: 324669 NSpgid: 322663 NSsid: 322663 VmPeak: 1107248 kB VmSize: 1107248 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 101652 kB VmRSS: 101652 kB RssAnon: 60160 kB RssFile: 41492 kB RssShmem: 0 kB VmData: 866000 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 612 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: 49 nonvoluntary_ctxt_switches: 95 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '324669', 'Ngid': '0', 'Pid': '324669', 'PPid': '324668', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '324669', 'NSpid': '324669', 'NSpgid': '322663', 'NSsid': '322663', 'VmPeak': '1107248 kB', 'VmSize': '1107248 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '101652 kB', 'VmRSS': '101652 kB', 'RssAnon': '60160 kB', 'RssFile': '41492 kB', 'RssShmem': '0 kB', 'VmData': '866000 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '612 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': '49', 'nonvoluntary_ctxt_switches': '95'} ('datou_batch_current', '324669', '1107248', '0', '1107248', '866000', '101652', b'', 'marlene', '3545157') 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 ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (26016100) 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 (3545157 ) ) 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 (26016100) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1377220320, 'portfolio_id': 26016100}, {'photo_id': 1377220317, 'portfolio_id': 26016100}, {'photo_id': 1377220308, 'portfolio_id': 26016100}, {'photo_id': 1377220295, 'portfolio_id': 26016100}, {'photo_id': 1377220291, 'portfolio_id': 26016100}, {'photo_id': 1377220287, 'portfolio_id': 26016100}, {'photo_id': 1377220283, 'portfolio_id': 26016100}, {'photo_id': 1377220273, 'portfolio_id': 26016100}, {'photo_id': 1377220259, 'portfolio_id': 26016100}, {'photo_id': 1377220255, 'portfolio_id': 26016100}, {'photo_id': 1377220252, 'portfolio_id': 26016100}, {'photo_id': 1377220250, 'portfolio_id': 26016100}, {'photo_id': 1377220242, 'portfolio_id': 26016100}, {'photo_id': 1377220222, 'portfolio_id': 26016100}, {'photo_id': 1377220220, 'portfolio_id': 26016100}, {'photo_id': 1377220218, 'portfolio_id': 26016100}, {'photo_id': 1377220209, 'portfolio_id': 26016100}, {'photo_id': 1377220194, 'portfolio_id': 26016100}, {'photo_id': 1377220192, 'portfolio_id': 26016100}, {'photo_id': 1377220181, 'portfolio_id': 26016100}, {'photo_id': 1377220172, 'portfolio_id': 26016100}, {'photo_id': 1377220170, 'portfolio_id': 26016100}, {'photo_id': 1377220167, 'portfolio_id': 26016100}, {'photo_id': 1377220165, 'portfolio_id': 26016100}, {'photo_id': 1377220161, 'portfolio_id': 26016100}, {'photo_id': 1377220148, 'portfolio_id': 26016100}, {'photo_id': 1377220146, 'portfolio_id': 26016100}, {'photo_id': 1377220142, 'portfolio_id': 26016100}, {'photo_id': 1377220141, 'portfolio_id': 26016100}, {'photo_id': 1377220140, 'portfolio_id': 26016100}, {'photo_id': 1377220139, 'portfolio_id': 26016100}, {'photo_id': 1377220137, 'portfolio_id': 26016100}, {'photo_id': 1377220135, 'portfolio_id': 26016100}, {'photo_id': 1377220133, 'portfolio_id': 26016100}, {'photo_id': 1377220131, 'portfolio_id': 26016100}, {'photo_id': 1377220117, 'portfolio_id': 26016100}, {'photo_id': 1377220116, 'portfolio_id': 26016100}, {'photo_id': 1377220115, 'portfolio_id': 26016100}, {'photo_id': 1377220107, 'portfolio_id': 26016100}, {'photo_id': 1377220093, 'portfolio_id': 26016100}, {'photo_id': 1377220091, 'portfolio_id': 26016100}, {'photo_id': 1377220088, 'portfolio_id': 26016100}, {'photo_id': 1377220086, 'portfolio_id': 26016100}, {'photo_id': 1377220083, 'portfolio_id': 26016100}, {'photo_id': 1377220072, 'portfolio_id': 26016100}, {'photo_id': 1377220047, 'portfolio_id': 26016100}, {'photo_id': 1377220044, 'portfolio_id': 26016100}, {'photo_id': 1377220041, 'portfolio_id': 26016100}, {'photo_id': 1377220040, 'portfolio_id': 26016100}, {'photo_id': 1377220033, 'portfolio_id': 26016100}, {'photo_id': 1377220009, 'portfolio_id': 26016100}, {'photo_id': 1377220007, 'portfolio_id': 26016100}, {'photo_id': 1377220006, 'portfolio_id': 26016100}, {'photo_id': 1377220004, 'portfolio_id': 26016100}, {'photo_id': 1377219997, 'portfolio_id': 26016100}, {'photo_id': 1377219983, 'portfolio_id': 26016100}, {'photo_id': 1377219981, 'portfolio_id': 26016100}, {'photo_id': 1377219978, 'portfolio_id': 26016100}, {'photo_id': 1377219976, 'portfolio_id': 26016100}, {'photo_id': 1377219968, 'portfolio_id': 26016100}, {'photo_id': 1377219947, 'portfolio_id': 26016100}, {'photo_id': 1377219944, 'portfolio_id': 26016100}, {'photo_id': 1377219941, 'portfolio_id': 26016100}, {'photo_id': 1377219932, 'portfolio_id': 26016100}, {'photo_id': 1377219909, 'portfolio_id': 26016100}, {'photo_id': 1377219908, 'portfolio_id': 26016100}, {'photo_id': 1377219901, 'portfolio_id': 26016100}] map_portfolio_id_photo_id: {26016100: [1377220320, 1377220317, 1377220308, 1377220295, 1377220291, 1377220287, 1377220283, 1377220273, 1377220259, 1377220255, 1377220252, 1377220250, 1377220242, 1377220222, 1377220220, 1377220218, 1377220209, 1377220194, 1377220192, 1377220181, 1377220172, 1377220170, 1377220167, 1377220165, 1377220161, 1377220148, 1377220146, 1377220142, 1377220141, 1377220140, 1377220139, 1377220137, 1377220135, 1377220133, 1377220131, 1377220117, 1377220116, 1377220115, 1377220107, 1377220093, 1377220091, 1377220088, 1377220086, 1377220083, 1377220072, 1377220047, 1377220044, 1377220041, 1377220040, 1377220033, 1377220009, 1377220007, 1377220006, 1377220004, 1377219997, 1377219983, 1377219981, 1377219978, 1377219976, 1377219968, 1377219947, 1377219944, 1377219941, 1377219932, 1377219909, 1377219908, 1377219901]} ##### 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.015059471130371094 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Fri Aug 15 04:30:57 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 (26016100) 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 : 26016100 get user id for portfolio 26016100 get sub ptf for main ptf 26016100, type 3726 and hashtags ['metal', 'plastique', 'Carton_gris', 'environnement', 'mal_croppe', 'flou', 'autre_refus', 'papier', 'cartonnette', 'Carton_brun', 'kraft', '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`=26016100 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','plastique','Carton_gris','environnement','mal_croppe','flou','autre_refus','papier','cartonnette','Carton_brun','kraft','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`=26016100 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','plastique','Carton_gris','environnement','mal_croppe','flou','autre_refus','papier','cartonnette','Carton_brun','kraft','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 26016100, 'sub_port_id': 26016138, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523139, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 29)}, 'Carton_gris': {'main_port_id': 26016100, 'sub_port_id': 26016139, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523140, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 29)}, 'autre_refus': {'main_port_id': 26016100, 'sub_port_id': 26016140, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523141, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 29)}, 'metal': {'main_port_id': 26016100, 'sub_port_id': 26016141, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523142, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 29)}, 'cartonnette': {'main_port_id': 26016100, 'sub_port_id': 26016142, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523143, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 29)}, 'kraft': {'main_port_id': 26016100, 'sub_port_id': 26016143, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523144, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 26016100, 'sub_port_id': 26016144, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523145, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 29)}, 'plastique': {'main_port_id': 26016100, 'sub_port_id': 26016145, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523146, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 29)}, 'papier': {'main_port_id': 26016100, 'sub_port_id': 26016146, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523147, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 29)}, 'environnement': {'main_port_id': 26016100, 'sub_port_id': 26016147, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523148, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 29)}, 'mal_croppe': {'main_port_id': 26016100, 'sub_port_id': 26016148, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523149, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 29)}, 'Carton_brun': {'main_port_id': 26016100, 'sub_port_id': 26016149, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523150, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 29)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26016138 , 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=26016100 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 (26016138) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26016100) result : ((1377219901,), (1377219908,), (1377219909,), (1377219932,), (1377219941,), (1377219944,), (1377219947,), (1377219968,), (1377219976,), (1377219978,), (1377219981,), (1377219983,), (1377219997,), (1377220004,), (1377220006,), (1377220007,), (1377220009,), (1377220033,), (1377220040,), (1377220041,), (1377220044,), (1377220047,), (1377220072,), (1377220083,), (1377220086,), (1377220088,), (1377220091,), (1377220093,), (1377220107,), (1377220115,), (1377220116,), (1377220117,), (1377220131,), (1377220133,), (1377220135,), (1377220137,), (1377220139,), (1377220140,), (1377220141,), (1377220142,), (1377220146,), (1377220148,), (1377220161,), (1377220165,), (1377220167,), (1377220170,), (1377220172,), (1377220181,), (1377220192,), (1377220194,), (1377220209,), (1377220218,), (1377220220,), (1377220222,), (1377220242,), (1377220250,), (1377220252,), (1377220255,), (1377220259,), (1377220273,), (1377220283,), (1377220287,), (1377220291,), (1377220295,), (1377220308,), (1377220317,), (1377220320,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26016139 , 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=26016100 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 (26016139) result : ((1377220344,), (1377220345,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26016100) result : ((1377219901,), (1377219908,), (1377219909,), (1377219932,), (1377219941,), (1377219944,), (1377219947,), (1377219968,), (1377219976,), (1377219978,), (1377219981,), (1377219983,), (1377219997,), (1377220004,), (1377220006,), (1377220007,), (1377220009,), (1377220033,), (1377220040,), (1377220041,), (1377220044,), (1377220047,), (1377220072,), (1377220083,), (1377220086,), (1377220088,), (1377220091,), (1377220093,), (1377220107,), (1377220115,), (1377220116,), (1377220117,), (1377220131,), (1377220133,), (1377220135,), (1377220137,), (1377220139,), (1377220140,), (1377220141,), (1377220142,), (1377220146,), (1377220148,), (1377220161,), (1377220165,), (1377220167,), (1377220170,), (1377220172,), (1377220181,), (1377220192,), (1377220194,), (1377220209,), (1377220218,), (1377220220,), (1377220222,), (1377220242,), (1377220250,), (1377220252,), (1377220255,), (1377220259,), (1377220273,), (1377220283,), (1377220287,), (1377220291,), (1377220295,), (1377220308,), (1377220317,), (1377220320,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26016140 , 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=26016100 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 (26016140) result : ((1377220341,), (1377220342,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26016100) result : ((1377219901,), (1377219908,), (1377219909,), (1377219932,), (1377219941,), (1377219944,), (1377219947,), (1377219968,), (1377219976,), (1377219978,), (1377219981,), (1377219983,), (1377219997,), (1377220004,), (1377220006,), (1377220007,), (1377220009,), (1377220033,), (1377220040,), (1377220041,), (1377220044,), (1377220047,), (1377220072,), (1377220083,), (1377220086,), (1377220088,), (1377220091,), (1377220093,), (1377220107,), (1377220115,), (1377220116,), (1377220117,), (1377220131,), (1377220133,), (1377220135,), (1377220137,), (1377220139,), (1377220140,), (1377220141,), (1377220142,), (1377220146,), (1377220148,), (1377220161,), (1377220165,), (1377220167,), (1377220170,), (1377220172,), (1377220181,), (1377220192,), (1377220194,), (1377220209,), (1377220218,), (1377220220,), (1377220222,), (1377220242,), (1377220250,), (1377220252,), (1377220255,), (1377220259,), (1377220273,), (1377220283,), (1377220287,), (1377220291,), (1377220295,), (1377220308,), (1377220317,), (1377220320,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26016141 , 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=26016100 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 (26016141) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26016100) result : ((1377219901,), (1377219908,), (1377219909,), (1377219932,), (1377219941,), (1377219944,), (1377219947,), (1377219968,), (1377219976,), (1377219978,), (1377219981,), (1377219983,), (1377219997,), (1377220004,), (1377220006,), (1377220007,), (1377220009,), (1377220033,), (1377220040,), (1377220041,), (1377220044,), (1377220047,), (1377220072,), (1377220083,), (1377220086,), (1377220088,), (1377220091,), (1377220093,), (1377220107,), (1377220115,), (1377220116,), (1377220117,), (1377220131,), (1377220133,), (1377220135,), (1377220137,), (1377220139,), (1377220140,), (1377220141,), (1377220142,), (1377220146,), (1377220148,), (1377220161,), (1377220165,), (1377220167,), (1377220170,), (1377220172,), (1377220181,), (1377220192,), (1377220194,), (1377220209,), (1377220218,), (1377220220,), (1377220222,), (1377220242,), (1377220250,), (1377220252,), (1377220255,), (1377220259,), (1377220273,), (1377220283,), (1377220287,), (1377220291,), (1377220295,), (1377220308,), (1377220317,), (1377220320,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26016142 , 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=26016100 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 (26016142) result : ((1377220346,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26016100) result : ((1377219901,), (1377219908,), (1377219909,), (1377219932,), (1377219941,), (1377219944,), (1377219947,), (1377219968,), (1377219976,), (1377219978,), (1377219981,), (1377219983,), (1377219997,), (1377220004,), (1377220006,), (1377220007,), (1377220009,), (1377220033,), (1377220040,), (1377220041,), (1377220044,), (1377220047,), (1377220072,), (1377220083,), (1377220086,), (1377220088,), (1377220091,), (1377220093,), (1377220107,), (1377220115,), (1377220116,), (1377220117,), (1377220131,), (1377220133,), (1377220135,), (1377220137,), (1377220139,), (1377220140,), (1377220141,), (1377220142,), (1377220146,), (1377220148,), (1377220161,), (1377220165,), (1377220167,), (1377220170,), (1377220172,), (1377220181,), (1377220192,), (1377220194,), (1377220209,), (1377220218,), (1377220220,), (1377220222,), (1377220242,), (1377220250,), (1377220252,), (1377220255,), (1377220259,), (1377220273,), (1377220283,), (1377220287,), (1377220291,), (1377220295,), (1377220308,), (1377220317,), (1377220320,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26016143 , 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=26016100 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 (26016143) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26016100) result : ((1377219901,), (1377219908,), (1377219909,), (1377219932,), (1377219941,), (1377219944,), (1377219947,), (1377219968,), (1377219976,), (1377219978,), (1377219981,), (1377219983,), (1377219997,), (1377220004,), (1377220006,), (1377220007,), (1377220009,), (1377220033,), (1377220040,), (1377220041,), (1377220044,), (1377220047,), (1377220072,), (1377220083,), (1377220086,), (1377220088,), (1377220091,), (1377220093,), (1377220107,), (1377220115,), (1377220116,), (1377220117,), (1377220131,), (1377220133,), (1377220135,), (1377220137,), (1377220139,), (1377220140,), (1377220141,), (1377220142,), (1377220146,), (1377220148,), (1377220161,), (1377220165,), (1377220167,), (1377220170,), (1377220172,), (1377220181,), (1377220192,), (1377220194,), (1377220209,), (1377220218,), (1377220220,), (1377220222,), (1377220242,), (1377220250,), (1377220252,), (1377220255,), (1377220259,), (1377220273,), (1377220283,), (1377220287,), (1377220291,), (1377220295,), (1377220308,), (1377220317,), (1377220320,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26016144 , 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=26016100 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 (26016144) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26016100) result : ((1377219901,), (1377219908,), (1377219909,), (1377219932,), (1377219941,), (1377219944,), (1377219947,), (1377219968,), (1377219976,), (1377219978,), (1377219981,), (1377219983,), (1377219997,), (1377220004,), (1377220006,), (1377220007,), (1377220009,), (1377220033,), (1377220040,), (1377220041,), (1377220044,), (1377220047,), (1377220072,), (1377220083,), (1377220086,), (1377220088,), (1377220091,), (1377220093,), (1377220107,), (1377220115,), (1377220116,), (1377220117,), (1377220131,), (1377220133,), (1377220135,), (1377220137,), (1377220139,), (1377220140,), (1377220141,), (1377220142,), (1377220146,), (1377220148,), (1377220161,), (1377220165,), (1377220167,), (1377220170,), (1377220172,), (1377220181,), (1377220192,), (1377220194,), (1377220209,), (1377220218,), (1377220220,), (1377220222,), (1377220242,), (1377220250,), (1377220252,), (1377220255,), (1377220259,), (1377220273,), (1377220283,), (1377220287,), (1377220291,), (1377220295,), (1377220308,), (1377220317,), (1377220320,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26016145 , 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=26016100 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 (26016145) result : ((1377220349,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26016100) result : ((1377219901,), (1377219908,), (1377219909,), (1377219932,), (1377219941,), (1377219944,), (1377219947,), (1377219968,), (1377219976,), (1377219978,), (1377219981,), (1377219983,), (1377219997,), (1377220004,), (1377220006,), (1377220007,), (1377220009,), (1377220033,), (1377220040,), (1377220041,), (1377220044,), (1377220047,), (1377220072,), (1377220083,), (1377220086,), (1377220088,), (1377220091,), (1377220093,), (1377220107,), (1377220115,), (1377220116,), (1377220117,), (1377220131,), (1377220133,), (1377220135,), (1377220137,), (1377220139,), (1377220140,), (1377220141,), (1377220142,), (1377220146,), (1377220148,), (1377220161,), (1377220165,), (1377220167,), (1377220170,), (1377220172,), (1377220181,), (1377220192,), (1377220194,), (1377220209,), (1377220218,), (1377220220,), (1377220222,), (1377220242,), (1377220250,), (1377220252,), (1377220255,), (1377220259,), (1377220273,), (1377220283,), (1377220287,), (1377220291,), (1377220295,), (1377220308,), (1377220317,), (1377220320,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26016146 , 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=26016100 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 (26016146) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26016100) result : ((1377219901,), (1377219908,), (1377219909,), (1377219932,), (1377219941,), (1377219944,), (1377219947,), (1377219968,), (1377219976,), (1377219978,), (1377219981,), (1377219983,), (1377219997,), (1377220004,), (1377220006,), (1377220007,), (1377220009,), (1377220033,), (1377220040,), (1377220041,), (1377220044,), (1377220047,), (1377220072,), (1377220083,), (1377220086,), (1377220088,), (1377220091,), (1377220093,), (1377220107,), (1377220115,), (1377220116,), (1377220117,), (1377220131,), (1377220133,), (1377220135,), (1377220137,), (1377220139,), (1377220140,), (1377220141,), (1377220142,), (1377220146,), (1377220148,), (1377220161,), (1377220165,), (1377220167,), (1377220170,), (1377220172,), (1377220181,), (1377220192,), (1377220194,), (1377220209,), (1377220218,), (1377220220,), (1377220222,), (1377220242,), (1377220250,), (1377220252,), (1377220255,), (1377220259,), (1377220273,), (1377220283,), (1377220287,), (1377220291,), (1377220295,), (1377220308,), (1377220317,), (1377220320,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26016147 , 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=26016100 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 (26016147) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26016100) result : ((1377219901,), (1377219908,), (1377219909,), (1377219932,), (1377219941,), (1377219944,), (1377219947,), (1377219968,), (1377219976,), (1377219978,), (1377219981,), (1377219983,), (1377219997,), (1377220004,), (1377220006,), (1377220007,), (1377220009,), (1377220033,), (1377220040,), (1377220041,), (1377220044,), (1377220047,), (1377220072,), (1377220083,), (1377220086,), (1377220088,), (1377220091,), (1377220093,), (1377220107,), (1377220115,), (1377220116,), (1377220117,), (1377220131,), (1377220133,), (1377220135,), (1377220137,), (1377220139,), (1377220140,), (1377220141,), (1377220142,), (1377220146,), (1377220148,), (1377220161,), (1377220165,), (1377220167,), (1377220170,), (1377220172,), (1377220181,), (1377220192,), (1377220194,), (1377220209,), (1377220218,), (1377220220,), (1377220222,), (1377220242,), (1377220250,), (1377220252,), (1377220255,), (1377220259,), (1377220273,), (1377220283,), (1377220287,), (1377220291,), (1377220295,), (1377220308,), (1377220317,), (1377220320,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26016148 , 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=26016100 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 (26016148) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26016100) result : ((1377219901,), (1377219908,), (1377219909,), (1377219932,), (1377219941,), (1377219944,), (1377219947,), (1377219968,), (1377219976,), (1377219978,), (1377219981,), (1377219983,), (1377219997,), (1377220004,), (1377220006,), (1377220007,), (1377220009,), (1377220033,), (1377220040,), (1377220041,), (1377220044,), (1377220047,), (1377220072,), (1377220083,), (1377220086,), (1377220088,), (1377220091,), (1377220093,), (1377220107,), (1377220115,), (1377220116,), (1377220117,), (1377220131,), (1377220133,), (1377220135,), (1377220137,), (1377220139,), (1377220140,), (1377220141,), (1377220142,), (1377220146,), (1377220148,), (1377220161,), (1377220165,), (1377220167,), (1377220170,), (1377220172,), (1377220181,), (1377220192,), (1377220194,), (1377220209,), (1377220218,), (1377220220,), (1377220222,), (1377220242,), (1377220250,), (1377220252,), (1377220255,), (1377220259,), (1377220273,), (1377220283,), (1377220287,), (1377220291,), (1377220295,), (1377220308,), (1377220317,), (1377220320,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26016149 , 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=26016100 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 (26016149) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26016100) result : ((1377219901,), (1377219908,), (1377219909,), (1377219932,), (1377219941,), (1377219944,), (1377219947,), (1377219968,), (1377219976,), (1377219978,), (1377219981,), (1377219983,), (1377219997,), (1377220004,), (1377220006,), (1377220007,), (1377220009,), (1377220033,), (1377220040,), (1377220041,), (1377220044,), (1377220047,), (1377220072,), (1377220083,), (1377220086,), (1377220088,), (1377220091,), (1377220093,), (1377220107,), (1377220115,), (1377220116,), (1377220117,), (1377220131,), (1377220133,), (1377220135,), (1377220137,), (1377220139,), (1377220140,), (1377220141,), (1377220142,), (1377220146,), (1377220148,), (1377220161,), (1377220165,), (1377220167,), (1377220170,), (1377220172,), (1377220181,), (1377220192,), (1377220194,), (1377220209,), (1377220218,), (1377220220,), (1377220222,), (1377220242,), (1377220250,), (1377220252,), (1377220255,), (1377220259,), (1377220273,), (1377220283,), (1377220287,), (1377220291,), (1377220295,), (1377220308,), (1377220317,), (1377220320,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26016100 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','plastique','Carton_gris','environnement','mal_croppe','flou','autre_refus','papier','cartonnette','Carton_brun','kraft','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`=26016100 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','plastique','Carton_gris','environnement','mal_croppe','flou','autre_refus','papier','cartonnette','Carton_brun','kraft','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 26016100, 'sub_port_id': 26016150, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523151, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 31)}, 'Carton_gris': {'main_port_id': 26016100, 'sub_port_id': 26016151, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523152, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 31)}, 'autre_refus': {'main_port_id': 26016100, 'sub_port_id': 26016152, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523153, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 31)}, 'metal': {'main_port_id': 26016100, 'sub_port_id': 26016153, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523154, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 31)}, 'cartonnette': {'main_port_id': 26016100, 'sub_port_id': 26016154, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523155, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 31)}, 'kraft': {'main_port_id': 26016100, 'sub_port_id': 26016155, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523156, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 31)}, 'Teint_Dans_La_Masse': {'main_port_id': 26016100, 'sub_port_id': 26016156, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523157, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 31)}, 'plastique': {'main_port_id': 26016100, 'sub_port_id': 26016157, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523158, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 31)}, 'papier': {'main_port_id': 26016100, 'sub_port_id': 26016158, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523159, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 31)}, 'environnement': {'main_port_id': 26016100, 'sub_port_id': 26016159, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523160, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 31)}, 'mal_croppe': {'main_port_id': 26016100, 'sub_port_id': 26016160, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523161, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 31)}, 'Carton_brun': {'main_port_id': 26016100, 'sub_port_id': 26016161, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17523162, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 17, 31)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26016150,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26016138 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26016151,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26016139 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26016152,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26016140 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26016153,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26016141 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26016154,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26016142 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26016155,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26016143 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26016156,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26016144 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26016157,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26016145 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26016158,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26016146 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26016159,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26016147 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26016160,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26016148 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26016161,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26016149 lien utilise dans velours : https://www.fotonower.com/velours/26016150,26016151,26016152,26016153,26016154,26016155,26016156,26016157,26016158,26016159,26016160,26016161?tags=flou,Carton_gris,autre_refus,metal,cartonnette,kraft,Teint_Dans_La_Masse,plastique,papier,environnement,mal_croppe,Carton_brun After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26016100]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1377220320, 1377220317, 1377220308, 1377220295, 1377220291, 1377220287, 1377220283, 1377220273] map_info['map_portfolio_photo'] : {26016100: [1377220320, 1377220317, 1377220308, 1377220295, 1377220291, 1377220287, 1377220283, 1377220273, 1377220259, 1377220255, 1377220252, 1377220250, 1377220242, 1377220222, 1377220220, 1377220218, 1377220209, 1377220194, 1377220192, 1377220181, 1377220172, 1377220170, 1377220167, 1377220165, 1377220161, 1377220148, 1377220146, 1377220142, 1377220141, 1377220140, 1377220139, 1377220137, 1377220135, 1377220133, 1377220131, 1377220117, 1377220116, 1377220115, 1377220107, 1377220093, 1377220091, 1377220088, 1377220086, 1377220083, 1377220072, 1377220047, 1377220044, 1377220041, 1377220040, 1377220033, 1377220009, 1377220007, 1377220006, 1377220004, 1377219997, 1377219983, 1377219981, 1377219978, 1377219976, 1377219968, 1377219947, 1377219944, 1377219941, 1377219932, 1377219909, 1377219908, 1377219901]} final : False mtd_id 4302 list_pids : [1377220320, 1377220317, 1377220308, 1377220295, 1377220291, 1377220287, 1377220283, 1377220273] Looping around the photos to save general results len do output : 1 /26016100. 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, '3545157') ('4302', '26016100', '1377220320', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220317', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220308', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220295', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220291', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220287', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220283', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220273', None, None, None, None, None, '3545157') 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', None, '26016100', "{'flou': 26016138, 'Carton_gris': 26016139, 'autre_refus': 26016140, 'metal': 26016141, 'cartonnette': 26016142, 'kraft': 26016143, 'Teint_Dans_La_Masse': 26016144, 'plastique': 26016145, 'papier': 26016146, 'environnement': 26016147, 'mal_croppe': 26016148, 'Carton_brun': 26016149}", None, None, None, None, '3545157'), ('4302', '26016100', '1377220320', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220317', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220308', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220295', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220291', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220287', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220283', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220273', None, None, None, None, None, '3545157')] time used for this insertion : 0.0426790714263916 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5895934104919434 time spend to save output : 0.04298281669616699 total time spend for step 1 : 1.6325762271881104 step2:final Fri Aug 15 04:30:59 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 (26016100) 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 26016100 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1377219909,1377219908,1377219901,1377219947,1377219944,1377219941,1377219932,1377219983,1377219981,1377219978,1377219976,1377219968,1377220009,1377220007,1377220006,1377220004,1377219997,1377220047,1377220044,1377220041,1377220040,1377220033,1377220093,1377220091,1377220088,1377220086,1377220072,1377220083,1377220148,1377220117,1377220116,1377220146,1377220115,1377220142,1377220107,1377220141,1377220140,1377220139,1377220137,1377220135,1377220133,1377220131,1377220172,1377220170,1377220167,1377220165,1377220161,1377220194,1377220192,1377220181,1377220222,1377220220,1377220218,1377220209,1377220259,1377220255,1377220252,1377220250,1377220242,1377220295,1377220291,1377220287,1377220283,1377220273,1377220320,1377220317,1377220308); 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([26016100]) Inside saveOutput : final : False verbose : True original output for save of step final : {1377220320: ('0.041468531755644335',), 1377220317: ('0.041468531755644335',), 1377220308: ('0.041468531755644335',), 1377220295: ('0.041468531755644335',), 1377220291: ('0.041468531755644335',), 1377220287: ('0.041468531755644335',), 1377220283: ('0.041468531755644335',), 1377220273: ('0.041468531755644335',)} new output for save of step final : {1377220320: ('0.041468531755644335',), 1377220317: ('0.041468531755644335',), 1377220308: ('0.041468531755644335',), 1377220295: ('0.041468531755644335',), 1377220291: ('0.041468531755644335',), 1377220287: ('0.041468531755644335',), 1377220283: ('0.041468531755644335',), 1377220273: ('0.041468531755644335',)} [1377220320, 1377220317, 1377220308, 1377220295, 1377220291, 1377220287, 1377220283, 1377220273] map_info['map_portfolio_photo'] : {26016100: [1377220320, 1377220317, 1377220308, 1377220295, 1377220291, 1377220287, 1377220283, 1377220273, 1377220259, 1377220255, 1377220252, 1377220250, 1377220242, 1377220222, 1377220220, 1377220218, 1377220209, 1377220194, 1377220192, 1377220181, 1377220172, 1377220170, 1377220167, 1377220165, 1377220161, 1377220148, 1377220146, 1377220142, 1377220141, 1377220140, 1377220139, 1377220137, 1377220135, 1377220133, 1377220131, 1377220117, 1377220116, 1377220115, 1377220107, 1377220093, 1377220091, 1377220088, 1377220086, 1377220083, 1377220072, 1377220047, 1377220044, 1377220041, 1377220040, 1377220033, 1377220009, 1377220007, 1377220006, 1377220004, 1377219997, 1377219983, 1377219981, 1377219978, 1377219976, 1377219968, 1377219947, 1377219944, 1377219941, 1377219932, 1377219909, 1377219908, 1377219901]} final : False mtd_id 4302 list_pids : [1377220320, 1377220317, 1377220308, 1377220295, 1377220291, 1377220287, 1377220283, 1377220273] Looping around the photos to save general results len do output : 8 /1377220320.Didn't retrieve data . /1377220317.Didn't retrieve data . /1377220308.Didn't retrieve data . /1377220295.Didn't retrieve data . /1377220291.Didn't retrieve data . /1377220287.Didn't retrieve data . /1377220283.Didn't retrieve data . /1377220273.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, '3545157') ('4302', '26016100', '1377220320', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220317', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220308', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220295', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220291', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220287', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220283', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220273', None, None, None, None, None, '3545157') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 24 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', '26016100', '1377220320', '0.041468531755644335', None, None, None, None, '3545157'), ('4302', '26016100', '1377220317', '0.041468531755644335', None, None, None, None, '3545157'), ('4302', '26016100', '1377220308', '0.041468531755644335', None, None, None, None, '3545157'), ('4302', '26016100', '1377220295', '0.041468531755644335', None, None, None, None, '3545157'), ('4302', '26016100', '1377220291', '0.041468531755644335', None, None, None, None, '3545157'), ('4302', '26016100', '1377220287', '0.041468531755644335', None, None, None, None, '3545157'), ('4302', '26016100', '1377220283', '0.041468531755644335', None, None, None, None, '3545157'), ('4302', '26016100', '1377220273', '0.041468531755644335', None, None, None, None, '3545157')] time used for this insertion : 0.09925198554992676 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.10889291763305664 time spend to save output : 0.09978365898132324 total time spend for step 2 : 0.20867657661437988 step3:velours_tree Fri Aug 15 04:30:59 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 : {26016100: [{'flou': 26016138, 'Carton_gris': 26016139, 'autre_refus': 26016140, 'metal': 26016141, 'cartonnette': 26016142, 'kraft': 26016143, 'Teint_Dans_La_Masse': 26016144, 'plastique': 26016145, 'papier': 26016146, 'environnement': 26016147, 'mal_croppe': 26016148, 'Carton_brun': 26016149}]} input_args_next_step : {26016100: ()} output_args : {26016100: [{'flou': 26016138, 'Carton_gris': 26016139, 'autre_refus': 26016140, 'metal': 26016141, 'cartonnette': 26016142, 'kraft': 26016143, 'Teint_Dans_La_Masse': 26016144, 'plastique': 26016145, 'papier': 26016146, 'environnement': 26016147, 'mal_croppe': 26016148, 'Carton_brun': 26016149}]} args : 26016100 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 : ({'flou': 26016138, 'Carton_gris': 26016139, 'autre_refus': 26016140, 'metal': 26016141, 'cartonnette': 26016142, 'kraft': 26016143, 'Teint_Dans_La_Masse': 26016144, 'plastique': 26016145, 'papier': 26016146, 'environnement': 26016147, 'mal_croppe': 26016148, 'Carton_brun': 26016149},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26016100) 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([26016100]) 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.318493127822876 time spend to save output : 6.437301635742188e-05 total time spend for step 3 : 0.3185575008392334 step4:send_mail_cod Fri Aug 15 04:31:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1377220320: ('0.041468531755644335',), 1377220317: ('0.041468531755644335',), 1377220308: ('0.041468531755644335',), 1377220295: ('0.041468531755644335',), 1377220291: ('0.041468531755644335',), 1377220287: ('0.041468531755644335',), 1377220283: ('0.041468531755644335',), 1377220273: ('0.041468531755644335',)} input_args_next_step : {1377220320: ()} output_args : {1377220320: ('0.041468531755644335',), 1377220317: ('0.041468531755644335',), 1377220308: ('0.041468531755644335',), 1377220295: ('0.041468531755644335',), 1377220291: ('0.041468531755644335',), 1377220287: ('0.041468531755644335',), 1377220283: ('0.041468531755644335',), 1377220273: ('0.041468531755644335',)} args : 1377220320 depend.output_id : 0 input_args_next_step : {1377220320: ('0.041468531755644335',), 1377220317: ()} output_args : {1377220320: ('0.041468531755644335',), 1377220317: ('0.041468531755644335',), 1377220308: ('0.041468531755644335',), 1377220295: ('0.041468531755644335',), 1377220291: ('0.041468531755644335',), 1377220287: ('0.041468531755644335',), 1377220283: ('0.041468531755644335',), 1377220273: ('0.041468531755644335',)} args : 1377220317 depend.output_id : 0 input_args_next_step : {1377220320: ('0.041468531755644335',), 1377220317: ('0.041468531755644335',), 1377220308: ()} output_args : {1377220320: ('0.041468531755644335',), 1377220317: ('0.041468531755644335',), 1377220308: ('0.041468531755644335',), 1377220295: ('0.041468531755644335',), 1377220291: ('0.041468531755644335',), 1377220287: ('0.041468531755644335',), 1377220283: ('0.041468531755644335',), 1377220273: ('0.041468531755644335',)} args : 1377220308 depend.output_id : 0 input_args_next_step : {1377220320: ('0.041468531755644335',), 1377220317: ('0.041468531755644335',), 1377220308: ('0.041468531755644335',), 1377220295: ()} output_args : {1377220320: ('0.041468531755644335',), 1377220317: ('0.041468531755644335',), 1377220308: ('0.041468531755644335',), 1377220295: ('0.041468531755644335',), 1377220291: ('0.041468531755644335',), 1377220287: ('0.041468531755644335',), 1377220283: ('0.041468531755644335',), 1377220273: ('0.041468531755644335',)} args : 1377220295 depend.output_id : 0 input_args_next_step : {1377220320: ('0.041468531755644335',), 1377220317: ('0.041468531755644335',), 1377220308: ('0.041468531755644335',), 1377220295: ('0.041468531755644335',), 1377220291: ()} output_args : {1377220320: ('0.041468531755644335',), 1377220317: ('0.041468531755644335',), 1377220308: ('0.041468531755644335',), 1377220295: ('0.041468531755644335',), 1377220291: ('0.041468531755644335',), 1377220287: ('0.041468531755644335',), 1377220283: ('0.041468531755644335',), 1377220273: ('0.041468531755644335',)} args : 1377220291 depend.output_id : 0 input_args_next_step : {1377220320: ('0.041468531755644335',), 1377220317: ('0.041468531755644335',), 1377220308: ('0.041468531755644335',), 1377220295: ('0.041468531755644335',), 1377220291: ('0.041468531755644335',), 1377220287: ()} output_args : {1377220320: ('0.041468531755644335',), 1377220317: ('0.041468531755644335',), 1377220308: ('0.041468531755644335',), 1377220295: ('0.041468531755644335',), 1377220291: ('0.041468531755644335',), 1377220287: ('0.041468531755644335',), 1377220283: ('0.041468531755644335',), 1377220273: ('0.041468531755644335',)} args : 1377220287 depend.output_id : 0 input_args_next_step : {1377220320: ('0.041468531755644335',), 1377220317: ('0.041468531755644335',), 1377220308: ('0.041468531755644335',), 1377220295: ('0.041468531755644335',), 1377220291: ('0.041468531755644335',), 1377220287: ('0.041468531755644335',), 1377220283: ()} output_args : {1377220320: ('0.041468531755644335',), 1377220317: ('0.041468531755644335',), 1377220308: ('0.041468531755644335',), 1377220295: ('0.041468531755644335',), 1377220291: ('0.041468531755644335',), 1377220287: ('0.041468531755644335',), 1377220283: ('0.041468531755644335',), 1377220273: ('0.041468531755644335',)} args : 1377220283 depend.output_id : 0 input_args_next_step : {1377220320: ('0.041468531755644335',), 1377220317: ('0.041468531755644335',), 1377220308: ('0.041468531755644335',), 1377220295: ('0.041468531755644335',), 1377220291: ('0.041468531755644335',), 1377220287: ('0.041468531755644335',), 1377220283: ('0.041468531755644335',), 1377220273: ()} output_args : {1377220320: ('0.041468531755644335',), 1377220317: ('0.041468531755644335',), 1377220308: ('0.041468531755644335',), 1377220295: ('0.041468531755644335',), 1377220291: ('0.041468531755644335',), 1377220287: ('0.041468531755644335',), 1377220283: ('0.041468531755644335',), 1377220273: ('0.041468531755644335',)} args : 1377220273 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 : {26016100: [{'flou': 26016138, 'Carton_gris': 26016139, 'autre_refus': 26016140, 'metal': 26016141, 'cartonnette': 26016142, 'kraft': 26016143, 'Teint_Dans_La_Masse': 26016144, 'plastique': 26016145, 'papier': 26016146, 'environnement': 26016147, 'mal_croppe': 26016148, 'Carton_brun': 26016149}]} input_args_next_step : {1377220320: ('0.041468531755644335',), 1377220317: ('0.041468531755644335',), 1377220308: ('0.041468531755644335',), 1377220295: ('0.041468531755644335',), 1377220291: ('0.041468531755644335',), 1377220287: ('0.041468531755644335',), 1377220283: ('0.041468531755644335',), 1377220273: ('0.041468531755644335',), 26016100: ()} output_args : {26016100: [{'flou': 26016138, 'Carton_gris': 26016139, 'autre_refus': 26016140, 'metal': 26016141, 'cartonnette': 26016142, 'kraft': 26016143, 'Teint_Dans_La_Masse': 26016144, 'plastique': 26016145, 'papier': 26016146, 'environnement': 26016147, 'mal_croppe': 26016148, 'Carton_brun': 26016149}]} args : 26016100 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 :9, first value : ('0.041468531755644335',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26016100) 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 ph WHERE photo_id IN (1377220320,1377220317,1377220308,1377220295,1377220291,1377220287,1377220283,1377220273) Found this number of photos: 8 ##### Call download_photos : nb_thread : 5 begin to download photo : 1377220273 begin to download photo : 1377220287 begin to download photo : 1377220295 begin to download photo : 1377220317 download finish for photo 1377220287 begin to download photo : 1377220291 download finish for photo 1377220317 begin to download photo : 1377220320 download finish for photo 1377220295 begin to download photo : 1377220308 download finish for photo 1377220273 begin to download photo : 1377220283 download finish for photo 1377220291 download finish for photo 1377220320 download finish for photo 1377220308 download finish for photo 1377220283 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette260161381755225060/ length of list_filenames : 8 ; length of list_pids : 8 ; length of list_args : 8 results_Auto_P26016100_15-08-2025_04_31_00.pdf 26016138 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26016138 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette260161381755225060 26016140 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26016140 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1377220341: '1755224967_2869418_1377220137_f3b546434c8a21427eecaa797629f3ff_rle_crop_3916239813_0.png', 1377220342: '1755224967_2869418_1377220135_88022dec0eb9eb842b76274300ff15d9_rle_crop_3916239828_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/24d370b6ae3fd0111d8ce2678b984464_7956930.png change filename to text .imagette260161401755225060/ imagette260161401755225060/1755224967_2869418_1377220135_88022dec0eb9eb842b76274300ff15d9_rle_crop_3916239828_0.png.png imagette260161401755225060/1755224967_2869418_1377220137_f3b546434c8a21427eecaa797629f3ff_rle_crop_3916239813_0.png.png imagette260161411755225060/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/d7ff220bd7ac0c692badb491efc18566_13089344.png imagette260161401755225060 26016141 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26016141 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette260161411755225060 26016142 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26016142 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1377220346: '1755224967_2869418_1377220133_cef766305ec1279ff380f0e9d01ee936_rle_crop_3916239839_0.png'} change filename to text .imagette260161421755225060/ imagette260161421755225060/1755224967_2869418_1377220133_cef766305ec1279ff380f0e9d01ee936_rle_crop_3916239839_0.png.png imagette260161431755225060/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/6089ac6d96b64d7fb8279884c0eca984_43644991.png imagette260161421755225060 26016143 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26016143 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette260161431755225060 26016145 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26016145 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1377220349: '1755224967_2869418_1377220131_399da827e3ac3c9912ee3bca8d251281_rle_crop_3916239859_0.png'} change filename to text .imagette260161451755225060/ imagette260161451755225060/1755224967_2869418_1377220131_399da827e3ac3c9912ee3bca8d251281_rle_crop_3916239859_0.png.png imagette260161481755225060/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/239d94a25ff18a3c023b0801d7c67c6a_62687798.png imagette260161451755225060 26016148 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26016148 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette260161481755225060 26016139 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26016139 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1377220344: '1755224967_2869418_1377220135_88022dec0eb9eb842b76274300ff15d9_rle_crop_3916239827_0.png', 1377220345: '1755224967_2869418_1377220133_cef766305ec1279ff380f0e9d01ee936_rle_crop_3916239838_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/51e14c52baa9925e1fbfac4a19bf445c_93775094.png change filename to text .imagette260161391755225060/ imagette260161391755225060/1755224967_2869418_1377220133_cef766305ec1279ff380f0e9d01ee936_rle_crop_3916239838_0.png.png imagette260161391755225060/1755224967_2869418_1377220135_88022dec0eb9eb842b76274300ff15d9_rle_crop_3916239827_0.png.png imagette260161441755225060/ imagette260161491755225060/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/f5b40e1d1b37a4997f60e10b81cc08a7_53140038.png imagette260161391755225060 26016144 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26016144 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette260161441755225060 26016149 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26016149 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette260161491755225060 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=26016100 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/26016150,26016151,26016152,26016153,26016154,26016155,26016156,26016157,26016158,26016159,26016160,26016161?tags=flou,Carton_gris,autre_refus,metal,cartonnette,kraft,Teint_Dans_La_Masse,plastique,papier,environnement,mal_croppe,Carton_brun your option no_mail is active, we will not send the real mail to your client args[1377220320] : ('0.041468531755644335',) no score found for photo 1377220320 We are sending mail with results at report@fotonower.com args[1377220317] : ('0.041468531755644335',) no score found for photo 1377220317 We are sending mail with results at report@fotonower.com args[1377220308] : ('0.041468531755644335',) no score found for photo 1377220308 We are sending mail with results at report@fotonower.com args[1377220295] : ('0.041468531755644335',) no score found for photo 1377220295 We are sending mail with results at report@fotonower.com args[1377220291] : ('0.041468531755644335',) no score found for photo 1377220291 We are sending mail with results at report@fotonower.com args[1377220287] : ('0.041468531755644335',) no score found for photo 1377220287 We are sending mail with results at report@fotonower.com args[1377220283] : ('0.041468531755644335',) no score found for photo 1377220283 We are sending mail with results at report@fotonower.com args[1377220273] : ('0.041468531755644335',) no score found for photo 1377220273 We are sending mail with results at report@fotonower.com refus_total : 0.041468531755644335 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26016100 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_P26016100_15-08-2025_04_31_00.pdf results_Auto_P26016100_15-08-2025_04_31_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26016100_15-08-2025_04_31_00.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','26016100','results_Auto_P26016100_15-08-2025_04_31_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26016100_15-08-2025_04_31_00.pdf','pdf','','0.1','0.041468531755644335') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26016100]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1377220320, 1377220317, 1377220308, 1377220295, 1377220291, 1377220287, 1377220283, 1377220273] map_info['map_portfolio_photo'] : {26016100: [1377220320, 1377220317, 1377220308, 1377220295, 1377220291, 1377220287, 1377220283, 1377220273, 1377220259, 1377220255, 1377220252, 1377220250, 1377220242, 1377220222, 1377220220, 1377220218, 1377220209, 1377220194, 1377220192, 1377220181, 1377220172, 1377220170, 1377220167, 1377220165, 1377220161, 1377220148, 1377220146, 1377220142, 1377220141, 1377220140, 1377220139, 1377220137, 1377220135, 1377220133, 1377220131, 1377220117, 1377220116, 1377220115, 1377220107, 1377220093, 1377220091, 1377220088, 1377220086, 1377220083, 1377220072, 1377220047, 1377220044, 1377220041, 1377220040, 1377220033, 1377220009, 1377220007, 1377220006, 1377220004, 1377219997, 1377219983, 1377219981, 1377219978, 1377219976, 1377219968, 1377219947, 1377219944, 1377219941, 1377219932, 1377219909, 1377219908, 1377219901]} final : False mtd_id 4302 list_pids : [1377220320, 1377220317, 1377220308, 1377220295, 1377220291, 1377220287, 1377220283, 1377220273] 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, '3545157') ('4302', '26016100', '1377220320', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220317', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220308', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220295', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220291', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220287', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220283', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220273', None, None, None, None, None, '3545157') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 8 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', '26016100', '1377220320', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220317', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220308', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220295', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220291', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220287', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220283', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220273', None, None, None, None, None, '3545157')] time used for this insertion : 0.0747077465057373 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.6834514141082764 time spend to save output : 0.07501506805419922 total time spend for step 4 : 1.7584664821624756 step5:split_time_score Fri Aug 15 04:31: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 complete output_args for input 0 : ['26016100'] 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 : [('26016100',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26016100) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1377220287: {'path': 'temp/1755225060_324669_1377220287_5d61393b4c1e39507951a192b100199f.jpg', 'extension': 'jpg'}, 1377220291: {'path': 'temp/1755225060_324669_1377220291_a83913cab5de24236a9d04d3418cbc64.jpg', 'extension': 'jpg'}, 1377220317: {'path': 'temp/1755225060_324669_1377220317_d7dc4b90a45f1db285d9d1661f8686a8.jpg', 'extension': 'jpg'}, 1377220320: {'path': 'temp/1755225060_324669_1377220320_3257358e38ec1810265533be3530b6d6.jpg', 'extension': 'jpg'}, 1377220295: {'path': 'temp/1755225060_324669_1377220295_cdd964813fb74c783dc6010194e5e9bd.jpg', 'extension': 'jpg'}, 1377220308: {'path': 'temp/1755225060_324669_1377220308_06dca3f6b70f35d38819d946982c8521.jpg', 'extension': 'jpg'}, 1377220273: {'path': 'temp/1755225060_324669_1377220273_b2b4abcf981071379c082a9c425445d9.jpg', 'extension': 'jpg'}, 1377220283: {'path': 'temp/1755225060_324669_1377220283_319514f9be116830ae905824f67f2276.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 = 26016100; (('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 ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 26016100 group by h (('04', 67),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26016100 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 (26016100) 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 (26016100) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 15082025 26016100 Nombre de photos uploadées : 67 / 23040 (0%) 15082025 26016100 Nombre de photos taguées (types de déchets): 0 / 67 (0%) 15082025 26016100 Nombre de photos taguées (volume) : 0 / 67 (0%) [{'photo_id': 1377219909, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/d855e869619c4ea288b217a3b9ef45c9.jpg', 'username': None, 'uploaded_at': 1755224167, 'text': 'image_15082025_04_15_04_10148.jpg'}, {'photo_id': 1377219908, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/ddb145207144f0ca62e4fafc12b08433.jpg', 'username': None, 'uploaded_at': 1755224167, 'text': 'image_15082025_04_15_14_10134.jpg'}, {'photo_id': 1377219901, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/57f6f90fbca08e688fe0a80ba8a4dba6.jpg', 'username': None, 'uploaded_at': 1755224167, 'text': 'image_15082025_04_15_44_9123.jpg'}, {'photo_id': 1377219947, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/5c3a32e80c2b519589af57998ffe7f5a.jpg', 'username': None, 'uploaded_at': 1755224228, 'text': 'image_15082025_04_15_54_10133.jpg'}] 0 [] elapsed_time : load_data_split_time_score 4.0531158447265625e-06 elapsed_time : order_list_meta_photo_and_scores 1.1682510375976562e-05 ??????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0041351318359375 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 26016100, '2025-08-15' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2122421,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.20863652229309082 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= 2122421 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130783, 'mtr_portfolio_id': 26009616, 'dashboard_result_id': 14042023, '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_P26009616_15-08-2025_00_33_29.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26009617, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26009618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26009619, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26009620, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26009621, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26009622, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26009623, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26009624, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26009625, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26009626, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26009627, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26009628, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130783, 'mtr_portfolio_id': 26009667, 'dashboard_result_id': 14042024, '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_P26009667_15-08-2025_00_47_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26009670, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26009671, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26009672, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26009673, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26009674, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26009675, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26009676, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26009677, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26009679, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26009680, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26009681, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26009682, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130783, 'mtr_portfolio_id': 26010093, 'dashboard_result_id': 14042025, '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_P26010093_15-08-2025_01_34_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26010154, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26010155, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26010156, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26010157, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26010158, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26010159, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26010160, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26010161, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26010162, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26010163, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26010164, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26010165, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130783, 'mtr_portfolio_id': 26011192, 'dashboard_result_id': 14042026, '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_P26011192_15-08-2025_01_49_28.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011231, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011232, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011233, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011234, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011235, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011236, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011237, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011238, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011239, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011240, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011241, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26011242, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130783, 'mtr_portfolio_id': 26011457, 'dashboard_result_id': 14042027, '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_P26011457_15-08-2025_02_03_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26011462, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011463, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011464, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011465, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011466, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011467, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011468, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011469, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011470, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011471, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011472, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011473, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130783, 'mtr_portfolio_id': 26011726, 'dashboard_result_id': 14042028, '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_P26011726_15-08-2025_02_19_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011786, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011787, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011788, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011789, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011790, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011791, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011792, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011793, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011794, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26011795, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011796, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011797, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130783, 'mtr_portfolio_id': 26012288, 'dashboard_result_id': 14042029, '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_P26012288_15-08-2025_02_32_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26012300, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26012301, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26012302, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26012303, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26012304, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26012305, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26012306, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26012307, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26012308, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26012309, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26012310, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26012311, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130783, 'mtr_portfolio_id': 26012804, 'dashboard_result_id': 14042030, '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_P26012804_15-08-2025_02_50_30.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26012822, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26012823, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26012824, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26012825, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26012826, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26012827, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26012828, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26012829, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26012830, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26012831, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26012832, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26012833, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130783, 'mtr_portfolio_id': 26013291, 'dashboard_result_id': 14042031, '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_P26013291_15-08-2025_03_08_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26013309, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26013310, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26013311, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26013312, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26013313, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26013314, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26013315, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26013316, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26013317, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26013318, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26013319, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26013320, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130783, 'mtr_portfolio_id': 26013988, 'dashboard_result_id': 14042032, '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_P26013988_15-08-2025_03_17_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26013998, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26013999, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014000, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26014001, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014002, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014004, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014005, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014006, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014007, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014008, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014009, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014010, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130783, 'mtr_portfolio_id': 26014385, 'dashboard_result_id': 14042033, '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_P26014385_15-08-2025_03_33_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26014399, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014400, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26014401, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014402, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26014403, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014404, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014405, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014406, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014407, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014408, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014409, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014410, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130783, 'mtr_portfolio_id': 26014766, 'dashboard_result_id': 14042034, '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_P26014766_15-08-2025_03_47_33.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26014776, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014777, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26014778, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014779, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014780, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014781, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014782, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014783, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014784, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014785, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26014786, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014787, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130783, 'mtr_portfolio_id': 26015128, 'dashboard_result_id': 14042035, '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_P26015128_15-08-2025_04_02_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26015133, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26015134, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26015135, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26015136, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26015137, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26015138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26015139, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26015140, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26015141, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26015142, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26015143, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26015144, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130783, 'mtr_portfolio_id': 26015599, 'dashboard_result_id': 14042036, '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_P26015599_15-08-2025_04_16_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26015625, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26015626, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26015627, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26015628, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26015629, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26015630, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26015631, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26015632, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26015633, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26015634, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26015635, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26015636, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130783, 'mtr_portfolio_id': 26016100, 'dashboard_result_id': 14042037, '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_P26016100_15-08-2025_04_27_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26016138, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26016139, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26016140, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26016141, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26016142, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26016143, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26016144, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26016145, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26016146, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26016147, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26016148, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26016149, '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 = 26009616 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': 3543348, 'mtr_portfolio_id': 26009616, 'created_at': datetime.datetime(2025, 8, 15, 0, 33, 29), 'result': '0.02393868320933984', 'result_long': None, 'result_double': None}] Qualite : 0.02393868320933984 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26009616 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26009616_15-08-2025_00_33_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26009616 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_P26009616_15-08-2025_00_33_29.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26009617, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26009618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26009619, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26009620, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26009621, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26009622, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26009623, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26009624, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26009625, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26009626, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26009627, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26009628, 'pht': 3726}}" where mtr_portfolio_id = 26009616 and dashboard_run_id = 2130783 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`=26009616 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14042023, 0.02393868320933984, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26009616_15-08-2025_00_33_29.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26009617, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26009618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26009619, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26009620, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26009621, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26009622, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26009623, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26009624, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26009625, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26009626, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26009627, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26009628, '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 = 26009667 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': 3543352, 'mtr_portfolio_id': 26009667, 'created_at': datetime.datetime(2025, 8, 15, 0, 46, 59), 'result': '0.044401801310752075', 'result_long': None, 'result_double': None}] Qualite : 0.044401801310752075 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26009667 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26009667_15-08-2025_00_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26009667 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_P26009667_15-08-2025_00_47_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26009670, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26009671, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26009672, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26009673, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26009674, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26009675, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26009676, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26009677, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26009679, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26009680, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26009681, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26009682, 'pht': 3726}}" where mtr_portfolio_id = 26009667 and dashboard_run_id = 2130783 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`=26009667 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14042024, 0.044401801310752075, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26009667_15-08-2025_00_47_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26009670, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26009671, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26009672, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26009673, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26009674, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26009675, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26009676, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26009677, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26009679, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26009680, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26009681, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26009682, '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 = 26010093 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': 3543403, 'mtr_portfolio_id': 26010093, 'created_at': datetime.datetime(2025, 8, 15, 1, 34, 58), 'result': '0.06099066835265486', 'result_long': None, 'result_double': None}] Qualite : 0.06099066835265486 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26010093 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26010093_15-08-2025_01_34_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26010093 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_P26010093_15-08-2025_01_34_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26010154, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26010155, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26010156, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26010157, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26010158, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26010159, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26010160, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26010161, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26010162, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26010163, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26010164, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26010165, 'pht': 3726}}" where mtr_portfolio_id = 26010093 and dashboard_run_id = 2130783 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`=26010093 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14042025, 0.06099066835265486, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26010093_15-08-2025_01_34_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26010154, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26010155, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26010156, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26010157, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26010158, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26010159, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26010160, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26010161, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26010162, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26010163, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26010164, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26010165, '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 = 26011192 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': 3543660, 'mtr_portfolio_id': 26011192, 'created_at': datetime.datetime(2025, 8, 15, 1, 49, 27), 'result': '0.03868287500958118', 'result_long': None, 'result_double': None}] Qualite : 0.03868287500958118 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26011192 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011192_15-08-2025_01_49_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26011192 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_P26011192_15-08-2025_01_49_28.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011231, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011232, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011233, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011234, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011235, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011236, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011237, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011238, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011239, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011240, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011241, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26011242, 'pht': 3726}}" where mtr_portfolio_id = 26011192 and dashboard_run_id = 2130783 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`=26011192 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14042026, 0.03868287500958118, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011192_15-08-2025_01_49_28.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011231, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011232, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011233, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011234, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011235, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011236, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011237, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011238, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011239, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011240, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011241, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26011242, '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 = 26011457 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': 3543710, 'mtr_portfolio_id': 26011457, 'created_at': datetime.datetime(2025, 8, 15, 2, 3), 'result': '0.03564865645332555', 'result_long': None, 'result_double': None}] Qualite : 0.03564865645332555 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26011457 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011457_15-08-2025_02_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26011457 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_P26011457_15-08-2025_02_03_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26011462, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011463, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011464, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011465, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011466, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011467, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011468, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011469, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011470, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011471, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011472, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011473, 'pht': 3726}}" where mtr_portfolio_id = 26011457 and dashboard_run_id = 2130783 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`=26011457 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14042027, 0.03564865645332555, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011457_15-08-2025_02_03_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26011462, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011463, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011464, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011465, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011466, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011467, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011468, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011469, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011470, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011471, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011472, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011473, '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 = 26011726 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': 3543812, 'mtr_portfolio_id': 26011726, 'created_at': datetime.datetime(2025, 8, 15, 2, 18, 59), 'result': '0.06410354923549737', 'result_long': None, 'result_double': None}] Qualite : 0.06410354923549737 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26011726 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011726_15-08-2025_02_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26011726 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_P26011726_15-08-2025_02_19_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011786, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011787, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011788, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011789, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011790, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011791, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011792, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011793, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011794, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26011795, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011796, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011797, 'pht': 3726}}" where mtr_portfolio_id = 26011726 and dashboard_run_id = 2130783 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`=26011726 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14042028, 0.06410354923549737, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011726_15-08-2025_02_19_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011786, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011787, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011788, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011789, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011790, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011791, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011792, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011793, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011794, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26011795, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011796, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011797, '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 = 26012288 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': 3543948, 'mtr_portfolio_id': 26012288, 'created_at': datetime.datetime(2025, 8, 15, 2, 32, 58), 'result': '0.055275944500488824', 'result_long': None, 'result_double': None}] Qualite : 0.055275944500488824 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26012288 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26012288_15-08-2025_02_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26012288 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_P26012288_15-08-2025_02_32_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26012300, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26012301, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26012302, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26012303, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26012304, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26012305, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26012306, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26012307, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26012308, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26012309, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26012310, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26012311, 'pht': 3726}}" where mtr_portfolio_id = 26012288 and dashboard_run_id = 2130783 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`=26012288 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14042029, 0.055275944500488824, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26012288_15-08-2025_02_32_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26012300, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26012301, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26012302, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26012303, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26012304, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26012305, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26012306, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26012307, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26012308, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26012309, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26012310, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26012311, '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 = 26012804 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': 3544150, 'mtr_portfolio_id': 26012804, 'created_at': datetime.datetime(2025, 8, 15, 2, 50, 29), 'result': '0.07201274534087537', 'result_long': None, 'result_double': None}] Qualite : 0.07201274534087537 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26012804 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26012804_15-08-2025_02_50_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26012804 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_P26012804_15-08-2025_02_50_30.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26012822, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26012823, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26012824, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26012825, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26012826, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26012827, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26012828, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26012829, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26012830, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26012831, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26012832, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26012833, 'pht': 3726}}" where mtr_portfolio_id = 26012804 and dashboard_run_id = 2130783 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`=26012804 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14042030, 0.07201274534087537, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26012804_15-08-2025_02_50_30.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26012822, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26012823, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26012824, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26012825, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26012826, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26012827, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26012828, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26012829, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26012830, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26012831, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26012832, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26012833, '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 = 26013291 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': 3544375, 'mtr_portfolio_id': 26013291, 'created_at': datetime.datetime(2025, 8, 15, 3, 8, 58), 'result': '0.039870167648543724', 'result_long': None, 'result_double': None}] Qualite : 0.039870167648543724 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26013291 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26013291_15-08-2025_03_08_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26013291 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_P26013291_15-08-2025_03_08_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26013309, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26013310, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26013311, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26013312, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26013313, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26013314, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26013315, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26013316, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26013317, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26013318, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26013319, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26013320, 'pht': 3726}}" where mtr_portfolio_id = 26013291 and dashboard_run_id = 2130783 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`=26013291 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14042031, 0.039870167648543724, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26013291_15-08-2025_03_08_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26013309, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26013310, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26013311, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26013312, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26013313, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26013314, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26013315, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26013316, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26013317, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26013318, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26013319, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26013320, '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 = 26013988 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': 3544648, 'mtr_portfolio_id': 26013988, 'created_at': datetime.datetime(2025, 8, 15, 3, 17), 'result': '0.07984756001990542', 'result_long': None, 'result_double': None}] Qualite : 0.07984756001990542 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26013988 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26013988_15-08-2025_03_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26013988 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_P26013988_15-08-2025_03_17_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26013998, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26013999, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014000, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26014001, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014002, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014004, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014005, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014006, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014007, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014008, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014009, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014010, 'pht': 3726}}" where mtr_portfolio_id = 26013988 and dashboard_run_id = 2130783 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`=26013988 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14042032, 0.07984756001990542, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26013988_15-08-2025_03_17_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26013998, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26013999, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014000, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26014001, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014002, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014004, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014005, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014006, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014007, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014008, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014009, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014010, '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 = 26014385 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': 3544723, 'mtr_portfolio_id': 26014385, 'created_at': datetime.datetime(2025, 8, 15, 3, 33), 'result': '0.06013094672396472', 'result_long': None, 'result_double': None}] Qualite : 0.06013094672396472 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26014385 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26014385_15-08-2025_03_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26014385 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_P26014385_15-08-2025_03_33_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26014399, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014400, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26014401, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014402, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26014403, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014404, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014405, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014406, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014407, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014408, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014409, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014410, 'pht': 3726}}" where mtr_portfolio_id = 26014385 and dashboard_run_id = 2130783 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`=26014385 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14042033, 0.06013094672396472, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26014385_15-08-2025_03_33_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26014399, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014400, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26014401, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014402, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26014403, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014404, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014405, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014406, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014407, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014408, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014409, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014410, '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 = 26014766 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': 3544778, 'mtr_portfolio_id': 26014766, 'created_at': datetime.datetime(2025, 8, 15, 3, 47, 32), 'result': '0.04564862762433859', 'result_long': None, 'result_double': None}] Qualite : 0.04564862762433859 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26014766 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26014766_15-08-2025_03_47_33.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26014766 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_P26014766_15-08-2025_03_47_33.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26014776, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014777, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26014778, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014779, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014780, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014781, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014782, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014783, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014784, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014785, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26014786, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014787, 'pht': 3726}}" where mtr_portfolio_id = 26014766 and dashboard_run_id = 2130783 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`=26014766 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14042034, 0.04564862762433859, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26014766_15-08-2025_03_47_33.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26014776, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014777, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26014778, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014779, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014780, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014781, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014782, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014783, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014784, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014785, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26014786, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014787, '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 = 26015128 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': 3544865, 'mtr_portfolio_id': 26015128, 'created_at': datetime.datetime(2025, 8, 15, 4, 2, 57), 'result': '0.050519310784844916', 'result_long': None, 'result_double': None}] Qualite : 0.050519310784844916 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26015128 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26015128_15-08-2025_04_02_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26015128 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_P26015128_15-08-2025_04_02_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26015133, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26015134, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26015135, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26015136, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26015137, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26015138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26015139, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26015140, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26015141, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26015142, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26015143, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26015144, 'pht': 3726}}" where mtr_portfolio_id = 26015128 and dashboard_run_id = 2130785 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`=26015128 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14042035, 0.050519310784844916, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26015128_15-08-2025_04_02_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26015133, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26015134, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26015135, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26015136, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26015137, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26015138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26015139, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26015140, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26015141, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26015142, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26015143, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26015144, '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 = 26015599 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': 3545004, 'mtr_portfolio_id': 26015599, 'created_at': datetime.datetime(2025, 8, 15, 4, 16, 57), 'result': '0.0397361537279944', 'result_long': None, 'result_double': None}] Qualite : 0.0397361537279944 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26015599 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26015599_15-08-2025_04_16_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26015599 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_P26015599_15-08-2025_04_16_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26015625, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26015626, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26015627, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26015628, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26015629, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26015630, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26015631, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26015632, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26015633, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26015634, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26015635, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26015636, 'pht': 3726}}" where mtr_portfolio_id = 26015599 and dashboard_run_id = 2130785 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`=26015599 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14042036, 0.0397361537279944, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26015599_15-08-2025_04_16_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26015625, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26015626, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26015627, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26015628, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26015629, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26015630, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26015631, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26015632, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26015633, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26015634, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26015635, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26015636, '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 = 26016100 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': 3545157, 'mtr_portfolio_id': 26016100, 'created_at': datetime.datetime(2025, 8, 15, 4, 30, 59), 'result': '0.041468531755644335', 'result_long': None, 'result_double': None}] Qualite : 0.041468531755644335 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26016100 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26016100_15-08-2025_04_31_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26016100 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_P26016100_15-08-2025_04_31_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26016138, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26016139, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26016140, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26016141, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26016142, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26016143, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26016144, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26016145, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26016146, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26016147, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26016148, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26016149, 'pht': 3726}}" where mtr_portfolio_id = 26016100 and dashboard_run_id = 2130785 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`=26016100 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14042037, 0.041468531755644335, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26016100_15-08-2025_04_31_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26016138, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26016139, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26016140, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26016141, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26016142, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26016143, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26016144, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26016145, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26016146, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26016147, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26016148, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26016149, '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 (26009616,26009667,26010093,26011192,26011457,26011726,26012288,26012804,26013291,26013988,26014385,26014766,26015128,26015599,26016100) result : ((1377183099,), (1377184546,), (1377184550,), (1377184791,), (1377184820,), (1377184849,), (1377184879,), (1377185245,), (1377185214,), (1377185547,), (1377185701,), (1377185814,), (1377185930,), (1377187140,), (1377187184,), (1377187228,), (1377187274,), (1377187304,), (1377187685,), (1377187797,), (1377187888,), (1377188711,), (1377188767,), (1377188820,), (1377188876,), (1377188932,), (1377190070,), (1377190228,), (1377190359,), (1377190441,), (1377190471,), (1377190479,), (1377190495,), (1377190502,), (1377190532,), (1377190561,), (1377190593,), (1377191277,), (1377191317,), (1377191372,), (1377191420,), (1377191469,), (1377191527,), (1377191911,), (1377191983,), (1377192027,), (1377192057,), (1377192109,), (1377192242,), (1377192317,), (1377192322,), (1377192326,), (1377192330,), (1377192448,), (1377192451,), (1377192453,), (1377192636,), (1377192638,), (1377192640,), (1377192642,), (1377192701,), (1377192702,), (1377192703,), (1377192705,), (1377192709,), (1377192807,), (1377192810,), (1377192843,), (1377192861,), (1377192865,), (1377192869,), (1377192926,), (1377192923,), (1377192924,), (1377192949,), (1377192956,), (1377192973,), (1377192997,), (1377192999,), (1377193001,), (1377193005,), (1377193046,), (1377193050,), (1377193053,), (1377193126,), (1377193147,), (1377193163,), (1377193166,), (1377193171,), (1377193192,), (1377193195,), (1377193222,), (1377193224,), (1377193226,), (1377193229,), (1377193248,), (1377193250,), (1377193253,), (1377193257,), (1377193260,), (1377193263,), (1377193272,), (1377193359,), (1377193369,), (1377193414,), (1377193539,), (1377193571,), (1377199434,), (1377199461,), (1377199463,), (1377199477,), (1377199479,), (1377199482,), (1377199487,), (1377199491,), (1377199505,), (1377199514,), (1377199534,), (1377199538,), (1377199548,), (1377199564,), (1377199572,), (1377199575,), (1377199607,), (1377199612,), (1377199616,), (1377199620,), (1377199623,), (1377199634,), (1377199637,), (1377199641,), (1377199666,), (1377199669,), (1377199706,), (1377199708,), (1377199709,), (1377199712,), (1377199716,), (1377199730,), (1377199733,), (1377199735,), (1377199738,), (1377199740,), (1377199743,), (1377199752,), (1377199754,), (1377199757,), (1377199761,), (1377199764,), (1377199768,), (1377199779,), (1377199782,), (1377199789,), (1377199791,), (1377199793,), (1377199798,), (1377199801,), (1377199804,), (1377199808,), (1377199811,), (1377199815,), (1377199824,), (1377199826,), (1377199829,), (1377199835,), (1377199879,), (1377199856,), (1377199858,), (1377199860,), (1377199863,), (1377199869,), (1377199892,), (1377199895,), (1377199898,), (1377199902,), (1377199962,), (1377199964,), (1377199966,), (1377199969,), (1377199972,), (1377199974,), (1377199996,), (1377200022,), (1377200050,), (1377200078,), (1377200131,), (1377200442,), (1377200538,), (1377200571,), (1377200876,), (1377200880,), (1377200883,), (1377200887,), (1377201028,), (1377201059,), (1377201089,), (1377201122,), (1377201217,), (1377201218,), (1377201220,), (1377201224,), (1377201228,), (1377201238,), (1377201248,), (1377201250,), (1377201252,), (1377201310,), (1377201313,), (1377201331,), (1377201334,), (1377201336,), (1377201352,), (1377201353,), (1377201374,), (1377201376,), (1377201389,), (1377201440,), (1377201442,), (1377201444,), (1377201446,), (1377201450,), (1377201697,), (1377201728,), (1377201761,), (1377201794,), (1377201824,), (1377201856,), (1377201949,), (1377201978,), (1377202014,), (1377202302,), (1377202148,), (1377202184,), (1377202214,), (1377202243,), (1377202273,), (1377202605,), (1377202670,), (1377202725,), (1377202801,), (1377202859,), (1377202902,), (1377203221,), (1377203251,), (1377203281,), (1377203313,), (1377203346,), (1377203350,), (1377203358,), (1377203359,), (1377203361,), (1377203365,), (1377203369,), (1377203373,), (1377203399,), (1377203427,), (1377203552,), (1377203585,), (1377203617,), (1377203648,), (1377203678,), (1377203768,), (1377203808,), (1377203840,), (1377203870,), (1377203900,), (1377204161,), (1377204191,), (1377204532,), (1377204562,), (1377204594,), (1377205038,), (1377205095,), (1377205165,), (1377205221,), (1377205574,), (1377205602,), (1377205636,), (1377205702,), (1377206188,), (1377206220,), (1377206248,), (1377206314,), (1377206349,), (1377206585,), (1377206614,), (1377206642,), (1377206677,), (1377206716,), (1377207106,), (1377207160,), (1377207206,), (1377207236,), (1377207269,), (1377207300,), (1377207465,), (1377207521,), (1377207571,), (1377207606,), (1377207738,), (1377207788,), (1377207839,), (1377207878,), (1377207908,), (1377208001,), (1377208003,), (1377208006,), (1377208008,), (1377208011,), (1377208014,), (1377208162,), (1377208027,), (1377208034,), (1377208071,), (1377208102,), (1377208133,), (1377208347,), (1377208380,), (1377208504,), (1377208513,), (1377208518,), (1377208521,), (1377208524,), (1377208557,), (1377208587,), (1377208622,), (1377208653,), (1377208689,), (1377208720,), (1377208954,), (1377208987,), (1377209018,), (1377209273,), (1377209276,), (1377209279,), (1377209283,), (1377209510,), (1377209513,), (1377209537,), (1377209543,), (1377209565,), (1377209567,), (1377209570,), (1377209572,), (1377209574,), (1377209577,), (1377209603,), (1377209605,), (1377209608,), (1377209611,), (1377209614,), (1377209616,), (1377209624,), (1377209628,), (1377209634,), (1377209639,), (1377209642,), (1377209650,), (1377209651,), (1377209652,), (1377209654,), (1377209673,), (1377209677,), (1377209680,), (1377209682,), (1377209684,), (1377209686,), (1377209702,), (1377209704,), (1377209706,), (1377209708,), (1377209711,), (1377209716,), (1377209723,), (1377209726,), (1377209732,), (1377209738,), (1377209741,), (1377209743,), (1377209750,), (1377209751,), (1377209754,), (1377209756,), (1377209758,), (1377209759,), (1377209771,), (1377209774,), (1377209775,), (1377209777,), (1377209780,), (1377209783,), (1377209805,), (1377209808,), (1377209809,), (1377209811,), (1377209847,), (1377209840,), (1377209842,), (1377209866,), (1377209878,), (1377209880,), (1377209882,), (1377209884,), (1377209886,), (1377209903,), (1377209907,), (1377209912,), (1377209916,), (1377209918,), (1377209919,), (1377209923,), (1377209925,), (1377209946,), (1377209977,), (1377210020,), (1377210133,), (1377210162,), (1377210297,), (1377210329,), (1377210900,), (1377210931,), (1377210932,), (1377210934,), (1377210936,), (1377210938,), (1377210971,), (1377210973,), (1377210974,), (1377210980,), (1377211003,), (1377211005,), (1377211007,), (1377211010,), (1377211013,), (1377211017,), (1377211033,), (1377211035,), (1377211037,), (1377211039,), (1377211041,), (1377211043,), (1377211052,), (1377211054,), (1377211056,), (1377211059,), (1377211062,), (1377211065,), (1377211076,), (1377211077,), (1377211079,), (1377211082,), (1377211084,), (1377211087,), (1377211098,), (1377211101,), (1377211103,), (1377211104,), (1377211105,), (1377211111,), (1377211135,), (1377211136,), (1377211171,), (1377211173,), (1377211177,), (1377211181,), (1377211118,), (1377211122,), (1377211129,), (1377211132,), (1377211149,), (1377211153,), (1377211158,), (1377211160,), (1377211161,), (1377211162,), (1377211167,), (1377211169,), (1377211187,), (1377211188,), (1377211189,), (1377211190,), (1377211192,), (1377211197,), (1377211200,), (1377211203,), (1377211206,), (1377211208,), (1377211210,), (1377211431,), (1377214993,), (1377214957,), (1377215242,), (1377215250,), (1377215252,), (1377215254,), (1377215267,), (1377215288,), (1377215291,), (1377215311,), (1377215314,), (1377215318,), (1377215319,), (1377215322,), (1377215346,), (1377215349,), (1377215352,), (1377215388,), (1377215390,), (1377215392,), (1377215409,), (1377215411,), (1377215414,), (1377215417,), (1377215421,), (1377215423,), (1377215427,), (1377215435,), (1377215437,), (1377215439,), (1377215441,), (1377215448,), (1377215452,), (1377215463,), (1377215482,), (1377215479,), (1377215508,), (1377215515,), (1377215516,), (1377215517,), (1377215524,), (1377215527,), (1377215529,), (1377215532,), (1377215534,), (1377215545,), (1377215547,), (1377215549,), (1377215575,), (1377215576,), (1377215578,), (1377215605,), (1377215608,), (1377215611,), (1377215631,), (1377215634,), (1377215636,), (1377215652,), (1377215654,), (1377215657,), (1377215661,), (1377215672,), (1377215673,), (1377215674,), (1377215678,), (1377215681,), (1377215695,), (1377215699,), (1377215703,), (1377215706,), (1377215720,), (1377215728,), (1377215734,), (1377215737,), (1377215746,), (1377215747,), (1377215749,), (1377215752,), (1377215769,), (1377215770,), (1377215771,), (1377215787,), (1377215789,), (1377215791,), (1377215793,), (1377215796,), (1377215799,), (1377215806,), (1377215808,), (1377215810,), (1377215812,), (1377215814,), (1377215817,), (1377215842,), (1377215838,), (1377215840,), (1377215875,), (1377215878,), (1377215881,), (1377215885,), (1377215888,), (1377215898,), (1377215902,), (1377215905,), (1377215908,), (1377215911,), (1377215914,), (1377215918,), (1377215919,), (1377215920,), (1377215924,), (1377215927,), (1377215931,), (1377215934,), (1377215936,), (1377215938,), (1377215941,), (1377215943,), (1377215945,), (1377215949,), (1377215961,), (1377215963,), (1377215969,), (1377215972,), (1377215976,), (1377215986,), (1377215987,), (1377215988,), (1377215991,), (1377215994,), (1377215998,), (1377216008,), (1377216012,), (1377216023,), (1377216031,), (1377216046,), (1377216048,), (1377216050,), (1377216053,), (1377216066,), (1377216068,), (1377216070,), (1377216102,), (1377216104,), (1377216106,), (1377216111,), (1377216130,), (1377216132,), (1377216134,), (1377216138,), (1377216141,), (1377216152,), (1377216155,), (1377216159,), (1377216162,), (1377216164,), (1377216166,), (1377216171,), (1377216178,), (1377216180,), (1377216182,), (1377216185,), (1377216188,), (1377216203,), (1377216206,), (1377216210,), (1377216214,), (1377216218,), (1377216237,), (1377216231,), (1377216234,), (1377216235,), (1377216258,), (1377216264,), (1377216277,), (1377216280,), (1377216283,), (1377216287,), (1377216301,), (1377216303,), (1377216305,), (1377216308,), (1377216310,), (1377216312,), (1377216321,), (1377216322,), (1377216329,), (1377216335,), (1377216338,), (1377216355,), (1377216360,), (1377216362,), (1377216366,), (1377216371,), (1377216386,), (1377216389,), (1377216391,), (1377216394,), (1377216397,), (1377216400,), (1377216411,), (1377216414,), (1377216418,), (1377216421,), (1377216424,), (1377216426,), (1377216431,), (1377216434,), (1377216437,), (1377216439,), (1377216444,), (1377216446,), (1377216464,), (1377216466,), (1377216468,), (1377216471,), (1377216473,), (1377216476,), (1377216480,), (1377216483,), (1377216486,), (1377216491,), (1377216495,), (1377216510,), (1377216511,), (1377216512,), (1377216515,), (1377216534,), (1377216536,), (1377216540,), (1377216543,), (1377216547,), (1377216567,), (1377216569,), (1377216573,), (1377216576,), (1377216579,), (1377216583,), (1377216734,), (1377216638,), (1377216674,), (1377216708,), (1377216999,), (1377217031,), (1377217059,), (1377217247,), (1377217254,), (1377217256,), (1377217415,), (1377217450,), (1377217478,), (1377217499,), (1377217511,), (1377217548,), (1377217556,), (1377217558,), (1377217561,), (1377217564,), (1377217581,), (1377217589,), (1377217590,), (1377217591,), (1377217594,), (1377217614,), (1377217621,), (1377217632,), (1377217661,), (1377217691,), (1377217964,), (1377217993,), (1377218053,), (1377218106,), (1377218158,), (1377218458,), (1377218494,), (1377218524,), (1377219018,), (1377219054,), (1377219081,), (1377219114,), (1377219143,), (1377219394,), (1377219428,), (1377219455,), (1377219485,), (1377219491,), (1377219522,), (1377219630,), (1377219662,), (1377219693,), (1377219724,), (1377219805,), (1377219806,), (1377219810,), (1377219812,), (1377219816,), (1377219817,), (1377219821,), (1377219822,), (1377219824,), (1377219825,), (1377219826,), (1377219827,), (1377219837,), (1377219839,), (1377219842,), (1377219844,), (1377219847,), (1377219850,), (1377219861,), (1377219864,), (1377219876,), (1377219877,), (1377219880,), (1377219882,), (1377219884,), (1377219887,), (1377219912,), (1377219901,), (1377219908,), (1377219909,), (1377219932,), (1377219941,), (1377219944,), (1377219947,), (1377219968,), (1377219976,), (1377219978,), (1377219981,), (1377219983,), (1377219997,), (1377220004,), (1377220006,), (1377220007,), (1377220009,), (1377220033,), (1377220040,), (1377220041,), (1377220044,), (1377220047,), (1377220072,), (1377220083,), (1377220086,), (1377220088,), (1377220091,), (1377220093,), (1377220107,), (1377220115,), (1377220116,), (1377220117,), (1377220131,), (1377220133,), (1377220135,), (1377220137,), (1377220139,), (1377220140,), (1377220141,), (1377220142,), (1377220146,), (1377220148,), (1377220161,), (1377220165,), (1377220167,), (1377220170,), (1377220172,), (1377220181,), (1377220192,), (1377220194,), (1377220209,), (1377220218,), (1377220220,), (1377220222,), (1377220242,), (1377220250,), (1377220252,), (1377220255,), (1377220259,), (1377220273,), (1377220283,), (1377220287,), (1377220291,), (1377220295,), (1377220308,), (1377220317,), (1377220320,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'15082025': {'nb_upload': 67, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26016100]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1377220320, 1377220317, 1377220308, 1377220295, 1377220291, 1377220287, 1377220283, 1377220273] map_info['map_portfolio_photo'] : {26016100: [1377220320, 1377220317, 1377220308, 1377220295, 1377220291, 1377220287, 1377220283, 1377220273, 1377220259, 1377220255, 1377220252, 1377220250, 1377220242, 1377220222, 1377220220, 1377220218, 1377220209, 1377220194, 1377220192, 1377220181, 1377220172, 1377220170, 1377220167, 1377220165, 1377220161, 1377220148, 1377220146, 1377220142, 1377220141, 1377220140, 1377220139, 1377220137, 1377220135, 1377220133, 1377220131, 1377220117, 1377220116, 1377220115, 1377220107, 1377220093, 1377220091, 1377220088, 1377220086, 1377220083, 1377220072, 1377220047, 1377220044, 1377220041, 1377220040, 1377220033, 1377220009, 1377220007, 1377220006, 1377220004, 1377219997, 1377219983, 1377219981, 1377219978, 1377219976, 1377219968, 1377219947, 1377219944, 1377219941, 1377219932, 1377219909, 1377219908, 1377219901]} final : True mtd_id 4302 list_pids : [1377220320, 1377220317, 1377220308, 1377220295, 1377220291, 1377220287, 1377220283, 1377220273] Looping around the photos to save general results len do output : 1 /26016100Didn'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, '3545157') ('4302', '26016100', '1377220320', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220317', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220308', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220295', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220291', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220287', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220283', None, None, None, None, None, '3545157') ('4302', None, None, None, None, None, None, None, '3545157') ('4302', '26016100', '1377220273', None, None, None, None, None, '3545157') 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', None, '26016100', 'None', None, None, None, None, '3545157'), ('4302', '26016100', '1377220320', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220317', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220308', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220295', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220291', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220287', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220283', None, None, None, None, None, '3545157'), ('4302', '26016100', '1377220273', None, None, None, None, None, '3545157')] time used for this insertion : 0.01448822021484375 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5091512203216553 time spend to save output : 0.014677762985229492 total time spend for step 5 : 1.5238289833068848 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 (3545157) 1.88user 2.47system 0:09.17elapsed 47%CPU (0avgtext+0avgdata 163832maxresident)k 696inputs+5104outputs (9major+64200minor)pagefaults 0swaps