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 : 3185103 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 (4177509) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4177509) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29126976 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4177509'] with mtr_portfolio_ids : ['29126976'] and first list_photo_ids : [] new path : /proc/3185103/ Name: python3 Umask: 0002 State: R (running) Tgid: 3185103 Ngid: 0 Pid: 3185103 PPid: 3185102 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3185103 NSpid: 3185103 NSpgid: 3184154 NSsid: 3184154 VmPeak: 1113360 kB VmSize: 1113360 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 106056 kB VmRSS: 106056 kB RssAnon: 66288 kB RssFile: 39768 kB RssShmem: 0 kB VmData: 872088 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130476 kB VmPTE: 620 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: 72 nonvoluntary_ctxt_switches: 120 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3185103', 'Ngid': '0', 'Pid': '3185103', 'PPid': '3185102', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3185103', 'NSpid': '3185103', 'NSpgid': '3184154', 'NSsid': '3184154', 'VmPeak': '1113360 kB', 'VmSize': '1113360 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '106056 kB', 'VmRSS': '106056 kB', 'RssAnon': '66288 kB', 'RssFile': '39768 kB', 'RssShmem': '0 kB', 'VmData': '872088 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130476 kB', 'VmPTE': '620 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': '72', 'nonvoluntary_ctxt_switches': '120'} ('datou_batch_current', '3185103', '1113360', '0', '1113360', '872088', '106056', b'', 'marlene', '4177509') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (29126976) 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 (4177509 ) ) 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 (29126976) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1397569920, 'portfolio_id': 29126976}, {'photo_id': 1397569718, 'portfolio_id': 29126976}, {'photo_id': 1397569673, 'portfolio_id': 29126976}, {'photo_id': 1397569607, 'portfolio_id': 29126976}, {'photo_id': 1397569555, 'portfolio_id': 29126976}, {'photo_id': 1397569337, 'portfolio_id': 29126976}, {'photo_id': 1397569267, 'portfolio_id': 29126976}, {'photo_id': 1397569194, 'portfolio_id': 29126976}, {'photo_id': 1397569126, 'portfolio_id': 29126976}, {'photo_id': 1397569039, 'portfolio_id': 29126976}, {'photo_id': 1397569031, 'portfolio_id': 29126976}, {'photo_id': 1397568620, 'portfolio_id': 29126976}, {'photo_id': 1397568618, 'portfolio_id': 29126976}, {'photo_id': 1397568617, 'portfolio_id': 29126976}, {'photo_id': 1397568616, 'portfolio_id': 29126976}, {'photo_id': 1397568615, 'portfolio_id': 29126976}, {'photo_id': 1397568534, 'portfolio_id': 29126976}, {'photo_id': 1397568528, 'portfolio_id': 29126976}, {'photo_id': 1397568527, 'portfolio_id': 29126976}, {'photo_id': 1397568490, 'portfolio_id': 29126976}, {'photo_id': 1397568488, 'portfolio_id': 29126976}, {'photo_id': 1397568406, 'portfolio_id': 29126976}, {'photo_id': 1397568405, 'portfolio_id': 29126976}, {'photo_id': 1397568237, 'portfolio_id': 29126976}, {'photo_id': 1397568236, 'portfolio_id': 29126976}, {'photo_id': 1397568127, 'portfolio_id': 29126976}, {'photo_id': 1397568126, 'portfolio_id': 29126976}, {'photo_id': 1397568125, 'portfolio_id': 29126976}, {'photo_id': 1397568066, 'portfolio_id': 29126976}, {'photo_id': 1397568065, 'portfolio_id': 29126976}, {'photo_id': 1397568062, 'portfolio_id': 29126976}, {'photo_id': 1397568061, 'portfolio_id': 29126976}, {'photo_id': 1397568058, 'portfolio_id': 29126976}, {'photo_id': 1397568057, 'portfolio_id': 29126976}, {'photo_id': 1397568054, 'portfolio_id': 29126976}, {'photo_id': 1397568053, 'portfolio_id': 29126976}, {'photo_id': 1397568050, 'portfolio_id': 29126976}, {'photo_id': 1397568049, 'portfolio_id': 29126976}, {'photo_id': 1397568048, 'portfolio_id': 29126976}, {'photo_id': 1397568047, 'portfolio_id': 29126976}, {'photo_id': 1397568046, 'portfolio_id': 29126976}, {'photo_id': 1397568036, 'portfolio_id': 29126976}, {'photo_id': 1397568031, 'portfolio_id': 29126976}, {'photo_id': 1397568028, 'portfolio_id': 29126976}, {'photo_id': 1397568025, 'portfolio_id': 29126976}, {'photo_id': 1397568019, 'portfolio_id': 29126976}, {'photo_id': 1397567997, 'portfolio_id': 29126976}, {'photo_id': 1397567952, 'portfolio_id': 29126976}, {'photo_id': 1397567950, 'portfolio_id': 29126976}, {'photo_id': 1397567949, 'portfolio_id': 29126976}, {'photo_id': 1397567948, 'portfolio_id': 29126976}, {'photo_id': 1397567947, 'portfolio_id': 29126976}, {'photo_id': 1397567864, 'portfolio_id': 29126976}, {'photo_id': 1397567849, 'portfolio_id': 29126976}, {'photo_id': 1397567846, 'portfolio_id': 29126976}, {'photo_id': 1397567774, 'portfolio_id': 29126976}, {'photo_id': 1397567770, 'portfolio_id': 29126976}, {'photo_id': 1397567756, 'portfolio_id': 29126976}, {'photo_id': 1397567752, 'portfolio_id': 29126976}, {'photo_id': 1397567746, 'portfolio_id': 29126976}] map_portfolio_id_photo_id: {29126976: [1397569920, 1397569718, 1397569673, 1397569607, 1397569555, 1397569337, 1397569267, 1397569194, 1397569126, 1397569039, 1397569031, 1397568620, 1397568618, 1397568617, 1397568616, 1397568615, 1397568534, 1397568528, 1397568527, 1397568490, 1397568488, 1397568406, 1397568405, 1397568237, 1397568236, 1397568127, 1397568126, 1397568125, 1397568066, 1397568065, 1397568062, 1397568061, 1397568058, 1397568057, 1397568054, 1397568053, 1397568050, 1397568049, 1397568048, 1397568047, 1397568046, 1397568036, 1397568031, 1397568028, 1397568025, 1397568019, 1397567997, 1397567952, 1397567950, 1397567949, 1397567948, 1397567947, 1397567864, 1397567849, 1397567846, 1397567774, 1397567770, 1397567756, 1397567752, 1397567746]} ##### 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.02035999298095703 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Wed Dec 3 04:02:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29126976) 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 : 29126976 get user id for portfolio 29126976 get sub ptf for main ptf 29126976, type 3726 and hashtags ['Teint_Dans_La_Masse', 'environnement', 'papier', 'Carton_brun', 'metal', 'Carton_gris', 'mal_croppe', 'autre_refus', 'plastique', 'cartonnette', 'flou', 'kraft'] 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`=29126976 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','environnement','papier','Carton_brun','metal','Carton_gris','mal_croppe','autre_refus','plastique','cartonnette','flou','kraft')) 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`=29126976 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','environnement','papier','Carton_brun','metal','Carton_gris','mal_croppe','autre_refus','plastique','cartonnette','flou','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 29126976, 'sub_port_id': 29126985, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790544, 'last_updated_at': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 28)}, 'Carton_brun': {'main_port_id': 29126976, 'sub_port_id': 29126986, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790545, 'last_updated_at': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 28)}, 'metal': {'main_port_id': 29126976, 'sub_port_id': 29126987, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790546, 'last_updated_at': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 28)}, 'plastique': {'main_port_id': 29126976, 'sub_port_id': 29126988, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790547, 'last_updated_at': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 28)}, 'cartonnette': {'main_port_id': 29126976, 'sub_port_id': 29126989, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790548, 'last_updated_at': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 28)}, 'papier': {'main_port_id': 29126976, 'sub_port_id': 29126990, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790549, 'last_updated_at': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 28)}, 'kraft': {'main_port_id': 29126976, 'sub_port_id': 29126991, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790550, 'last_updated_at': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 28)}, 'mal_croppe': {'main_port_id': 29126976, 'sub_port_id': 29126992, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790551, 'last_updated_at': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 28)}, 'flou': {'main_port_id': 29126976, 'sub_port_id': 29126993, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790552, 'last_updated_at': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 29126976, 'sub_port_id': 29126994, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790553, 'last_updated_at': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 28)}, 'autre_refus': {'main_port_id': 29126976, 'sub_port_id': 29126995, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790554, 'last_updated_at': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 28)}, 'Carton_gris': {'main_port_id': 29126976, 'sub_port_id': 29126996, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790555, 'last_updated_at': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29126985 , 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=29126976 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 (29126985) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29126976) result : ((1397567746,), (1397567752,), (1397567756,), (1397567770,), (1397567774,), (1397567846,), (1397567849,), (1397567864,), (1397567947,), (1397567948,), (1397567949,), (1397567950,), (1397567952,), (1397567997,), (1397568019,), (1397568025,), (1397568028,), (1397568031,), (1397568036,), (1397568046,), (1397568047,), (1397568048,), (1397568049,), (1397568050,), (1397568053,), (1397568054,), (1397568057,), (1397568058,), (1397568061,), (1397568062,), (1397568065,), (1397568066,), (1397568125,), (1397568126,), (1397568127,), (1397568236,), (1397568237,), (1397568405,), (1397568406,), (1397568488,), (1397568490,), (1397568527,), (1397568528,), (1397568534,), (1397568615,), (1397568616,), (1397568617,), (1397568618,), (1397568620,), (1397569031,), (1397569039,), (1397569126,), (1397569194,), (1397569267,), (1397569337,), (1397569555,), (1397569607,), (1397569673,), (1397569718,), (1397569920,)) 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 29126986 , 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=29126976 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 (29126986) result : ((1397568847,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29126976) result : ((1397567746,), (1397567752,), (1397567756,), (1397567770,), (1397567774,), (1397567846,), (1397567849,), (1397567864,), (1397567947,), (1397567948,), (1397567949,), (1397567950,), (1397567952,), (1397567997,), (1397568019,), (1397568025,), (1397568028,), (1397568031,), (1397568036,), (1397568046,), (1397568047,), (1397568048,), (1397568049,), (1397568050,), (1397568053,), (1397568054,), (1397568057,), (1397568058,), (1397568061,), (1397568062,), (1397568065,), (1397568066,), (1397568125,), (1397568126,), (1397568127,), (1397568236,), (1397568237,), (1397568405,), (1397568406,), (1397568488,), (1397568490,), (1397568527,), (1397568528,), (1397568534,), (1397568615,), (1397568616,), (1397568617,), (1397568618,), (1397568620,), (1397569031,), (1397569039,), (1397569126,), (1397569194,), (1397569267,), (1397569337,), (1397569555,), (1397569607,), (1397569673,), (1397569718,), (1397569920,)) 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 29126987 , 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=29126976 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 (29126987) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29126976) result : ((1397567746,), (1397567752,), (1397567756,), (1397567770,), (1397567774,), (1397567846,), (1397567849,), (1397567864,), (1397567947,), (1397567948,), (1397567949,), (1397567950,), (1397567952,), (1397567997,), (1397568019,), (1397568025,), (1397568028,), (1397568031,), (1397568036,), (1397568046,), (1397568047,), (1397568048,), (1397568049,), (1397568050,), (1397568053,), (1397568054,), (1397568057,), (1397568058,), (1397568061,), (1397568062,), (1397568065,), (1397568066,), (1397568125,), (1397568126,), (1397568127,), (1397568236,), (1397568237,), (1397568405,), (1397568406,), (1397568488,), (1397568490,), (1397568527,), (1397568528,), (1397568534,), (1397568615,), (1397568616,), (1397568617,), (1397568618,), (1397568620,), (1397569031,), (1397569039,), (1397569126,), (1397569194,), (1397569267,), (1397569337,), (1397569555,), (1397569607,), (1397569673,), (1397569718,), (1397569920,)) 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 29126988 , 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=29126976 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 (29126988) result : ((1397568478,), (1397568480,), (1397568585,), (1397568586,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29126976) result : ((1397567746,), (1397567752,), (1397567756,), (1397567770,), (1397567774,), (1397567846,), (1397567849,), (1397567864,), (1397567947,), (1397567948,), (1397567949,), (1397567950,), (1397567952,), (1397567997,), (1397568019,), (1397568025,), (1397568028,), (1397568031,), (1397568036,), (1397568046,), (1397568047,), (1397568048,), (1397568049,), (1397568050,), (1397568053,), (1397568054,), (1397568057,), (1397568058,), (1397568061,), (1397568062,), (1397568065,), (1397568066,), (1397568125,), (1397568126,), (1397568127,), (1397568236,), (1397568237,), (1397568405,), (1397568406,), (1397568488,), (1397568490,), (1397568527,), (1397568528,), (1397568534,), (1397568615,), (1397568616,), (1397568617,), (1397568618,), (1397568620,), (1397569031,), (1397569039,), (1397569126,), (1397569194,), (1397569267,), (1397569337,), (1397569555,), (1397569607,), (1397569673,), (1397569718,), (1397569920,)) 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 29126989 , 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=29126976 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 (29126989) result : ((1397568111,), (1397568113,), (1397568115,), (1397570040,), (1397570743,), (1397570745,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29126976) result : ((1397567746,), (1397567752,), (1397567756,), (1397567770,), (1397567774,), (1397567846,), (1397567849,), (1397567864,), (1397567947,), (1397567948,), (1397567949,), (1397567950,), (1397567952,), (1397567997,), (1397568019,), (1397568025,), (1397568028,), (1397568031,), (1397568036,), (1397568046,), (1397568047,), (1397568048,), (1397568049,), (1397568050,), (1397568053,), (1397568054,), (1397568057,), (1397568058,), (1397568061,), (1397568062,), (1397568065,), (1397568066,), (1397568125,), (1397568126,), (1397568127,), (1397568236,), (1397568237,), (1397568405,), (1397568406,), (1397568488,), (1397568490,), (1397568527,), (1397568528,), (1397568534,), (1397568615,), (1397568616,), (1397568617,), (1397568618,), (1397568620,), (1397569031,), (1397569039,), (1397569126,), (1397569194,), (1397569267,), (1397569337,), (1397569555,), (1397569607,), (1397569673,), (1397569718,), (1397569920,)) 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 29126990 , 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=29126976 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 (29126990) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29126976) result : ((1397567746,), (1397567752,), (1397567756,), (1397567770,), (1397567774,), (1397567846,), (1397567849,), (1397567864,), (1397567947,), (1397567948,), (1397567949,), (1397567950,), (1397567952,), (1397567997,), (1397568019,), (1397568025,), (1397568028,), (1397568031,), (1397568036,), (1397568046,), (1397568047,), (1397568048,), (1397568049,), (1397568050,), (1397568053,), (1397568054,), (1397568057,), (1397568058,), (1397568061,), (1397568062,), (1397568065,), (1397568066,), (1397568125,), (1397568126,), (1397568127,), (1397568236,), (1397568237,), (1397568405,), (1397568406,), (1397568488,), (1397568490,), (1397568527,), (1397568528,), (1397568534,), (1397568615,), (1397568616,), (1397568617,), (1397568618,), (1397568620,), (1397569031,), (1397569039,), (1397569126,), (1397569194,), (1397569267,), (1397569337,), (1397569555,), (1397569607,), (1397569673,), (1397569718,), (1397569920,)) 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 29126991 , 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=29126976 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 (29126991) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29126976) result : ((1397567746,), (1397567752,), (1397567756,), (1397567770,), (1397567774,), (1397567846,), (1397567849,), (1397567864,), (1397567947,), (1397567948,), (1397567949,), (1397567950,), (1397567952,), (1397567997,), (1397568019,), (1397568025,), (1397568028,), (1397568031,), (1397568036,), (1397568046,), (1397568047,), (1397568048,), (1397568049,), (1397568050,), (1397568053,), (1397568054,), (1397568057,), (1397568058,), (1397568061,), (1397568062,), (1397568065,), (1397568066,), (1397568125,), (1397568126,), (1397568127,), (1397568236,), (1397568237,), (1397568405,), (1397568406,), (1397568488,), (1397568490,), (1397568527,), (1397568528,), (1397568534,), (1397568615,), (1397568616,), (1397568617,), (1397568618,), (1397568620,), (1397569031,), (1397569039,), (1397569126,), (1397569194,), (1397569267,), (1397569337,), (1397569555,), (1397569607,), (1397569673,), (1397569718,), (1397569920,)) 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 29126992 , 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=29126976 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 (29126992) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29126976) result : ((1397567746,), (1397567752,), (1397567756,), (1397567770,), (1397567774,), (1397567846,), (1397567849,), (1397567864,), (1397567947,), (1397567948,), (1397567949,), (1397567950,), (1397567952,), (1397567997,), (1397568019,), (1397568025,), (1397568028,), (1397568031,), (1397568036,), (1397568046,), (1397568047,), (1397568048,), (1397568049,), (1397568050,), (1397568053,), (1397568054,), (1397568057,), (1397568058,), (1397568061,), (1397568062,), (1397568065,), (1397568066,), (1397568125,), (1397568126,), (1397568127,), (1397568236,), (1397568237,), (1397568405,), (1397568406,), (1397568488,), (1397568490,), (1397568527,), (1397568528,), (1397568534,), (1397568615,), (1397568616,), (1397568617,), (1397568618,), (1397568620,), (1397569031,), (1397569039,), (1397569126,), (1397569194,), (1397569267,), (1397569337,), (1397569555,), (1397569607,), (1397569673,), (1397569718,), (1397569920,)) 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 29126993 , 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=29126976 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 (29126993) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29126976) result : ((1397567746,), (1397567752,), (1397567756,), (1397567770,), (1397567774,), (1397567846,), (1397567849,), (1397567864,), (1397567947,), (1397567948,), (1397567949,), (1397567950,), (1397567952,), (1397567997,), (1397568019,), (1397568025,), (1397568028,), (1397568031,), (1397568036,), (1397568046,), (1397568047,), (1397568048,), (1397568049,), (1397568050,), (1397568053,), (1397568054,), (1397568057,), (1397568058,), (1397568061,), (1397568062,), (1397568065,), (1397568066,), (1397568125,), (1397568126,), (1397568127,), (1397568236,), (1397568237,), (1397568405,), (1397568406,), (1397568488,), (1397568490,), (1397568527,), (1397568528,), (1397568534,), (1397568615,), (1397568616,), (1397568617,), (1397568618,), (1397568620,), (1397569031,), (1397569039,), (1397569126,), (1397569194,), (1397569267,), (1397569337,), (1397569555,), (1397569607,), (1397569673,), (1397569718,), (1397569920,)) 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 29126994 , 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=29126976 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 (29126994) result : ((1397568077,), (1397570036,), (1397570037,), (1397570723,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29126976) result : ((1397567746,), (1397567752,), (1397567756,), (1397567770,), (1397567774,), (1397567846,), (1397567849,), (1397567864,), (1397567947,), (1397567948,), (1397567949,), (1397567950,), (1397567952,), (1397567997,), (1397568019,), (1397568025,), (1397568028,), (1397568031,), (1397568036,), (1397568046,), (1397568047,), (1397568048,), (1397568049,), (1397568050,), (1397568053,), (1397568054,), (1397568057,), (1397568058,), (1397568061,), (1397568062,), (1397568065,), (1397568066,), (1397568125,), (1397568126,), (1397568127,), (1397568236,), (1397568237,), (1397568405,), (1397568406,), (1397568488,), (1397568490,), (1397568527,), (1397568528,), (1397568534,), (1397568615,), (1397568616,), (1397568617,), (1397568618,), (1397568620,), (1397569031,), (1397569039,), (1397569126,), (1397569194,), (1397569267,), (1397569337,), (1397569555,), (1397569607,), (1397569673,), (1397569718,), (1397569920,)) 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 29126995 , 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=29126976 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 (29126995) result : ((1397568099,), (1397568300,), (1397568584,), (1397570038,), (1397570732,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29126976) result : ((1397567746,), (1397567752,), (1397567756,), (1397567770,), (1397567774,), (1397567846,), (1397567849,), (1397567864,), (1397567947,), (1397567948,), (1397567949,), (1397567950,), (1397567952,), (1397567997,), (1397568019,), (1397568025,), (1397568028,), (1397568031,), (1397568036,), (1397568046,), (1397568047,), (1397568048,), (1397568049,), (1397568050,), (1397568053,), (1397568054,), (1397568057,), (1397568058,), (1397568061,), (1397568062,), (1397568065,), (1397568066,), (1397568125,), (1397568126,), (1397568127,), (1397568236,), (1397568237,), (1397568405,), (1397568406,), (1397568488,), (1397568490,), (1397568527,), (1397568528,), (1397568534,), (1397568615,), (1397568616,), (1397568617,), (1397568618,), (1397568620,), (1397569031,), (1397569039,), (1397569126,), (1397569194,), (1397569267,), (1397569337,), (1397569555,), (1397569607,), (1397569673,), (1397569718,), (1397569920,)) 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 29126996 , 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=29126976 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 (29126996) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29126976) result : ((1397567746,), (1397567752,), (1397567756,), (1397567770,), (1397567774,), (1397567846,), (1397567849,), (1397567864,), (1397567947,), (1397567948,), (1397567949,), (1397567950,), (1397567952,), (1397567997,), (1397568019,), (1397568025,), (1397568028,), (1397568031,), (1397568036,), (1397568046,), (1397568047,), (1397568048,), (1397568049,), (1397568050,), (1397568053,), (1397568054,), (1397568057,), (1397568058,), (1397568061,), (1397568062,), (1397568065,), (1397568066,), (1397568125,), (1397568126,), (1397568127,), (1397568236,), (1397568237,), (1397568405,), (1397568406,), (1397568488,), (1397568490,), (1397568527,), (1397568528,), (1397568534,), (1397568615,), (1397568616,), (1397568617,), (1397568618,), (1397568620,), (1397569031,), (1397569039,), (1397569126,), (1397569194,), (1397569267,), (1397569337,), (1397569555,), (1397569607,), (1397569673,), (1397569718,), (1397569920,)) 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`=29126976 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','environnement','papier','Carton_brun','metal','Carton_gris','mal_croppe','autre_refus','plastique','cartonnette','flou','kraft')) 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`=29126976 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','environnement','papier','Carton_brun','metal','Carton_gris','mal_croppe','autre_refus','plastique','cartonnette','flou','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 29126976, 'sub_port_id': 29126997, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790556, 'last_updated_at': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 34)}, 'Carton_brun': {'main_port_id': 29126976, 'sub_port_id': 29126998, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790557, 'last_updated_at': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 34)}, 'metal': {'main_port_id': 29126976, 'sub_port_id': 29126999, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790558, 'last_updated_at': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 34)}, 'plastique': {'main_port_id': 29126976, 'sub_port_id': 29127000, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790559, 'last_updated_at': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 34)}, 'cartonnette': {'main_port_id': 29126976, 'sub_port_id': 29127001, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790560, 'last_updated_at': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 34)}, 'papier': {'main_port_id': 29126976, 'sub_port_id': 29127002, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790561, 'last_updated_at': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 34)}, 'kraft': {'main_port_id': 29126976, 'sub_port_id': 29127003, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790562, 'last_updated_at': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 34)}, 'mal_croppe': {'main_port_id': 29126976, 'sub_port_id': 29127004, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790563, 'last_updated_at': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 34)}, 'flou': {'main_port_id': 29126976, 'sub_port_id': 29127005, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790564, 'last_updated_at': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 34)}, 'Teint_Dans_La_Masse': {'main_port_id': 29126976, 'sub_port_id': 29127006, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790565, 'last_updated_at': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 34)}, 'autre_refus': {'main_port_id': 29126976, 'sub_port_id': 29127007, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790566, 'last_updated_at': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 3, 49, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 34)}, 'Carton_gris': {'main_port_id': 29126976, 'sub_port_id': 29127008, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19790567, 'last_updated_at': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 3, 4, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 3, 3, 49, 34)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29126997,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29126985 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29126998,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29126986 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29126999,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29126987 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29127000,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29126988 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29127001,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29126989 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29127002,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29126990 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29127003,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29126991 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29127004,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29126992 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29127005,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29126993 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29127006,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29126994 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29127007,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29126995 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29127008,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29126996 lien utilise dans velours : https://marlene.fotonower.com/velours/29126997,29126998,29126999,29127000,29127001,29127002,29127003,29127004,29127005,29127006,29127007,29127008?tags=environnement,Carton_brun,metal,plastique,cartonnette,papier,kraft,mal_croppe,flou,Teint_Dans_La_Masse,autre_refus,Carton_gris After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29126976]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1397569920, 1397569718, 1397569673, 1397569607, 1397569555] map_info['map_portfolio_photo'] : {29126976: [1397569920, 1397569718, 1397569673, 1397569607, 1397569555, 1397569337, 1397569267, 1397569194, 1397569126, 1397569039, 1397569031, 1397568620, 1397568618, 1397568617, 1397568616, 1397568615, 1397568534, 1397568528, 1397568527, 1397568490, 1397568488, 1397568406, 1397568405, 1397568237, 1397568236, 1397568127, 1397568126, 1397568125, 1397568066, 1397568065, 1397568062, 1397568061, 1397568058, 1397568057, 1397568054, 1397568053, 1397568050, 1397568049, 1397568048, 1397568047, 1397568046, 1397568036, 1397568031, 1397568028, 1397568025, 1397568019, 1397567997, 1397567952, 1397567950, 1397567949, 1397567948, 1397567947, 1397567864, 1397567849, 1397567846, 1397567774, 1397567770, 1397567756, 1397567752, 1397567746]} final : False mtd_id 4302 list_pids : [1397569920, 1397569718, 1397569673, 1397569607, 1397569555] Looping around the photos to save general results len do output : 1 /29126976. 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, '4177509') ('4302', '29126976', '1397569920', None, None, None, None, None, '4177509') ('4302', None, None, None, None, None, None, None, '4177509') ('4302', '29126976', '1397569718', None, None, None, None, None, '4177509') ('4302', None, None, None, None, None, None, None, '4177509') ('4302', '29126976', '1397569673', None, None, None, None, None, '4177509') ('4302', None, None, None, None, None, None, None, '4177509') ('4302', '29126976', '1397569607', None, None, None, None, None, '4177509') ('4302', None, None, None, None, None, None, None, '4177509') ('4302', '29126976', '1397569555', None, None, None, None, None, '4177509') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 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, '29126976', "{'environnement': 29126985, 'Carton_brun': 29126986, 'metal': 29126987, 'plastique': 29126988, 'cartonnette': 29126989, 'papier': 29126990, 'kraft': 29126991, 'mal_croppe': 29126992, 'flou': 29126993, 'Teint_Dans_La_Masse': 29126994, 'autre_refus': 29126995, 'Carton_gris': 29126996}", None, None, None, None, '4177509'), ('4302', '29126976', '1397569920', None, None, None, None, None, '4177509'), ('4302', '29126976', '1397569718', None, None, None, None, None, '4177509'), ('4302', '29126976', '1397569673', None, None, None, None, None, '4177509'), ('4302', '29126976', '1397569607', None, None, None, None, None, '4177509'), ('4302', '29126976', '1397569555', None, None, None, None, None, '4177509')] time used for this insertion : 0.026574373245239258 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.864806890487671 time spend to save output : 0.026844024658203125 total time spend for step 1 : 1.891650915145874 step2:final Wed Dec 3 04:02:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29126976) 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 29126976 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1397567774,1397567770,1397567756,1397567752,1397567746,1397567864,1397567849,1397567846,1397568050,1397567952,1397568049,1397567950,1397567949,1397568048,1397567948,1397568047,1397567947,1397568046,1397568036,1397568031,1397568028,1397568025,1397568019,1397567997,1397568061,1397568062,1397568057,1397568058,1397568053,1397568054,1397568066,1397568065,1397568127,1397568125,1397568126,1397568237,1397568236,1397568406,1397568405,1397568490,1397568488,1397568528,1397568527,1397568534,1397569718,1397568620,1397569673,1397568618,1397568617,1397569607,1397569555,1397568616,1397569337,1397568615,1397569267,1397569194,1397569126,1397569039,1397569031,1397569920); 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([29126976]) Inside saveOutput : final : False verbose : True original output for save of step final : {1397569920: ('0.028423060964911283',), 1397569718: ('0.028423060964911283',), 1397569673: ('0.028423060964911283',), 1397569607: ('0.028423060964911283',), 1397569555: ('0.028423060964911283',)} new output for save of step final : {1397569920: ('0.028423060964911283',), 1397569718: ('0.028423060964911283',), 1397569673: ('0.028423060964911283',), 1397569607: ('0.028423060964911283',), 1397569555: ('0.028423060964911283',)} [1397569920, 1397569718, 1397569673, 1397569607, 1397569555] map_info['map_portfolio_photo'] : {29126976: [1397569920, 1397569718, 1397569673, 1397569607, 1397569555, 1397569337, 1397569267, 1397569194, 1397569126, 1397569039, 1397569031, 1397568620, 1397568618, 1397568617, 1397568616, 1397568615, 1397568534, 1397568528, 1397568527, 1397568490, 1397568488, 1397568406, 1397568405, 1397568237, 1397568236, 1397568127, 1397568126, 1397568125, 1397568066, 1397568065, 1397568062, 1397568061, 1397568058, 1397568057, 1397568054, 1397568053, 1397568050, 1397568049, 1397568048, 1397568047, 1397568046, 1397568036, 1397568031, 1397568028, 1397568025, 1397568019, 1397567997, 1397567952, 1397567950, 1397567949, 1397567948, 1397567947, 1397567864, 1397567849, 1397567846, 1397567774, 1397567770, 1397567756, 1397567752, 1397567746]} final : False mtd_id 4302 list_pids : [1397569920, 1397569718, 1397569673, 1397569607, 1397569555] Looping around the photos to save general results len do output : 5 /1397569920.Didn't retrieve data . /1397569718.Didn't retrieve data . /1397569673.Didn't retrieve data . /1397569607.Didn't retrieve data . /1397569555.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, '4177509') ('4302', '29126976', '1397569920', None, None, None, None, None, '4177509') ('4302', None, None, None, None, None, None, None, '4177509') ('4302', '29126976', '1397569718', None, None, None, None, None, '4177509') ('4302', None, None, None, None, None, None, None, '4177509') ('4302', '29126976', '1397569673', None, None, None, None, None, '4177509') ('4302', None, None, None, None, None, None, None, '4177509') ('4302', '29126976', '1397569607', None, None, None, None, None, '4177509') ('4302', None, None, None, None, None, None, None, '4177509') ('4302', '29126976', '1397569555', None, None, None, None, None, '4177509') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 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', '29126976', '1397569920', '0.028423060964911283', None, None, None, None, '4177509'), ('4302', '29126976', '1397569718', '0.028423060964911283', None, None, None, None, '4177509'), ('4302', '29126976', '1397569673', '0.028423060964911283', None, None, None, None, '4177509'), ('4302', '29126976', '1397569607', '0.028423060964911283', None, None, None, None, '4177509'), ('4302', '29126976', '1397569555', '0.028423060964911283', None, None, None, None, '4177509')] time used for this insertion : 0.013771295547485352 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.08103370666503906 time spend to save output : 0.014203310012817383 total time spend for step 2 : 0.09523701667785645 step3:velours_tree Wed Dec 3 04:02:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {29126976: [{'environnement': 29126985, 'Carton_brun': 29126986, 'metal': 29126987, 'plastique': 29126988, 'cartonnette': 29126989, 'papier': 29126990, 'kraft': 29126991, 'mal_croppe': 29126992, 'flou': 29126993, 'Teint_Dans_La_Masse': 29126994, 'autre_refus': 29126995, 'Carton_gris': 29126996}]} input_args_next_step : {29126976: ()} output_args : {29126976: [{'environnement': 29126985, 'Carton_brun': 29126986, 'metal': 29126987, 'plastique': 29126988, 'cartonnette': 29126989, 'papier': 29126990, 'kraft': 29126991, 'mal_croppe': 29126992, 'flou': 29126993, 'Teint_Dans_La_Masse': 29126994, 'autre_refus': 29126995, 'Carton_gris': 29126996}]} args : 29126976 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 : ({'environnement': 29126985, 'Carton_brun': 29126986, 'metal': 29126987, 'plastique': 29126988, 'cartonnette': 29126989, 'papier': 29126990, 'kraft': 29126991, 'mal_croppe': 29126992, 'flou': 29126993, 'Teint_Dans_La_Masse': 29126994, 'autre_refus': 29126995, 'Carton_gris': 29126996},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29126976) 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([29126976]) 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.39849281311035156 time spend to save output : 7.295608520507812e-05 total time spend for step 3 : 0.39856576919555664 step4:send_mail_cod Wed Dec 3 04:02:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1397569920: ('0.028423060964911283',), 1397569718: ('0.028423060964911283',), 1397569673: ('0.028423060964911283',), 1397569607: ('0.028423060964911283',), 1397569555: ('0.028423060964911283',)} input_args_next_step : {1397569920: ()} output_args : {1397569920: ('0.028423060964911283',), 1397569718: ('0.028423060964911283',), 1397569673: ('0.028423060964911283',), 1397569607: ('0.028423060964911283',), 1397569555: ('0.028423060964911283',)} args : 1397569920 depend.output_id : 0 input_args_next_step : {1397569920: ('0.028423060964911283',), 1397569718: ()} output_args : {1397569920: ('0.028423060964911283',), 1397569718: ('0.028423060964911283',), 1397569673: ('0.028423060964911283',), 1397569607: ('0.028423060964911283',), 1397569555: ('0.028423060964911283',)} args : 1397569718 depend.output_id : 0 input_args_next_step : {1397569920: ('0.028423060964911283',), 1397569718: ('0.028423060964911283',), 1397569673: ()} output_args : {1397569920: ('0.028423060964911283',), 1397569718: ('0.028423060964911283',), 1397569673: ('0.028423060964911283',), 1397569607: ('0.028423060964911283',), 1397569555: ('0.028423060964911283',)} args : 1397569673 depend.output_id : 0 input_args_next_step : {1397569920: ('0.028423060964911283',), 1397569718: ('0.028423060964911283',), 1397569673: ('0.028423060964911283',), 1397569607: ()} output_args : {1397569920: ('0.028423060964911283',), 1397569718: ('0.028423060964911283',), 1397569673: ('0.028423060964911283',), 1397569607: ('0.028423060964911283',), 1397569555: ('0.028423060964911283',)} args : 1397569607 depend.output_id : 0 input_args_next_step : {1397569920: ('0.028423060964911283',), 1397569718: ('0.028423060964911283',), 1397569673: ('0.028423060964911283',), 1397569607: ('0.028423060964911283',), 1397569555: ()} output_args : {1397569920: ('0.028423060964911283',), 1397569718: ('0.028423060964911283',), 1397569673: ('0.028423060964911283',), 1397569607: ('0.028423060964911283',), 1397569555: ('0.028423060964911283',)} args : 1397569555 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 : {29126976: [{'environnement': 29126985, 'Carton_brun': 29126986, 'metal': 29126987, 'plastique': 29126988, 'cartonnette': 29126989, 'papier': 29126990, 'kraft': 29126991, 'mal_croppe': 29126992, 'flou': 29126993, 'Teint_Dans_La_Masse': 29126994, 'autre_refus': 29126995, 'Carton_gris': 29126996}]} input_args_next_step : {1397569920: ('0.028423060964911283',), 1397569718: ('0.028423060964911283',), 1397569673: ('0.028423060964911283',), 1397569607: ('0.028423060964911283',), 1397569555: ('0.028423060964911283',), 29126976: ()} output_args : {29126976: [{'environnement': 29126985, 'Carton_brun': 29126986, 'metal': 29126987, 'plastique': 29126988, 'cartonnette': 29126989, 'papier': 29126990, 'kraft': 29126991, 'mal_croppe': 29126992, 'flou': 29126993, 'Teint_Dans_La_Masse': 29126994, 'autre_refus': 29126995, 'Carton_gris': 29126996}]} args : 29126976 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 :6, first value : ('0.028423060964911283',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29126976) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos_view ph WHERE photo_id IN (1397569920,1397569718,1397569673,1397569607,1397569555) Found this number of photos: 5 ##### Call download_photos : nb_thread : 5 begin to download photo : 1397569555 begin to download photo : 1397569673 begin to download photo : 1397569920 download finish for photo 1397569555 begin to download photo : 1397569607 download finish for photo 1397569920 download finish for photo 1397569673 begin to download photo : 1397569718 download finish for photo 1397569607 download finish for photo 1397569718 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette291269871764730980/ length of list_filenames : 5 ; length of list_pids : 5 ; length of list_args : 5 results_Auto_P29126976_03-12-2025_04_03_00.pdf 29126987 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29126987 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette291269871764730980 29126988 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29126988 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1397568478: '1764730468_3338412_1397568126_c761fd7ef02ee4d036b6451c89cd3598_rle_crop_4056316747_0.png', 1397568480: '1764730468_3338412_1397568125_aaa67758f0ee171b9063380d5eb3a4b8_rle_crop_4056316764_0.png', 1397568585: '1764730626_3344598_1397568062_66be389daf409d3c487e0efae28384eb_rle_crop_4056324171_0.png', 1397568586: '1764730626_3344598_1397568061_0cd791467dd6cf93785173003c5bbb95_rle_crop_4056324182_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/819f8610e7b447785981c63e3d0c2331_70350639.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/8efb98d1910a055e891b864cc94c3267_42805019.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/57e0ec4dafa9f9b2a6e839204a18f2f6_97546907.png change filename to text .imagette291269881764730980/ imagette291269881764730980/1764730626_3344598_1397568061_0cd791467dd6cf93785173003c5bbb95_rle_crop_4056324182_0.png.png imagette291269881764730980/1764730468_3338412_1397568126_c761fd7ef02ee4d036b6451c89cd3598_rle_crop_4056316747_0.png.png imagette291269881764730980/1764730626_3344598_1397568062_66be389daf409d3c487e0efae28384eb_rle_crop_4056324171_0.png.png imagette291269881764730980/1764730468_3338412_1397568125_aaa67758f0ee171b9063380d5eb3a4b8_rle_crop_4056316764_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/57e0ec4dafa9f9b2a6e839204a18f2f6_33482025.png imagette291269881764730980 29126989 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29126989 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1397568111: '1764730286_3328079_1397567948_509610ba0b4b3feae98eb27cb6653062_rle_crop_4056316195_0.png', 1397568113: '1764730286_3328079_1397567947_3cd037c68c1835bf502e795a822bc1e8_rle_crop_4056316207_0.png', 1397568115: '1764730286_3328079_1397567947_3cd037c68c1835bf502e795a822bc1e8_rle_crop_4056316210_0.png', 1397570040: '1764730864_3441687_1397568534_d42c480e5411cdd697bc3b5af44c79ef_rle_crop_4056337387_0.png', 1397570743: '1764730946_3448522_1397569039_cbf286a1244cb7620406faee833e59dd_rle_crop_4056340225_0.png', 1397570745: '1764730946_3448522_1397569031_4f6bacdb2e3af5c8c4e293c7cdb5c117_rle_crop_4056340239_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/39534a88225a04284a502e98d02f628d_30215897.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/0f9ba41995cc8e21ebbb6be50f801726_93942305.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/df73b2361a4449322129203e05029338_73606994.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/498b129ef794906afa2a04c47ba9b589_20413193.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/05f5996a41f2abf59ffcc3cc92a80a8e_23335528.png change filename to text .imagette291269891764730980/ imagette291269891764730980/1764730286_3328079_1397567947_3cd037c68c1835bf502e795a822bc1e8_rle_crop_4056316207_0.png.png imagette291269891764730980/1764730286_3328079_1397567948_509610ba0b4b3feae98eb27cb6653062_rle_crop_4056316195_0.png.png imagette291269891764730980/1764730946_3448522_1397569031_4f6bacdb2e3af5c8c4e293c7cdb5c117_rle_crop_4056340239_0.png.png imagette291269891764730980/1764730946_3448522_1397569039_cbf286a1244cb7620406faee833e59dd_rle_crop_4056340225_0.png.png imagette291269891764730980/1764730864_3441687_1397568534_d42c480e5411cdd697bc3b5af44c79ef_rle_crop_4056337387_0.png.png imagette291269891764730980/1764730286_3328079_1397567947_3cd037c68c1835bf502e795a822bc1e8_rle_crop_4056316210_0.png.png imagette291269911764730980/ imagette291269921764730980/ imagette291269931764730980/ wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/400031870e88b78461fd56191ea3cd9b_19767125.png imagette291269891764730980 29126991 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29126991 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette291269911764730980 29126992 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29126992 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette291269921764730980 29126993 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29126993 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette291269931764730980 29126995 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29126995 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1397568099: '1764730286_3328079_1397567948_509610ba0b4b3feae98eb27cb6653062_rle_crop_4056316189_0.png', 1397568300: '1764730383_3333327_1397568031_3ccf37d5ded0088372b2333b01a9768d_rle_crop_4056316486_0.png', 1397568584: '1764730626_3344598_1397568031_3ccf37d5ded0088372b2333b01a9768d_rle_crop_4056316486_0.png', 1397570038: '1764730864_3441687_1397568527_3eb01d5727dcee51038bdbad07b5a84f_rle_crop_4056338523_0.png', 1397570732: '1764730946_3448522_1397569039_cbf286a1244cb7620406faee833e59dd_rle_crop_4056340223_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/31fdd8b9f1e9d367c8ac632a42c8a26d_67418660.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/8d97433330af92abd04637af0b166d68_42926661.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/8d97433330af92abd04637af0b166d68_76537228.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/b5183ff4c6ad712aac44a1a6d24f1ca5_85069944.png change filename to text .imagette291269951764730980/ imagette291269951764730980/1764730946_3448522_1397569039_cbf286a1244cb7620406faee833e59dd_rle_crop_4056340223_0.png.png imagette291269951764730980/1764730626_3344598_1397568031_3ccf37d5ded0088372b2333b01a9768d_rle_crop_4056316486_0.png.png imagette291269951764730980/1764730864_3441687_1397568527_3eb01d5727dcee51038bdbad07b5a84f_rle_crop_4056338523_0.png.png imagette291269951764730980/1764730286_3328079_1397567948_509610ba0b4b3feae98eb27cb6653062_rle_crop_4056316189_0.png.png imagette291269951764730980/1764730383_3333327_1397568031_3ccf37d5ded0088372b2333b01a9768d_rle_crop_4056316486_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/fdcd454b7e752673c593becfebe9e4b4_77469608.png imagette291269951764730980 29126986 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29126986 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1397568847: '1764730746_3348296_1397568528_ef55fd3a55fb4ca692080912b4e8f7f3_rle_crop_4056334503_0.png'} change filename to text .imagette291269861764730981/ imagette291269861764730981/1764730746_3348296_1397568528_ef55fd3a55fb4ca692080912b4e8f7f3_rle_crop_4056334503_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/b52bdc736faff855f939c3a0e67e1349_31798448.png imagette291269861764730981 29126994 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29126994 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1397568077: '1764730266_3326219_1397567849_472683050433b3612216fdacbcb4c341_rle_crop_4056316041_0.png', 1397570036: '1764730864_3441687_1397568534_d42c480e5411cdd697bc3b5af44c79ef_rle_crop_4056337393_0.png', 1397570037: '1764730864_3441687_1397568534_d42c480e5411cdd697bc3b5af44c79ef_rle_crop_4056337391_0.png', 1397570723: '1764730946_3448522_1397569039_cbf286a1244cb7620406faee833e59dd_rle_crop_4056340226_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/4537e8be312829576df2dd2d9b519fed_18923229.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/83e79bfe86b0819852b34db40f0c9729_52309673.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/e1436d445bf276f6e50631557b8717e7_76769056.png change filename to text .imagette291269941764730981/ imagette291269941764730981/1764730864_3441687_1397568534_d42c480e5411cdd697bc3b5af44c79ef_rle_crop_4056337393_0.png.png imagette291269941764730981/1764730266_3326219_1397567849_472683050433b3612216fdacbcb4c341_rle_crop_4056316041_0.png.png imagette291269941764730981/1764730864_3441687_1397568534_d42c480e5411cdd697bc3b5af44c79ef_rle_crop_4056337391_0.png.png imagette291269941764730981/1764730946_3448522_1397569039_cbf286a1244cb7620406faee833e59dd_rle_crop_4056340226_0.png.png imagette291269961764730981/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/5d4ec0c71129a9814f62625a3cba6177_38310657.png imagette291269941764730981 29126996 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29126996 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette291269961764730981 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=29126976 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/29126997,29126998,29126999,29127000,29127001,29127002,29127003,29127004,29127005,29127006,29127007,29127008?tags=environnement,Carton_brun,metal,plastique,cartonnette,papier,kraft,mal_croppe,flou,Teint_Dans_La_Masse,autre_refus,Carton_gris your option no_mail is active, we will not send the real mail to your client args[1397569920] : ('0.028423060964911283',) no score found for photo 1397569920 We are sending mail with results at report@fotonower.com args[1397569718] : ('0.028423060964911283',) no score found for photo 1397569718 We are sending mail with results at report@fotonower.com args[1397569673] : ('0.028423060964911283',) no score found for photo 1397569673 We are sending mail with results at report@fotonower.com args[1397569607] : ('0.028423060964911283',) no score found for photo 1397569607 We are sending mail with results at report@fotonower.com args[1397569555] : ('0.028423060964911283',) no score found for photo 1397569555 We are sending mail with results at report@fotonower.com refus_total : 0.028423060964911283 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29126976 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_P29126976_03-12-2025_04_03_00.pdf results_Auto_P29126976_03-12-2025_04_03_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29126976_03-12-2025_04_03_00.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','29126976','results_Auto_P29126976_03-12-2025_04_03_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29126976_03-12-2025_04_03_00.pdf','pdf','','0.11','0.028423060964911283') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29126976]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1397569920, 1397569718, 1397569673, 1397569607, 1397569555] map_info['map_portfolio_photo'] : {29126976: [1397569920, 1397569718, 1397569673, 1397569607, 1397569555, 1397569337, 1397569267, 1397569194, 1397569126, 1397569039, 1397569031, 1397568620, 1397568618, 1397568617, 1397568616, 1397568615, 1397568534, 1397568528, 1397568527, 1397568490, 1397568488, 1397568406, 1397568405, 1397568237, 1397568236, 1397568127, 1397568126, 1397568125, 1397568066, 1397568065, 1397568062, 1397568061, 1397568058, 1397568057, 1397568054, 1397568053, 1397568050, 1397568049, 1397568048, 1397568047, 1397568046, 1397568036, 1397568031, 1397568028, 1397568025, 1397568019, 1397567997, 1397567952, 1397567950, 1397567949, 1397567948, 1397567947, 1397567864, 1397567849, 1397567846, 1397567774, 1397567770, 1397567756, 1397567752, 1397567746]} final : False mtd_id 4302 list_pids : [1397569920, 1397569718, 1397569673, 1397569607, 1397569555] 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, '4177509') ('4302', '29126976', '1397569920', None, None, None, None, None, '4177509') ('4302', None, None, None, None, None, None, None, '4177509') ('4302', '29126976', '1397569718', None, None, None, None, None, '4177509') ('4302', None, None, None, None, None, None, None, '4177509') ('4302', '29126976', '1397569673', None, None, None, None, None, '4177509') ('4302', None, None, None, None, None, None, None, '4177509') ('4302', '29126976', '1397569607', None, None, None, None, None, '4177509') ('4302', None, None, None, None, None, None, None, '4177509') ('4302', '29126976', '1397569555', None, None, None, None, None, '4177509') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '29126976', '1397569920', None, None, None, None, None, '4177509'), ('4302', '29126976', '1397569718', None, None, None, None, None, '4177509'), ('4302', '29126976', '1397569673', None, None, None, None, None, '4177509'), ('4302', '29126976', '1397569607', None, None, None, None, None, '4177509'), ('4302', '29126976', '1397569555', None, None, None, None, None, '4177509')] time used for this insertion : 0.014720439910888672 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.950347900390625 time spend to save output : 0.014949798583984375 total time spend for step 4 : 2.9652976989746094 step5:split_time_score Wed Dec 3 04:03:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['29126976'] 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 : [('29126976',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29126976) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1397569920: {'path': 'temp/1764730979_3185103_1397569920_85ca7863b9ca695acb91eeb93a5768d3.jpg', 'extension': 'jpg'}, 1397569555: {'path': 'temp/1764730979_3185103_1397569555_225d00e3774ac934a1f09b7b8df38856.jpg', 'extension': 'jpg'}, 1397569607: {'path': 'temp/1764730979_3185103_1397569607_7eca9a2f2998205359b5c6655b35b770.jpg', 'extension': 'jpg'}, 1397569673: {'path': 'temp/1764730979_3185103_1397569673_f10c0d2a1f03ea4f98633710107efa1f.jpg', 'extension': 'jpg'}, 1397569718: {'path': 'temp/1764730979_3185103_1397569718_36b8e34271deec827762fb561ebd0435.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 = 29126976; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm_bis',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 29126976 group by h (('03', 60),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29126976 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 (29126976) 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 (29126976) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 03122025 29126976 Nombre de photos uploadées : 60 / 23040 (0%) 03122025 29126976 Nombre de photos taguées (types de déchets): 0 / 60 (0%) 03122025 29126976 Nombre de photos taguées (volume) : 0 / 60 (0%) [{'photo_id': 1397567774, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/2062382cfe42d7e2735b2e2a07fa4ec5.jpg', 'username': None, 'uploaded_at': 1764729967, 'text': 'image_03122025_03_45_05_10189.jpg'}, {'photo_id': 1397567770, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/ed9d0da14a30a0b169e7744a06d97f23.jpg', 'username': None, 'uploaded_at': 1764729967, 'text': 'image_03122025_03_45_14_9125.jpg'}, {'photo_id': 1397567756, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/c458ae9df8fd00ca25edc40b6e8b7c1b.jpg', 'username': None, 'uploaded_at': 1764729967, 'text': 'image_03122025_03_45_24_10143.jpg'}, {'photo_id': 1397567752, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/3/7694b1b572dc9fce101eae3c27d22767.jpg', 'username': None, 'uploaded_at': 1764729967, 'text': 'image_03122025_03_45_34_10137.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.86102294921875e-06 elapsed_time : order_list_meta_photo_and_scores 1.049041748046875e-05 ???????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.002762317657470703 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 29126976, '2025-12-03' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-12-03' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2683135,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.2622342109680176 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= 2683135 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2683135, 'dashboard_run_id': 2690857, 'mtr_portfolio_id': 29118472, 'dashboard_result_id': 17988135, '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_P29118472_03-12-2025_00_17_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 29118473, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29118474, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29118475, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29118476, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29118477, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29118478, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29118479, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29118480, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29118481, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29118482, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29118483, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29118484, 'pht': 3726}}"}, {'dashboat_entry_day': 2683135, 'dashboard_run_id': 2690857, 'mtr_portfolio_id': 29119115, 'dashboard_result_id': 17988136, '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_P29119115_03-12-2025_00_33_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29119121, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29119122, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29119123, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29119124, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29119125, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29119126, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29119127, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29119128, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29119129, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29119130, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29119131, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29119132, 'pht': 3726}}"}, {'dashboat_entry_day': 2683135, 'dashboard_run_id': 2690857, 'mtr_portfolio_id': 29119691, 'dashboard_result_id': 17988137, '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_P29119691_03-12-2025_00_47_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29119699, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29119700, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29119701, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29119702, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29119703, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29119704, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29119705, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29119706, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29119707, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29119708, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29119709, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29119710, 'pht': 3726}}"}, {'dashboat_entry_day': 2683135, 'dashboard_run_id': 2690857, 'mtr_portfolio_id': 29120310, 'dashboard_result_id': 17988138, '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_P29120310_03-12-2025_01_33_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29120319, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29120320, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29120321, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29120322, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29120323, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29120324, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29120325, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29120326, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29120327, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29120328, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29120329, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29120330, 'pht': 3726}}"}, {'dashboat_entry_day': 2683135, 'dashboard_run_id': 2690857, 'mtr_portfolio_id': 29122211, 'dashboard_result_id': 17988139, '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_P29122211_03-12-2025_01_47_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29122252, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29122253, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29122254, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29122255, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29122256, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29122257, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29122258, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29122259, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29122260, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29122261, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29122262, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29122263, 'pht': 3726}}"}, {'dashboat_entry_day': 2683135, 'dashboard_run_id': 2690857, 'mtr_portfolio_id': 29122760, 'dashboard_result_id': 17988140, '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_P29122760_03-12-2025_02_03_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29122768, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29122769, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29122770, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29122771, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29122772, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29122773, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29122774, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29122775, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29122776, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29122777, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29122778, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29122779, 'pht': 3726}}"}, {'dashboat_entry_day': 2683135, 'dashboard_run_id': 2690857, 'mtr_portfolio_id': 29123215, 'dashboard_result_id': 17988141, '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_P29123215_03-12-2025_02_23_28.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29123264, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29123265, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29123266, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29123268, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29123269, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29123270, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29123271, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29123272, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29123273, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29123274, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29123275, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29123276, 'pht': 3726}}"}, {'dashboat_entry_day': 2683135, 'dashboard_run_id': 2690857, 'mtr_portfolio_id': 29123936, 'dashboard_result_id': 17988142, '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_P29123936_03-12-2025_02_33_28.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29123977, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29123978, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29123979, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29123980, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29123981, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29123982, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29123983, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29123984, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29123985, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29123986, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29123987, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29123988, 'pht': 3726}}"}, {'dashboat_entry_day': 2683135, 'dashboard_run_id': 2690857, 'mtr_portfolio_id': 29124511, 'dashboard_result_id': 17988143, '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_P29124511_03-12-2025_02_48_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29124515, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29124516, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29124517, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29124518, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29124519, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29124520, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29124521, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29124522, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29124523, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29124524, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29124525, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29124526, 'pht': 3726}}"}, {'dashboat_entry_day': 2683135, 'dashboard_run_id': 2690857, 'mtr_portfolio_id': 29125212, 'dashboard_result_id': 17988144, '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_P29125212_03-12-2025_03_03_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29125222, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29125223, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29125224, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29125225, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29125226, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29125227, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29125228, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29125229, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29125230, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29125231, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29125232, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29125233, 'pht': 3726}}"}, {'dashboat_entry_day': 2683135, 'dashboard_run_id': 2690857, 'mtr_portfolio_id': 29125708, 'dashboard_result_id': 17988145, '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_P29125708_03-12-2025_03_19_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29125724, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29125725, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29125726, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29125727, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29125728, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29125729, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29125730, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29125731, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29125732, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29125733, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29125734, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29125735, 'pht': 3726}}"}, {'dashboat_entry_day': 2683135, 'dashboard_run_id': 2690857, 'mtr_portfolio_id': 29126179, 'dashboard_result_id': 17988146, '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_P29126179_03-12-2025_03_35_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29126220, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29126221, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29126222, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29126223, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29126224, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29126225, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29126226, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29126227, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29126228, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29126229, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29126230, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29126231, 'pht': 3726}}"}, {'dashboat_entry_day': 2683135, 'dashboard_run_id': 2690857, 'mtr_portfolio_id': 29126661, 'dashboard_result_id': 17988147, '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_P29126661_03-12-2025_03_49_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29126663, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29126664, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29126665, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29126666, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29126667, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29126668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29126669, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29126670, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29126671, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29126672, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29126673, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29126674, 'pht': 3726}}"}, {'dashboat_entry_day': 2683135, 'dashboard_run_id': 2690857, 'mtr_portfolio_id': 29126976, 'dashboard_result_id': 17988148, '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_P29126976_03-12-2025_04_00_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29126985, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29126986, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29126987, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29126988, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29126989, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29126990, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29126991, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29126992, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29126993, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29126994, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29126995, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29126996, '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 = 29118472 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': 4176628, 'mtr_portfolio_id': 29118472, 'created_at': datetime.datetime(2025, 12, 3, 0, 16, 59), 'result': '0.04905352563667279', 'result_long': None, 'result_double': None}] Qualite : 0.04905352563667279 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29118472 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29118472_03-12-2025_00_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29118472 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_P29118472_03-12-2025_00_17_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 29118473, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29118474, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29118475, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29118476, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29118477, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29118478, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29118479, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29118480, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29118481, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29118482, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29118483, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29118484, 'pht': 3726}}" where mtr_portfolio_id = 29118472 and dashboard_run_id = 2690857 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`=29118472 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17988135, 0.04905352563667279, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29118472_03-12-2025_00_17_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 29118473, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29118474, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29118475, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29118476, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29118477, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29118478, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29118479, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29118480, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29118481, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29118482, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29118483, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29118484, '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 = 29119115 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': 4176666, 'mtr_portfolio_id': 29119115, 'created_at': datetime.datetime(2025, 12, 3, 0, 33), 'result': '0.03304120601130474', 'result_long': None, 'result_double': None}] Qualite : 0.03304120601130474 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29119115 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29119115_03-12-2025_00_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29119115 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_P29119115_03-12-2025_00_33_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29119121, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29119122, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29119123, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29119124, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29119125, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29119126, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29119127, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29119128, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29119129, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29119130, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29119131, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29119132, 'pht': 3726}}" where mtr_portfolio_id = 29119115 and dashboard_run_id = 2690857 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`=29119115 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17988136, 0.03304120601130474, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29119115_03-12-2025_00_33_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29119121, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29119122, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29119123, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29119124, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29119125, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29119126, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29119127, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29119128, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29119129, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29119130, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29119131, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29119132, '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 = 29119691 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': 4176732, 'mtr_portfolio_id': 29119691, 'created_at': datetime.datetime(2025, 12, 3, 0, 47), 'result': '0.03837649725504374', 'result_long': None, 'result_double': None}] Qualite : 0.03837649725504374 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29119691 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29119691_03-12-2025_00_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29119691 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_P29119691_03-12-2025_00_47_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29119699, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29119700, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29119701, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29119702, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29119703, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29119704, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29119705, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29119706, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29119707, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29119708, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29119709, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29119710, 'pht': 3726}}" where mtr_portfolio_id = 29119691 and dashboard_run_id = 2690857 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`=29119691 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17988137, 0.03837649725504374, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29119691_03-12-2025_00_47_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29119699, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29119700, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29119701, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29119702, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29119703, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29119704, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29119705, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29119706, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29119707, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29119708, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29119709, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29119710, '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 = 29120310 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': 4176800, 'mtr_portfolio_id': 29120310, 'created_at': datetime.datetime(2025, 12, 3, 1, 33, 2), 'result': '0.038083180487468386', 'result_long': None, 'result_double': None}] Qualite : 0.038083180487468386 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29120310 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29120310_03-12-2025_01_33_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29120310 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_P29120310_03-12-2025_01_33_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29120319, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29120320, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29120321, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29120322, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29120323, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29120324, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29120325, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29120326, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29120327, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29120328, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29120329, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29120330, 'pht': 3726}}" where mtr_portfolio_id = 29120310 and dashboard_run_id = 2690857 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`=29120310 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17988138, 0.038083180487468386, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29120310_03-12-2025_01_33_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29120319, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29120320, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29120321, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29120322, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29120323, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29120324, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29120325, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29120326, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29120327, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29120328, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29120329, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29120330, '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 = 29122211 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': 4176968, 'mtr_portfolio_id': 29122211, 'created_at': datetime.datetime(2025, 12, 3, 1, 46, 59), 'result': '0.056521657679935486', 'result_long': None, 'result_double': None}] Qualite : 0.056521657679935486 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29122211 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29122211_03-12-2025_01_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29122211 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_P29122211_03-12-2025_01_47_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29122252, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29122253, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29122254, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29122255, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29122256, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29122257, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29122258, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29122259, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29122260, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29122261, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29122262, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29122263, 'pht': 3726}}" where mtr_portfolio_id = 29122211 and dashboard_run_id = 2690857 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`=29122211 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17988139, 0.056521657679935486, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29122211_03-12-2025_01_47_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29122252, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29122253, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29122254, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29122255, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29122256, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29122257, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29122258, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29122259, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29122260, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29122261, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29122262, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29122263, '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 = 29122760 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': 4177003, 'mtr_portfolio_id': 29122760, 'created_at': datetime.datetime(2025, 12, 3, 2, 3), 'result': '0.05216261271663149', 'result_long': None, 'result_double': None}] Qualite : 0.05216261271663149 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29122760 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29122760_03-12-2025_02_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29122760 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_P29122760_03-12-2025_02_03_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29122768, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29122769, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29122770, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29122771, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29122772, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29122773, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29122774, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29122775, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29122776, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29122777, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29122778, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29122779, 'pht': 3726}}" where mtr_portfolio_id = 29122760 and dashboard_run_id = 2690857 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`=29122760 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17988140, 0.05216261271663149, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29122760_03-12-2025_02_03_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29122768, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29122769, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29122770, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29122771, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29122772, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29122773, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29122774, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29122775, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29122776, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29122777, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29122778, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29122779, '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 = 29123215 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': 4177085, 'mtr_portfolio_id': 29123215, 'created_at': datetime.datetime(2025, 12, 3, 2, 23, 27), 'result': '0.04066275432172213', 'result_long': None, 'result_double': None}] Qualite : 0.04066275432172213 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29123215 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29123215_03-12-2025_02_23_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29123215 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_P29123215_03-12-2025_02_23_28.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29123264, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29123265, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29123266, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29123268, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29123269, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29123270, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29123271, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29123272, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29123273, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29123274, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29123275, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29123276, 'pht': 3726}}" where mtr_portfolio_id = 29123215 and dashboard_run_id = 2690857 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`=29123215 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17988141, 0.04066275432172213, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29123215_03-12-2025_02_23_28.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29123264, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29123265, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29123266, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29123268, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29123269, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29123270, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29123271, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29123272, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29123273, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29123274, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29123275, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29123276, '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 = 29123936 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': 4177161, 'mtr_portfolio_id': 29123936, 'created_at': datetime.datetime(2025, 12, 3, 2, 33, 27), 'result': '0.03559125110950435', 'result_long': None, 'result_double': None}] Qualite : 0.03559125110950435 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29123936 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29123936_03-12-2025_02_33_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29123936 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_P29123936_03-12-2025_02_33_28.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29123977, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29123978, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29123979, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29123980, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29123981, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29123982, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29123983, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29123984, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29123985, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29123986, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29123987, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29123988, 'pht': 3726}}" where mtr_portfolio_id = 29123936 and dashboard_run_id = 2690857 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`=29123936 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17988142, 0.03559125110950435, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29123936_03-12-2025_02_33_28.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29123977, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29123978, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29123979, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29123980, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29123981, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29123982, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29123983, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29123984, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29123985, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29123986, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29123987, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29123988, '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 = 29124511 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': 4177225, 'mtr_portfolio_id': 29124511, 'created_at': datetime.datetime(2025, 12, 3, 2, 48, 58), 'result': '0.04545517111056412', 'result_long': None, 'result_double': None}] Qualite : 0.04545517111056412 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29124511 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29124511_03-12-2025_02_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29124511 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_P29124511_03-12-2025_02_48_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29124515, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29124516, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29124517, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29124518, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29124519, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29124520, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29124521, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29124522, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29124523, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29124524, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29124525, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29124526, 'pht': 3726}}" where mtr_portfolio_id = 29124511 and dashboard_run_id = 2690857 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`=29124511 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17988143, 0.04545517111056412, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29124511_03-12-2025_02_48_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29124515, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29124516, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29124517, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29124518, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29124519, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29124520, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29124521, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29124522, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29124523, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29124524, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29124525, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29124526, '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 = 29125212 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': 4177298, 'mtr_portfolio_id': 29125212, 'created_at': datetime.datetime(2025, 12, 3, 3, 2, 59), 'result': '0.03758967905490408', 'result_long': None, 'result_double': None}] Qualite : 0.03758967905490408 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29125212 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29125212_03-12-2025_03_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29125212 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_P29125212_03-12-2025_03_03_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29125222, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29125223, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29125224, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29125225, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29125226, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29125227, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29125228, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29125229, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29125230, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29125231, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29125232, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29125233, 'pht': 3726}}" where mtr_portfolio_id = 29125212 and dashboard_run_id = 2690857 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`=29125212 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17988144, 0.03758967905490408, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29125212_03-12-2025_03_03_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29125222, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29125223, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29125224, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29125225, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29125226, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29125227, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29125228, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29125229, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29125230, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29125231, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29125232, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29125233, '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 = 29125708 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': 4177350, 'mtr_portfolio_id': 29125708, 'created_at': datetime.datetime(2025, 12, 3, 3, 19), 'result': '0.06190909768276253', 'result_long': None, 'result_double': None}] Qualite : 0.06190909768276253 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29125708 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29125708_03-12-2025_03_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29125708 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_P29125708_03-12-2025_03_19_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29125724, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29125725, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29125726, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29125727, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29125728, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29125729, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29125730, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29125731, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29125732, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29125733, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29125734, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29125735, 'pht': 3726}}" where mtr_portfolio_id = 29125708 and dashboard_run_id = 2690857 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`=29125708 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17988145, 0.06190909768276253, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29125708_03-12-2025_03_19_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29125724, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29125725, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29125726, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29125727, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29125728, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29125729, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29125730, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29125731, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29125732, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29125733, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29125734, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29125735, '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 = 29126179 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': 4177422, 'mtr_portfolio_id': 29126179, 'created_at': datetime.datetime(2025, 12, 3, 3, 35), 'result': '0.1106890530209358', 'result_long': None, 'result_double': None}] Qualite : 0.1106890530209358 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29126179 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29126179_03-12-2025_03_35_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29126179 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_P29126179_03-12-2025_03_35_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29126220, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29126221, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29126222, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29126223, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29126224, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29126225, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29126226, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29126227, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29126228, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29126229, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29126230, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29126231, 'pht': 3726}}" where mtr_portfolio_id = 29126179 and dashboard_run_id = 2690855 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`=29126179 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17988146, 0.1106890530209358, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29126179_03-12-2025_03_35_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29126220, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29126221, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29126222, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29126223, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29126224, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29126225, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29126226, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29126227, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29126228, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29126229, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29126230, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29126231, '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 = 29126661 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': 4177467, 'mtr_portfolio_id': 29126661, 'created_at': datetime.datetime(2025, 12, 3, 3, 49, 1), 'result': '0.04568220365483323', 'result_long': None, 'result_double': None}] Qualite : 0.04568220365483323 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29126661 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29126661_03-12-2025_03_49_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29126661 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_P29126661_03-12-2025_03_49_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29126663, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29126664, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29126665, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29126666, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29126667, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29126668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29126669, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29126670, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29126671, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29126672, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29126673, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29126674, 'pht': 3726}}" where mtr_portfolio_id = 29126661 and dashboard_run_id = 2690855 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`=29126661 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17988147, 0.04568220365483323, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29126661_03-12-2025_03_49_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29126663, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29126664, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29126665, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29126666, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29126667, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29126668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29126669, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29126670, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29126671, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29126672, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29126673, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29126674, '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 = 29126976 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': 4177509, 'mtr_portfolio_id': 29126976, 'created_at': datetime.datetime(2025, 12, 3, 4, 2, 59), 'result': '0.028423060964911283', 'result_long': None, 'result_double': None}] Qualite : 0.028423060964911283 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29126976 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29126976_03-12-2025_04_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29126976 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_P29126976_03-12-2025_04_03_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29126985, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29126986, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29126987, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29126988, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29126989, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29126990, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29126991, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29126992, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29126993, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29126994, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29126995, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29126996, 'pht': 3726}}" where mtr_portfolio_id = 29126976 and dashboard_run_id = 2690855 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`=29126976 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17988148, 0.028423060964911283, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29126976_03-12-2025_04_03_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29126985, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29126986, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29126987, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29126988, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29126989, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29126990, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29126991, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29126992, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29126993, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29126994, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29126995, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29126996, '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 (29118472,29119115,29119691,29120310,29122211,29122760,29123215,29123936,29124511,29125212,29125708,29126179,29126661,29126976) result : ((1397526149,), (1397526182,), (1397526188,), (1397526201,), (1397526203,), (1397526336,), (1397526338,), (1397526374,), (1397526412,), (1397526447,), (1397526815,), (1397526849,), (1397526884,), (1397526941,), (1397527079,), (1397527162,), (1397527749,), (1397527807,), (1397527824,), (1397527825,), (1397527827,), (1397528273,), (1397528309,), (1397528341,), (1397528389,), (1397528390,), (1397528394,), (1397528478,), (1397528479,), (1397528480,), (1397528503,), (1397528515,), (1397528700,), (1397528738,), (1397528772,), (1397528807,), (1397528845,), (1397528915,), (1397529116,), (1397529160,), (1397529192,), (1397529228,), (1397529265,), (1397529355,), (1397529357,), (1397529359,), (1397529435,), (1397529474,), (1397529508,), (1397529547,), (1397529701,), (1397529747,), (1397529801,), (1397529806,), (1397529884,), (1397529892,), (1397529898,), (1397529900,), (1397529923,), (1397529924,), (1397529927,), (1397529931,), (1397529932,), (1397529934,), (1397529978,), (1397529983,), (1397529984,), (1397529985,), (1397529987,), (1397530010,), (1397530012,), (1397530016,), (1397530098,), (1397530096,), (1397530097,), (1397530104,), (1397530105,), (1397530106,), (1397530107,), (1397530109,), (1397530156,), (1397530157,), (1397530158,), (1397530160,), (1397530163,), (1397530164,), (1397530191,), (1397530228,), (1397530264,), (1397530306,), (1397530470,), (1397530507,), (1397530546,), (1397530717,), (1397530718,), (1397530719,), (1397530720,), (1397530722,), (1397530896,), (1397530948,), (1397530949,), (1397530951,), (1397530991,), (1397531033,), (1397531144,), (1397531145,), (1397531146,), (1397531147,), (1397531149,), (1397531151,), (1397531155,), (1397531156,), (1397531157,), (1397531247,), (1397531286,), (1397531295,), (1397531303,), (1397531379,), (1397531447,), (1397531477,), (1397531498,), (1397531625,), (1397531626,), (1397531627,), (1397531672,), (1397531716,), (1397531718,), (1397531724,), (1397531725,), (1397531726,), (1397531735,), (1397531736,), (1397531737,), (1397531768,), (1397532189,), (1397532223,), (1397532258,), (1397532294,), (1397532331,), (1397532698,), (1397532700,), (1397532703,), (1397532705,), (1397532790,), (1397532825,), (1397532696,), (1397532697,), (1397532905,), (1397532906,), (1397532918,), (1397533399,), (1397533435,), (1397533472,), (1397533505,), (1397533541,), (1397533920,), (1397533960,), (1397533996,), (1397534050,), (1397534088,), (1397534125,), (1397534338,), (1397534339,), (1397534389,), (1397534424,), (1397534702,), (1397534703,), (1397534704,), (1397534714,), (1397534775,), (1397534776,), (1397534777,), (1397534905,), (1397534911,), (1397534913,), (1397534914,), (1397534918,), (1397534929,), (1397534980,), (1397535132,), (1397535169,), (1397535204,), (1397535240,), (1397535274,), (1397535652,), (1397535688,), (1397535727,), (1397535769,), (1397535806,), (1397535842,), (1397536008,), (1397536010,), (1397536012,), (1397536015,), (1397536047,), (1397536083,), (1397536255,), (1397536322,), (1397536387,), (1397536686,), (1397536723,), (1397536760,), (1397536810,), (1397536887,), (1397537339,), (1397537385,), (1397537416,), (1397537451,), (1397537878,), (1397537923,), (1397537966,), (1397538038,), (1397538109,), (1397538634,), (1397538675,), (1397538714,), (1397538773,), (1397538802,), (1397538829,), (1397539013,), (1397538883,), (1397538928,), (1397538973,), (1397539186,), (1397539187,), (1397539188,), (1397539189,), (1397539440,), (1397539473,), (1397539515,), (1397539548,), (1397539918,), (1397539988,), (1397540055,), (1397540126,), (1397540643,), (1397540686,), (1397540716,), (1397541136,), (1397541180,), (1397541416,), (1397541417,), (1397541418,), (1397541728,), (1397541761,), (1397541793,), (1397541832,), (1397541865,), (1397542168,), (1397542169,), (1397542422,), (1397542423,), (1397542932,), (1397542963,), (1397543265,), (1397543280,), (1397543287,), (1397543295,), (1397543421,), (1397543422,), (1397543423,), (1397543424,), (1397543913,), (1397543962,), (1397543997,), (1397544036,), (1397551260,), (1397551257,), (1397551258,), (1397551259,), (1397551323,), (1397551324,), (1397551325,), (1397551326,), (1397551331,), (1397551332,), (1397551333,), (1397551334,), (1397551357,), (1397551948,), (1397551998,), (1397552081,), (1397552445,), (1397552452,), (1397552492,), (1397552531,), (1397552731,), (1397552764,), (1397553007,), (1397553008,), (1397553023,), (1397553024,), (1397553047,), (1397553140,), (1397553141,), (1397553180,), (1397553181,), (1397553183,), (1397553185,), (1397553196,), (1397553263,), (1397553264,), (1397553265,), (1397553266,), (1397553272,), (1397553273,), (1397553274,), (1397553275,), (1397553282,), (1397553283,), (1397553284,), (1397553316,), (1397553317,), (1397553318,), (1397553490,), (1397553491,), (1397553492,), (1397553647,), (1397553674,), (1397553694,), (1397553697,), (1397553700,), (1397553800,), (1397553789,), (1397553790,), (1397553799,), (1397553882,), (1397553914,), (1397553915,), (1397553939,), (1397553940,), (1397553941,), (1397553948,), (1397553949,), (1397553950,), (1397553952,), (1397553967,), (1397553968,), (1397553969,), (1397553971,), (1397553977,), (1397553978,), (1397553979,), (1397553980,), (1397553982,), (1397554001,), (1397554002,), (1397554003,), (1397554004,), (1397554006,), (1397554008,), (1397554022,), (1397554029,), (1397554036,), (1397554092,), (1397554093,), (1397554094,), (1397554095,), (1397554171,), (1397554173,), (1397554184,), (1397554185,), (1397554186,), (1397554187,), (1397554190,), (1397554191,), (1397554192,), (1397554193,), (1397554195,), (1397554197,), (1397554207,), (1397554208,), (1397554209,), (1397554210,), (1397554212,), (1397554214,), (1397554393,), (1397554401,), (1397554420,), (1397554440,), (1397554475,), (1397554518,), (1397554728,), (1397554772,), (1397554816,), (1397554861,), (1397554894,), (1397554944,), (1397555342,), (1397555146,), (1397555196,), (1397555238,), (1397555275,), (1397555498,), (1397555648,), (1397555713,), (1397555782,), (1397555837,), (1397556225,), (1397556265,), (1397556300,), (1397556338,), (1397556353,), (1397556354,), (1397556507,), (1397556573,), (1397557131,), (1397557175,), (1397557194,), (1397557423,), (1397557427,), (1397557428,), (1397557430,), (1397557432,), (1397557433,), (1397557521,), (1397557558,), (1397557591,), (1397558146,), (1397558150,), (1397558160,), (1397558467,), (1397558468,), (1397558469,), (1397558471,), (1397558473,), (1397558494,), (1397558654,), (1397558655,), (1397558668,), (1397558669,), (1397558761,), (1397558762,), (1397558806,), (1397558809,), (1397558811,), (1397558813,), (1397558855,), (1397558856,), (1397558857,), (1397558858,), (1397558860,), (1397558956,), (1397558968,), (1397558971,), (1397559076,), (1397559083,), (1397559084,), (1397559102,), (1397559198,), (1397559199,), (1397559201,), (1397559202,), (1397559203,), (1397559228,), (1397560843,), (1397559223,), (1397559224,), (1397559225,), (1397559226,), (1397559232,), (1397559233,), (1397559234,), (1397559236,), (1397559238,), (1397559240,), (1397559247,), (1397559256,), (1397559261,), (1397559273,), (1397559275,), (1397559285,), (1397559396,), (1397559398,), (1397559400,), (1397559402,), (1397559412,), (1397559461,), (1397559501,), (1397559558,), (1397559608,), (1397559642,), (1397559674,), (1397559707,), (1397559813,), (1397559845,), (1397559880,), (1397559918,), (1397559953,), (1397560029,), (1397560153,), (1397560208,), (1397560278,), (1397560354,), (1397560428,), (1397560545,), (1397560799,), (1397560975,), (1397560976,), (1397560983,), (1397561362,), (1397561376,), (1397561410,), (1397561430,), (1397561512,), (1397561513,), (1397561514,), (1397561515,), (1397561575,), (1397561576,), (1397561577,), (1397561578,), (1397561580,), (1397561685,), (1397561704,), (1397561750,), (1397561803,), (1397561804,), (1397561825,), (1397561826,), (1397561862,), (1397561863,), (1397561864,), (1397561871,), (1397561873,), (1397561878,), (1397561960,), (1397561962,), (1397561969,), (1397561973,), (1397561976,), (1397561983,), (1397562002,), (1397562003,), (1397562004,), (1397562053,), (1397562054,), (1397562056,), (1397562058,), (1397562061,), (1397562085,), (1397562081,), (1397562083,), (1397562084,), (1397562093,), (1397562094,), (1397562100,), (1397562109,), (1397562110,), (1397562114,), (1397562120,), (1397562132,), (1397562173,), (1397562174,), (1397562175,), (1397562176,), (1397562178,), (1397562219,), (1397562239,), (1397562240,), (1397562247,), (1397562257,), (1397562304,), (1397562305,), (1397562325,), (1397562328,), (1397562337,), (1397562415,), (1397562417,), (1397562427,), (1397562461,), (1397562538,), (1397562539,), (1397562541,), (1397562551,), (1397562656,), (1397562657,), (1397562658,), (1397562684,), (1397562686,), (1397562698,), (1397562717,), (1397562719,), (1397562721,), (1397562722,), (1397562732,), (1397562741,), (1397562748,), (1397562750,), (1397562752,), (1397562754,), (1397562756,), (1397562757,), (1397562758,), (1397562764,), (1397562765,), (1397562769,), (1397562777,), (1397562779,), (1397562781,), (1397562809,), (1397562810,), (1397562811,), (1397562812,), (1397562865,), (1397562866,), (1397562867,), (1397562887,), (1397562894,), (1397562895,), (1397562904,), (1397562908,), (1397563065,), (1397562943,), (1397562952,), (1397563026,), (1397563063,), (1397563150,), (1397563152,), (1397563177,), (1397563187,), (1397563253,), (1397563254,), (1397563255,), (1397563256,), (1397563258,), (1397563263,), (1397563265,), (1397563268,), (1397563271,), (1397563274,), (1397563277,), (1397563288,), (1397563289,), (1397563290,), (1397563300,), (1397563306,), (1397563308,), (1397563309,), (1397563311,), (1397563313,), (1397563366,), (1397563367,), (1397563368,), (1397563369,), (1397563371,), (1397563391,), (1397563392,), (1397563393,), (1397563394,), (1397563396,), (1397563398,), (1397563482,), (1397563506,), (1397563544,), (1397563548,), (1397563549,), (1397563664,), (1397563670,), (1397563714,), (1397563715,), (1397563716,), (1397563717,), (1397563719,), (1397563721,), (1397563789,), (1397563790,), (1397563791,), (1397563808,), (1397563820,), (1397563833,), (1397563867,), (1397563868,), (1397563869,), (1397563870,), (1397563872,), (1397563893,), (1397563896,), (1397563898,), (1397563900,), (1397563946,), (1397563949,), (1397563951,), (1397563953,), (1397563955,), (1397563957,), (1397563994,), (1397563995,), (1397564000,), (1397564021,), (1397564004,), (1397564019,), (1397564078,), (1397564083,), (1397564085,), (1397564095,), (1397564096,), (1397564097,), (1397564098,), (1397564112,), (1397564114,), (1397564116,), (1397564118,), (1397564213,), (1397564215,), (1397564216,), (1397564217,), (1397564219,), (1397564228,), (1397564229,), (1397564277,), (1397564301,), (1397564363,), (1397564365,), (1397564395,), (1397564398,), (1397564401,), (1397564419,), (1397564423,), (1397564424,), (1397564425,), (1397564426,), (1397564427,), (1397564428,), (1397564429,), (1397564430,), (1397564431,), (1397564433,), (1397564457,), (1397564466,), (1397564469,), (1397564471,), (1397564473,), (1397564487,), (1397564506,), (1397564508,), (1397564510,), (1397564512,), (1397564516,), (1397564520,), (1397564550,), (1397564590,), (1397564616,), (1397564620,), (1397564621,), (1397564643,), (1397564695,), (1397564696,), (1397564697,), (1397564698,), (1397564737,), (1397564738,), (1397564739,), (1397564740,), (1397564748,), (1397564750,), (1397564782,), (1397564783,), (1397564784,), (1397564785,), (1397564810,), (1397565005,), (1397564970,), (1397564985,), (1397564988,), (1397564997,), (1397564999,), (1397565018,), (1397565020,), (1397565021,), (1397565079,), (1397565099,), (1397565170,), (1397565171,), (1397565278,), (1397565945,), (1397565944,), (1397566195,), (1397566204,), (1397566226,), (1397566321,), (1397566705,), (1397566731,), (1397566805,), (1397566939,), (1397566940,), (1397566941,), (1397566942,), (1397567007,), (1397567008,), (1397567009,), (1397567011,), (1397567013,), (1397567015,), (1397567041,), (1397567046,), (1397567047,), (1397567048,), (1397567074,), (1397567076,), (1397567078,), (1397567080,), (1397567082,), (1397567084,), (1397567137,), (1397567138,), (1397567144,), (1397567145,), (1397567236,), (1397567237,), (1397567238,), (1397567239,), (1397567382,), (1397567395,), (1397567407,), (1397567415,), (1397567417,), (1397567472,), (1397567473,), (1397567507,), (1397567539,), (1397567586,), (1397567592,), (1397567616,), (1397567622,), (1397567625,), (1397567782,), (1397567746,), (1397567752,), (1397567756,), (1397567770,), (1397567774,), (1397567846,), (1397567849,), (1397567864,), (1397567947,), (1397567948,), (1397567949,), (1397567950,), (1397567952,), (1397567997,), (1397568019,), (1397568025,), (1397568028,), (1397568031,), (1397568036,), (1397568046,), (1397568047,), (1397568048,), (1397568049,), (1397568050,), (1397568053,), (1397568054,), (1397568057,), (1397568058,), (1397568061,), (1397568062,), (1397568065,), (1397568066,), (1397568125,), (1397568126,), (1397568127,), (1397568236,), (1397568237,), (1397568405,), (1397568406,), (1397568488,), (1397568490,), (1397568527,), (1397568528,), (1397568534,), (1397568615,), (1397568616,), (1397568617,), (1397568618,), (1397568620,), (1397569031,), (1397569039,), (1397569126,), (1397569194,), (1397569267,), (1397569337,), (1397569555,), (1397569607,), (1397569673,), (1397569718,), (1397569920,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'03122025': {'nb_upload': 60, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29126976]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1397569920, 1397569718, 1397569673, 1397569607, 1397569555] map_info['map_portfolio_photo'] : {29126976: [1397569920, 1397569718, 1397569673, 1397569607, 1397569555, 1397569337, 1397569267, 1397569194, 1397569126, 1397569039, 1397569031, 1397568620, 1397568618, 1397568617, 1397568616, 1397568615, 1397568534, 1397568528, 1397568527, 1397568490, 1397568488, 1397568406, 1397568405, 1397568237, 1397568236, 1397568127, 1397568126, 1397568125, 1397568066, 1397568065, 1397568062, 1397568061, 1397568058, 1397568057, 1397568054, 1397568053, 1397568050, 1397568049, 1397568048, 1397568047, 1397568046, 1397568036, 1397568031, 1397568028, 1397568025, 1397568019, 1397567997, 1397567952, 1397567950, 1397567949, 1397567948, 1397567947, 1397567864, 1397567849, 1397567846, 1397567774, 1397567770, 1397567756, 1397567752, 1397567746]} final : True mtd_id 4302 list_pids : [1397569920, 1397569718, 1397569673, 1397569607, 1397569555] Looping around the photos to save general results len do output : 1 /29126976Didn'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, '4177509') ('4302', '29126976', '1397569920', None, None, None, None, None, '4177509') ('4302', None, None, None, None, None, None, None, '4177509') ('4302', '29126976', '1397569718', None, None, None, None, None, '4177509') ('4302', None, None, None, None, None, None, None, '4177509') ('4302', '29126976', '1397569673', None, None, None, None, None, '4177509') ('4302', None, None, None, None, None, None, None, '4177509') ('4302', '29126976', '1397569607', None, None, None, None, None, '4177509') ('4302', None, None, None, None, None, None, None, '4177509') ('4302', '29126976', '1397569555', None, None, None, None, None, '4177509') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 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, '29126976', 'None', None, None, None, None, '4177509'), ('4302', '29126976', '1397569920', None, None, None, None, None, '4177509'), ('4302', '29126976', '1397569718', None, None, None, None, None, '4177509'), ('4302', '29126976', '1397569673', None, None, None, None, None, '4177509'), ('4302', '29126976', '1397569607', None, None, None, None, None, '4177509'), ('4302', '29126976', '1397569555', None, None, None, None, None, '4177509')] time used for this insertion : 0.0416257381439209 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.3268940448760986 time spend to save output : 0.04186391830444336 total time spend for step 5 : 1.368757963180542 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 (4177509) 2.08user 2.59system 0:08.32elapsed 56%CPU (0avgtext+0avgdata 165280maxresident)k 38784inputs+6032outputs (229major+66980minor)pagefaults 0swaps