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 : 295230 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 (3545004) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3545004) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26015599 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3545004'] with mtr_portfolio_ids : ['26015599'] and first list_photo_ids : [] new path : /proc/295230/ Name: python3 Umask: 0002 State: R (running) Tgid: 295230 Ngid: 0 Pid: 295230 PPid: 295229 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 295230 NSpid: 295230 NSpgid: 293960 NSsid: 293960 VmPeak: 1107248 kB VmSize: 1107248 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 101464 kB VmRSS: 101464 kB RssAnon: 60156 kB RssFile: 41308 kB RssShmem: 0 kB VmData: 866000 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 604 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: 50 nonvoluntary_ctxt_switches: 89 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '295230', 'Ngid': '0', 'Pid': '295230', 'PPid': '295229', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '295230', 'NSpid': '295230', 'NSpgid': '293960', 'NSsid': '293960', 'VmPeak': '1107248 kB', 'VmSize': '1107248 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '101464 kB', 'VmRSS': '101464 kB', 'RssAnon': '60156 kB', 'RssFile': '41308 kB', 'RssShmem': '0 kB', 'VmData': '866000 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '604 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': '50', 'nonvoluntary_ctxt_switches': '89'} ('datou_batch_current', '295230', '1107248', '0', '1107248', '866000', '101464', b'', 'marlene', '3545004') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (26015599) 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 (3545004 ) ) 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 (26015599) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1377219827, 'portfolio_id': 26015599}, {'photo_id': 1377219826, 'portfolio_id': 26015599}, {'photo_id': 1377219825, 'portfolio_id': 26015599}, {'photo_id': 1377219824, 'portfolio_id': 26015599}, {'photo_id': 1377219822, 'portfolio_id': 26015599}, {'photo_id': 1377219821, 'portfolio_id': 26015599}, {'photo_id': 1377219817, 'portfolio_id': 26015599}, {'photo_id': 1377219816, 'portfolio_id': 26015599}, {'photo_id': 1377219812, 'portfolio_id': 26015599}, {'photo_id': 1377219810, 'portfolio_id': 26015599}, {'photo_id': 1377219806, 'portfolio_id': 26015599}, {'photo_id': 1377219805, 'portfolio_id': 26015599}, {'photo_id': 1377219724, 'portfolio_id': 26015599}, {'photo_id': 1377219693, 'portfolio_id': 26015599}, {'photo_id': 1377219662, 'portfolio_id': 26015599}, {'photo_id': 1377219630, 'portfolio_id': 26015599}, {'photo_id': 1377219522, 'portfolio_id': 26015599}, {'photo_id': 1377219491, 'portfolio_id': 26015599}, {'photo_id': 1377219485, 'portfolio_id': 26015599}, {'photo_id': 1377219455, 'portfolio_id': 26015599}, {'photo_id': 1377219428, 'portfolio_id': 26015599}, {'photo_id': 1377219394, 'portfolio_id': 26015599}, {'photo_id': 1377219143, 'portfolio_id': 26015599}, {'photo_id': 1377219114, 'portfolio_id': 26015599}, {'photo_id': 1377219081, 'portfolio_id': 26015599}, {'photo_id': 1377219054, 'portfolio_id': 26015599}, {'photo_id': 1377219018, 'portfolio_id': 26015599}, {'photo_id': 1377218524, 'portfolio_id': 26015599}, {'photo_id': 1377218494, 'portfolio_id': 26015599}, {'photo_id': 1377218458, 'portfolio_id': 26015599}, {'photo_id': 1377218158, 'portfolio_id': 26015599}, {'photo_id': 1377218106, 'portfolio_id': 26015599}, {'photo_id': 1377218053, 'portfolio_id': 26015599}, {'photo_id': 1377217993, 'portfolio_id': 26015599}, {'photo_id': 1377217964, 'portfolio_id': 26015599}, {'photo_id': 1377217691, 'portfolio_id': 26015599}, {'photo_id': 1377217661, 'portfolio_id': 26015599}, {'photo_id': 1377217632, 'portfolio_id': 26015599}, {'photo_id': 1377217621, 'portfolio_id': 26015599}, {'photo_id': 1377217614, 'portfolio_id': 26015599}, {'photo_id': 1377217594, 'portfolio_id': 26015599}, {'photo_id': 1377217591, 'portfolio_id': 26015599}, {'photo_id': 1377217590, 'portfolio_id': 26015599}, {'photo_id': 1377217589, 'portfolio_id': 26015599}, {'photo_id': 1377217581, 'portfolio_id': 26015599}, {'photo_id': 1377217564, 'portfolio_id': 26015599}, {'photo_id': 1377217561, 'portfolio_id': 26015599}, {'photo_id': 1377217558, 'portfolio_id': 26015599}, {'photo_id': 1377217556, 'portfolio_id': 26015599}, {'photo_id': 1377217548, 'portfolio_id': 26015599}, {'photo_id': 1377217511, 'portfolio_id': 26015599}, {'photo_id': 1377217499, 'portfolio_id': 26015599}, {'photo_id': 1377217478, 'portfolio_id': 26015599}, {'photo_id': 1377217450, 'portfolio_id': 26015599}, {'photo_id': 1377217415, 'portfolio_id': 26015599}, {'photo_id': 1377217256, 'portfolio_id': 26015599}, {'photo_id': 1377217254, 'portfolio_id': 26015599}, {'photo_id': 1377217247, 'portfolio_id': 26015599}, {'photo_id': 1377217059, 'portfolio_id': 26015599}, {'photo_id': 1377217031, 'portfolio_id': 26015599}, {'photo_id': 1377216999, 'portfolio_id': 26015599}, {'photo_id': 1377216708, 'portfolio_id': 26015599}, {'photo_id': 1377216674, 'portfolio_id': 26015599}, {'photo_id': 1377216638, 'portfolio_id': 26015599}] map_portfolio_id_photo_id: {26015599: [1377219827, 1377219826, 1377219825, 1377219824, 1377219822, 1377219821, 1377219817, 1377219816, 1377219812, 1377219810, 1377219806, 1377219805, 1377219724, 1377219693, 1377219662, 1377219630, 1377219522, 1377219491, 1377219485, 1377219455, 1377219428, 1377219394, 1377219143, 1377219114, 1377219081, 1377219054, 1377219018, 1377218524, 1377218494, 1377218458, 1377218158, 1377218106, 1377218053, 1377217993, 1377217964, 1377217691, 1377217661, 1377217632, 1377217621, 1377217614, 1377217594, 1377217591, 1377217590, 1377217589, 1377217581, 1377217564, 1377217561, 1377217558, 1377217556, 1377217548, 1377217511, 1377217499, 1377217478, 1377217450, 1377217415, 1377217256, 1377217254, 1377217247, 1377217059, 1377217031, 1377216999, 1377216708, 1377216674, 1377216638]} ##### 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.016162872314453125 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Fri Aug 15 04:14:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26015599) 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 : 26015599 get user id for portfolio 26015599 get sub ptf for main ptf 26015599, type 3726 and hashtags ['plastique', 'autre_refus', 'metal', 'kraft', 'cartonnette', 'flou', 'Carton_brun', 'environnement', 'mal_croppe', 'Carton_gris', 'papier', 'Teint_Dans_La_Masse'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26015599 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','metal','kraft','cartonnette','flou','Carton_brun','environnement','mal_croppe','Carton_gris','papier','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26015599 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','metal','kraft','cartonnette','flou','Carton_brun','environnement','mal_croppe','Carton_gris','papier','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 26015599, 'sub_port_id': 26015625, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522803, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 30)}, 'cartonnette': {'main_port_id': 26015599, 'sub_port_id': 26015626, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522804, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 30)}, 'flou': {'main_port_id': 26015599, 'sub_port_id': 26015627, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522805, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 30)}, 'kraft': {'main_port_id': 26015599, 'sub_port_id': 26015628, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522806, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 30)}, 'autre_refus': {'main_port_id': 26015599, 'sub_port_id': 26015629, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522807, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 30)}, 'mal_croppe': {'main_port_id': 26015599, 'sub_port_id': 26015630, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522808, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 30)}, 'metal': {'main_port_id': 26015599, 'sub_port_id': 26015631, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522809, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 30)}, 'environnement': {'main_port_id': 26015599, 'sub_port_id': 26015632, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522810, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 30)}, 'plastique': {'main_port_id': 26015599, 'sub_port_id': 26015633, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522811, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 30)}, 'Carton_gris': {'main_port_id': 26015599, 'sub_port_id': 26015634, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522812, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 30)}, 'Teint_Dans_La_Masse': {'main_port_id': 26015599, 'sub_port_id': 26015635, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522813, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 30)}, 'Carton_brun': {'main_port_id': 26015599, 'sub_port_id': 26015636, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522814, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 30)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26015625 , 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=26015599 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 (26015625) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26015599) result : ((1377216638,), (1377216674,), (1377216708,), (1377216999,), (1377217031,), (1377217059,), (1377217247,), (1377217254,), (1377217256,), (1377217415,), (1377217450,), (1377217478,), (1377217499,), (1377217511,), (1377217548,), (1377217556,), (1377217558,), (1377217561,), (1377217564,), (1377217581,), (1377217589,), (1377217590,), (1377217591,), (1377217594,), (1377217614,), (1377217621,), (1377217632,), (1377217661,), (1377217691,), (1377217964,), (1377217993,), (1377218053,), (1377218106,), (1377218158,), (1377218458,), (1377218494,), (1377218524,), (1377219018,), (1377219054,), (1377219081,), (1377219114,), (1377219143,), (1377219394,), (1377219428,), (1377219455,), (1377219485,), (1377219491,), (1377219522,), (1377219630,), (1377219662,), (1377219693,), (1377219724,), (1377219805,), (1377219806,), (1377219810,), (1377219812,), (1377219816,), (1377219817,), (1377219821,), (1377219822,), (1377219824,), (1377219825,), (1377219826,), (1377219827,)) 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 26015626 , 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=26015599 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 (26015626) result : ((1377219008,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26015599) result : ((1377216638,), (1377216674,), (1377216708,), (1377216999,), (1377217031,), (1377217059,), (1377217247,), (1377217254,), (1377217256,), (1377217415,), (1377217450,), (1377217478,), (1377217499,), (1377217511,), (1377217548,), (1377217556,), (1377217558,), (1377217561,), (1377217564,), (1377217581,), (1377217589,), (1377217590,), (1377217591,), (1377217594,), (1377217614,), (1377217621,), (1377217632,), (1377217661,), (1377217691,), (1377217964,), (1377217993,), (1377218053,), (1377218106,), (1377218158,), (1377218458,), (1377218494,), (1377218524,), (1377219018,), (1377219054,), (1377219081,), (1377219114,), (1377219143,), (1377219394,), (1377219428,), (1377219455,), (1377219485,), (1377219491,), (1377219522,), (1377219630,), (1377219662,), (1377219693,), (1377219724,), (1377219805,), (1377219806,), (1377219810,), (1377219812,), (1377219816,), (1377219817,), (1377219821,), (1377219822,), (1377219824,), (1377219825,), (1377219826,), (1377219827,)) 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 26015627 , 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=26015599 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 (26015627) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26015599) result : ((1377216638,), (1377216674,), (1377216708,), (1377216999,), (1377217031,), (1377217059,), (1377217247,), (1377217254,), (1377217256,), (1377217415,), (1377217450,), (1377217478,), (1377217499,), (1377217511,), (1377217548,), (1377217556,), (1377217558,), (1377217561,), (1377217564,), (1377217581,), (1377217589,), (1377217590,), (1377217591,), (1377217594,), (1377217614,), (1377217621,), (1377217632,), (1377217661,), (1377217691,), (1377217964,), (1377217993,), (1377218053,), (1377218106,), (1377218158,), (1377218458,), (1377218494,), (1377218524,), (1377219018,), (1377219054,), (1377219081,), (1377219114,), (1377219143,), (1377219394,), (1377219428,), (1377219455,), (1377219485,), (1377219491,), (1377219522,), (1377219630,), (1377219662,), (1377219693,), (1377219724,), (1377219805,), (1377219806,), (1377219810,), (1377219812,), (1377219816,), (1377219817,), (1377219821,), (1377219822,), (1377219824,), (1377219825,), (1377219826,), (1377219827,)) 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 26015628 , 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=26015599 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 (26015628) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26015599) result : ((1377216638,), (1377216674,), (1377216708,), (1377216999,), (1377217031,), (1377217059,), (1377217247,), (1377217254,), (1377217256,), (1377217415,), (1377217450,), (1377217478,), (1377217499,), (1377217511,), (1377217548,), (1377217556,), (1377217558,), (1377217561,), (1377217564,), (1377217581,), (1377217589,), (1377217590,), (1377217591,), (1377217594,), (1377217614,), (1377217621,), (1377217632,), (1377217661,), (1377217691,), (1377217964,), (1377217993,), (1377218053,), (1377218106,), (1377218158,), (1377218458,), (1377218494,), (1377218524,), (1377219018,), (1377219054,), (1377219081,), (1377219114,), (1377219143,), (1377219394,), (1377219428,), (1377219455,), (1377219485,), (1377219491,), (1377219522,), (1377219630,), (1377219662,), (1377219693,), (1377219724,), (1377219805,), (1377219806,), (1377219810,), (1377219812,), (1377219816,), (1377219817,), (1377219821,), (1377219822,), (1377219824,), (1377219825,), (1377219826,), (1377219827,)) 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 26015629 , 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=26015599 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 (26015629) result : ((1377217839,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26015599) result : ((1377216638,), (1377216674,), (1377216708,), (1377216999,), (1377217031,), (1377217059,), (1377217247,), (1377217254,), (1377217256,), (1377217415,), (1377217450,), (1377217478,), (1377217499,), (1377217511,), (1377217548,), (1377217556,), (1377217558,), (1377217561,), (1377217564,), (1377217581,), (1377217589,), (1377217590,), (1377217591,), (1377217594,), (1377217614,), (1377217621,), (1377217632,), (1377217661,), (1377217691,), (1377217964,), (1377217993,), (1377218053,), (1377218106,), (1377218158,), (1377218458,), (1377218494,), (1377218524,), (1377219018,), (1377219054,), (1377219081,), (1377219114,), (1377219143,), (1377219394,), (1377219428,), (1377219455,), (1377219485,), (1377219491,), (1377219522,), (1377219630,), (1377219662,), (1377219693,), (1377219724,), (1377219805,), (1377219806,), (1377219810,), (1377219812,), (1377219816,), (1377219817,), (1377219821,), (1377219822,), (1377219824,), (1377219825,), (1377219826,), (1377219827,)) 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 26015630 , 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=26015599 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 (26015630) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26015599) result : ((1377216638,), (1377216674,), (1377216708,), (1377216999,), (1377217031,), (1377217059,), (1377217247,), (1377217254,), (1377217256,), (1377217415,), (1377217450,), (1377217478,), (1377217499,), (1377217511,), (1377217548,), (1377217556,), (1377217558,), (1377217561,), (1377217564,), (1377217581,), (1377217589,), (1377217590,), (1377217591,), (1377217594,), (1377217614,), (1377217621,), (1377217632,), (1377217661,), (1377217691,), (1377217964,), (1377217993,), (1377218053,), (1377218106,), (1377218158,), (1377218458,), (1377218494,), (1377218524,), (1377219018,), (1377219054,), (1377219081,), (1377219114,), (1377219143,), (1377219394,), (1377219428,), (1377219455,), (1377219485,), (1377219491,), (1377219522,), (1377219630,), (1377219662,), (1377219693,), (1377219724,), (1377219805,), (1377219806,), (1377219810,), (1377219812,), (1377219816,), (1377219817,), (1377219821,), (1377219822,), (1377219824,), (1377219825,), (1377219826,), (1377219827,)) 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 26015631 , 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=26015599 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 (26015631) result : ((1377219526,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26015599) result : ((1377216638,), (1377216674,), (1377216708,), (1377216999,), (1377217031,), (1377217059,), (1377217247,), (1377217254,), (1377217256,), (1377217415,), (1377217450,), (1377217478,), (1377217499,), (1377217511,), (1377217548,), (1377217556,), (1377217558,), (1377217561,), (1377217564,), (1377217581,), (1377217589,), (1377217590,), (1377217591,), (1377217594,), (1377217614,), (1377217621,), (1377217632,), (1377217661,), (1377217691,), (1377217964,), (1377217993,), (1377218053,), (1377218106,), (1377218158,), (1377218458,), (1377218494,), (1377218524,), (1377219018,), (1377219054,), (1377219081,), (1377219114,), (1377219143,), (1377219394,), (1377219428,), (1377219455,), (1377219485,), (1377219491,), (1377219522,), (1377219630,), (1377219662,), (1377219693,), (1377219724,), (1377219805,), (1377219806,), (1377219810,), (1377219812,), (1377219816,), (1377219817,), (1377219821,), (1377219822,), (1377219824,), (1377219825,), (1377219826,), (1377219827,)) 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 26015632 , 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=26015599 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 (26015632) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26015599) result : ((1377216638,), (1377216674,), (1377216708,), (1377216999,), (1377217031,), (1377217059,), (1377217247,), (1377217254,), (1377217256,), (1377217415,), (1377217450,), (1377217478,), (1377217499,), (1377217511,), (1377217548,), (1377217556,), (1377217558,), (1377217561,), (1377217564,), (1377217581,), (1377217589,), (1377217590,), (1377217591,), (1377217594,), (1377217614,), (1377217621,), (1377217632,), (1377217661,), (1377217691,), (1377217964,), (1377217993,), (1377218053,), (1377218106,), (1377218158,), (1377218458,), (1377218494,), (1377218524,), (1377219018,), (1377219054,), (1377219081,), (1377219114,), (1377219143,), (1377219394,), (1377219428,), (1377219455,), (1377219485,), (1377219491,), (1377219522,), (1377219630,), (1377219662,), (1377219693,), (1377219724,), (1377219805,), (1377219806,), (1377219810,), (1377219812,), (1377219816,), (1377219817,), (1377219821,), (1377219822,), (1377219824,), (1377219825,), (1377219826,), (1377219827,)) 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 26015633 , 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=26015599 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 (26015633) result : ((1377219523,), (1377219524,), (1377219525,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26015599) result : ((1377216638,), (1377216674,), (1377216708,), (1377216999,), (1377217031,), (1377217059,), (1377217247,), (1377217254,), (1377217256,), (1377217415,), (1377217450,), (1377217478,), (1377217499,), (1377217511,), (1377217548,), (1377217556,), (1377217558,), (1377217561,), (1377217564,), (1377217581,), (1377217589,), (1377217590,), (1377217591,), (1377217594,), (1377217614,), (1377217621,), (1377217632,), (1377217661,), (1377217691,), (1377217964,), (1377217993,), (1377218053,), (1377218106,), (1377218158,), (1377218458,), (1377218494,), (1377218524,), (1377219018,), (1377219054,), (1377219081,), (1377219114,), (1377219143,), (1377219394,), (1377219428,), (1377219455,), (1377219485,), (1377219491,), (1377219522,), (1377219630,), (1377219662,), (1377219693,), (1377219724,), (1377219805,), (1377219806,), (1377219810,), (1377219812,), (1377219816,), (1377219817,), (1377219821,), (1377219822,), (1377219824,), (1377219825,), (1377219826,), (1377219827,)) 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 26015634 , 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=26015599 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 (26015634) result : ((1377217845,), (1377218990,), (1377218993,), (1377219518,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26015599) result : ((1377216638,), (1377216674,), (1377216708,), (1377216999,), (1377217031,), (1377217059,), (1377217247,), (1377217254,), (1377217256,), (1377217415,), (1377217450,), (1377217478,), (1377217499,), (1377217511,), (1377217548,), (1377217556,), (1377217558,), (1377217561,), (1377217564,), (1377217581,), (1377217589,), (1377217590,), (1377217591,), (1377217594,), (1377217614,), (1377217621,), (1377217632,), (1377217661,), (1377217691,), (1377217964,), (1377217993,), (1377218053,), (1377218106,), (1377218158,), (1377218458,), (1377218494,), (1377218524,), (1377219018,), (1377219054,), (1377219081,), (1377219114,), (1377219143,), (1377219394,), (1377219428,), (1377219455,), (1377219485,), (1377219491,), (1377219522,), (1377219630,), (1377219662,), (1377219693,), (1377219724,), (1377219805,), (1377219806,), (1377219810,), (1377219812,), (1377219816,), (1377219817,), (1377219821,), (1377219822,), (1377219824,), (1377219825,), (1377219826,), (1377219827,)) 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 26015635 , 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=26015599 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 (26015635) result : ((1377217576,), (1377217832,), (1377218976,), (1377218979,), (1377218981,), (1377219516,), (1377219517,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26015599) result : ((1377216638,), (1377216674,), (1377216708,), (1377216999,), (1377217031,), (1377217059,), (1377217247,), (1377217254,), (1377217256,), (1377217415,), (1377217450,), (1377217478,), (1377217499,), (1377217511,), (1377217548,), (1377217556,), (1377217558,), (1377217561,), (1377217564,), (1377217581,), (1377217589,), (1377217590,), (1377217591,), (1377217594,), (1377217614,), (1377217621,), (1377217632,), (1377217661,), (1377217691,), (1377217964,), (1377217993,), (1377218053,), (1377218106,), (1377218158,), (1377218458,), (1377218494,), (1377218524,), (1377219018,), (1377219054,), (1377219081,), (1377219114,), (1377219143,), (1377219394,), (1377219428,), (1377219455,), (1377219485,), (1377219491,), (1377219522,), (1377219630,), (1377219662,), (1377219693,), (1377219724,), (1377219805,), (1377219806,), (1377219810,), (1377219812,), (1377219816,), (1377219817,), (1377219821,), (1377219822,), (1377219824,), (1377219825,), (1377219826,), (1377219827,)) 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 26015636 , 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=26015599 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 (26015636) result : ((1377219519,), (1377219521,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26015599) result : ((1377216638,), (1377216674,), (1377216708,), (1377216999,), (1377217031,), (1377217059,), (1377217247,), (1377217254,), (1377217256,), (1377217415,), (1377217450,), (1377217478,), (1377217499,), (1377217511,), (1377217548,), (1377217556,), (1377217558,), (1377217561,), (1377217564,), (1377217581,), (1377217589,), (1377217590,), (1377217591,), (1377217594,), (1377217614,), (1377217621,), (1377217632,), (1377217661,), (1377217691,), (1377217964,), (1377217993,), (1377218053,), (1377218106,), (1377218158,), (1377218458,), (1377218494,), (1377218524,), (1377219018,), (1377219054,), (1377219081,), (1377219114,), (1377219143,), (1377219394,), (1377219428,), (1377219455,), (1377219485,), (1377219491,), (1377219522,), (1377219630,), (1377219662,), (1377219693,), (1377219724,), (1377219805,), (1377219806,), (1377219810,), (1377219812,), (1377219816,), (1377219817,), (1377219821,), (1377219822,), (1377219824,), (1377219825,), (1377219826,), (1377219827,)) 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`=26015599 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','metal','kraft','cartonnette','flou','Carton_brun','environnement','mal_croppe','Carton_gris','papier','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26015599 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','autre_refus','metal','kraft','cartonnette','flou','Carton_brun','environnement','mal_croppe','Carton_gris','papier','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 26015599, 'sub_port_id': 26015637, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522815, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 31)}, 'cartonnette': {'main_port_id': 26015599, 'sub_port_id': 26015638, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522816, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 31)}, 'flou': {'main_port_id': 26015599, 'sub_port_id': 26015639, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522817, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 31)}, 'kraft': {'main_port_id': 26015599, 'sub_port_id': 26015640, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522818, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 31)}, 'autre_refus': {'main_port_id': 26015599, 'sub_port_id': 26015641, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522819, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 31)}, 'mal_croppe': {'main_port_id': 26015599, 'sub_port_id': 26015642, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522820, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 31)}, 'metal': {'main_port_id': 26015599, 'sub_port_id': 26015643, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522821, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 31)}, 'environnement': {'main_port_id': 26015599, 'sub_port_id': 26015644, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522822, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 31)}, 'plastique': {'main_port_id': 26015599, 'sub_port_id': 26015645, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522823, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 31)}, 'Carton_gris': {'main_port_id': 26015599, 'sub_port_id': 26015646, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522824, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 31)}, 'Teint_Dans_La_Masse': {'main_port_id': 26015599, 'sub_port_id': 26015647, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522825, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 3, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 31)}, 'Carton_brun': {'main_port_id': 26015599, 'sub_port_id': 26015648, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17522826, 'last_updated_at': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 4, 3, 31)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26015637,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26015625 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26015638,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26015626 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26015639,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26015627 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26015640,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26015628 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26015641,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26015629 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26015642,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26015630 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26015643,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26015631 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26015644,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26015632 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26015645,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26015633 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26015646,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26015634 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26015647,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26015635 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26015648,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26015636 lien utilise dans velours : https://www.fotonower.com/velours/26015637,26015638,26015639,26015640,26015641,26015642,26015643,26015644,26015645,26015646,26015647,26015648?tags=papier,cartonnette,flou,kraft,autre_refus,mal_croppe,metal,environnement,plastique,Carton_gris,Teint_Dans_La_Masse,Carton_brun After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26015599]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1377219827, 1377219826, 1377219825, 1377219824, 1377219822, 1377219821, 1377219817, 1377219816, 1377219812, 1377219810, 1377219806, 1377219805, 1377219724, 1377219693, 1377219662, 1377219630] map_info['map_portfolio_photo'] : {26015599: [1377219827, 1377219826, 1377219825, 1377219824, 1377219822, 1377219821, 1377219817, 1377219816, 1377219812, 1377219810, 1377219806, 1377219805, 1377219724, 1377219693, 1377219662, 1377219630, 1377219522, 1377219491, 1377219485, 1377219455, 1377219428, 1377219394, 1377219143, 1377219114, 1377219081, 1377219054, 1377219018, 1377218524, 1377218494, 1377218458, 1377218158, 1377218106, 1377218053, 1377217993, 1377217964, 1377217691, 1377217661, 1377217632, 1377217621, 1377217614, 1377217594, 1377217591, 1377217590, 1377217589, 1377217581, 1377217564, 1377217561, 1377217558, 1377217556, 1377217548, 1377217511, 1377217499, 1377217478, 1377217450, 1377217415, 1377217256, 1377217254, 1377217247, 1377217059, 1377217031, 1377216999, 1377216708, 1377216674, 1377216638]} final : False mtd_id 4302 list_pids : [1377219827, 1377219826, 1377219825, 1377219824, 1377219822, 1377219821, 1377219817, 1377219816, 1377219812, 1377219810, 1377219806, 1377219805, 1377219724, 1377219693, 1377219662, 1377219630] Looping around the photos to save general results len do output : 1 /26015599. 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, '3545004') ('4302', '26015599', '1377219827', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219826', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219825', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219824', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219822', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219821', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219817', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219816', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219812', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219810', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219806', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219805', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219724', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219693', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219662', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219630', None, None, None, None, None, '3545004') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 17 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, '26015599', "{'papier': 26015625, 'cartonnette': 26015626, 'flou': 26015627, 'kraft': 26015628, 'autre_refus': 26015629, 'mal_croppe': 26015630, 'metal': 26015631, 'environnement': 26015632, 'plastique': 26015633, 'Carton_gris': 26015634, 'Teint_Dans_La_Masse': 26015635, 'Carton_brun': 26015636}", None, None, None, None, '3545004'), ('4302', '26015599', '1377219827', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219826', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219825', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219824', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219822', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219821', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219817', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219816', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219812', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219810', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219806', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219805', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219724', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219693', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219662', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219630', None, None, None, None, None, '3545004')] time used for this insertion : 0.08058309555053711 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4927692413330078 time spend to save output : 0.0809178352355957 total time spend for step 1 : 1.5736870765686035 step2:final Fri Aug 15 04:15:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 (26015599) 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 26015599 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1377216708,1377216674,1377216638,1377217059,1377217031,1377216999,1377217256,1377217254,1377217247,1377217511,1377217499,1377217478,1377217450,1377217415,1377217564,1377217561,1377217558,1377217556,1377217548,1377217594,1377217591,1377217590,1377217589,1377217581,1377217691,1377217661,1377217632,1377217621,1377217614,1377218158,1377218106,1377218053,1377217993,1377217964,1377218524,1377218494,1377218458,1377219143,1377219114,1377219081,1377219054,1377219018,1377219491,1377219485,1377219455,1377219428,1377219394,1377219724,1377219693,1377219522,1377219662,1377219826,1377219827,1377219630,1377219824,1377219825,1377219821,1377219822,1377219816,1377219817,1377219810,1377219812,1377219805,1377219806); 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([26015599]) Inside saveOutput : final : False verbose : True original output for save of step final : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',)} new output for save of step final : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',)} [1377219827, 1377219826, 1377219825, 1377219824, 1377219822, 1377219821, 1377219817, 1377219816, 1377219812, 1377219810, 1377219806, 1377219805, 1377219724, 1377219693, 1377219662, 1377219630] map_info['map_portfolio_photo'] : {26015599: [1377219827, 1377219826, 1377219825, 1377219824, 1377219822, 1377219821, 1377219817, 1377219816, 1377219812, 1377219810, 1377219806, 1377219805, 1377219724, 1377219693, 1377219662, 1377219630, 1377219522, 1377219491, 1377219485, 1377219455, 1377219428, 1377219394, 1377219143, 1377219114, 1377219081, 1377219054, 1377219018, 1377218524, 1377218494, 1377218458, 1377218158, 1377218106, 1377218053, 1377217993, 1377217964, 1377217691, 1377217661, 1377217632, 1377217621, 1377217614, 1377217594, 1377217591, 1377217590, 1377217589, 1377217581, 1377217564, 1377217561, 1377217558, 1377217556, 1377217548, 1377217511, 1377217499, 1377217478, 1377217450, 1377217415, 1377217256, 1377217254, 1377217247, 1377217059, 1377217031, 1377216999, 1377216708, 1377216674, 1377216638]} final : False mtd_id 4302 list_pids : [1377219827, 1377219826, 1377219825, 1377219824, 1377219822, 1377219821, 1377219817, 1377219816, 1377219812, 1377219810, 1377219806, 1377219805, 1377219724, 1377219693, 1377219662, 1377219630] Looping around the photos to save general results len do output : 16 /1377219827.Didn't retrieve data . /1377219826.Didn't retrieve data . /1377219825.Didn't retrieve data . /1377219824.Didn't retrieve data . /1377219822.Didn't retrieve data . /1377219821.Didn't retrieve data . /1377219817.Didn't retrieve data . /1377219816.Didn't retrieve data . /1377219812.Didn't retrieve data . /1377219810.Didn't retrieve data . /1377219806.Didn't retrieve data . /1377219805.Didn't retrieve data . /1377219724.Didn't retrieve data . /1377219693.Didn't retrieve data . /1377219662.Didn't retrieve data . /1377219630.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, '3545004') ('4302', '26015599', '1377219827', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219826', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219825', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219824', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219822', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219821', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219817', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219816', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219812', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219810', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219806', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219805', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219724', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219693', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219662', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219630', None, None, None, None, None, '3545004') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 48 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', '26015599', '1377219827', '0.047472019864925254', None, None, None, None, '3545004'), ('4302', '26015599', '1377219826', '0.047472019864925254', None, None, None, None, '3545004'), ('4302', '26015599', '1377219825', '0.047472019864925254', None, None, None, None, '3545004'), ('4302', '26015599', '1377219824', '0.047472019864925254', None, None, None, None, '3545004'), ('4302', '26015599', '1377219822', '0.047472019864925254', None, None, None, None, '3545004'), ('4302', '26015599', '1377219821', '0.047472019864925254', None, None, None, None, '3545004'), ('4302', '26015599', '1377219817', '0.047472019864925254', None, None, None, None, '3545004'), ('4302', '26015599', '1377219816', '0.047472019864925254', None, None, None, None, '3545004'), ('4302', '26015599', '1377219812', '0.047472019864925254', None, None, None, None, '3545004'), ('4302', '26015599', '1377219810', '0.047472019864925254', None, None, None, None, '3545004'), ('4302', '26015599', '1377219806', '0.047472019864925254', None, None, None, None, '3545004'), ('4302', '26015599', '1377219805', '0.047472019864925254', None, None, None, None, '3545004'), ('4302', '26015599', '1377219724', '0.047472019864925254', None, None, None, None, '3545004'), ('4302', '26015599', '1377219693', '0.047472019864925254', None, None, None, None, '3545004'), ('4302', '26015599', '1377219662', '0.047472019864925254', None, None, None, None, '3545004'), ('4302', '26015599', '1377219630', '0.047472019864925254', None, None, None, None, '3545004')] time used for this insertion : 0.019113540649414062 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.12474727630615234 time spend to save output : 0.01983809471130371 total time spend for step 2 : 0.14458537101745605 step3:velours_tree Fri Aug 15 04:15:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {26015599: [{'papier': 26015625, 'cartonnette': 26015626, 'flou': 26015627, 'kraft': 26015628, 'autre_refus': 26015629, 'mal_croppe': 26015630, 'metal': 26015631, 'environnement': 26015632, 'plastique': 26015633, 'Carton_gris': 26015634, 'Teint_Dans_La_Masse': 26015635, 'Carton_brun': 26015636}]} input_args_next_step : {26015599: ()} output_args : {26015599: [{'papier': 26015625, 'cartonnette': 26015626, 'flou': 26015627, 'kraft': 26015628, 'autre_refus': 26015629, 'mal_croppe': 26015630, 'metal': 26015631, 'environnement': 26015632, 'plastique': 26015633, 'Carton_gris': 26015634, 'Teint_Dans_La_Masse': 26015635, 'Carton_brun': 26015636}]} args : 26015599 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': 26015625, 'cartonnette': 26015626, 'flou': 26015627, 'kraft': 26015628, 'autre_refus': 26015629, 'mal_croppe': 26015630, 'metal': 26015631, 'environnement': 26015632, 'plastique': 26015633, 'Carton_gris': 26015634, 'Teint_Dans_La_Masse': 26015635, 'Carton_brun': 26015636},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26015599) 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([26015599]) 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.28867268562316895 time spend to save output : 7.295608520507812e-05 total time spend for step 3 : 0.288745641708374 step4:send_mail_cod Fri Aug 15 04:15:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',)} input_args_next_step : {1377219827: ()} output_args : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',)} args : 1377219827 depend.output_id : 0 input_args_next_step : {1377219827: ('0.047472019864925254',), 1377219826: ()} output_args : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',)} args : 1377219826 depend.output_id : 0 input_args_next_step : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ()} output_args : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',)} args : 1377219825 depend.output_id : 0 input_args_next_step : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ()} output_args : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',)} args : 1377219824 depend.output_id : 0 input_args_next_step : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ()} output_args : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',)} args : 1377219822 depend.output_id : 0 input_args_next_step : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ()} output_args : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',)} args : 1377219821 depend.output_id : 0 input_args_next_step : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ()} output_args : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',)} args : 1377219817 depend.output_id : 0 input_args_next_step : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ()} output_args : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',)} args : 1377219816 depend.output_id : 0 input_args_next_step : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ()} output_args : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',)} args : 1377219812 depend.output_id : 0 input_args_next_step : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ()} output_args : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',)} args : 1377219810 depend.output_id : 0 input_args_next_step : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ()} output_args : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',)} args : 1377219806 depend.output_id : 0 input_args_next_step : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ()} output_args : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',)} args : 1377219805 depend.output_id : 0 input_args_next_step : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ()} output_args : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',)} args : 1377219724 depend.output_id : 0 input_args_next_step : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ()} output_args : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',)} args : 1377219693 depend.output_id : 0 input_args_next_step : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ()} output_args : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',)} args : 1377219662 depend.output_id : 0 input_args_next_step : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ()} output_args : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',)} args : 1377219630 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 : {26015599: [{'papier': 26015625, 'cartonnette': 26015626, 'flou': 26015627, 'kraft': 26015628, 'autre_refus': 26015629, 'mal_croppe': 26015630, 'metal': 26015631, 'environnement': 26015632, 'plastique': 26015633, 'Carton_gris': 26015634, 'Teint_Dans_La_Masse': 26015635, 'Carton_brun': 26015636}]} input_args_next_step : {1377219827: ('0.047472019864925254',), 1377219826: ('0.047472019864925254',), 1377219825: ('0.047472019864925254',), 1377219824: ('0.047472019864925254',), 1377219822: ('0.047472019864925254',), 1377219821: ('0.047472019864925254',), 1377219817: ('0.047472019864925254',), 1377219816: ('0.047472019864925254',), 1377219812: ('0.047472019864925254',), 1377219810: ('0.047472019864925254',), 1377219806: ('0.047472019864925254',), 1377219805: ('0.047472019864925254',), 1377219724: ('0.047472019864925254',), 1377219693: ('0.047472019864925254',), 1377219662: ('0.047472019864925254',), 1377219630: ('0.047472019864925254',), 26015599: ()} output_args : {26015599: [{'papier': 26015625, 'cartonnette': 26015626, 'flou': 26015627, 'kraft': 26015628, 'autre_refus': 26015629, 'mal_croppe': 26015630, 'metal': 26015631, 'environnement': 26015632, 'plastique': 26015633, 'Carton_gris': 26015634, 'Teint_Dans_La_Masse': 26015635, 'Carton_brun': 26015636}]} args : 26015599 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 :17, first value : ('0.047472019864925254',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26015599) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1377219827,1377219826,1377219825,1377219824,1377219822,1377219821,1377219817,1377219816,1377219812,1377219810,1377219806,1377219805,1377219724,1377219693,1377219662,1377219630) Found this number of photos: 16 ##### Call download_photos : nb_thread : 5 begin to download photo : 1377219630 begin to download photo : 1377219805 begin to download photo : 1377219816 begin to download photo : 1377219824 download finish for photo 1377219805 begin to download photo : 1377219806 download finish for photo 1377219816 begin to download photo : 1377219817 download finish for photo 1377219630 begin to download photo : 1377219662 download finish for photo 1377219824 begin to download photo : 1377219825 download finish for photo 1377219806 begin to download photo : 1377219810 download finish for photo 1377219662 begin to download photo : 1377219693 download finish for photo 1377219825 begin to download photo : 1377219826 download finish for photo 1377219817 begin to download photo : 1377219821 download finish for photo 1377219821 begin to download photo : 1377219822 download finish for photo 1377219810 begin to download photo : 1377219812 download finish for photo 1377219826 begin to download photo : 1377219827 download finish for photo 1377219693 begin to download photo : 1377219724 download finish for photo 1377219827 download finish for photo 1377219812 download finish for photo 1377219822 download finish for photo 1377219724 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 16 ; length of list_pids : 16 ; length of list_args : 16 results_Auto_P26015599_15-08-2025_04_15_01.pdf 26015626 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26015626 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1377219008: '1755223767_2832133_1377217499_9a617ca088ccbd18a05eecde25100df7_rle_crop_3916237404_0.png'} change filename to text .imagette260156261755224101/ imagette260156261755224101/1755223767_2832133_1377217499_9a617ca088ccbd18a05eecde25100df7_rle_crop_3916237404_0.png.png imagette260156271755224101/ imagette260156281755224101/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/8cb37a4310b62ccbeda0eb7dd75d30e2_85193915.png imagette260156261755224101 26015627 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26015627 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette260156271755224101 26015628 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26015628 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette260156281755224101 26015629 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26015629 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1377217839: '1755223644_2829469_1377217247_3e66aeaae48f7ed47983ade2c5f9031b_rle_crop_3916237276_0.png'} change filename to text .imagette260156291755224101/ imagette260156291755224101/1755223644_2829469_1377217247_3e66aeaae48f7ed47983ade2c5f9031b_rle_crop_3916237276_0.png.png imagette260156301755224101/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/e0c6dafc46883593362a3719b103af60_73914797.png imagette260156291755224101 26015630 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26015630 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette260156301755224101 26015631 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26015631 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1377219526: '1755223886_2835443_1377217632_8d28033fbc7a6b3f2294fb5d85053530_rle_crop_3916237831_0.png'} change filename to text .imagette260156311755224101/ imagette260156311755224101/1755223886_2835443_1377217632_8d28033fbc7a6b3f2294fb5d85053530_rle_crop_3916237831_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/5f3f89a17418d738c1ef56ef6c3b7ab0_2833765.png imagette260156311755224101 26015633 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26015633 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1377219523: '1755223886_2835443_1377217632_8d28033fbc7a6b3f2294fb5d85053530_rle_crop_3916237836_0.png', 1377219524: '1755223886_2835443_1377217621_fdda3c041fcf874880931e0cb5af01e8_rle_crop_3916237849_0.png', 1377219525: '1755223886_2835443_1377217614_917a649796467588f71c431622e77fea_rle_crop_3916237856_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/57c36bcfb41479286b2aefa9153a7c88_81463002.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/9d8488f4a50227f5ffb8795df3b64f08_66114677.png change filename to text .imagette260156331755224101/ imagette260156331755224101/1755223886_2835443_1377217614_917a649796467588f71c431622e77fea_rle_crop_3916237856_0.png.png imagette260156331755224101/1755223886_2835443_1377217621_fdda3c041fcf874880931e0cb5af01e8_rle_crop_3916237849_0.png.png imagette260156331755224101/1755223886_2835443_1377217632_8d28033fbc7a6b3f2294fb5d85053530_rle_crop_3916237836_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/2caf23be05dabddde559707a4a88be7a_93438008.png imagette260156331755224101 26015634 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26015634 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1377217845: '1755223644_2829469_1377217247_3e66aeaae48f7ed47983ade2c5f9031b_rle_crop_3916237281_0.png', 1377218990: '1755223767_2832133_1377217499_9a617ca088ccbd18a05eecde25100df7_rle_crop_3916237407_0.png', 1377218993: '1755223767_2832133_1377217478_726320d550115a167cc726ed86b25266_rle_crop_3916237417_0.png', 1377219518: '1755223886_2835443_1377217632_8d28033fbc7a6b3f2294fb5d85053530_rle_crop_3916237829_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/37508eadc3d77c3006b335595cc1ab57_61402631.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/a7ca179c127c20179a20d6cf8dccc5b1_16436685.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/8db2f8a766af464e1a72d11d715959cd_5125192.png change filename to text .imagette260156341755224101/ imagette260156341755224101/1755223886_2835443_1377217632_8d28033fbc7a6b3f2294fb5d85053530_rle_crop_3916237829_0.png.png imagette260156341755224101/1755223767_2832133_1377217478_726320d550115a167cc726ed86b25266_rle_crop_3916237417_0.png.png imagette260156341755224101/1755223767_2832133_1377217499_9a617ca088ccbd18a05eecde25100df7_rle_crop_3916237407_0.png.png imagette260156341755224101/1755223644_2829469_1377217247_3e66aeaae48f7ed47983ade2c5f9031b_rle_crop_3916237281_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/d4eb803b48f3c706511f63356289216e_30842589.png imagette260156341755224101 26015635 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26015635 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1377217576: '1755223525_2824404_1377217031_3e4fa77e7c758aea3303dadfa970d042_rle_crop_3916236899_0.png', 1377217832: '1755223644_2829469_1377217247_3e66aeaae48f7ed47983ade2c5f9031b_rle_crop_3916237275_0.png', 1377218976: '1755223767_2832133_1377217564_6a84b1a2213718485ecda1cd2c67b1a0_rle_crop_3916237399_0.png', 1377218979: '1755223767_2832133_1377217499_9a617ca088ccbd18a05eecde25100df7_rle_crop_3916237410_0.png', 1377218981: '1755223767_2832133_1377217499_9a617ca088ccbd18a05eecde25100df7_rle_crop_3916237411_0.png', 1377219516: '1755223886_2835443_1377217661_ea152ef41b03fa7c383f6cd45ab75556_rle_crop_3916237819_0.png', 1377219517: '1755223886_2835443_1377217632_8d28033fbc7a6b3f2294fb5d85053530_rle_crop_3916237840_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/b3d8215a2738fe92d910629204e32580_5814806.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/1dd4034937ca3e69a918a8346dc4cec2_8030088.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/599a3bf6317402ccbf3d4f8631c678ca_57871662.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/f236f6631c0fb35ea2a2f7ce2e5d1506_21408888.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/a66737254f05b0ee8b9e044f717ec3b5_4780376.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/5244a37b0b4282895e1eb50eab2d5ee3_94103857.png change filename to text .imagette260156351755224101/ imagette260156351755224101/1755223525_2824404_1377217031_3e4fa77e7c758aea3303dadfa970d042_rle_crop_3916236899_0.png.png imagette260156351755224101/1755223886_2835443_1377217661_ea152ef41b03fa7c383f6cd45ab75556_rle_crop_3916237819_0.png.png imagette260156351755224101/1755223767_2832133_1377217564_6a84b1a2213718485ecda1cd2c67b1a0_rle_crop_3916237399_0.png.png imagette260156351755224101/1755223767_2832133_1377217499_9a617ca088ccbd18a05eecde25100df7_rle_crop_3916237411_0.png.png imagette260156351755224101/1755223644_2829469_1377217247_3e66aeaae48f7ed47983ade2c5f9031b_rle_crop_3916237275_0.png.png imagette260156351755224101/1755223767_2832133_1377217499_9a617ca088ccbd18a05eecde25100df7_rle_crop_3916237410_0.png.png imagette260156351755224101/1755223886_2835443_1377217632_8d28033fbc7a6b3f2294fb5d85053530_rle_crop_3916237840_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/9e50b2d8918fdb82a2f6587c57915f1e_37907234.png imagette260156351755224101 26015636 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26015636 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1377219519: '1755223886_2835443_1377217661_ea152ef41b03fa7c383f6cd45ab75556_rle_crop_3916237824_0.png', 1377219521: '1755223886_2835443_1377217632_8d28033fbc7a6b3f2294fb5d85053530_rle_crop_3916237835_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/495a069724bdec46cdaa22b5c8882a95_89931976.png change filename to text .imagette260156361755224102/ imagette260156361755224102/1755223886_2835443_1377217632_8d28033fbc7a6b3f2294fb5d85053530_rle_crop_3916237835_0.png.png imagette260156361755224102/1755223886_2835443_1377217661_ea152ef41b03fa7c383f6cd45ab75556_rle_crop_3916237824_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/31566d343d1ffc7fcb3848bd27b9f577_33029354.png imagette260156361755224102 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=26015599 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/26015637,26015638,26015639,26015640,26015641,26015642,26015643,26015644,26015645,26015646,26015647,26015648?tags=papier,cartonnette,flou,kraft,autre_refus,mal_croppe,metal,environnement,plastique,Carton_gris,Teint_Dans_La_Masse,Carton_brun your option no_mail is active, we will not send the real mail to your client args[1377219827] : ('0.047472019864925254',) no score found for photo 1377219827 We are sending mail with results at report@fotonower.com args[1377219826] : ('0.047472019864925254',) no score found for photo 1377219826 We are sending mail with results at report@fotonower.com args[1377219825] : ('0.047472019864925254',) no score found for photo 1377219825 We are sending mail with results at report@fotonower.com args[1377219824] : ('0.047472019864925254',) no score found for photo 1377219824 We are sending mail with results at report@fotonower.com args[1377219822] : ('0.047472019864925254',) no score found for photo 1377219822 We are sending mail with results at report@fotonower.com args[1377219821] : ('0.047472019864925254',) no score found for photo 1377219821 We are sending mail with results at report@fotonower.com args[1377219817] : ('0.047472019864925254',) no score found for photo 1377219817 We are sending mail with results at report@fotonower.com args[1377219816] : ('0.047472019864925254',) no score found for photo 1377219816 We are sending mail with results at report@fotonower.com args[1377219812] : ('0.047472019864925254',) no score found for photo 1377219812 We are sending mail with results at report@fotonower.com args[1377219810] : ('0.047472019864925254',) no score found for photo 1377219810 We are sending mail with results at report@fotonower.com args[1377219806] : ('0.047472019864925254',) no score found for photo 1377219806 We are sending mail with results at report@fotonower.com args[1377219805] : ('0.047472019864925254',) no score found for photo 1377219805 We are sending mail with results at report@fotonower.com args[1377219724] : ('0.047472019864925254',) no score found for photo 1377219724 We are sending mail with results at report@fotonower.com args[1377219693] : ('0.047472019864925254',) no score found for photo 1377219693 We are sending mail with results at report@fotonower.com args[1377219662] : ('0.047472019864925254',) no score found for photo 1377219662 We are sending mail with results at report@fotonower.com args[1377219630] : ('0.047472019864925254',) no score found for photo 1377219630 We are sending mail with results at report@fotonower.com refus_total : 0.047472019864925254 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26015599 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_P26015599_15-08-2025_04_15_01.pdf results_Auto_P26015599_15-08-2025_04_15_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26015599_15-08-2025_04_15_01.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','26015599','results_Auto_P26015599_15-08-2025_04_15_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26015599_15-08-2025_04_15_01.pdf','pdf','','0.2','0.047472019864925254') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26015599]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1377219827, 1377219826, 1377219825, 1377219824, 1377219822, 1377219821, 1377219817, 1377219816, 1377219812, 1377219810, 1377219806, 1377219805, 1377219724, 1377219693, 1377219662, 1377219630] map_info['map_portfolio_photo'] : {26015599: [1377219827, 1377219826, 1377219825, 1377219824, 1377219822, 1377219821, 1377219817, 1377219816, 1377219812, 1377219810, 1377219806, 1377219805, 1377219724, 1377219693, 1377219662, 1377219630, 1377219522, 1377219491, 1377219485, 1377219455, 1377219428, 1377219394, 1377219143, 1377219114, 1377219081, 1377219054, 1377219018, 1377218524, 1377218494, 1377218458, 1377218158, 1377218106, 1377218053, 1377217993, 1377217964, 1377217691, 1377217661, 1377217632, 1377217621, 1377217614, 1377217594, 1377217591, 1377217590, 1377217589, 1377217581, 1377217564, 1377217561, 1377217558, 1377217556, 1377217548, 1377217511, 1377217499, 1377217478, 1377217450, 1377217415, 1377217256, 1377217254, 1377217247, 1377217059, 1377217031, 1377216999, 1377216708, 1377216674, 1377216638]} final : False mtd_id 4302 list_pids : [1377219827, 1377219826, 1377219825, 1377219824, 1377219822, 1377219821, 1377219817, 1377219816, 1377219812, 1377219810, 1377219806, 1377219805, 1377219724, 1377219693, 1377219662, 1377219630] 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, '3545004') ('4302', '26015599', '1377219827', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219826', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219825', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219824', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219822', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219821', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219817', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219816', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219812', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219810', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219806', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219805', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219724', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219693', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219662', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219630', None, None, None, None, None, '3545004') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 16 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', '26015599', '1377219827', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219826', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219825', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219824', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219822', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219821', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219817', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219816', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219812', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219810', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219806', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219805', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219724', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219693', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219662', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219630', None, None, None, None, None, '3545004')] time used for this insertion : 0.020166397094726562 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.9527359008789062 time spend to save output : 0.020415782928466797 total time spend for step 4 : 2.973151683807373 step5:split_time_score Fri Aug 15 04:15: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 : ['26015599'] 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 : [('26015599',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26015599) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1377219824: {'path': 'temp/1755224100_295230_1377219824_f9ae55f393189944dbe3ad4e2c3cb5cf.jpg', 'extension': 'jpg'}, 1377219825: {'path': 'temp/1755224100_295230_1377219825_cbef8c87910b58066351851e0e85281e.jpg', 'extension': 'jpg'}, 1377219826: {'path': 'temp/1755224100_295230_1377219826_acd4a7fb94776b653419a76a166a89e3.jpg', 'extension': 'jpg'}, 1377219827: {'path': 'temp/1755224100_295230_1377219827_421acad984c673da3eefd2ca3c9a639c.jpg', 'extension': 'jpg'}, 1377219805: {'path': 'temp/1755224100_295230_1377219805_d78339cdae99076a253cb5c0d4bfbf02.jpg', 'extension': 'jpg'}, 1377219806: {'path': 'temp/1755224100_295230_1377219806_c091bc11737d4fbed47b06c49ab11365.jpg', 'extension': 'jpg'}, 1377219810: {'path': 'temp/1755224100_295230_1377219810_a818a017851b74d73732a76a3b061739.jpg', 'extension': 'jpg'}, 1377219812: {'path': 'temp/1755224100_295230_1377219812_6265a5e49b708125c7e29efc80542fd5.jpg', 'extension': 'jpg'}, 1377219816: {'path': 'temp/1755224100_295230_1377219816_bd97e94a16e55b44a9a1ab80f91dd688.jpg', 'extension': 'jpg'}, 1377219817: {'path': 'temp/1755224100_295230_1377219817_e45b6918e207739c426449a02f1f561e.jpg', 'extension': 'jpg'}, 1377219821: {'path': 'temp/1755224100_295230_1377219821_de7847c6b9bccce5a45bc40f5b621b72.jpg', 'extension': 'jpg'}, 1377219822: {'path': 'temp/1755224100_295230_1377219822_2dd947c6ada831f57f0ac7363ad68ddc.jpg', 'extension': 'jpg'}, 1377219630: {'path': 'temp/1755224100_295230_1377219630_8ecf622be98ff593711bf52cbad3fcfd.jpg', 'extension': 'jpg'}, 1377219662: {'path': 'temp/1755224100_295230_1377219662_8c0871e0dc3f2e98fc2bfa3075c9c6ed.jpg', 'extension': 'jpg'}, 1377219693: {'path': 'temp/1755224100_295230_1377219693_5d6f695f6fd7829be76141d43f46523e.jpg', 'extension': 'jpg'}, 1377219724: {'path': 'temp/1755224100_295230_1377219724_0dfbad7cb7e0f6257f64c8ec268ce39c.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 = 26015599; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 26015599 group by h (('04', 64),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26015599 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 (26015599) 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 (26015599) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 15082025 26015599 Nombre de photos uploadées : 64 / 23040 (0%) 15082025 26015599 Nombre de photos taguées (types de déchets): 0 / 64 (0%) 15082025 26015599 Nombre de photos taguées (volume) : 0 / 64 (0%) [{'photo_id': 1377216708, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/c942607af7eac97e7ab3d30756e9dce0.jpg', 'username': None, 'uploaded_at': 1755223268, 'text': 'image_15082025_04_00_14_10209.jpg'}, {'photo_id': 1377216674, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/83580cbd2bd66f44b28b37d811c54eb2.jpg', 'username': None, 'uploaded_at': 1755223268, 'text': 'image_15082025_04_00_24_10139.jpg'}, {'photo_id': 1377216638, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/941ae0d27be757bbd718fb4450ddf8ec.jpg', 'username': None, 'uploaded_at': 1755223268, 'text': 'image_15082025_04_00_44_10136.jpg'}, {'photo_id': 1377217059, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/9d5d4b96ccad25f8f4e01c24b16d588d.jpg', 'username': None, 'uploaded_at': 1755223328, 'text': 'image_15082025_04_00_54_10136.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 4.76837158203125e-06 ???????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.003550291061401367 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 26015599, '2025-08-15' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2122421,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.40561461448669434 We will return after consolidate but for now we need the day, how to get it, for now depending on the previous heavy steps SELECT dri.dashboard_entry_day, dr.dashboard_run_id, dr.mtr_portfolio_id, dr.id, dr.hashtag, dr.completion_json FROM MTRPhoto.dashboard_results dr, MTRPhoto.dashboard_run_ids dri, MTRPhoto.dashboard_entry_day ded WHERE ded.id= 2122421 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130711, 'mtr_portfolio_id': 26009616, 'dashboard_result_id': 14041373, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26009616_15-08-2025_00_33_29.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26009617, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26009618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26009619, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26009620, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26009621, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26009622, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26009623, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26009624, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26009625, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26009626, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26009627, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26009628, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130711, 'mtr_portfolio_id': 26009667, 'dashboard_result_id': 14041374, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26009667_15-08-2025_00_47_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26009670, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26009671, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26009672, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26009673, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26009674, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26009675, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26009676, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26009677, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26009679, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26009680, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26009681, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26009682, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130711, 'mtr_portfolio_id': 26010093, 'dashboard_result_id': 14041375, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26010093_15-08-2025_01_34_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26010154, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26010155, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26010156, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26010157, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26010158, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26010159, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26010160, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26010161, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26010162, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26010163, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26010164, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26010165, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130711, 'mtr_portfolio_id': 26011192, 'dashboard_result_id': 14041376, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011192_15-08-2025_01_49_28.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011231, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011232, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011233, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011234, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011235, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011236, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011237, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011238, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011239, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011240, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011241, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26011242, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130711, 'mtr_portfolio_id': 26011457, 'dashboard_result_id': 14041377, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011457_15-08-2025_02_03_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26011462, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011463, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011464, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011465, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011466, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011467, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011468, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011469, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011470, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011471, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011472, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011473, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130711, 'mtr_portfolio_id': 26011726, 'dashboard_result_id': 14041378, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011726_15-08-2025_02_19_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011786, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011787, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011788, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011789, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011790, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011791, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011792, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011793, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011794, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26011795, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011796, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011797, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130711, 'mtr_portfolio_id': 26012288, 'dashboard_result_id': 14041379, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26012288_15-08-2025_02_32_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26012300, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26012301, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26012302, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26012303, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26012304, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26012305, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26012306, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26012307, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26012308, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26012309, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26012310, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26012311, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130711, 'mtr_portfolio_id': 26012804, 'dashboard_result_id': 14041380, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26012804_15-08-2025_02_50_30.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26012822, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26012823, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26012824, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26012825, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26012826, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26012827, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26012828, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26012829, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26012830, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26012831, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26012832, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26012833, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130711, 'mtr_portfolio_id': 26013291, 'dashboard_result_id': 14041381, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26013291_15-08-2025_03_08_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26013309, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26013310, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26013311, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26013312, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26013313, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26013314, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26013315, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26013316, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26013317, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26013318, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26013319, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26013320, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130711, 'mtr_portfolio_id': 26013988, 'dashboard_result_id': 14041382, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26013988_15-08-2025_03_17_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26013998, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26013999, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014000, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26014001, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014002, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014004, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014005, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014006, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014007, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014008, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014009, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014010, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130711, 'mtr_portfolio_id': 26014385, 'dashboard_result_id': 14041383, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26014385_15-08-2025_03_33_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26014399, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014400, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26014401, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014402, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26014403, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014404, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014405, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014406, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014407, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014408, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014409, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014410, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130711, 'mtr_portfolio_id': 26014766, 'dashboard_result_id': 14041384, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26014766_15-08-2025_03_47_33.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26014776, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014777, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26014778, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014779, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014780, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014781, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014782, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014783, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014784, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014785, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26014786, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014787, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130711, 'mtr_portfolio_id': 26015128, 'dashboard_result_id': 14041385, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26015128_15-08-2025_04_02_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26015133, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26015134, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26015135, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26015136, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26015137, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26015138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26015139, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26015140, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26015141, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26015142, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26015143, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26015144, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2130711, 'mtr_portfolio_id': 26015599, 'dashboard_result_id': 14041386, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26015599_15-08-2025_04_13_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26015625, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26015626, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26015627, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26015628, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26015629, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26015630, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26015631, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26015632, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26015633, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26015634, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26015635, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26015636, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26009616 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3543348, 'mtr_portfolio_id': 26009616, 'created_at': datetime.datetime(2025, 8, 15, 0, 33, 29), 'result': '0.02393868320933984', 'result_long': None, 'result_double': None}] Qualite : 0.02393868320933984 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26009616 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26009616_15-08-2025_00_33_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26009616 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26009616_15-08-2025_00_33_29.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26009617, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26009618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26009619, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26009620, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26009621, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26009622, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26009623, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26009624, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26009625, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26009626, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26009627, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26009628, 'pht': 3726}}" where mtr_portfolio_id = 26009616 and dashboard_run_id = 2130711 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26009616 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14041373, 0.02393868320933984, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26009616_15-08-2025_00_33_29.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26009617, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26009618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26009619, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26009620, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26009621, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26009622, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26009623, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26009624, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26009625, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26009626, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26009627, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26009628, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26009667 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3543352, 'mtr_portfolio_id': 26009667, 'created_at': datetime.datetime(2025, 8, 15, 0, 46, 59), 'result': '0.044401801310752075', 'result_long': None, 'result_double': None}] Qualite : 0.044401801310752075 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26009667 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26009667_15-08-2025_00_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26009667 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26009667_15-08-2025_00_47_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26009670, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26009671, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26009672, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26009673, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26009674, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26009675, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26009676, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26009677, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26009679, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26009680, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26009681, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26009682, 'pht': 3726}}" where mtr_portfolio_id = 26009667 and dashboard_run_id = 2130711 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26009667 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14041374, 0.044401801310752075, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26009667_15-08-2025_00_47_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26009670, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26009671, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26009672, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26009673, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26009674, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26009675, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26009676, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26009677, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26009679, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26009680, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26009681, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26009682, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26010093 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3543403, 'mtr_portfolio_id': 26010093, 'created_at': datetime.datetime(2025, 8, 15, 1, 34, 58), 'result': '0.06099066835265486', 'result_long': None, 'result_double': None}] Qualite : 0.06099066835265486 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26010093 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26010093_15-08-2025_01_34_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26010093 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26010093_15-08-2025_01_34_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26010154, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26010155, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26010156, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26010157, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26010158, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26010159, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26010160, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26010161, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26010162, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26010163, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26010164, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26010165, 'pht': 3726}}" where mtr_portfolio_id = 26010093 and dashboard_run_id = 2130711 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26010093 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14041375, 0.06099066835265486, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26010093_15-08-2025_01_34_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26010154, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26010155, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26010156, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26010157, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26010158, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26010159, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26010160, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26010161, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26010162, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26010163, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26010164, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26010165, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26011192 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3543660, 'mtr_portfolio_id': 26011192, 'created_at': datetime.datetime(2025, 8, 15, 1, 49, 27), 'result': '0.03868287500958118', 'result_long': None, 'result_double': None}] Qualite : 0.03868287500958118 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26011192 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011192_15-08-2025_01_49_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26011192 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011192_15-08-2025_01_49_28.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011231, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011232, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011233, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011234, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011235, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011236, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011237, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011238, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011239, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011240, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011241, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26011242, 'pht': 3726}}" where mtr_portfolio_id = 26011192 and dashboard_run_id = 2130711 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26011192 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14041376, 0.03868287500958118, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011192_15-08-2025_01_49_28.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011231, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011232, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011233, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011234, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011235, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011236, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011237, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011238, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011239, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011240, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011241, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26011242, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26011457 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3543710, 'mtr_portfolio_id': 26011457, 'created_at': datetime.datetime(2025, 8, 15, 2, 3), 'result': '0.03564865645332555', 'result_long': None, 'result_double': None}] Qualite : 0.03564865645332555 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26011457 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011457_15-08-2025_02_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26011457 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011457_15-08-2025_02_03_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26011462, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011463, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011464, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011465, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011466, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011467, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011468, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011469, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011470, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011471, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011472, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011473, 'pht': 3726}}" where mtr_portfolio_id = 26011457 and dashboard_run_id = 2130711 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26011457 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14041377, 0.03564865645332555, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011457_15-08-2025_02_03_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26011462, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011463, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011464, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011465, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011466, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011467, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011468, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011469, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011470, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011471, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011472, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011473, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26011726 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3543812, 'mtr_portfolio_id': 26011726, 'created_at': datetime.datetime(2025, 8, 15, 2, 18, 59), 'result': '0.06410354923549737', 'result_long': None, 'result_double': None}] Qualite : 0.06410354923549737 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26011726 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011726_15-08-2025_02_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26011726 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011726_15-08-2025_02_19_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011786, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011787, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011788, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011789, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011790, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011791, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011792, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011793, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011794, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26011795, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011796, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011797, 'pht': 3726}}" where mtr_portfolio_id = 26011726 and dashboard_run_id = 2130711 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26011726 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14041378, 0.06410354923549737, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011726_15-08-2025_02_19_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011786, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011787, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011788, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011789, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011790, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011791, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011792, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011793, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011794, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26011795, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011796, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011797, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26012288 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3543948, 'mtr_portfolio_id': 26012288, 'created_at': datetime.datetime(2025, 8, 15, 2, 32, 58), 'result': '0.055275944500488824', 'result_long': None, 'result_double': None}] Qualite : 0.055275944500488824 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26012288 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26012288_15-08-2025_02_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26012288 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26012288_15-08-2025_02_32_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26012300, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26012301, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26012302, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26012303, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26012304, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26012305, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26012306, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26012307, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26012308, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26012309, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26012310, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26012311, 'pht': 3726}}" where mtr_portfolio_id = 26012288 and dashboard_run_id = 2130711 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26012288 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14041379, 0.055275944500488824, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26012288_15-08-2025_02_32_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26012300, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26012301, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26012302, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26012303, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26012304, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26012305, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26012306, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26012307, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26012308, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26012309, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26012310, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26012311, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26012804 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3544150, 'mtr_portfolio_id': 26012804, 'created_at': datetime.datetime(2025, 8, 15, 2, 50, 29), 'result': '0.07201274534087537', 'result_long': None, 'result_double': None}] Qualite : 0.07201274534087537 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26012804 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26012804_15-08-2025_02_50_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26012804 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26012804_15-08-2025_02_50_30.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26012822, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26012823, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26012824, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26012825, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26012826, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26012827, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26012828, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26012829, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26012830, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26012831, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26012832, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26012833, 'pht': 3726}}" where mtr_portfolio_id = 26012804 and dashboard_run_id = 2130711 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26012804 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14041380, 0.07201274534087537, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26012804_15-08-2025_02_50_30.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26012822, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26012823, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26012824, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26012825, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26012826, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26012827, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26012828, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26012829, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26012830, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26012831, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26012832, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26012833, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26013291 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3544375, 'mtr_portfolio_id': 26013291, 'created_at': datetime.datetime(2025, 8, 15, 3, 8, 58), 'result': '0.039870167648543724', 'result_long': None, 'result_double': None}] Qualite : 0.039870167648543724 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26013291 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26013291_15-08-2025_03_08_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26013291 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26013291_15-08-2025_03_08_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26013309, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26013310, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26013311, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26013312, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26013313, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26013314, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26013315, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26013316, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26013317, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26013318, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26013319, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26013320, 'pht': 3726}}" where mtr_portfolio_id = 26013291 and dashboard_run_id = 2130711 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26013291 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14041381, 0.039870167648543724, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26013291_15-08-2025_03_08_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26013309, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26013310, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26013311, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26013312, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26013313, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26013314, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26013315, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26013316, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26013317, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26013318, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26013319, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26013320, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26013988 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3544648, 'mtr_portfolio_id': 26013988, 'created_at': datetime.datetime(2025, 8, 15, 3, 17), 'result': '0.07984756001990542', 'result_long': None, 'result_double': None}] Qualite : 0.07984756001990542 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26013988 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26013988_15-08-2025_03_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26013988 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26013988_15-08-2025_03_17_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26013998, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26013999, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014000, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26014001, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014002, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014004, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014005, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014006, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014007, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014008, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014009, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014010, 'pht': 3726}}" where mtr_portfolio_id = 26013988 and dashboard_run_id = 2130711 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26013988 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14041382, 0.07984756001990542, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26013988_15-08-2025_03_17_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26013998, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26013999, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014000, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26014001, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014002, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014004, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014005, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014006, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014007, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014008, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014009, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014010, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26014385 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3544723, 'mtr_portfolio_id': 26014385, 'created_at': datetime.datetime(2025, 8, 15, 3, 33), 'result': '0.06013094672396472', 'result_long': None, 'result_double': None}] Qualite : 0.06013094672396472 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26014385 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26014385_15-08-2025_03_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26014385 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26014385_15-08-2025_03_33_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26014399, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014400, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26014401, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014402, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26014403, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014404, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014405, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014406, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014407, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014408, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014409, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014410, 'pht': 3726}}" where mtr_portfolio_id = 26014385 and dashboard_run_id = 2130714 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26014385 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14041383, 0.06013094672396472, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26014385_15-08-2025_03_33_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26014399, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014400, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26014401, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014402, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26014403, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014404, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014405, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014406, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014407, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014408, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014409, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014410, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26014766 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3544778, 'mtr_portfolio_id': 26014766, 'created_at': datetime.datetime(2025, 8, 15, 3, 47, 32), 'result': '0.04564862762433859', 'result_long': None, 'result_double': None}] Qualite : 0.04564862762433859 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26014766 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26014766_15-08-2025_03_47_33.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26014766 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26014766_15-08-2025_03_47_33.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26014776, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014777, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26014778, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014779, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014780, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014781, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014782, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014783, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014784, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014785, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26014786, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014787, 'pht': 3726}}" where mtr_portfolio_id = 26014766 and dashboard_run_id = 2130714 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26014766 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14041384, 0.04564862762433859, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26014766_15-08-2025_03_47_33.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26014776, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014777, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26014778, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014779, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014780, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014781, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014782, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014783, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014784, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014785, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26014786, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014787, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26015128 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3544865, 'mtr_portfolio_id': 26015128, 'created_at': datetime.datetime(2025, 8, 15, 4, 2, 57), 'result': '0.050519310784844916', 'result_long': None, 'result_double': None}] Qualite : 0.050519310784844916 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26015128 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26015128_15-08-2025_04_02_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26015128 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26015128_15-08-2025_04_02_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26015133, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26015134, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26015135, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26015136, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26015137, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26015138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26015139, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26015140, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26015141, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26015142, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26015143, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26015144, 'pht': 3726}}" where mtr_portfolio_id = 26015128 and dashboard_run_id = 2130714 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26015128 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14041385, 0.050519310784844916, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26015128_15-08-2025_04_02_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26015133, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26015134, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26015135, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26015136, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26015137, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26015138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26015139, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26015140, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26015141, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26015142, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26015143, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26015144, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26015599 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3545004, 'mtr_portfolio_id': 26015599, 'created_at': datetime.datetime(2025, 8, 15, 4, 15), 'result': '0.047472019864925254', 'result_long': None, 'result_double': None}] Qualite : 0.047472019864925254 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26015599 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26015599_15-08-2025_04_15_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26015599 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26015599_15-08-2025_04_15_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26015625, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26015626, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26015627, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26015628, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26015629, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26015630, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26015631, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26015632, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26015633, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26015634, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26015635, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26015636, 'pht': 3726}}" where mtr_portfolio_id = 26015599 and dashboard_run_id = 2130714 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26015599 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14041386, 0.047472019864925254, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26015599_15-08-2025_04_15_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26015625, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26015626, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26015627, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26015628, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26015629, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26015630, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26015631, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26015632, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26015633, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26015634, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26015635, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26015636, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26009616,26009667,26010093,26011192,26011457,26011726,26012288,26012804,26013291,26013988,26014385,26014766,26015128,26015599) result : ((1377183099,), (1377184546,), (1377184550,), (1377184791,), (1377184820,), (1377184849,), (1377184879,), (1377185245,), (1377185214,), (1377185547,), (1377185701,), (1377185814,), (1377185930,), (1377187140,), (1377187184,), (1377187228,), (1377187274,), (1377187304,), (1377187685,), (1377187797,), (1377187888,), (1377188711,), (1377188767,), (1377188820,), (1377188876,), (1377188932,), (1377190070,), (1377190228,), (1377190359,), (1377190441,), (1377190471,), (1377190479,), (1377190495,), (1377190502,), (1377190532,), (1377190561,), (1377190593,), (1377191277,), (1377191317,), (1377191372,), (1377191420,), (1377191469,), (1377191527,), (1377191911,), (1377191983,), (1377192027,), (1377192057,), (1377192109,), (1377192242,), (1377192317,), (1377192322,), (1377192326,), (1377192330,), (1377192448,), (1377192451,), (1377192453,), (1377192636,), (1377192638,), (1377192640,), (1377192642,), (1377192701,), (1377192702,), (1377192703,), (1377192705,), (1377192709,), (1377192807,), (1377192810,), (1377192843,), (1377192861,), (1377192865,), (1377192869,), (1377192926,), (1377192923,), (1377192924,), (1377192949,), (1377192956,), (1377192973,), (1377192997,), (1377192999,), (1377193001,), (1377193005,), (1377193046,), (1377193050,), (1377193053,), (1377193126,), (1377193147,), (1377193163,), (1377193166,), (1377193171,), (1377193192,), (1377193195,), (1377193222,), (1377193224,), (1377193226,), (1377193229,), (1377193248,), (1377193250,), (1377193253,), (1377193257,), (1377193260,), (1377193263,), (1377193272,), (1377193359,), (1377193369,), (1377193414,), (1377193539,), (1377193571,), (1377199434,), (1377199461,), (1377199463,), (1377199477,), (1377199479,), (1377199482,), (1377199487,), (1377199491,), (1377199505,), (1377199514,), (1377199534,), (1377199538,), (1377199548,), (1377199564,), (1377199572,), (1377199575,), (1377199607,), (1377199612,), (1377199616,), (1377199620,), (1377199623,), (1377199634,), (1377199637,), (1377199641,), (1377199666,), (1377199669,), (1377199706,), (1377199708,), (1377199709,), (1377199712,), (1377199716,), (1377199730,), (1377199733,), (1377199735,), (1377199738,), (1377199740,), (1377199743,), (1377199752,), (1377199754,), (1377199757,), (1377199761,), (1377199764,), (1377199768,), (1377199779,), (1377199782,), (1377199789,), (1377199791,), (1377199793,), (1377199798,), (1377199801,), (1377199804,), (1377199808,), (1377199811,), (1377199815,), (1377199824,), (1377199826,), (1377199829,), (1377199835,), (1377199879,), (1377199856,), (1377199858,), (1377199860,), (1377199863,), (1377199869,), (1377199892,), (1377199895,), (1377199898,), (1377199902,), (1377199962,), (1377199964,), (1377199966,), (1377199969,), (1377199972,), (1377199974,), (1377199996,), (1377200022,), (1377200050,), (1377200078,), (1377200131,), (1377200442,), (1377200538,), (1377200571,), (1377200876,), (1377200880,), (1377200883,), (1377200887,), (1377201028,), (1377201059,), (1377201089,), (1377201122,), (1377201217,), (1377201218,), (1377201220,), (1377201224,), (1377201228,), (1377201238,), (1377201248,), (1377201250,), (1377201252,), (1377201310,), (1377201313,), (1377201331,), (1377201334,), (1377201336,), (1377201352,), (1377201353,), (1377201374,), (1377201376,), (1377201389,), (1377201440,), (1377201442,), (1377201444,), (1377201446,), (1377201450,), (1377201697,), (1377201728,), (1377201761,), (1377201794,), (1377201824,), (1377201856,), (1377201949,), (1377201978,), (1377202014,), (1377202302,), (1377202148,), (1377202184,), (1377202214,), (1377202243,), (1377202273,), (1377202605,), (1377202670,), (1377202725,), (1377202801,), (1377202859,), (1377202902,), (1377203221,), (1377203251,), (1377203281,), (1377203313,), (1377203346,), (1377203350,), (1377203358,), (1377203359,), (1377203361,), (1377203365,), (1377203369,), (1377203373,), (1377203399,), (1377203427,), (1377203552,), (1377203585,), (1377203617,), (1377203648,), (1377203678,), (1377203768,), (1377203808,), (1377203840,), (1377203870,), (1377203900,), (1377204161,), (1377204191,), (1377204532,), (1377204562,), (1377204594,), (1377205038,), (1377205095,), (1377205165,), (1377205221,), (1377205574,), (1377205602,), (1377205636,), (1377205702,), (1377206188,), (1377206220,), (1377206248,), (1377206314,), (1377206349,), (1377206585,), (1377206614,), (1377206642,), (1377206677,), (1377206716,), (1377207106,), (1377207160,), (1377207206,), (1377207236,), (1377207269,), (1377207300,), (1377207465,), (1377207521,), (1377207571,), (1377207606,), (1377207738,), (1377207788,), (1377207839,), (1377207878,), (1377207908,), (1377208001,), (1377208003,), (1377208006,), (1377208008,), (1377208011,), (1377208014,), (1377208162,), (1377208027,), (1377208034,), (1377208071,), (1377208102,), (1377208133,), (1377208347,), (1377208380,), (1377208504,), (1377208513,), (1377208518,), (1377208521,), (1377208524,), (1377208557,), (1377208587,), (1377208622,), (1377208653,), (1377208689,), (1377208720,), (1377208954,), (1377208987,), (1377209018,), (1377209273,), (1377209276,), (1377209279,), (1377209283,), (1377209510,), (1377209513,), (1377209537,), (1377209543,), (1377209565,), (1377209567,), (1377209570,), (1377209572,), (1377209574,), (1377209577,), (1377209603,), (1377209605,), (1377209608,), (1377209611,), (1377209614,), (1377209616,), (1377209624,), (1377209628,), (1377209634,), (1377209639,), (1377209642,), (1377209650,), (1377209651,), (1377209652,), (1377209654,), (1377209673,), (1377209677,), (1377209680,), (1377209682,), (1377209684,), (1377209686,), (1377209702,), (1377209704,), (1377209706,), (1377209708,), (1377209711,), (1377209716,), (1377209723,), (1377209726,), (1377209732,), (1377209738,), (1377209741,), (1377209743,), (1377209750,), (1377209751,), (1377209754,), (1377209756,), (1377209758,), (1377209759,), (1377209771,), (1377209774,), (1377209775,), (1377209777,), (1377209780,), (1377209783,), (1377209805,), (1377209808,), (1377209809,), (1377209811,), (1377209847,), (1377209840,), (1377209842,), (1377209866,), (1377209878,), (1377209880,), (1377209882,), (1377209884,), (1377209886,), (1377209903,), (1377209907,), (1377209912,), (1377209916,), (1377209918,), (1377209919,), (1377209923,), (1377209925,), (1377209946,), (1377209977,), (1377210020,), (1377210133,), (1377210162,), (1377210297,), (1377210329,), (1377210900,), (1377210931,), (1377210932,), (1377210934,), (1377210936,), (1377210938,), (1377210971,), (1377210973,), (1377210974,), (1377210980,), (1377211003,), (1377211005,), (1377211007,), (1377211010,), (1377211013,), (1377211017,), (1377211033,), (1377211035,), (1377211037,), (1377211039,), (1377211041,), (1377211043,), (1377211052,), (1377211054,), (1377211056,), (1377211059,), (1377211062,), (1377211065,), (1377211076,), (1377211077,), (1377211079,), (1377211082,), (1377211084,), (1377211087,), (1377211098,), (1377211101,), (1377211103,), (1377211104,), (1377211105,), (1377211111,), (1377211135,), (1377211136,), (1377211171,), (1377211173,), (1377211177,), (1377211181,), (1377211118,), (1377211122,), (1377211129,), (1377211132,), (1377211149,), (1377211153,), (1377211158,), (1377211160,), (1377211161,), (1377211162,), (1377211167,), (1377211169,), (1377211187,), (1377211188,), (1377211189,), (1377211190,), (1377211192,), (1377211197,), (1377211200,), (1377211203,), (1377211206,), (1377211208,), (1377211210,), (1377211431,), (1377214993,), (1377214957,), (1377215242,), (1377215250,), (1377215252,), (1377215254,), (1377215267,), (1377215288,), (1377215291,), (1377215311,), (1377215314,), (1377215318,), (1377215319,), (1377215322,), (1377215346,), (1377215349,), (1377215352,), (1377215388,), (1377215390,), (1377215392,), (1377215409,), (1377215411,), (1377215414,), (1377215417,), (1377215421,), (1377215423,), (1377215427,), (1377215435,), (1377215437,), (1377215439,), (1377215441,), (1377215448,), (1377215452,), (1377215463,), (1377215482,), (1377215479,), (1377215508,), (1377215515,), (1377215516,), (1377215517,), (1377215524,), (1377215527,), (1377215529,), (1377215532,), (1377215534,), (1377215545,), (1377215547,), (1377215549,), (1377215575,), (1377215576,), (1377215578,), (1377215605,), (1377215608,), (1377215611,), (1377215631,), (1377215634,), (1377215636,), (1377215652,), (1377215654,), (1377215657,), (1377215661,), (1377215672,), (1377215673,), (1377215674,), (1377215678,), (1377215681,), (1377215695,), (1377215699,), (1377215703,), (1377215706,), (1377215720,), (1377215728,), (1377215734,), (1377215737,), (1377215746,), (1377215747,), (1377215749,), (1377215752,), (1377215769,), (1377215770,), (1377215771,), (1377215787,), (1377215789,), (1377215791,), (1377215793,), (1377215796,), (1377215799,), (1377215806,), (1377215808,), (1377215810,), (1377215812,), (1377215814,), (1377215817,), (1377215842,), (1377215838,), (1377215840,), (1377215875,), (1377215878,), (1377215881,), (1377215885,), (1377215888,), (1377215898,), (1377215902,), (1377215905,), (1377215908,), (1377215911,), (1377215914,), (1377215918,), (1377215919,), (1377215920,), (1377215924,), (1377215927,), (1377215931,), (1377215934,), (1377215936,), (1377215938,), (1377215941,), (1377215943,), (1377215945,), (1377215949,), (1377215961,), (1377215963,), (1377215969,), (1377215972,), (1377215976,), (1377215986,), (1377215987,), (1377215988,), (1377215991,), (1377215994,), (1377215998,), (1377216008,), (1377216012,), (1377216023,), (1377216031,), (1377216046,), (1377216048,), (1377216050,), (1377216053,), (1377216066,), (1377216068,), (1377216070,), (1377216102,), (1377216104,), (1377216106,), (1377216111,), (1377216130,), (1377216132,), (1377216134,), (1377216138,), (1377216141,), (1377216152,), (1377216155,), (1377216159,), (1377216162,), (1377216164,), (1377216166,), (1377216171,), (1377216178,), (1377216180,), (1377216182,), (1377216185,), (1377216188,), (1377216203,), (1377216206,), (1377216210,), (1377216214,), (1377216218,), (1377216237,), (1377216231,), (1377216234,), (1377216235,), (1377216258,), (1377216264,), (1377216277,), (1377216280,), (1377216283,), (1377216287,), (1377216301,), (1377216303,), (1377216305,), (1377216308,), (1377216310,), (1377216312,), (1377216321,), (1377216322,), (1377216329,), (1377216335,), (1377216338,), (1377216355,), (1377216360,), (1377216362,), (1377216366,), (1377216371,), (1377216386,), (1377216389,), (1377216391,), (1377216394,), (1377216397,), (1377216400,), (1377216411,), (1377216414,), (1377216418,), (1377216421,), (1377216424,), (1377216426,), (1377216431,), (1377216434,), (1377216437,), (1377216439,), (1377216444,), (1377216446,), (1377216464,), (1377216466,), (1377216468,), (1377216471,), (1377216473,), (1377216476,), (1377216480,), (1377216483,), (1377216486,), (1377216491,), (1377216495,), (1377216510,), (1377216511,), (1377216512,), (1377216515,), (1377216534,), (1377216536,), (1377216540,), (1377216543,), (1377216547,), (1377216567,), (1377216569,), (1377216573,), (1377216576,), (1377216579,), (1377216583,), (1377216734,), (1377216638,), (1377216674,), (1377216708,), (1377216999,), (1377217031,), (1377217059,), (1377217247,), (1377217254,), (1377217256,), (1377217415,), (1377217450,), (1377217478,), (1377217499,), (1377217511,), (1377217548,), (1377217556,), (1377217558,), (1377217561,), (1377217564,), (1377217581,), (1377217589,), (1377217590,), (1377217591,), (1377217594,), (1377217614,), (1377217621,), (1377217632,), (1377217661,), (1377217691,), (1377217964,), (1377217993,), (1377218053,), (1377218106,), (1377218158,), (1377218458,), (1377218494,), (1377218524,), (1377219018,), (1377219054,), (1377219081,), (1377219114,), (1377219143,), (1377219394,), (1377219428,), (1377219455,), (1377219485,), (1377219491,), (1377219522,), (1377219630,), (1377219662,), (1377219693,), (1377219724,), (1377219805,), (1377219806,), (1377219810,), (1377219812,), (1377219816,), (1377219817,), (1377219821,), (1377219822,), (1377219824,), (1377219825,), (1377219826,), (1377219827,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'15082025': {'nb_upload': 64, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26015599]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1377219827, 1377219826, 1377219825, 1377219824, 1377219822, 1377219821, 1377219817, 1377219816, 1377219812, 1377219810, 1377219806, 1377219805, 1377219724, 1377219693, 1377219662, 1377219630] map_info['map_portfolio_photo'] : {26015599: [1377219827, 1377219826, 1377219825, 1377219824, 1377219822, 1377219821, 1377219817, 1377219816, 1377219812, 1377219810, 1377219806, 1377219805, 1377219724, 1377219693, 1377219662, 1377219630, 1377219522, 1377219491, 1377219485, 1377219455, 1377219428, 1377219394, 1377219143, 1377219114, 1377219081, 1377219054, 1377219018, 1377218524, 1377218494, 1377218458, 1377218158, 1377218106, 1377218053, 1377217993, 1377217964, 1377217691, 1377217661, 1377217632, 1377217621, 1377217614, 1377217594, 1377217591, 1377217590, 1377217589, 1377217581, 1377217564, 1377217561, 1377217558, 1377217556, 1377217548, 1377217511, 1377217499, 1377217478, 1377217450, 1377217415, 1377217256, 1377217254, 1377217247, 1377217059, 1377217031, 1377216999, 1377216708, 1377216674, 1377216638]} final : True mtd_id 4302 list_pids : [1377219827, 1377219826, 1377219825, 1377219824, 1377219822, 1377219821, 1377219817, 1377219816, 1377219812, 1377219810, 1377219806, 1377219805, 1377219724, 1377219693, 1377219662, 1377219630] Looping around the photos to save general results len do output : 1 /26015599Didn'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, '3545004') ('4302', '26015599', '1377219827', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219826', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219825', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219824', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219822', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219821', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219817', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219816', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219812', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219810', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219806', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219805', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219724', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219693', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219662', None, None, None, None, None, '3545004') ('4302', None, None, None, None, None, None, None, '3545004') ('4302', '26015599', '1377219630', None, None, None, None, None, '3545004') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 17 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, '26015599', 'None', None, None, None, None, '3545004'), ('4302', '26015599', '1377219827', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219826', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219825', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219824', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219822', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219821', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219817', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219816', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219812', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219810', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219806', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219805', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219724', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219693', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219662', None, None, None, None, None, '3545004'), ('4302', '26015599', '1377219630', None, None, None, None, None, '3545004')] time used for this insertion : 0.0618891716003418 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.3319120407104492 time spend to save output : 0.062133073806762695 total time spend for step 5 : 1.394045114517212 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 (3545004) 2.25user 2.44system 0:09.87elapsed 47%CPU (0avgtext+0avgdata 164796maxresident)k 0inputs+13240outputs (0major+72627minor)pagefaults 0swaps