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 : 3097828 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 (4082974) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4082974) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28736530 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4082974'] with mtr_portfolio_ids : ['28736530'] and first list_photo_ids : [] new path : /proc/3097828/ Name: python3 Umask: 0002 State: R (running) Tgid: 3097828 Ngid: 0 Pid: 3097828 PPid: 3097827 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3097828 NSpid: 3097828 NSpgid: 3096155 NSsid: 3096155 VmPeak: 1106908 kB VmSize: 1106884 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99388 kB VmRSS: 99388 kB RssAnon: 59908 kB RssFile: 39480 kB RssShmem: 0 kB VmData: 865636 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 596 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: 46 nonvoluntary_ctxt_switches: 89 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3097828', 'Ngid': '0', 'Pid': '3097828', 'PPid': '3097827', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3097828', 'NSpid': '3097828', 'NSpgid': '3096155', 'NSsid': '3096155', 'VmPeak': '1106908 kB', 'VmSize': '1106884 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99388 kB', 'VmRSS': '99388 kB', 'RssAnon': '59908 kB', 'RssFile': '39480 kB', 'RssShmem': '0 kB', 'VmData': '865636 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '596 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': '46', 'nonvoluntary_ctxt_switches': '89'} ('datou_batch_current', '3097828', '1106908', '0', '1106884', '865636', '99388', b'', 'marlene', '4082974') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (28736530) 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 (4082974 ) ) 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 (28736530) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1395326987, 'portfolio_id': 28736530}, {'photo_id': 1395326982, 'portfolio_id': 28736530}, {'photo_id': 1395326978, 'portfolio_id': 28736530}, {'photo_id': 1395326973, 'portfolio_id': 28736530}, {'photo_id': 1395326935, 'portfolio_id': 28736530}, {'photo_id': 1395326930, 'portfolio_id': 28736530}, {'photo_id': 1395326926, 'portfolio_id': 28736530}, {'photo_id': 1395326887, 'portfolio_id': 28736530}, {'photo_id': 1395326882, 'portfolio_id': 28736530}, {'photo_id': 1395326880, 'portfolio_id': 28736530}, {'photo_id': 1395326879, 'portfolio_id': 28736530}, {'photo_id': 1395326878, 'portfolio_id': 28736530}, {'photo_id': 1395326865, 'portfolio_id': 28736530}, {'photo_id': 1395326861, 'portfolio_id': 28736530}, {'photo_id': 1395326855, 'portfolio_id': 28736530}, {'photo_id': 1395326849, 'portfolio_id': 28736530}, {'photo_id': 1395326848, 'portfolio_id': 28736530}, {'photo_id': 1395326847, 'portfolio_id': 28736530}, {'photo_id': 1395326841, 'portfolio_id': 28736530}, {'photo_id': 1395326837, 'portfolio_id': 28736530}, {'photo_id': 1395326831, 'portfolio_id': 28736530}, {'photo_id': 1395326821, 'portfolio_id': 28736530}, {'photo_id': 1395326818, 'portfolio_id': 28736530}, {'photo_id': 1395326816, 'portfolio_id': 28736530}, {'photo_id': 1395326791, 'portfolio_id': 28736530}, {'photo_id': 1395326787, 'portfolio_id': 28736530}, {'photo_id': 1395326785, 'portfolio_id': 28736530}, {'photo_id': 1395326784, 'portfolio_id': 28736530}, {'photo_id': 1395326779, 'portfolio_id': 28736530}, {'photo_id': 1395326760, 'portfolio_id': 28736530}, {'photo_id': 1395326756, 'portfolio_id': 28736530}, {'photo_id': 1395326753, 'portfolio_id': 28736530}, {'photo_id': 1395326749, 'portfolio_id': 28736530}, {'photo_id': 1395326747, 'portfolio_id': 28736530}, {'photo_id': 1395326745, 'portfolio_id': 28736530}, {'photo_id': 1395326726, 'portfolio_id': 28736530}, {'photo_id': 1395326720, 'portfolio_id': 28736530}, {'photo_id': 1395326715, 'portfolio_id': 28736530}, {'photo_id': 1395326711, 'portfolio_id': 28736530}, {'photo_id': 1395326709, 'portfolio_id': 28736530}, {'photo_id': 1395326690, 'portfolio_id': 28736530}, {'photo_id': 1395326686, 'portfolio_id': 28736530}, {'photo_id': 1395326682, 'portfolio_id': 28736530}, {'photo_id': 1395326679, 'portfolio_id': 28736530}, {'photo_id': 1395326677, 'portfolio_id': 28736530}, {'photo_id': 1395326675, 'portfolio_id': 28736530}, {'photo_id': 1395326642, 'portfolio_id': 28736530}, {'photo_id': 1395326639, 'portfolio_id': 28736530}, {'photo_id': 1395326637, 'portfolio_id': 28736530}, {'photo_id': 1395326635, 'portfolio_id': 28736530}, {'photo_id': 1395326628, 'portfolio_id': 28736530}, {'photo_id': 1395326624, 'portfolio_id': 28736530}, {'photo_id': 1395326619, 'portfolio_id': 28736530}, {'photo_id': 1395326615, 'portfolio_id': 28736530}, {'photo_id': 1395326613, 'portfolio_id': 28736530}, {'photo_id': 1395326611, 'portfolio_id': 28736530}, {'photo_id': 1395326596, 'portfolio_id': 28736530}, {'photo_id': 1395326594, 'portfolio_id': 28736530}, {'photo_id': 1395326590, 'portfolio_id': 28736530}, {'photo_id': 1395326588, 'portfolio_id': 28736530}, {'photo_id': 1395326587, 'portfolio_id': 28736530}, {'photo_id': 1395326586, 'portfolio_id': 28736530}, {'photo_id': 1395326555, 'portfolio_id': 28736530}, {'photo_id': 1395326551, 'portfolio_id': 28736530}, {'photo_id': 1395326549, 'portfolio_id': 28736530}, {'photo_id': 1395326548, 'portfolio_id': 28736530}, {'photo_id': 1395326547, 'portfolio_id': 28736530}, {'photo_id': 1395326475, 'portfolio_id': 28736530}, {'photo_id': 1395326474, 'portfolio_id': 28736530}, {'photo_id': 1395326473, 'portfolio_id': 28736530}, {'photo_id': 1395326460, 'portfolio_id': 28736530}, {'photo_id': 1395326457, 'portfolio_id': 28736530}, {'photo_id': 1395326453, 'portfolio_id': 28736530}, {'photo_id': 1395326451, 'portfolio_id': 28736530}, {'photo_id': 1395326450, 'portfolio_id': 28736530}] map_portfolio_id_photo_id: {28736530: [1395326987, 1395326982, 1395326978, 1395326973, 1395326935, 1395326930, 1395326926, 1395326887, 1395326882, 1395326880, 1395326879, 1395326878, 1395326865, 1395326861, 1395326855, 1395326849, 1395326848, 1395326847, 1395326841, 1395326837, 1395326831, 1395326821, 1395326818, 1395326816, 1395326791, 1395326787, 1395326785, 1395326784, 1395326779, 1395326760, 1395326756, 1395326753, 1395326749, 1395326747, 1395326745, 1395326726, 1395326720, 1395326715, 1395326711, 1395326709, 1395326690, 1395326686, 1395326682, 1395326679, 1395326677, 1395326675, 1395326642, 1395326639, 1395326637, 1395326635, 1395326628, 1395326624, 1395326619, 1395326615, 1395326613, 1395326611, 1395326596, 1395326594, 1395326590, 1395326588, 1395326587, 1395326586, 1395326555, 1395326551, 1395326549, 1395326548, 1395326547, 1395326475, 1395326474, 1395326473, 1395326460, 1395326457, 1395326453, 1395326451, 1395326450]} ##### 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.016776561737060547 #### 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 Thu Nov 20 04:02: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 (28736530) 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 : 28736530 get user id for portfolio 28736530 get sub ptf for main ptf 28736530, type 3726 and hashtags ['plastique', 'autre_refus', 'metal', 'Teint_Dans_La_Masse', 'Carton_gris', 'Carton_brun', 'environnement', 'kraft', 'papier', 'mal_croppe', 'flou', 'cartonnette'] 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`=28736530 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','metal','Teint_Dans_La_Masse','Carton_gris','Carton_brun','environnement','kraft','papier','mal_croppe','flou','cartonnette')) 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`=28736530 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','metal','Teint_Dans_La_Masse','Carton_gris','Carton_brun','environnement','kraft','papier','mal_croppe','flou','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 28736530, 'sub_port_id': 28736562, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494020, 'last_updated_at': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 26)}, 'mal_croppe': {'main_port_id': 28736530, 'sub_port_id': 28736563, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494021, 'last_updated_at': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 26)}, 'cartonnette': {'main_port_id': 28736530, 'sub_port_id': 28736564, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494022, 'last_updated_at': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 26)}, 'Carton_brun': {'main_port_id': 28736530, 'sub_port_id': 28736565, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494023, 'last_updated_at': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 26)}, 'flou': {'main_port_id': 28736530, 'sub_port_id': 28736566, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494024, 'last_updated_at': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 26)}, 'autre_refus': {'main_port_id': 28736530, 'sub_port_id': 28736567, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494025, 'last_updated_at': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 26)}, 'Carton_gris': {'main_port_id': 28736530, 'sub_port_id': 28736568, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494026, 'last_updated_at': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 26)}, 'Teint_Dans_La_Masse': {'main_port_id': 28736530, 'sub_port_id': 28736569, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494027, 'last_updated_at': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 26)}, 'environnement': {'main_port_id': 28736530, 'sub_port_id': 28736570, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494028, 'last_updated_at': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 26)}, 'metal': {'main_port_id': 28736530, 'sub_port_id': 28736571, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494029, 'last_updated_at': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 26)}, 'plastique': {'main_port_id': 28736530, 'sub_port_id': 28736572, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494030, 'last_updated_at': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 26)}, 'kraft': {'main_port_id': 28736530, 'sub_port_id': 28736573, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494031, 'last_updated_at': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 26)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28736562 , 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=28736530 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 (28736562) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28736530) result : ((1395326450,), (1395326451,), (1395326453,), (1395326457,), (1395326460,), (1395326473,), (1395326474,), (1395326475,), (1395326547,), (1395326548,), (1395326549,), (1395326551,), (1395326555,), (1395326586,), (1395326587,), (1395326588,), (1395326590,), (1395326594,), (1395326596,), (1395326611,), (1395326613,), (1395326615,), (1395326619,), (1395326624,), (1395326628,), (1395326635,), (1395326637,), (1395326639,), (1395326642,), (1395326675,), (1395326677,), (1395326679,), (1395326682,), (1395326686,), (1395326690,), (1395326709,), (1395326711,), (1395326715,), (1395326720,), (1395326726,), (1395326745,), (1395326747,), (1395326749,), (1395326753,), (1395326756,), (1395326760,), (1395326779,), (1395326784,), (1395326785,), (1395326787,), (1395326791,), (1395326816,), (1395326818,), (1395326821,), (1395326831,), (1395326837,), (1395326841,), (1395326847,), (1395326848,), (1395326849,), (1395326855,), (1395326861,), (1395326865,), (1395326878,), (1395326879,), (1395326880,), (1395326882,), (1395326887,), (1395326926,), (1395326930,), (1395326935,), (1395326973,), (1395326978,), (1395326982,), (1395326987,)) 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 28736563 , 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=28736530 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 (28736563) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28736530) result : ((1395326450,), (1395326451,), (1395326453,), (1395326457,), (1395326460,), (1395326473,), (1395326474,), (1395326475,), (1395326547,), (1395326548,), (1395326549,), (1395326551,), (1395326555,), (1395326586,), (1395326587,), (1395326588,), (1395326590,), (1395326594,), (1395326596,), (1395326611,), (1395326613,), (1395326615,), (1395326619,), (1395326624,), (1395326628,), (1395326635,), (1395326637,), (1395326639,), (1395326642,), (1395326675,), (1395326677,), (1395326679,), (1395326682,), (1395326686,), (1395326690,), (1395326709,), (1395326711,), (1395326715,), (1395326720,), (1395326726,), (1395326745,), (1395326747,), (1395326749,), (1395326753,), (1395326756,), (1395326760,), (1395326779,), (1395326784,), (1395326785,), (1395326787,), (1395326791,), (1395326816,), (1395326818,), (1395326821,), (1395326831,), (1395326837,), (1395326841,), (1395326847,), (1395326848,), (1395326849,), (1395326855,), (1395326861,), (1395326865,), (1395326878,), (1395326879,), (1395326880,), (1395326882,), (1395326887,), (1395326926,), (1395326930,), (1395326935,), (1395326973,), (1395326978,), (1395326982,), (1395326987,)) 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 28736564 , 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=28736530 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 (28736564) result : ((1395326803,), (1395326893,), (1395326910,), (1395326911,), (1395326912,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28736530) result : ((1395326450,), (1395326451,), (1395326453,), (1395326457,), (1395326460,), (1395326473,), (1395326474,), (1395326475,), (1395326547,), (1395326548,), (1395326549,), (1395326551,), (1395326555,), (1395326586,), (1395326587,), (1395326588,), (1395326590,), (1395326594,), (1395326596,), (1395326611,), (1395326613,), (1395326615,), (1395326619,), (1395326624,), (1395326628,), (1395326635,), (1395326637,), (1395326639,), (1395326642,), (1395326675,), (1395326677,), (1395326679,), (1395326682,), (1395326686,), (1395326690,), (1395326709,), (1395326711,), (1395326715,), (1395326720,), (1395326726,), (1395326745,), (1395326747,), (1395326749,), (1395326753,), (1395326756,), (1395326760,), (1395326779,), (1395326784,), (1395326785,), (1395326787,), (1395326791,), (1395326816,), (1395326818,), (1395326821,), (1395326831,), (1395326837,), (1395326841,), (1395326847,), (1395326848,), (1395326849,), (1395326855,), (1395326861,), (1395326865,), (1395326878,), (1395326879,), (1395326880,), (1395326882,), (1395326887,), (1395326926,), (1395326930,), (1395326935,), (1395326973,), (1395326978,), (1395326982,), (1395326987,)) 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 28736565 , 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=28736530 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 (28736565) result : ((1395326832,), (1395326996,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28736530) result : ((1395326450,), (1395326451,), (1395326453,), (1395326457,), (1395326460,), (1395326473,), (1395326474,), (1395326475,), (1395326547,), (1395326548,), (1395326549,), (1395326551,), (1395326555,), (1395326586,), (1395326587,), (1395326588,), (1395326590,), (1395326594,), (1395326596,), (1395326611,), (1395326613,), (1395326615,), (1395326619,), (1395326624,), (1395326628,), (1395326635,), (1395326637,), (1395326639,), (1395326642,), (1395326675,), (1395326677,), (1395326679,), (1395326682,), (1395326686,), (1395326690,), (1395326709,), (1395326711,), (1395326715,), (1395326720,), (1395326726,), (1395326745,), (1395326747,), (1395326749,), (1395326753,), (1395326756,), (1395326760,), (1395326779,), (1395326784,), (1395326785,), (1395326787,), (1395326791,), (1395326816,), (1395326818,), (1395326821,), (1395326831,), (1395326837,), (1395326841,), (1395326847,), (1395326848,), (1395326849,), (1395326855,), (1395326861,), (1395326865,), (1395326878,), (1395326879,), (1395326880,), (1395326882,), (1395326887,), (1395326926,), (1395326930,), (1395326935,), (1395326973,), (1395326978,), (1395326982,), (1395326987,)) 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 28736566 , 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=28736530 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 (28736566) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28736530) result : ((1395326450,), (1395326451,), (1395326453,), (1395326457,), (1395326460,), (1395326473,), (1395326474,), (1395326475,), (1395326547,), (1395326548,), (1395326549,), (1395326551,), (1395326555,), (1395326586,), (1395326587,), (1395326588,), (1395326590,), (1395326594,), (1395326596,), (1395326611,), (1395326613,), (1395326615,), (1395326619,), (1395326624,), (1395326628,), (1395326635,), (1395326637,), (1395326639,), (1395326642,), (1395326675,), (1395326677,), (1395326679,), (1395326682,), (1395326686,), (1395326690,), (1395326709,), (1395326711,), (1395326715,), (1395326720,), (1395326726,), (1395326745,), (1395326747,), (1395326749,), (1395326753,), (1395326756,), (1395326760,), (1395326779,), (1395326784,), (1395326785,), (1395326787,), (1395326791,), (1395326816,), (1395326818,), (1395326821,), (1395326831,), (1395326837,), (1395326841,), (1395326847,), (1395326848,), (1395326849,), (1395326855,), (1395326861,), (1395326865,), (1395326878,), (1395326879,), (1395326880,), (1395326882,), (1395326887,), (1395326926,), (1395326930,), (1395326935,), (1395326973,), (1395326978,), (1395326982,), (1395326987,)) 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 28736567 , 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=28736530 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 (28736567) result : ((1395326829,), (1395326913,), (1395326914,), (1395326994,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28736530) result : ((1395326450,), (1395326451,), (1395326453,), (1395326457,), (1395326460,), (1395326473,), (1395326474,), (1395326475,), (1395326547,), (1395326548,), (1395326549,), (1395326551,), (1395326555,), (1395326586,), (1395326587,), (1395326588,), (1395326590,), (1395326594,), (1395326596,), (1395326611,), (1395326613,), (1395326615,), (1395326619,), (1395326624,), (1395326628,), (1395326635,), (1395326637,), (1395326639,), (1395326642,), (1395326675,), (1395326677,), (1395326679,), (1395326682,), (1395326686,), (1395326690,), (1395326709,), (1395326711,), (1395326715,), (1395326720,), (1395326726,), (1395326745,), (1395326747,), (1395326749,), (1395326753,), (1395326756,), (1395326760,), (1395326779,), (1395326784,), (1395326785,), (1395326787,), (1395326791,), (1395326816,), (1395326818,), (1395326821,), (1395326831,), (1395326837,), (1395326841,), (1395326847,), (1395326848,), (1395326849,), (1395326855,), (1395326861,), (1395326865,), (1395326878,), (1395326879,), (1395326880,), (1395326882,), (1395326887,), (1395326926,), (1395326930,), (1395326935,), (1395326973,), (1395326978,), (1395326982,), (1395326987,)) 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 28736568 , 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=28736530 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 (28736568) result : ((1395326802,), (1395326830,), (1395326892,), (1395326915,), (1395326916,), (1395326917,), (1395326955,), (1395326956,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28736530) result : ((1395326450,), (1395326451,), (1395326453,), (1395326457,), (1395326460,), (1395326473,), (1395326474,), (1395326475,), (1395326547,), (1395326548,), (1395326549,), (1395326551,), (1395326555,), (1395326586,), (1395326587,), (1395326588,), (1395326590,), (1395326594,), (1395326596,), (1395326611,), (1395326613,), (1395326615,), (1395326619,), (1395326624,), (1395326628,), (1395326635,), (1395326637,), (1395326639,), (1395326642,), (1395326675,), (1395326677,), (1395326679,), (1395326682,), (1395326686,), (1395326690,), (1395326709,), (1395326711,), (1395326715,), (1395326720,), (1395326726,), (1395326745,), (1395326747,), (1395326749,), (1395326753,), (1395326756,), (1395326760,), (1395326779,), (1395326784,), (1395326785,), (1395326787,), (1395326791,), (1395326816,), (1395326818,), (1395326821,), (1395326831,), (1395326837,), (1395326841,), (1395326847,), (1395326848,), (1395326849,), (1395326855,), (1395326861,), (1395326865,), (1395326878,), (1395326879,), (1395326880,), (1395326882,), (1395326887,), (1395326926,), (1395326930,), (1395326935,), (1395326973,), (1395326978,), (1395326982,), (1395326987,)) 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 28736569 , 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=28736530 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 (28736569) result : ((1395326650,), (1395326799,), (1395326800,), (1395326801,), (1395326823,), (1395326824,), (1395326825,), (1395326827,), (1395326889,), (1395326890,), (1395326891,), (1395326909,), (1395326954,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28736530) result : ((1395326450,), (1395326451,), (1395326453,), (1395326457,), (1395326460,), (1395326473,), (1395326474,), (1395326475,), (1395326547,), (1395326548,), (1395326549,), (1395326551,), (1395326555,), (1395326586,), (1395326587,), (1395326588,), (1395326590,), (1395326594,), (1395326596,), (1395326611,), (1395326613,), (1395326615,), (1395326619,), (1395326624,), (1395326628,), (1395326635,), (1395326637,), (1395326639,), (1395326642,), (1395326675,), (1395326677,), (1395326679,), (1395326682,), (1395326686,), (1395326690,), (1395326709,), (1395326711,), (1395326715,), (1395326720,), (1395326726,), (1395326745,), (1395326747,), (1395326749,), (1395326753,), (1395326756,), (1395326760,), (1395326779,), (1395326784,), (1395326785,), (1395326787,), (1395326791,), (1395326816,), (1395326818,), (1395326821,), (1395326831,), (1395326837,), (1395326841,), (1395326847,), (1395326848,), (1395326849,), (1395326855,), (1395326861,), (1395326865,), (1395326878,), (1395326879,), (1395326880,), (1395326882,), (1395326887,), (1395326926,), (1395326930,), (1395326935,), (1395326973,), (1395326978,), (1395326982,), (1395326987,)) 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 28736570 , 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=28736530 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 (28736570) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28736530) result : ((1395326450,), (1395326451,), (1395326453,), (1395326457,), (1395326460,), (1395326473,), (1395326474,), (1395326475,), (1395326547,), (1395326548,), (1395326549,), (1395326551,), (1395326555,), (1395326586,), (1395326587,), (1395326588,), (1395326590,), (1395326594,), (1395326596,), (1395326611,), (1395326613,), (1395326615,), (1395326619,), (1395326624,), (1395326628,), (1395326635,), (1395326637,), (1395326639,), (1395326642,), (1395326675,), (1395326677,), (1395326679,), (1395326682,), (1395326686,), (1395326690,), (1395326709,), (1395326711,), (1395326715,), (1395326720,), (1395326726,), (1395326745,), (1395326747,), (1395326749,), (1395326753,), (1395326756,), (1395326760,), (1395326779,), (1395326784,), (1395326785,), (1395326787,), (1395326791,), (1395326816,), (1395326818,), (1395326821,), (1395326831,), (1395326837,), (1395326841,), (1395326847,), (1395326848,), (1395326849,), (1395326855,), (1395326861,), (1395326865,), (1395326878,), (1395326879,), (1395326880,), (1395326882,), (1395326887,), (1395326926,), (1395326930,), (1395326935,), (1395326973,), (1395326978,), (1395326982,), (1395326987,)) 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 28736571 , 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=28736530 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 (28736571) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28736530) result : ((1395326450,), (1395326451,), (1395326453,), (1395326457,), (1395326460,), (1395326473,), (1395326474,), (1395326475,), (1395326547,), (1395326548,), (1395326549,), (1395326551,), (1395326555,), (1395326586,), (1395326587,), (1395326588,), (1395326590,), (1395326594,), (1395326596,), (1395326611,), (1395326613,), (1395326615,), (1395326619,), (1395326624,), (1395326628,), (1395326635,), (1395326637,), (1395326639,), (1395326642,), (1395326675,), (1395326677,), (1395326679,), (1395326682,), (1395326686,), (1395326690,), (1395326709,), (1395326711,), (1395326715,), (1395326720,), (1395326726,), (1395326745,), (1395326747,), (1395326749,), (1395326753,), (1395326756,), (1395326760,), (1395326779,), (1395326784,), (1395326785,), (1395326787,), (1395326791,), (1395326816,), (1395326818,), (1395326821,), (1395326831,), (1395326837,), (1395326841,), (1395326847,), (1395326848,), (1395326849,), (1395326855,), (1395326861,), (1395326865,), (1395326878,), (1395326879,), (1395326880,), (1395326882,), (1395326887,), (1395326926,), (1395326930,), (1395326935,), (1395326973,), (1395326978,), (1395326982,), (1395326987,)) 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 28736572 , 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=28736530 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 (28736572) result : ((1395326834,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28736530) result : ((1395326450,), (1395326451,), (1395326453,), (1395326457,), (1395326460,), (1395326473,), (1395326474,), (1395326475,), (1395326547,), (1395326548,), (1395326549,), (1395326551,), (1395326555,), (1395326586,), (1395326587,), (1395326588,), (1395326590,), (1395326594,), (1395326596,), (1395326611,), (1395326613,), (1395326615,), (1395326619,), (1395326624,), (1395326628,), (1395326635,), (1395326637,), (1395326639,), (1395326642,), (1395326675,), (1395326677,), (1395326679,), (1395326682,), (1395326686,), (1395326690,), (1395326709,), (1395326711,), (1395326715,), (1395326720,), (1395326726,), (1395326745,), (1395326747,), (1395326749,), (1395326753,), (1395326756,), (1395326760,), (1395326779,), (1395326784,), (1395326785,), (1395326787,), (1395326791,), (1395326816,), (1395326818,), (1395326821,), (1395326831,), (1395326837,), (1395326841,), (1395326847,), (1395326848,), (1395326849,), (1395326855,), (1395326861,), (1395326865,), (1395326878,), (1395326879,), (1395326880,), (1395326882,), (1395326887,), (1395326926,), (1395326930,), (1395326935,), (1395326973,), (1395326978,), (1395326982,), (1395326987,)) 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 28736573 , 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=28736530 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 (28736573) result : ((1395326805,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28736530) result : ((1395326450,), (1395326451,), (1395326453,), (1395326457,), (1395326460,), (1395326473,), (1395326474,), (1395326475,), (1395326547,), (1395326548,), (1395326549,), (1395326551,), (1395326555,), (1395326586,), (1395326587,), (1395326588,), (1395326590,), (1395326594,), (1395326596,), (1395326611,), (1395326613,), (1395326615,), (1395326619,), (1395326624,), (1395326628,), (1395326635,), (1395326637,), (1395326639,), (1395326642,), (1395326675,), (1395326677,), (1395326679,), (1395326682,), (1395326686,), (1395326690,), (1395326709,), (1395326711,), (1395326715,), (1395326720,), (1395326726,), (1395326745,), (1395326747,), (1395326749,), (1395326753,), (1395326756,), (1395326760,), (1395326779,), (1395326784,), (1395326785,), (1395326787,), (1395326791,), (1395326816,), (1395326818,), (1395326821,), (1395326831,), (1395326837,), (1395326841,), (1395326847,), (1395326848,), (1395326849,), (1395326855,), (1395326861,), (1395326865,), (1395326878,), (1395326879,), (1395326880,), (1395326882,), (1395326887,), (1395326926,), (1395326930,), (1395326935,), (1395326973,), (1395326978,), (1395326982,), (1395326987,)) 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`=28736530 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','metal','Teint_Dans_La_Masse','Carton_gris','Carton_brun','environnement','kraft','papier','mal_croppe','flou','cartonnette')) 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`=28736530 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','metal','Teint_Dans_La_Masse','Carton_gris','Carton_brun','environnement','kraft','papier','mal_croppe','flou','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 28736530, 'sub_port_id': 28736575, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494032, 'last_updated_at': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 32)}, 'mal_croppe': {'main_port_id': 28736530, 'sub_port_id': 28736576, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494033, 'last_updated_at': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 32)}, 'cartonnette': {'main_port_id': 28736530, 'sub_port_id': 28736577, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494034, 'last_updated_at': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 32)}, 'Carton_brun': {'main_port_id': 28736530, 'sub_port_id': 28736578, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494035, 'last_updated_at': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 32)}, 'flou': {'main_port_id': 28736530, 'sub_port_id': 28736579, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494036, 'last_updated_at': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 32)}, 'autre_refus': {'main_port_id': 28736530, 'sub_port_id': 28736580, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494037, 'last_updated_at': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 32)}, 'Carton_gris': {'main_port_id': 28736530, 'sub_port_id': 28736581, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494038, 'last_updated_at': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 32)}, 'Teint_Dans_La_Masse': {'main_port_id': 28736530, 'sub_port_id': 28736582, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494039, 'last_updated_at': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 32)}, 'environnement': {'main_port_id': 28736530, 'sub_port_id': 28736583, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494040, 'last_updated_at': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 32)}, 'metal': {'main_port_id': 28736530, 'sub_port_id': 28736584, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494041, 'last_updated_at': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 32)}, 'plastique': {'main_port_id': 28736530, 'sub_port_id': 28736585, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494042, 'last_updated_at': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 3, 49, 32), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 32)}, 'kraft': {'main_port_id': 28736530, 'sub_port_id': 28736586, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19494043, 'last_updated_at': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 20, 4, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 20, 3, 49, 32)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28736575,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28736562 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28736576,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28736563 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28736577,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28736564 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28736578,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28736565 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28736579,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28736566 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28736580,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28736567 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28736581,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28736568 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28736582,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28736569 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28736583,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28736570 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28736584,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28736571 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28736585,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28736572 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28736586,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28736573 lien utilise dans velours : https://marlene.fotonower.com/velours/28736575,28736576,28736577,28736578,28736579,28736580,28736581,28736582,28736583,28736584,28736585,28736586?tags=papier,mal_croppe,cartonnette,Carton_brun,flou,autre_refus,Carton_gris,Teint_Dans_La_Masse,environnement,metal,plastique,kraft After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28736530]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1395326987, 1395326982, 1395326978, 1395326973] map_info['map_portfolio_photo'] : {28736530: [1395326987, 1395326982, 1395326978, 1395326973, 1395326935, 1395326930, 1395326926, 1395326887, 1395326882, 1395326880, 1395326879, 1395326878, 1395326865, 1395326861, 1395326855, 1395326849, 1395326848, 1395326847, 1395326841, 1395326837, 1395326831, 1395326821, 1395326818, 1395326816, 1395326791, 1395326787, 1395326785, 1395326784, 1395326779, 1395326760, 1395326756, 1395326753, 1395326749, 1395326747, 1395326745, 1395326726, 1395326720, 1395326715, 1395326711, 1395326709, 1395326690, 1395326686, 1395326682, 1395326679, 1395326677, 1395326675, 1395326642, 1395326639, 1395326637, 1395326635, 1395326628, 1395326624, 1395326619, 1395326615, 1395326613, 1395326611, 1395326596, 1395326594, 1395326590, 1395326588, 1395326587, 1395326586, 1395326555, 1395326551, 1395326549, 1395326548, 1395326547, 1395326475, 1395326474, 1395326473, 1395326460, 1395326457, 1395326453, 1395326451, 1395326450]} final : False mtd_id 4302 list_pids : [1395326987, 1395326982, 1395326978, 1395326973] Looping around the photos to save general results len do output : 1 /28736530. 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, '4082974') ('4302', '28736530', '1395326987', None, None, None, None, None, '4082974') ('4302', None, None, None, None, None, None, None, '4082974') ('4302', '28736530', '1395326982', None, None, None, None, None, '4082974') ('4302', None, None, None, None, None, None, None, '4082974') ('4302', '28736530', '1395326978', None, None, None, None, None, '4082974') ('4302', None, None, None, None, None, None, None, '4082974') ('4302', '28736530', '1395326973', None, None, None, None, None, '4082974') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 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, '28736530', "{'papier': 28736562, 'mal_croppe': 28736563, 'cartonnette': 28736564, 'Carton_brun': 28736565, 'flou': 28736566, 'autre_refus': 28736567, 'Carton_gris': 28736568, 'Teint_Dans_La_Masse': 28736569, 'environnement': 28736570, 'metal': 28736571, 'plastique': 28736572, 'kraft': 28736573}", None, None, None, None, '4082974'), ('4302', '28736530', '1395326987', None, None, None, None, None, '4082974'), ('4302', '28736530', '1395326982', None, None, None, None, None, '4082974'), ('4302', '28736530', '1395326978', None, None, None, None, None, '4082974'), ('4302', '28736530', '1395326973', None, None, None, None, None, '4082974')] time used for this insertion : 0.01600360870361328 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5196805000305176 time spend to save output : 0.016257524490356445 total time spend for step 1 : 1.535938024520874 step2:final Thu Nov 20 04:02: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 (28736530) 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 28736530 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1395326460,1395326457,1395326453,1395326451,1395326475,1395326450,1395326474,1395326473,1395326555,1395326551,1395326549,1395326548,1395326547,1395326596,1395326594,1395326590,1395326588,1395326587,1395326586,1395326628,1395326624,1395326619,1395326615,1395326613,1395326611,1395326642,1395326639,1395326637,1395326635,1395326690,1395326686,1395326682,1395326679,1395326677,1395326675,1395326726,1395326720,1395326715,1395326711,1395326709,1395326760,1395326756,1395326753,1395326749,1395326747,1395326745,1395326849,1395326791,1395326848,1395326787,1395326785,1395326847,1395326841,1395326784,1395326837,1395326779,1395326831,1395326821,1395326818,1395326816,1395326865,1395326861,1395326855,1395326887,1395326882,1395326880,1395326879,1395326878,1395326935,1395326930,1395326926,1395326987,1395326982,1395326978,1395326973); 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([28736530]) Inside saveOutput : final : False verbose : True original output for save of step final : {1395326987: ('0.019234555220049757',), 1395326982: ('0.019234555220049757',), 1395326978: ('0.019234555220049757',), 1395326973: ('0.019234555220049757',)} new output for save of step final : {1395326987: ('0.019234555220049757',), 1395326982: ('0.019234555220049757',), 1395326978: ('0.019234555220049757',), 1395326973: ('0.019234555220049757',)} [1395326987, 1395326982, 1395326978, 1395326973] map_info['map_portfolio_photo'] : {28736530: [1395326987, 1395326982, 1395326978, 1395326973, 1395326935, 1395326930, 1395326926, 1395326887, 1395326882, 1395326880, 1395326879, 1395326878, 1395326865, 1395326861, 1395326855, 1395326849, 1395326848, 1395326847, 1395326841, 1395326837, 1395326831, 1395326821, 1395326818, 1395326816, 1395326791, 1395326787, 1395326785, 1395326784, 1395326779, 1395326760, 1395326756, 1395326753, 1395326749, 1395326747, 1395326745, 1395326726, 1395326720, 1395326715, 1395326711, 1395326709, 1395326690, 1395326686, 1395326682, 1395326679, 1395326677, 1395326675, 1395326642, 1395326639, 1395326637, 1395326635, 1395326628, 1395326624, 1395326619, 1395326615, 1395326613, 1395326611, 1395326596, 1395326594, 1395326590, 1395326588, 1395326587, 1395326586, 1395326555, 1395326551, 1395326549, 1395326548, 1395326547, 1395326475, 1395326474, 1395326473, 1395326460, 1395326457, 1395326453, 1395326451, 1395326450]} final : False mtd_id 4302 list_pids : [1395326987, 1395326982, 1395326978, 1395326973] Looping around the photos to save general results len do output : 4 /1395326987.Didn't retrieve data . /1395326982.Didn't retrieve data . /1395326978.Didn't retrieve data . /1395326973.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, '4082974') ('4302', '28736530', '1395326987', None, None, None, None, None, '4082974') ('4302', None, None, None, None, None, None, None, '4082974') ('4302', '28736530', '1395326982', None, None, None, None, None, '4082974') ('4302', None, None, None, None, None, None, None, '4082974') ('4302', '28736530', '1395326978', None, None, None, None, None, '4082974') ('4302', None, None, None, None, None, None, None, '4082974') ('4302', '28736530', '1395326973', None, None, None, None, None, '4082974') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '28736530', '1395326987', '0.019234555220049757', None, None, None, None, '4082974'), ('4302', '28736530', '1395326982', '0.019234555220049757', None, None, None, None, '4082974'), ('4302', '28736530', '1395326978', '0.019234555220049757', None, None, None, None, '4082974'), ('4302', '28736530', '1395326973', '0.019234555220049757', None, None, None, None, '4082974')] time used for this insertion : 0.012644290924072266 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07051920890808105 time spend to save output : 0.012953519821166992 total time spend for step 2 : 0.08347272872924805 step3:velours_tree Thu Nov 20 04:02: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 : {28736530: [{'papier': 28736562, 'mal_croppe': 28736563, 'cartonnette': 28736564, 'Carton_brun': 28736565, 'flou': 28736566, 'autre_refus': 28736567, 'Carton_gris': 28736568, 'Teint_Dans_La_Masse': 28736569, 'environnement': 28736570, 'metal': 28736571, 'plastique': 28736572, 'kraft': 28736573}]} input_args_next_step : {28736530: ()} output_args : {28736530: [{'papier': 28736562, 'mal_croppe': 28736563, 'cartonnette': 28736564, 'Carton_brun': 28736565, 'flou': 28736566, 'autre_refus': 28736567, 'Carton_gris': 28736568, 'Teint_Dans_La_Masse': 28736569, 'environnement': 28736570, 'metal': 28736571, 'plastique': 28736572, 'kraft': 28736573}]} args : 28736530 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'papier': 28736562, 'mal_croppe': 28736563, 'cartonnette': 28736564, 'Carton_brun': 28736565, 'flou': 28736566, 'autre_refus': 28736567, 'Carton_gris': 28736568, 'Teint_Dans_La_Masse': 28736569, 'environnement': 28736570, 'metal': 28736571, 'plastique': 28736572, 'kraft': 28736573},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28736530) 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([28736530]) 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.2916598320007324 time spend to save output : 5.316734313964844e-05 total time spend for step 3 : 0.29171299934387207 step4:send_mail_cod Thu Nov 20 04:02: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 ! complete output_args for input 2 : {1395326987: ('0.019234555220049757',), 1395326982: ('0.019234555220049757',), 1395326978: ('0.019234555220049757',), 1395326973: ('0.019234555220049757',)} input_args_next_step : {1395326987: ()} output_args : {1395326987: ('0.019234555220049757',), 1395326982: ('0.019234555220049757',), 1395326978: ('0.019234555220049757',), 1395326973: ('0.019234555220049757',)} args : 1395326987 depend.output_id : 0 input_args_next_step : {1395326987: ('0.019234555220049757',), 1395326982: ()} output_args : {1395326987: ('0.019234555220049757',), 1395326982: ('0.019234555220049757',), 1395326978: ('0.019234555220049757',), 1395326973: ('0.019234555220049757',)} args : 1395326982 depend.output_id : 0 input_args_next_step : {1395326987: ('0.019234555220049757',), 1395326982: ('0.019234555220049757',), 1395326978: ()} output_args : {1395326987: ('0.019234555220049757',), 1395326982: ('0.019234555220049757',), 1395326978: ('0.019234555220049757',), 1395326973: ('0.019234555220049757',)} args : 1395326978 depend.output_id : 0 input_args_next_step : {1395326987: ('0.019234555220049757',), 1395326982: ('0.019234555220049757',), 1395326978: ('0.019234555220049757',), 1395326973: ()} output_args : {1395326987: ('0.019234555220049757',), 1395326982: ('0.019234555220049757',), 1395326978: ('0.019234555220049757',), 1395326973: ('0.019234555220049757',)} args : 1395326973 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 : {28736530: [{'papier': 28736562, 'mal_croppe': 28736563, 'cartonnette': 28736564, 'Carton_brun': 28736565, 'flou': 28736566, 'autre_refus': 28736567, 'Carton_gris': 28736568, 'Teint_Dans_La_Masse': 28736569, 'environnement': 28736570, 'metal': 28736571, 'plastique': 28736572, 'kraft': 28736573}]} input_args_next_step : {1395326987: ('0.019234555220049757',), 1395326982: ('0.019234555220049757',), 1395326978: ('0.019234555220049757',), 1395326973: ('0.019234555220049757',), 28736530: ()} output_args : {28736530: [{'papier': 28736562, 'mal_croppe': 28736563, 'cartonnette': 28736564, 'Carton_brun': 28736565, 'flou': 28736566, 'autre_refus': 28736567, 'Carton_gris': 28736568, 'Teint_Dans_La_Masse': 28736569, 'environnement': 28736570, 'metal': 28736571, 'plastique': 28736572, 'kraft': 28736573}]} args : 28736530 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 :5, first value : ('0.019234555220049757',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28736530) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos_view ph WHERE photo_id IN (1395326987,1395326982,1395326978,1395326973) Found this number of photos: 4 ##### Call download_photos : nb_thread : 5 begin to download photo : 1395326973 begin to download photo : 1395326978 begin to download photo : 1395326982 begin to download photo : 1395326987 download finish for photo 1395326973 download finish for photo 1395326982 download finish for photo 1395326987 download finish for photo 1395326978 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette287365631763607779/ length of list_filenames : 4 ; length of list_pids : 4 ; length of list_args : 4 results_Auto_P28736530_20-11-2025_04_02_59.pdf 28736563 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28736563 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette287365631763607779 28736564 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28736564 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1395326803: '1763607307_1970610_1395326635_1abbbd6118c9ad2ec52ec88509c802ca_rle_crop_4039717456_0.png', 1395326893: '1763607447_1977201_1395326679_3118f31d9b944cf401cb377c48544a4b_rle_crop_4039718025_0.png', 1395326910: '1763607506_1980053_1395326784_ecab14dac4bb73838d8d7f891fabb55e_rle_crop_4039718201_0.png', 1395326911: '1763607506_1980053_1395326779_5102adcd0e381f582e8c18809032fef4_rle_crop_4039718216_0.png', 1395326912: '1763607506_1980053_1395326779_5102adcd0e381f582e8c18809032fef4_rle_crop_4039718209_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/ac3c48f0b95f70adb813aaa00afcf214_99913057.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/90cd3965ea56a288605e73e5ac51b5d6_50012869.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/9cc2501053b4feaa610d9777fcdc1184_23028132.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/36ff4fc9576992743d368f3d3c8424ab_76657767.png change filename to text .imagette287365641763607779/ imagette287365641763607779/1763607506_1980053_1395326779_5102adcd0e381f582e8c18809032fef4_rle_crop_4039718216_0.png.png imagette287365641763607779/1763607447_1977201_1395326679_3118f31d9b944cf401cb377c48544a4b_rle_crop_4039718025_0.png.png imagette287365641763607779/1763607506_1980053_1395326784_ecab14dac4bb73838d8d7f891fabb55e_rle_crop_4039718201_0.png.png imagette287365641763607779/1763607307_1970610_1395326635_1abbbd6118c9ad2ec52ec88509c802ca_rle_crop_4039717456_0.png.png imagette287365641763607779/1763607506_1980053_1395326779_5102adcd0e381f582e8c18809032fef4_rle_crop_4039718209_0.png.png imagette287365661763607780/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/040b6430628700669ad352a1958d76ed_59734171.png imagette287365641763607779 28736566 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28736566 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette287365661763607780 28736567 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28736567 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1395326829: '1763607326_1971137_1395326624_de8c7f504268b62675007514a1eec7c1_rle_crop_4039717614_0.png', 1395326913: '1763607547_1982510_1395326791_30a02e88bf3216ce7cc80e6f6a9cc8e5_rle_crop_4039718333_0.png', 1395326914: '1763607547_1982510_1395326749_36a492772f7f6492c21a3404f6a49db9_rle_crop_4039718360_0.png', 1395326994: '1763607666_2040489_1395326861_26aa863caf7dc20a159e253caa6dfb99_rle_crop_4039718622_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/8e79d32c6ba934e0b173ff22e9e0d20c_71516673.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/6bb49cdc3f82025195841ed99817cd12_29144104.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/641b6fe52c3a195526feb1624a98b185_57553489.png change filename to text .imagette287365671763607780/ imagette287365671763607780/1763607547_1982510_1395326749_36a492772f7f6492c21a3404f6a49db9_rle_crop_4039718360_0.png.png imagette287365671763607780/1763607666_2040489_1395326861_26aa863caf7dc20a159e253caa6dfb99_rle_crop_4039718622_0.png.png imagette287365671763607780/1763607326_1971137_1395326624_de8c7f504268b62675007514a1eec7c1_rle_crop_4039717614_0.png.png imagette287365671763607780/1763607547_1982510_1395326791_30a02e88bf3216ce7cc80e6f6a9cc8e5_rle_crop_4039718333_0.png.png imagette287365711763607780/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/d4dbd09102f796a21f40b83928643da3_46066946.png imagette287365671763607780 28736571 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28736571 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette287365711763607780 28736572 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28736572 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1395326834: '1763607326_1971137_1395326624_de8c7f504268b62675007514a1eec7c1_rle_crop_4039717618_0.png'} change filename to text .imagette287365721763607780/ imagette287365721763607780/1763607326_1971137_1395326624_de8c7f504268b62675007514a1eec7c1_rle_crop_4039717618_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/81abd9c7d86d0b5480736e108f172f88_7143210.png imagette287365721763607780 28736573 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28736573 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1395326805: '1763607307_1970610_1395326635_1abbbd6118c9ad2ec52ec88509c802ca_rle_crop_4039717453_0.png'} change filename to text .imagette287365731763607780/ imagette287365731763607780/1763607307_1970610_1395326635_1abbbd6118c9ad2ec52ec88509c802ca_rle_crop_4039717453_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/69b9be0ad467306951acafc06b79a03f_49411759.png imagette287365731763607780 28736565 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28736565 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1395326832: '1763607326_1971137_1395326619_955719c997df7ce14cce33baced88372_rle_crop_4039717632_0.png', 1395326996: '1763607666_2040489_1395326861_26aa863caf7dc20a159e253caa6dfb99_rle_crop_4039718629_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/bfcd64e071e1f2b88dc17c2183c28ffd_84897342.png change filename to text .imagette287365651763607780/ imagette287365651763607780/1763607666_2040489_1395326861_26aa863caf7dc20a159e253caa6dfb99_rle_crop_4039718629_0.png.png imagette287365651763607780/1763607326_1971137_1395326619_955719c997df7ce14cce33baced88372_rle_crop_4039717632_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/ca3aedf6efa0a3380505ac80cfe16cc4_12048905.png imagette287365651763607780 28736568 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28736568 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1395326802: '1763607307_1970610_1395326635_1abbbd6118c9ad2ec52ec88509c802ca_rle_crop_4039717452_0.png', 1395326830: '1763607326_1971137_1395326613_b1eddf7b64f8e7d6957a59ff823b8212_rle_crop_4039717654_0.png', 1395326892: '1763607447_1977201_1395326677_9270ed089b829dee86e98a518dc92879_rle_crop_4039718036_0.png', 1395326915: '1763607547_1982510_1395326747_2753cdaecf881e178e6c3067c513992a_rle_crop_4039718371_0.png', 1395326916: '1763607547_1982510_1395326747_2753cdaecf881e178e6c3067c513992a_rle_crop_4039718372_0.png', 1395326917: '1763607547_1982510_1395326745_cccbcb14e6dddf45f57ab72e1bbfd350_rle_crop_4039718382_0.png', 1395326955: '1763607625_2025137_1395326879_305b7e6750c5c3d2bd401eafefedee34_rle_crop_4039718500_0.png', 1395326956: '1763607625_2025137_1395326878_9b6c40212f0abae6e6c08be589539f2f_rle_crop_4039718541_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/844001181ef343faf5e1c35bc13be791_78651539.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/df2f1d85e62f6b028b6450ebb4651d86_38912898.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/539a121c4ede8b3e117e3a3fa28b5781_95335494.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/84c7074afebf7bfdee165469e1f54d3b_91269362.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/8affe06cd4bc56f68b8ae70ac4d96e61_23562057.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/22295b2b2cad6487f1fafe771c302807_68854405.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/09a322825618cbd4dbc5c337e2fda4fc_40710596.png change filename to text .imagette287365681763607780/ imagette287365681763607780/1763607625_2025137_1395326879_305b7e6750c5c3d2bd401eafefedee34_rle_crop_4039718500_0.png.png imagette287365681763607780/1763607447_1977201_1395326677_9270ed089b829dee86e98a518dc92879_rle_crop_4039718036_0.png.png imagette287365681763607780/1763607547_1982510_1395326747_2753cdaecf881e178e6c3067c513992a_rle_crop_4039718371_0.png.png imagette287365681763607780/1763607625_2025137_1395326878_9b6c40212f0abae6e6c08be589539f2f_rle_crop_4039718541_0.png.png imagette287365681763607780/1763607307_1970610_1395326635_1abbbd6118c9ad2ec52ec88509c802ca_rle_crop_4039717452_0.png.png imagette287365681763607780/1763607547_1982510_1395326745_cccbcb14e6dddf45f57ab72e1bbfd350_rle_crop_4039718382_0.png.png imagette287365681763607780/1763607547_1982510_1395326747_2753cdaecf881e178e6c3067c513992a_rle_crop_4039718372_0.png.png imagette287365681763607780/1763607326_1971137_1395326613_b1eddf7b64f8e7d6957a59ff823b8212_rle_crop_4039717654_0.png.png wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/05da6bc8c13879507fe7c043af0b6f24_43582588.png imagette287365681763607780 28736569 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28736569 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1395326650: '1763607066_1962053_1395326547_6cd80632a9fbd433a9014cc9040de8bf_rle_crop_4039716670_0.png', 1395326799: '1763607307_1970610_1395326637_758c75add94b078be8aeb800b4c7eae9_rle_crop_4039717444_0.png', 1395326800: '1763607307_1970610_1395326637_758c75add94b078be8aeb800b4c7eae9_rle_crop_4039717446_0.png', 1395326801: '1763607307_1970610_1395326635_1abbbd6118c9ad2ec52ec88509c802ca_rle_crop_4039717458_0.png', 1395326823: '1763607326_1971137_1395326624_de8c7f504268b62675007514a1eec7c1_rle_crop_4039717616_0.png', 1395326824: '1763607326_1971137_1395326615_02f2c302653bf42fb766c9e619ef3fb1_rle_crop_4039717643_0.png', 1395326825: '1763607326_1971137_1395326615_02f2c302653bf42fb766c9e619ef3fb1_rle_crop_4039717641_0.png', 1395326827: '1763607326_1971137_1395326611_b477459ac6e5748439801137bf4b5430_rle_crop_4039717674_0.png', 1395326889: '1763607447_1977201_1395326686_0a2ffe4d9a8477ee9214f259e0b5b5d5_rle_crop_4039717999_0.png', 1395326890: '1763607447_1977201_1395326682_62bb6af792653ffbdfdff8e64ba5b7b0_rle_crop_4039718017_0.png', 1395326891: '1763607447_1977201_1395326677_9270ed089b829dee86e98a518dc92879_rle_crop_4039718042_0.png', 1395326909: '1763607506_1980053_1395326779_5102adcd0e381f582e8c18809032fef4_rle_crop_4039718211_0.png', 1395326954: '1763607625_2025137_1395326878_9b6c40212f0abae6e6c08be589539f2f_rle_crop_4039718544_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/c9413e09e3901b419b1228f1fe7b0ec8_23966208.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/1027a7be238a7b86bc07268b1cecd2d3_97567310.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/369a229c1b32135b4d168a551d9b2566_5630480.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/5785776c401b49478184a01da3198a35_11166831.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/29f937e40d02d99946fdeffde699aa8c_32777993.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/0ad8f3381a90ea9efa9eb8343fb675f4_45256586.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/46256ee7f8321f22e3182f02d422bedb_69965475.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/5ab253932d10dde01daeff701799ed4f_85180163.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/bf8a65ee3f0c23913e71f7cc3e5c7074_12382410.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/15daf38bcdea755e0007cbea8c3c0e04_83415529.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/d37069bb472001c0344c8955c1f225e5_98798821.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/aa6049e91c89c5a3926f085751d64b14_90801526.png change filename to text .imagette287365691763607781/ imagette287365691763607781/1763607307_1970610_1395326637_758c75add94b078be8aeb800b4c7eae9_rle_crop_4039717444_0.png.png imagette287365691763607781/1763607326_1971137_1395326624_de8c7f504268b62675007514a1eec7c1_rle_crop_4039717616_0.png.png imagette287365691763607781/1763607326_1971137_1395326611_b477459ac6e5748439801137bf4b5430_rle_crop_4039717674_0.png.png imagette287365691763607781/1763607066_1962053_1395326547_6cd80632a9fbd433a9014cc9040de8bf_rle_crop_4039716670_0.png.png imagette287365691763607781/1763607625_2025137_1395326878_9b6c40212f0abae6e6c08be589539f2f_rle_crop_4039718544_0.png.png imagette287365691763607781/1763607307_1970610_1395326637_758c75add94b078be8aeb800b4c7eae9_rle_crop_4039717446_0.png.png imagette287365691763607781/1763607447_1977201_1395326686_0a2ffe4d9a8477ee9214f259e0b5b5d5_rle_crop_4039717999_0.png.png imagette287365691763607781/1763607447_1977201_1395326682_62bb6af792653ffbdfdff8e64ba5b7b0_rle_crop_4039718017_0.png.png imagette287365691763607781/1763607447_1977201_1395326677_9270ed089b829dee86e98a518dc92879_rle_crop_4039718042_0.png.png imagette287365691763607781/1763607307_1970610_1395326635_1abbbd6118c9ad2ec52ec88509c802ca_rle_crop_4039717458_0.png.png imagette287365691763607781/1763607326_1971137_1395326615_02f2c302653bf42fb766c9e619ef3fb1_rle_crop_4039717643_0.png.png imagette287365691763607781/1763607326_1971137_1395326615_02f2c302653bf42fb766c9e619ef3fb1_rle_crop_4039717641_0.png.png imagette287365691763607781/1763607506_1980053_1395326779_5102adcd0e381f582e8c18809032fef4_rle_crop_4039718211_0.png.png wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/bd9e28f146ffa5fd0a8d5a327fcf86bb_80452974.png imagette287365691763607781 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=28736530 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/28736575,28736576,28736577,28736578,28736579,28736580,28736581,28736582,28736583,28736584,28736585,28736586?tags=papier,mal_croppe,cartonnette,Carton_brun,flou,autre_refus,Carton_gris,Teint_Dans_La_Masse,environnement,metal,plastique,kraft your option no_mail is active, we will not send the real mail to your client args[1395326987] : ('0.019234555220049757',) no score found for photo 1395326987 We are sending mail with results at report@fotonower.com args[1395326982] : ('0.019234555220049757',) no score found for photo 1395326982 We are sending mail with results at report@fotonower.com args[1395326978] : ('0.019234555220049757',) no score found for photo 1395326978 We are sending mail with results at report@fotonower.com args[1395326973] : ('0.019234555220049757',) no score found for photo 1395326973 We are sending mail with results at report@fotonower.com refus_total : 0.019234555220049757 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28736530 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_P28736530_20-11-2025_04_02_59.pdf results_Auto_P28736530_20-11-2025_04_02_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28736530_20-11-2025_04_02_59.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','28736530','results_Auto_P28736530_20-11-2025_04_02_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28736530_20-11-2025_04_02_59.pdf','pdf','','0.13','0.019234555220049757') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28736530]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1395326987, 1395326982, 1395326978, 1395326973] map_info['map_portfolio_photo'] : {28736530: [1395326987, 1395326982, 1395326978, 1395326973, 1395326935, 1395326930, 1395326926, 1395326887, 1395326882, 1395326880, 1395326879, 1395326878, 1395326865, 1395326861, 1395326855, 1395326849, 1395326848, 1395326847, 1395326841, 1395326837, 1395326831, 1395326821, 1395326818, 1395326816, 1395326791, 1395326787, 1395326785, 1395326784, 1395326779, 1395326760, 1395326756, 1395326753, 1395326749, 1395326747, 1395326745, 1395326726, 1395326720, 1395326715, 1395326711, 1395326709, 1395326690, 1395326686, 1395326682, 1395326679, 1395326677, 1395326675, 1395326642, 1395326639, 1395326637, 1395326635, 1395326628, 1395326624, 1395326619, 1395326615, 1395326613, 1395326611, 1395326596, 1395326594, 1395326590, 1395326588, 1395326587, 1395326586, 1395326555, 1395326551, 1395326549, 1395326548, 1395326547, 1395326475, 1395326474, 1395326473, 1395326460, 1395326457, 1395326453, 1395326451, 1395326450]} final : False mtd_id 4302 list_pids : [1395326987, 1395326982, 1395326978, 1395326973] 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, '4082974') ('4302', '28736530', '1395326987', None, None, None, None, None, '4082974') ('4302', None, None, None, None, None, None, None, '4082974') ('4302', '28736530', '1395326982', None, None, None, None, None, '4082974') ('4302', None, None, None, None, None, None, None, '4082974') ('4302', '28736530', '1395326978', None, None, None, None, None, '4082974') ('4302', None, None, None, None, None, None, None, '4082974') ('4302', '28736530', '1395326973', None, None, None, None, None, '4082974') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 4 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', '28736530', '1395326987', None, None, None, None, None, '4082974'), ('4302', '28736530', '1395326982', None, None, None, None, None, '4082974'), ('4302', '28736530', '1395326978', None, None, None, None, None, '4082974'), ('4302', '28736530', '1395326973', None, None, None, None, None, '4082974')] time used for this insertion : 0.012656688690185547 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.4952456951141357 time spend to save output : 0.012858867645263672 total time spend for step 4 : 3.5081045627593994 step5:split_time_score Thu Nov 20 04:03:03 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 : ['28736530'] 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 : [('28736530',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28736530) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1395326973: {'path': 'temp/1763607779_3097828_1395326973_c81946ad9345dc4cfe1c7374c2079521.jpg', 'extension': 'jpg'}, 1395326982: {'path': 'temp/1763607779_3097828_1395326982_ba091b3dd4fb3a01177dc405f5b6e753.jpg', 'extension': 'jpg'}, 1395326987: {'path': 'temp/1763607779_3097828_1395326987_3f0400b6e34ac99074180681e8f722a7.jpg', 'extension': 'jpg'}, 1395326978: {'path': 'temp/1763607779_3097828_1395326978_ddd4d6e81c4398b23b80d46a55e14e04.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 = 28736530; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm_bis',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 28736530 group by h (('03', 75),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28736530 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 (28736530) 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 (28736530) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 20112025 28736530 Nombre de photos uploadées : 75 / 23040 (0%) 20112025 28736530 Nombre de photos taguées (types de déchets): 0 / 75 (0%) 20112025 28736530 Nombre de photos taguées (volume) : 0 / 75 (0%) [{'photo_id': 1395326460, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/02c53541206e398c6dac83e20164f9f4.jpg', 'username': None, 'uploaded_at': 1763606772, 'text': 'image_20112025_03_45_04_10137.jpg'}, {'photo_id': 1395326457, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/f00d73f42eb49afb65bbf6cfa0c86715.jpg', 'username': None, 'uploaded_at': 1763606772, 'text': 'image_20112025_03_45_13_9125.jpg'}, {'photo_id': 1395326453, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/e00dc53c296acccb60bbb51e71f1100d.jpg', 'username': None, 'uploaded_at': 1763606772, 'text': 'image_20112025_03_45_23_10134.jpg'}, {'photo_id': 1395326451, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/20/788e48f54fa16abc5538a29aceb19fc3.jpg', 'username': None, 'uploaded_at': 1763606772, 'text': 'image_20112025_03_45_34_10134.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 5.245208740234375e-06 ??????????????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.004023551940917969 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 28736530, '2025-11-20' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-11-20' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2614335,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.20556020736694336 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= 2614335 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2614335, 'dashboard_run_id': 2622229, 'mtr_portfolio_id': 28729285, 'dashboard_result_id': 17536470, '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_P28729285_20-11-2025_00_18_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28729288, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28729289, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28729290, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28729291, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28729292, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28729293, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28729294, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28729295, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28729296, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28729297, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28729298, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28729299, 'pht': 3726}}"}, {'dashboat_entry_day': 2614335, 'dashboard_run_id': 2622229, 'mtr_portfolio_id': 28729878, 'dashboard_result_id': 17536471, '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_P28729878_20-11-2025_00_32_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28729884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28729885, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28729886, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28729887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28729888, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28729889, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28729890, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28729891, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28729892, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28729893, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28729894, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28729895, 'pht': 3726}}"}, {'dashboat_entry_day': 2614335, 'dashboard_run_id': 2622229, 'mtr_portfolio_id': 28730454, 'dashboard_result_id': 17536472, '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_P28730454_20-11-2025_00_49_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28730533, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28730534, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28730535, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28730536, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28730537, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28730538, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28730539, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28730540, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28730541, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28730542, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28730543, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28730544, 'pht': 3726}}"}, {'dashboat_entry_day': 2614335, 'dashboard_run_id': 2622229, 'mtr_portfolio_id': 28730956, 'dashboard_result_id': 17536473, '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_P28730956_20-11-2025_01_03_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28730988, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28730989, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28730990, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28730991, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28730993, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28730994, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28730995, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28730996, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28730997, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28730998, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28730999, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28731000, 'pht': 3726}}"}, {'dashboat_entry_day': 2614335, 'dashboard_run_id': 2622229, 'mtr_portfolio_id': 28732283, 'dashboard_result_id': 17536474, '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_P28732283_20-11-2025_01_48_56.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28732315, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28732316, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28732317, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28732318, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28732319, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28732320, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28732321, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28732322, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28732323, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28732324, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28732325, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28732326, 'pht': 3726}}"}, {'dashboat_entry_day': 2614335, 'dashboard_run_id': 2622229, 'mtr_portfolio_id': 28732606, 'dashboard_result_id': 17536475, '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_P28732606_20-11-2025_02_05_28.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28732662, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28732663, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28732664, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28732665, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28732666, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28732668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28732669, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28732670, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28732671, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28732672, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28732673, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28732674, 'pht': 3726}}"}, {'dashboat_entry_day': 2614335, 'dashboard_run_id': 2622229, 'mtr_portfolio_id': 28732937, 'dashboard_result_id': 17536476, '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_P28732937_20-11-2025_02_20_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28732958, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28732959, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28732960, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28732961, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28732962, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28732963, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28732964, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28732965, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28732966, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28732967, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28732968, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28732969, 'pht': 3726}}"}, {'dashboat_entry_day': 2614335, 'dashboard_run_id': 2622229, 'mtr_portfolio_id': 28733416, 'dashboard_result_id': 17536477, '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_P28733416_20-11-2025_02_32_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28733425, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28733426, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28733427, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28733428, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28733429, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28733430, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28733431, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28733432, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28733433, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28733434, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28733435, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28733436, 'pht': 3726}}"}, {'dashboat_entry_day': 2614335, 'dashboard_run_id': 2622229, 'mtr_portfolio_id': 28733691, 'dashboard_result_id': 17536478, '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_P28733691_20-11-2025_02_48_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28733748, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28733749, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28733750, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28733751, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28733752, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28733753, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28733754, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28733755, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28733756, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28733757, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28733758, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28733759, 'pht': 3726}}"}, {'dashboat_entry_day': 2614335, 'dashboard_run_id': 2622229, 'mtr_portfolio_id': 28734257, 'dashboard_result_id': 17536479, '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_P28734257_20-11-2025_03_03_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28734266, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28734267, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28734268, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28734269, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28734270, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28734271, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28734272, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28734273, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28734274, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28734275, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28734276, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28734277, 'pht': 3726}}"}, {'dashboat_entry_day': 2614335, 'dashboard_run_id': 2622229, 'mtr_portfolio_id': 28734699, 'dashboard_result_id': 17536480, '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_P28734699_20-11-2025_03_18_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28734741, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28734742, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28734743, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28734744, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28734745, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28734746, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28734747, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28734748, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28734749, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28734750, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28734751, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28734752, 'pht': 3726}}"}, {'dashboat_entry_day': 2614335, 'dashboard_run_id': 2622229, 'mtr_portfolio_id': 28735407, 'dashboard_result_id': 17536481, '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_P28735407_20-11-2025_03_33_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28735440, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28735441, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28735442, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28735443, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28735444, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28735445, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28735446, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28735447, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28735448, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28735449, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28735450, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28735451, 'pht': 3726}}"}, {'dashboat_entry_day': 2614335, 'dashboard_run_id': 2622229, 'mtr_portfolio_id': 28735955, 'dashboard_result_id': 17536482, '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_P28735955_20-11-2025_03_48_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28735965, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28735966, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28735967, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28735968, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28735969, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28735970, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28735971, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28735972, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28735973, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28735974, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28735975, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28735976, 'pht': 3726}}"}, {'dashboat_entry_day': 2614335, 'dashboard_run_id': 2622229, 'mtr_portfolio_id': 28736530, 'dashboard_result_id': 17536483, '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_P28736530_20-11-2025_04_01_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28736562, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28736563, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28736564, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28736565, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28736566, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28736567, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28736568, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28736569, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28736570, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28736571, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28736572, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28736573, '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 = 28729285 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': 4081488, 'mtr_portfolio_id': 28729285, 'created_at': datetime.datetime(2025, 11, 20, 0, 18, 57), 'result': '0.06018919747618155', 'result_long': None, 'result_double': None}] Qualite : 0.06018919747618155 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28729285 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28729285_20-11-2025_00_18_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28729285 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_P28729285_20-11-2025_00_18_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28729288, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28729289, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28729290, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28729291, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28729292, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28729293, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28729294, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28729295, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28729296, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28729297, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28729298, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28729299, 'pht': 3726}}" where mtr_portfolio_id = 28729285 and dashboard_run_id = 2622229 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`=28729285 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17536470, 0.06018919747618155, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28729285_20-11-2025_00_18_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28729288, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28729289, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28729290, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28729291, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28729292, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28729293, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28729294, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28729295, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28729296, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28729297, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28729298, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28729299, '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 = 28729878 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': 4081529, 'mtr_portfolio_id': 28729878, 'created_at': datetime.datetime(2025, 11, 20, 0, 32, 58), 'result': '0.04051146822833891', 'result_long': None, 'result_double': None}] Qualite : 0.04051146822833891 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28729878 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28729878_20-11-2025_00_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28729878 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_P28729878_20-11-2025_00_32_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28729884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28729885, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28729886, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28729887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28729888, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28729889, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28729890, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28729891, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28729892, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28729893, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28729894, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28729895, 'pht': 3726}}" where mtr_portfolio_id = 28729878 and dashboard_run_id = 2622229 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`=28729878 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17536471, 0.04051146822833891, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28729878_20-11-2025_00_32_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28729884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28729885, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28729886, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28729887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28729888, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28729889, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28729890, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28729891, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28729892, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28729893, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28729894, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28729895, '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 = 28730454 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': 4081574, 'mtr_portfolio_id': 28730454, 'created_at': datetime.datetime(2025, 11, 20, 0, 49), 'result': '0.04475459129995709', 'result_long': None, 'result_double': None}] Qualite : 0.04475459129995709 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28730454 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28730454_20-11-2025_00_49_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28730454 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_P28730454_20-11-2025_00_49_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28730533, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28730534, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28730535, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28730536, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28730537, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28730538, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28730539, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28730540, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28730541, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28730542, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28730543, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28730544, 'pht': 3726}}" where mtr_portfolio_id = 28730454 and dashboard_run_id = 2622229 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`=28730454 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17536472, 0.04475459129995709, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28730454_20-11-2025_00_49_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28730533, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28730534, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28730535, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28730536, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28730537, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28730538, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28730539, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28730540, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28730541, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28730542, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28730543, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28730544, '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 = 28730956 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': 4081640, 'mtr_portfolio_id': 28730956, 'created_at': datetime.datetime(2025, 11, 20, 1, 2, 59), 'result': '0.027023236537056385', 'result_long': None, 'result_double': None}] Qualite : 0.027023236537056385 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28730956 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28730956_20-11-2025_01_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28730956 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_P28730956_20-11-2025_01_03_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28730988, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28730989, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28730990, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28730991, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28730993, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28730994, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28730995, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28730996, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28730997, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28730998, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28730999, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28731000, 'pht': 3726}}" where mtr_portfolio_id = 28730956 and dashboard_run_id = 2622229 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`=28730956 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17536473, 0.027023236537056385, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28730956_20-11-2025_01_03_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28730988, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28730989, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28730990, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28730991, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28730993, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28730994, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28730995, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28730996, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28730997, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28730998, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28730999, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28731000, '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 = 28732283 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': 4081894, 'mtr_portfolio_id': 28732283, 'created_at': datetime.datetime(2025, 11, 20, 1, 48, 56), 'result': '0.07992042718145526', 'result_long': None, 'result_double': None}] Qualite : 0.07992042718145526 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28732283 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28732283_20-11-2025_01_48_56.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28732283 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_P28732283_20-11-2025_01_48_56.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28732315, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28732316, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28732317, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28732318, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28732319, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28732320, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28732321, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28732322, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28732323, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28732324, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28732325, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28732326, 'pht': 3726}}" where mtr_portfolio_id = 28732283 and dashboard_run_id = 2622229 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`=28732283 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17536474, 0.07992042718145526, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28732283_20-11-2025_01_48_56.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28732315, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28732316, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28732317, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28732318, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28732319, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28732320, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28732321, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28732322, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28732323, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28732324, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28732325, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28732326, '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 = 28732606 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': 4081994, 'mtr_portfolio_id': 28732606, 'created_at': datetime.datetime(2025, 11, 20, 2, 5, 28), 'result': '0.036481154832629', 'result_long': None, 'result_double': None}] Qualite : 0.036481154832629 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28732606 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28732606_20-11-2025_02_05_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28732606 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_P28732606_20-11-2025_02_05_28.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28732662, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28732663, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28732664, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28732665, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28732666, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28732668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28732669, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28732670, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28732671, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28732672, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28732673, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28732674, 'pht': 3726}}" where mtr_portfolio_id = 28732606 and dashboard_run_id = 2622229 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`=28732606 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17536475, 0.036481154832629, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28732606_20-11-2025_02_05_28.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28732662, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28732663, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28732664, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28732665, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28732666, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28732668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28732669, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28732670, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28732671, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28732672, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28732673, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28732674, '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 = 28732937 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': 4082063, 'mtr_portfolio_id': 28732937, 'created_at': datetime.datetime(2025, 11, 20, 2, 20, 58), 'result': '0.049876742948835866', 'result_long': None, 'result_double': None}] Qualite : 0.049876742948835866 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28732937 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28732937_20-11-2025_02_20_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28732937 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_P28732937_20-11-2025_02_20_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28732958, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28732959, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28732960, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28732961, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28732962, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28732963, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28732964, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28732965, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28732966, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28732967, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28732968, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28732969, 'pht': 3726}}" where mtr_portfolio_id = 28732937 and dashboard_run_id = 2622229 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`=28732937 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17536476, 0.049876742948835866, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28732937_20-11-2025_02_20_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28732958, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28732959, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28732960, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28732961, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28732962, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28732963, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28732964, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28732965, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28732966, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28732967, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28732968, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28732969, '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 = 28733416 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': 4082143, 'mtr_portfolio_id': 28733416, 'created_at': datetime.datetime(2025, 11, 20, 2, 32, 57), 'result': '0.04565736205502317', 'result_long': None, 'result_double': None}] Qualite : 0.04565736205502317 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28733416 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28733416_20-11-2025_02_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28733416 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_P28733416_20-11-2025_02_32_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28733425, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28733426, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28733427, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28733428, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28733429, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28733430, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28733431, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28733432, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28733433, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28733434, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28733435, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28733436, 'pht': 3726}}" where mtr_portfolio_id = 28733416 and dashboard_run_id = 2622229 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`=28733416 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17536477, 0.04565736205502317, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28733416_20-11-2025_02_32_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28733425, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28733426, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28733427, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28733428, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28733429, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28733430, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28733431, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28733432, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28733433, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28733434, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28733435, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28733436, '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 = 28733691 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': 4082258, 'mtr_portfolio_id': 28733691, 'created_at': datetime.datetime(2025, 11, 20, 2, 48, 58), 'result': '0.058293275104193513', 'result_long': None, 'result_double': None}] Qualite : 0.058293275104193513 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28733691 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28733691_20-11-2025_02_48_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28733691 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_P28733691_20-11-2025_02_48_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28733748, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28733749, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28733750, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28733751, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28733752, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28733753, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28733754, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28733755, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28733756, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28733757, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28733758, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28733759, 'pht': 3726}}" where mtr_portfolio_id = 28733691 and dashboard_run_id = 2622229 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`=28733691 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17536478, 0.058293275104193513, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28733691_20-11-2025_02_48_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28733748, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28733749, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28733750, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28733751, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28733752, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28733753, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28733754, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28733755, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28733756, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28733757, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28733758, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28733759, '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 = 28734257 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': 4082387, 'mtr_portfolio_id': 28734257, 'created_at': datetime.datetime(2025, 11, 20, 3, 3, 1), 'result': '0.058986075072236986', 'result_long': None, 'result_double': None}] Qualite : 0.058986075072236986 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28734257 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28734257_20-11-2025_03_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28734257 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_P28734257_20-11-2025_03_03_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28734266, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28734267, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28734268, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28734269, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28734270, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28734271, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28734272, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28734273, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28734274, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28734275, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28734276, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28734277, 'pht': 3726}}" where mtr_portfolio_id = 28734257 and dashboard_run_id = 2622229 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`=28734257 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17536479, 0.058986075072236986, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28734257_20-11-2025_03_03_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28734266, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28734267, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28734268, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28734269, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28734270, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28734271, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28734272, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28734273, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28734274, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28734275, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28734276, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28734277, '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 = 28734699 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': 4082522, 'mtr_portfolio_id': 28734699, 'created_at': datetime.datetime(2025, 11, 20, 3, 18, 58), 'result': '0.03534103104186391', 'result_long': None, 'result_double': None}] Qualite : 0.03534103104186391 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28734699 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28734699_20-11-2025_03_18_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28734699 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_P28734699_20-11-2025_03_18_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28734741, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28734742, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28734743, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28734744, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28734745, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28734746, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28734747, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28734748, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28734749, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28734750, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28734751, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28734752, 'pht': 3726}}" where mtr_portfolio_id = 28734699 and dashboard_run_id = 2622229 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`=28734699 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17536480, 0.03534103104186391, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28734699_20-11-2025_03_18_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28734741, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28734742, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28734743, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28734744, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28734745, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28734746, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28734747, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28734748, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28734749, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28734750, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28734751, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28734752, '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 = 28735407 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': 4082672, 'mtr_portfolio_id': 28735407, 'created_at': datetime.datetime(2025, 11, 20, 3, 32, 59), 'result': '0.058841551007709846', 'result_long': None, 'result_double': None}] Qualite : 0.058841551007709846 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28735407 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28735407_20-11-2025_03_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28735407 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_P28735407_20-11-2025_03_33_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28735440, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28735441, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28735442, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28735443, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28735444, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28735445, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28735446, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28735447, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28735448, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28735449, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28735450, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28735451, 'pht': 3726}}" where mtr_portfolio_id = 28735407 and dashboard_run_id = 2622226 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`=28735407 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17536481, 0.058841551007709846, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28735407_20-11-2025_03_33_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28735440, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28735441, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28735442, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28735443, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28735444, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28735445, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28735446, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28735447, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28735448, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28735449, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28735450, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28735451, '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 = 28735955 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': 4082810, 'mtr_portfolio_id': 28735955, 'created_at': datetime.datetime(2025, 11, 20, 3, 48, 59), 'result': '0.04249680937951728', 'result_long': None, 'result_double': None}] Qualite : 0.04249680937951728 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28735955 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28735955_20-11-2025_03_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28735955 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_P28735955_20-11-2025_03_48_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28735965, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28735966, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28735967, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28735968, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28735969, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28735970, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28735971, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28735972, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28735973, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28735974, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28735975, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28735976, 'pht': 3726}}" where mtr_portfolio_id = 28735955 and dashboard_run_id = 2622226 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`=28735955 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17536482, 0.04249680937951728, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28735955_20-11-2025_03_48_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28735965, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28735966, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28735967, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28735968, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28735969, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28735970, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28735971, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28735972, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28735973, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28735974, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28735975, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28735976, '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 = 28736530 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': 4082974, 'mtr_portfolio_id': 28736530, 'created_at': datetime.datetime(2025, 11, 20, 4, 2, 59), 'result': '0.019234555220049757', 'result_long': None, 'result_double': None}] Qualite : 0.019234555220049757 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28736530 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28736530_20-11-2025_04_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28736530 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_P28736530_20-11-2025_04_02_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28736562, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28736563, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28736564, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28736565, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28736566, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28736567, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28736568, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28736569, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28736570, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28736571, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28736572, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28736573, 'pht': 3726}}" where mtr_portfolio_id = 28736530 and dashboard_run_id = 2622226 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`=28736530 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17536483, 0.019234555220049757, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28736530_20-11-2025_04_02_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28736562, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28736563, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28736564, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28736565, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28736566, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28736567, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28736568, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28736569, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28736570, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28736571, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28736572, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28736573, '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 (28729285,28729878,28730454,28730956,28732283,28732606,28732937,28733416,28733691,28734257,28734699,28735407,28735955,28736530) result : ((1395288892,), (1395288983,), (1395289751,), (1395289782,), (1395290131,), (1395290203,), (1395290270,), (1395290334,), (1395290691,), (1395290703,), (1395290705,), (1395290709,), (1395290712,), (1395290716,), (1395290731,), (1395290732,), (1395290760,), (1395290762,), (1395290765,), (1395290769,), (1395290772,), (1395290774,), (1395290819,), (1395290854,), (1395290898,), (1395291313,), (1395291346,), (1395291664,), (1395291671,), (1395291777,), (1395291779,), (1395291781,), (1395291784,), (1395292498,), (1395292500,), (1395292501,), (1395292777,), (1395292780,), (1395292782,), (1395292797,), (1395292799,), (1395292800,), (1395292803,), (1395292806,), (1395292825,), (1395292826,), (1395292827,), (1395292830,), (1395292851,), (1395292853,), (1395292856,), (1395292860,), (1395293706,), (1395293718,), (1395293722,), (1395293857,), (1395293891,), (1395293645,), (1395293696,), (1395293699,), (1395294062,), (1395294092,), (1395294124,), (1395294155,), (1395294572,), (1395294705,), (1395294861,), (1395295001,), (1395295144,), (1395295572,), (1395295574,), (1395295575,), (1395295601,), (1395295636,), (1395296088,), (1395296144,), (1395296177,), (1395296210,), (1395296252,), (1395296660,), (1395296674,), (1395296855,), (1395296889,), (1395296901,), (1395296904,), (1395296937,), (1395296952,), (1395296970,), (1395297005,), (1395297042,), (1395297080,), (1395297120,), (1395297485,), (1395297520,), (1395297560,), (1395297595,), (1395297961,), (1395297996,), (1395298047,), (1395298081,), (1395298622,), (1395298685,), (1395298748,), (1395298814,), (1395298881,), (1395298946,), (1395299017,), (1395299127,), (1395299135,), (1395299153,), (1395299186,), (1395300313,), (1395300346,), (1395300358,), (1395300366,), (1395300674,), (1395300709,), (1395300790,), (1395300875,), (1395300967,), (1395301065,), (1395301540,), (1395301574,), (1395301767,), (1395301798,), (1395301931,), (1395301632,), (1395301665,), (1395301699,), (1395301733,), (1395302054,), (1395302086,), (1395302117,), (1395302149,), (1395302184,), (1395302356,), (1395302359,), (1395302363,), (1395302377,), (1395302642,), (1395302701,), (1395303197,), (1395303228,), (1395303262,), (1395303296,), (1395303328,), (1395303535,), (1395303566,), (1395303599,), (1395303615,), (1395303624,), (1395303639,), (1395303683,), (1395303685,), (1395303690,), (1395303691,), (1395303692,), (1395304106,), (1395304141,), (1395304175,), (1395304216,), (1395304251,), (1395304286,), (1395304326,), (1395304358,), (1395304388,), (1395304428,), (1395304467,), (1395304601,), (1395304603,), (1395304622,), (1395304638,), (1395304659,), (1395304881,), (1395304909,), (1395304939,), (1395304970,), (1395304999,), (1395305150,), (1395305181,), (1395305213,), (1395305244,), (1395305278,), (1395305522,), (1395305523,), (1395305524,), (1395305976,), (1395306070,), (1395306183,), (1395306309,), (1395306876,), (1395306877,), (1395306879,), (1395306883,), (1395306886,), (1395306941,), (1395307170,), (1395307364,), (1395307277,), (1395307342,), (1395307356,), (1395307360,), (1395307374,), (1395307375,), (1395307376,), (1395307395,), (1395307396,), (1395307397,), (1395307725,), (1395307815,), (1395307922,), (1395308259,), (1395308286,), (1395308287,), (1395308288,), (1395308378,), (1395308412,), (1395308446,), (1395308770,), (1395308782,), (1395308811,), (1395308842,), (1395308943,), (1395308944,), (1395308945,), (1395308947,), (1395308966,), (1395308967,), (1395308983,), (1395308985,), (1395308987,), (1395308999,), (1395309002,), (1395309004,), (1395309008,), (1395309011,), (1395309014,), (1395309021,), (1395309023,), (1395309025,), (1395309026,), (1395309027,), (1395309028,), (1395309031,), (1395309045,), (1395309046,), (1395309047,), (1395309074,), (1395309078,), (1395309371,), (1395313362,), (1395313364,), (1395313365,), (1395313384,), (1395313386,), (1395313388,), (1395313391,), (1395313443,), (1395313446,), (1395313448,), (1395313450,), (1395313452,), (1395313475,), (1395313476,), (1395313478,), (1395313482,), (1395313486,), (1395313490,), (1395313497,), (1395313500,), (1395313503,), (1395313505,), (1395313607,), (1395313610,), (1395313611,), (1395313612,), (1395313631,), (1395313633,), (1395313635,), (1395313638,), (1395313642,), (1395313669,), (1395313671,), (1395313673,), (1395313675,), (1395313697,), (1395313699,), (1395313734,), (1395313739,), (1395313742,), (1395313756,), (1395313777,), (1395313779,), (1395313781,), (1395313783,), (1395313804,), (1395313805,), (1395313806,), (1395313809,), (1395313811,), (1395313828,), (1395313830,), (1395313832,), (1395313871,), (1395313901,), (1395313932,), (1395313961,), (1395313856,), (1395313857,), (1395313860,), (1395313865,), (1395313869,), (1395314100,), (1395314130,), (1395314162,), (1395314196,), (1395314230,), (1395314550,), (1395314582,), (1395314611,), (1395314641,), (1395314774,), (1395314806,), (1395314837,), (1395314865,), (1395314873,), (1395314998,), (1395314999,), (1395315000,), (1395315003,), (1395315008,), (1395315010,), (1395315020,), (1395315023,), (1395315043,), (1395315045,), (1395315047,), (1395315051,), (1395315076,), (1395315077,), (1395315078,), (1395315080,), (1395315084,), (1395315103,), (1395315104,), (1395315106,), (1395315108,), (1395315112,), (1395315132,), (1395315133,), (1395315135,), (1395315139,), (1395315142,), (1395315170,), (1395315172,), (1395315176,), (1395315180,), (1395315183,), (1395315185,), (1395315191,), (1395315195,), (1395315196,), (1395315199,), (1395315203,), (1395315218,), (1395315219,), (1395315220,), (1395315222,), (1395315224,), (1395315228,), (1395315239,), (1395315243,), (1395315248,), (1395315251,), (1395315258,), (1395315269,), (1395315271,), (1395315274,), (1395315278,), (1395315309,), (1395315310,), (1395315311,), (1395315340,), (1395315342,), (1395315300,), (1395315304,), (1395315307,), (1395315312,), (1395315314,), (1395315319,), (1395315323,), (1395315327,), (1395315330,), (1395315351,), (1395315353,), (1395315356,), (1395315377,), (1395315380,), (1395315383,), (1395315386,), (1395315389,), (1395315403,), (1395315404,), (1395315405,), (1395315407,), (1395315408,), (1395315412,), (1395315435,), (1395315436,), (1395315439,), (1395315443,), (1395315447,), (1395315450,), (1395315474,), (1395315476,), (1395315478,), (1395315479,), (1395315480,), (1395315481,), (1395315483,), (1395315487,), (1395315508,), (1395315510,), (1395315512,), (1395315533,), (1395315534,), (1395315535,), (1395315538,), (1395315567,), (1395315569,), (1395315572,), (1395315576,), (1395315587,), (1395315612,), (1395315614,), (1395315615,), (1395315618,), (1395315620,), (1395315641,), (1395315644,), (1395315646,), (1395315649,), (1395315654,), (1395315659,), (1395315669,), (1395315670,), (1395315671,), (1395315695,), (1395315697,), (1395315699,), (1395315702,), (1395315706,), (1395315710,), (1395315740,), (1395315742,), (1395315746,), (1395315752,), (1395315757,), (1395315789,), (1395315792,), (1395315859,), (1395315899,), (1395315935,), (1395315965,), (1395315993,), (1395316192,), (1395316197,), (1395315775,), (1395315777,), (1395315781,), (1395315785,), (1395315802,), (1395315806,), (1395315809,), (1395315811,), (1395315813,), (1395315815,), (1395315829,), (1395316121,), (1395316123,), (1395316155,), (1395316158,), (1395316180,), (1395316181,), (1395316184,), (1395316185,), (1395316188,), (1395316189,), (1395316269,), (1395316298,), (1395316300,), (1395316323,), (1395316326,), (1395316331,), (1395316355,), (1395316356,), (1395316357,), (1395316360,), (1395316365,), (1395316368,), (1395316388,), (1395316396,), (1395316399,), (1395316402,), (1395316422,), (1395316423,), (1395316424,), (1395316450,), (1395316457,), (1395316459,), (1395316463,), (1395316467,), (1395316482,), (1395316483,), (1395316484,), (1395316487,), (1395316516,), (1395316518,), (1395316520,), (1395316524,), (1395316528,), (1395316548,), (1395316550,), (1395316553,), (1395316557,), (1395316561,), (1395316563,), (1395316569,), (1395316571,), (1395316573,), (1395316575,), (1395316576,), (1395316579,), (1395316582,), (1395316587,), (1395316597,), (1395316644,), (1395316646,), (1395316702,), (1395316703,), (1395316704,), (1395316705,), (1395316707,), (1395316735,), (1395316738,), (1395316741,), (1395316744,), (1395316746,), (1395316749,), (1395316775,), (1395316780,), (1395316786,), (1395316796,), (1395316811,), (1395316814,), (1395316815,), (1395316772,), (1395316773,), (1395316817,), (1395316819,), (1395316854,), (1395316859,), (1395316861,), (1395316863,), (1395316880,), (1395316882,), (1395316884,), (1395316904,), (1395316905,), (1395316906,), (1395316911,), (1395316933,), (1395316934,), (1395316936,), (1395316940,), (1395316944,), (1395316952,), (1395316971,), (1395316972,), (1395316973,), (1395316976,), (1395316978,), (1395317001,), (1395317003,), (1395317005,), (1395317008,), (1395317027,), (1395317029,), (1395317033,), (1395317051,), (1395317052,), (1395317053,), (1395317079,), (1395317080,), (1395317081,), (1395317084,), (1395317100,), (1395317102,), (1395317104,), (1395317136,), (1395317137,), (1395317138,), (1395317140,), (1395317174,), (1395317175,), (1395317177,), (1395317198,), (1395317199,), (1395317201,), (1395317237,), (1395317241,), (1395317242,), (1395317252,), (1395317229,), (1395317230,), (1395317233,), (1395317258,), (1395317260,), (1395317262,), (1395317265,), (1395317286,), (1395317288,), (1395317291,), (1395317310,), (1395317311,), (1395317312,), (1395317314,), (1395317318,), (1395317320,), (1395317462,), (1395317492,), (1395317523,), (1395317554,), (1395317587,), (1395317872,), (1395317874,), (1395317891,), (1395317892,), (1395317893,), (1395317895,), (1395317908,), (1395317910,), (1395317912,), (1395317915,), (1395317919,), (1395317934,), (1395317935,), (1395317936,), (1395317939,), (1395317943,), (1395317945,), (1395318376,), (1395318442,), (1395318503,), (1395318552,), (1395318746,), (1395318750,), (1395318754,), (1395318781,), (1395318812,), (1395318820,), (1395318869,), (1395318883,), (1395318884,), (1395318887,), (1395318889,), (1395318892,), (1395318911,), (1395318950,), (1395319131,), (1395319162,), (1395319168,), (1395319185,), (1395319253,), (1395319255,), (1395319258,), (1395319271,), (1395319275,), (1395319277,), (1395319279,), (1395319307,), (1395319296,), (1395319298,), (1395319299,), (1395319303,), (1395319325,), (1395319327,), (1395319329,), (1395319535,), (1395319566,), (1395319597,), (1395319628,), (1395319659,), (1395319694,), (1395320287,), (1395320345,), (1395320998,), (1395321030,), (1395321431,), (1395321487,), (1395321522,), (1395321555,), (1395321589,), (1395321632,), (1395321883,), (1395321884,), (1395321886,), (1395321889,), (1395322163,), (1395322164,), (1395322165,), (1395322172,), (1395322185,), (1395322205,), (1395322207,), (1395322209,), (1395322245,), (1395322250,), (1395322253,), (1395322256,), (1395322259,), (1395322283,), (1395322286,), (1395322291,), (1395322296,), (1395322301,), (1395322304,), (1395322316,), (1395322318,), (1395322320,), (1395322324,), (1395322329,), (1395322363,), (1395322364,), (1395322365,), (1395322368,), (1395322373,), (1395322391,), (1395322393,), (1395322395,), (1395322399,), (1395322425,), (1395322427,), (1395322430,), (1395322433,), (1395322436,), (1395322440,), (1395322476,), (1395322559,), (1395322592,), (1395322622,), (1395322653,), (1395322684,), (1395322715,), (1395322462,), (1395322463,), (1395322465,), (1395322468,), (1395322472,), (1395322840,), (1395322876,), (1395322910,), (1395322948,), (1395322979,), (1395323213,), (1395323241,), (1395323439,), (1395323470,), (1395323500,), (1395323533,), (1395323655,), (1395323656,), (1395323657,), (1395323660,), (1395323705,), (1395324071,), (1395324101,), (1395324131,), (1395324163,), (1395324610,), (1395324640,), (1395324673,), (1395324705,), (1395324714,), (1395324716,), (1395324735,), (1395324736,), (1395324737,), (1395324749,), (1395324782,), (1395324817,), (1395324850,), (1395325079,), (1395325087,), (1395325089,), (1395325096,), (1395325101,), (1395325104,), (1395325128,), (1395325130,), (1395325132,), (1395325135,), (1395325138,), (1395325165,), (1395325166,), (1395325168,), (1395325172,), (1395325176,), (1395325179,), (1395325185,), (1395325186,), (1395325192,), (1395325195,), (1395325200,), (1395325205,), (1395325210,), (1395325235,), (1395325238,), (1395325240,), (1395325244,), (1395325247,), (1395325276,), (1395325278,), (1395325280,), (1395325284,), (1395325310,), (1395325314,), (1395325318,), (1395325321,), (1395325323,), (1395325326,), (1395325367,), (1395325372,), (1395325375,), (1395325383,), (1395325384,), (1395325385,), (1395325389,), (1395325357,), (1395325359,), (1395325363,), (1395325405,), (1395325410,), (1395325413,), (1395325507,), (1395325537,), (1395325570,), (1395325602,), (1395325839,), (1395325847,), (1395325877,), (1395325911,), (1395325947,), (1395326065,), (1395326067,), (1395326070,), (1395326073,), (1395326077,), (1395326090,), (1395326091,), (1395326093,), (1395326101,), (1395326105,), (1395326109,), (1395326117,), (1395326118,), (1395326119,), (1395326126,), (1395326130,), (1395326140,), (1395326143,), (1395326146,), (1395326185,), (1395326208,), (1395326217,), (1395326222,), (1395326227,), (1395326244,), (1395326245,), (1395326246,), (1395326263,), (1395326265,), (1395326267,), (1395326271,), (1395326282,), (1395326306,), (1395326307,), (1395326308,), (1395326314,), (1395326317,), (1395326340,), (1395326417,), (1395326418,), (1395326462,), (1395326470,), (1395326471,), (1395326450,), (1395326451,), (1395326453,), (1395326457,), (1395326460,), (1395326473,), (1395326474,), (1395326475,), (1395326547,), (1395326548,), (1395326549,), (1395326551,), (1395326555,), (1395326586,), (1395326587,), (1395326588,), (1395326590,), (1395326594,), (1395326596,), (1395326611,), (1395326613,), (1395326615,), (1395326619,), (1395326624,), (1395326628,), (1395326635,), (1395326637,), (1395326639,), (1395326642,), (1395326675,), (1395326677,), (1395326679,), (1395326682,), (1395326686,), (1395326690,), (1395326709,), (1395326711,), (1395326715,), (1395326720,), (1395326726,), (1395326745,), (1395326747,), (1395326749,), (1395326753,), (1395326756,), (1395326760,), (1395326779,), (1395326784,), (1395326785,), (1395326787,), (1395326791,), (1395326816,), (1395326818,), (1395326821,), (1395326831,), (1395326837,), (1395326841,), (1395326847,), (1395326848,), (1395326849,), (1395326855,), (1395326861,), (1395326865,), (1395326878,), (1395326879,), (1395326880,), (1395326882,), (1395326887,), (1395326926,), (1395326930,), (1395326935,), (1395326973,), (1395326978,), (1395326982,), (1395326987,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'20112025': {'nb_upload': 75, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28736530]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1395326987, 1395326982, 1395326978, 1395326973] map_info['map_portfolio_photo'] : {28736530: [1395326987, 1395326982, 1395326978, 1395326973, 1395326935, 1395326930, 1395326926, 1395326887, 1395326882, 1395326880, 1395326879, 1395326878, 1395326865, 1395326861, 1395326855, 1395326849, 1395326848, 1395326847, 1395326841, 1395326837, 1395326831, 1395326821, 1395326818, 1395326816, 1395326791, 1395326787, 1395326785, 1395326784, 1395326779, 1395326760, 1395326756, 1395326753, 1395326749, 1395326747, 1395326745, 1395326726, 1395326720, 1395326715, 1395326711, 1395326709, 1395326690, 1395326686, 1395326682, 1395326679, 1395326677, 1395326675, 1395326642, 1395326639, 1395326637, 1395326635, 1395326628, 1395326624, 1395326619, 1395326615, 1395326613, 1395326611, 1395326596, 1395326594, 1395326590, 1395326588, 1395326587, 1395326586, 1395326555, 1395326551, 1395326549, 1395326548, 1395326547, 1395326475, 1395326474, 1395326473, 1395326460, 1395326457, 1395326453, 1395326451, 1395326450]} final : True mtd_id 4302 list_pids : [1395326987, 1395326982, 1395326978, 1395326973] Looping around the photos to save general results len do output : 1 /28736530Didn'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, '4082974') ('4302', '28736530', '1395326987', None, None, None, None, None, '4082974') ('4302', None, None, None, None, None, None, None, '4082974') ('4302', '28736530', '1395326982', None, None, None, None, None, '4082974') ('4302', None, None, None, None, None, None, None, '4082974') ('4302', '28736530', '1395326978', None, None, None, None, None, '4082974') ('4302', None, None, None, None, None, None, None, '4082974') ('4302', '28736530', '1395326973', None, None, None, None, None, '4082974') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 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, '28736530', 'None', None, None, None, None, '4082974'), ('4302', '28736530', '1395326987', None, None, None, None, None, '4082974'), ('4302', '28736530', '1395326982', None, None, None, None, None, '4082974'), ('4302', '28736530', '1395326978', None, None, None, None, None, '4082974'), ('4302', '28736530', '1395326973', None, None, None, None, None, '4082974')] time used for this insertion : 0.02059626579284668 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.070833444595337 time spend to save output : 0.02077174186706543 total time spend for step 5 : 1.0916051864624023 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 (4082974) 1.89user 2.47system 0:08.00elapsed 54%CPU (0avgtext+0avgdata 159556maxresident)k 56inputs+6424outputs (1major+63941minor)pagefaults 0swaps