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 : 1401694 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 (3274520) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3274520) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24872568 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3274520'] with mtr_portfolio_ids : ['24872568'] and first list_photo_ids : [] new path : /proc/1401694/ Name: python3 Umask: 0002 State: R (running) Tgid: 1401694 Ngid: 0 Pid: 1401694 PPid: 1401693 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1401694 NSpid: 1401694 NSpgid: 1399689 NSsid: 1399689 VmPeak: 1106868 kB VmSize: 1106868 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98864 kB VmRSS: 98864 kB RssAnon: 59804 kB RssFile: 39060 kB RssShmem: 0 kB VmData: 865620 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 604 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 6/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: 43 nonvoluntary_ctxt_switches: 88 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1401694', 'Ngid': '0', 'Pid': '1401694', 'PPid': '1401693', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1401694', 'NSpid': '1401694', 'NSpgid': '1399689', 'NSsid': '1399689', 'VmPeak': '1106868 kB', 'VmSize': '1106868 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98864 kB', 'VmRSS': '98864 kB', 'RssAnon': '59804 kB', 'RssFile': '39060 kB', 'RssShmem': '0 kB', 'VmData': '865620 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '604 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '6/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': '43', 'nonvoluntary_ctxt_switches': '88'} ('datou_batch_current', '1401694', '1106868', '0', '1106868', '865620', '98864', b'', 'marlene', '3274520') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (24872568) 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 (3274520 ) ) 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 (24872568) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1371790580, 'portfolio_id': 24872568}, {'photo_id': 1371790579, 'portfolio_id': 24872568}, {'photo_id': 1371790576, 'portfolio_id': 24872568}, {'photo_id': 1371790573, 'portfolio_id': 24872568}, {'photo_id': 1371790571, 'portfolio_id': 24872568}, {'photo_id': 1371790569, 'portfolio_id': 24872568}, {'photo_id': 1371790520, 'portfolio_id': 24872568}, {'photo_id': 1371790518, 'portfolio_id': 24872568}, {'photo_id': 1371790515, 'portfolio_id': 24872568}, {'photo_id': 1371790512, 'portfolio_id': 24872568}, {'photo_id': 1371790510, 'portfolio_id': 24872568}, {'photo_id': 1371790506, 'portfolio_id': 24872568}, {'photo_id': 1371790497, 'portfolio_id': 24872568}, {'photo_id': 1371790493, 'portfolio_id': 24872568}, {'photo_id': 1371790488, 'portfolio_id': 24872568}, {'photo_id': 1371790485, 'portfolio_id': 24872568}, {'photo_id': 1371790481, 'portfolio_id': 24872568}, {'photo_id': 1371790477, 'portfolio_id': 24872568}, {'photo_id': 1371790427, 'portfolio_id': 24872568}, {'photo_id': 1371790425, 'portfolio_id': 24872568}, {'photo_id': 1371790423, 'portfolio_id': 24872568}, {'photo_id': 1371790421, 'portfolio_id': 24872568}, {'photo_id': 1371790418, 'portfolio_id': 24872568}, {'photo_id': 1371790417, 'portfolio_id': 24872568}, {'photo_id': 1371790378, 'portfolio_id': 24872568}, {'photo_id': 1371790375, 'portfolio_id': 24872568}, {'photo_id': 1371790369, 'portfolio_id': 24872568}, {'photo_id': 1371790365, 'portfolio_id': 24872568}, {'photo_id': 1371790362, 'portfolio_id': 24872568}, {'photo_id': 1371790360, 'portfolio_id': 24872568}, {'photo_id': 1371790344, 'portfolio_id': 24872568}, {'photo_id': 1371790339, 'portfolio_id': 24872568}, {'photo_id': 1371790335, 'portfolio_id': 24872568}, {'photo_id': 1371790332, 'portfolio_id': 24872568}, {'photo_id': 1371790330, 'portfolio_id': 24872568}, {'photo_id': 1371790327, 'portfolio_id': 24872568}, {'photo_id': 1371790293, 'portfolio_id': 24872568}, {'photo_id': 1371790290, 'portfolio_id': 24872568}, {'photo_id': 1371790287, 'portfolio_id': 24872568}, {'photo_id': 1371790286, 'portfolio_id': 24872568}, {'photo_id': 1371790283, 'portfolio_id': 24872568}, {'photo_id': 1371790281, 'portfolio_id': 24872568}, {'photo_id': 1371790255, 'portfolio_id': 24872568}, {'photo_id': 1371790253, 'portfolio_id': 24872568}, {'photo_id': 1371790251, 'portfolio_id': 24872568}, {'photo_id': 1371790248, 'portfolio_id': 24872568}, {'photo_id': 1371790244, 'portfolio_id': 24872568}, {'photo_id': 1371790236, 'portfolio_id': 24872568}, {'photo_id': 1371790221, 'portfolio_id': 24872568}, {'photo_id': 1371790220, 'portfolio_id': 24872568}, {'photo_id': 1371790217, 'portfolio_id': 24872568}, {'photo_id': 1371790215, 'portfolio_id': 24872568}, {'photo_id': 1371790213, 'portfolio_id': 24872568}, {'photo_id': 1371790212, 'portfolio_id': 24872568}, {'photo_id': 1371790210, 'portfolio_id': 24872568}, {'photo_id': 1371790209, 'portfolio_id': 24872568}, {'photo_id': 1371790206, 'portfolio_id': 24872568}, {'photo_id': 1371790205, 'portfolio_id': 24872568}, {'photo_id': 1371790202, 'portfolio_id': 24872568}, {'photo_id': 1371790201, 'portfolio_id': 24872568}, {'photo_id': 1371790034, 'portfolio_id': 24872568}, {'photo_id': 1371790028, 'portfolio_id': 24872568}, {'photo_id': 1371790020, 'portfolio_id': 24872568}, {'photo_id': 1371789996, 'portfolio_id': 24872568}, {'photo_id': 1371789968, 'portfolio_id': 24872568}, {'photo_id': 1371789944, 'portfolio_id': 24872568}, {'photo_id': 1371789781, 'portfolio_id': 24872568}, {'photo_id': 1371789778, 'portfolio_id': 24872568}, {'photo_id': 1371789775, 'portfolio_id': 24872568}, {'photo_id': 1371789772, 'portfolio_id': 24872568}, {'photo_id': 1371789769, 'portfolio_id': 24872568}, {'photo_id': 1371789757, 'portfolio_id': 24872568}, {'photo_id': 1371789626, 'portfolio_id': 24872568}, {'photo_id': 1371789598, 'portfolio_id': 24872568}, {'photo_id': 1371789574, 'portfolio_id': 24872568}, {'photo_id': 1371789552, 'portfolio_id': 24872568}, {'photo_id': 1371789524, 'portfolio_id': 24872568}, {'photo_id': 1371789493, 'portfolio_id': 24872568}, {'photo_id': 1371789093, 'portfolio_id': 24872568}, {'photo_id': 1371789052, 'portfolio_id': 24872568}, {'photo_id': 1371789027, 'portfolio_id': 24872568}, {'photo_id': 1371789000, 'portfolio_id': 24872568}, {'photo_id': 1371788977, 'portfolio_id': 24872568}, {'photo_id': 1371788952, 'portfolio_id': 24872568}] map_portfolio_id_photo_id: {24872568: [1371790580, 1371790579, 1371790576, 1371790573, 1371790571, 1371790569, 1371790520, 1371790518, 1371790515, 1371790512, 1371790510, 1371790506, 1371790497, 1371790493, 1371790488, 1371790485, 1371790481, 1371790477, 1371790427, 1371790425, 1371790423, 1371790421, 1371790418, 1371790417, 1371790378, 1371790375, 1371790369, 1371790365, 1371790362, 1371790360, 1371790344, 1371790339, 1371790335, 1371790332, 1371790330, 1371790327, 1371790293, 1371790290, 1371790287, 1371790286, 1371790283, 1371790281, 1371790255, 1371790253, 1371790251, 1371790248, 1371790244, 1371790236, 1371790221, 1371790220, 1371790217, 1371790215, 1371790213, 1371790212, 1371790210, 1371790209, 1371790206, 1371790205, 1371790202, 1371790201, 1371790034, 1371790028, 1371790020, 1371789996, 1371789968, 1371789944, 1371789781, 1371789778, 1371789775, 1371789772, 1371789769, 1371789757, 1371789626, 1371789598, 1371789574, 1371789552, 1371789524, 1371789493, 1371789093, 1371789052, 1371789027, 1371789000, 1371788977, 1371788952]} ##### 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.016199588775634766 #### 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 Sat Jul 12 04:14: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 (24872568) 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 : 24872568 get user id for portfolio 24872568 get sub ptf for main ptf 24872568, type 3726 and hashtags ['environnement', 'flou', 'metal', 'cartonnette', 'papier', 'mal_croppe', 'Carton_gris', 'kraft', 'plastique', 'Carton_brun', 'Teint_Dans_La_Masse', 'autre_refus'] 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`=24872568 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','flou','metal','cartonnette','papier','mal_croppe','Carton_gris','kraft','plastique','Carton_brun','Teint_Dans_La_Masse','autre_refus')) 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`=24872568 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','flou','metal','cartonnette','papier','mal_croppe','Carton_gris','kraft','plastique','Carton_brun','Teint_Dans_La_Masse','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 24872568, 'sub_port_id': 24872665, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745564, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 27)}, 'metal': {'main_port_id': 24872568, 'sub_port_id': 24872666, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745565, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 27)}, 'plastique': {'main_port_id': 24872568, 'sub_port_id': 24872667, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745566, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 27)}, 'papier': {'main_port_id': 24872568, 'sub_port_id': 24872668, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745567, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 27)}, 'autre_refus': {'main_port_id': 24872568, 'sub_port_id': 24872669, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745568, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 27)}, 'Carton_gris': {'main_port_id': 24872568, 'sub_port_id': 24872670, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745569, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 27)}, 'environnement': {'main_port_id': 24872568, 'sub_port_id': 24872671, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745570, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 27)}, 'mal_croppe': {'main_port_id': 24872568, 'sub_port_id': 24872672, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745571, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 27)}, 'flou': {'main_port_id': 24872568, 'sub_port_id': 24872673, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745572, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 24872568, 'sub_port_id': 24872674, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745573, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 27)}, 'Carton_brun': {'main_port_id': 24872568, 'sub_port_id': 24872675, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745574, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 27)}, 'cartonnette': {'main_port_id': 24872568, 'sub_port_id': 24872676, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745575, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24872665 , 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=24872568 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 (24872665) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24872568) result : ((1371788952,), (1371788977,), (1371789000,), (1371789027,), (1371789052,), (1371789093,), (1371789493,), (1371789524,), (1371789552,), (1371789574,), (1371789598,), (1371789626,), (1371789757,), (1371789769,), (1371789772,), (1371789775,), (1371789778,), (1371789781,), (1371789944,), (1371789968,), (1371789996,), (1371790020,), (1371790028,), (1371790034,), (1371790201,), (1371790202,), (1371790205,), (1371790206,), (1371790209,), (1371790210,), (1371790212,), (1371790213,), (1371790215,), (1371790217,), (1371790220,), (1371790221,), (1371790236,), (1371790244,), (1371790248,), (1371790251,), (1371790253,), (1371790255,), (1371790281,), (1371790283,), (1371790286,), (1371790287,), (1371790290,), (1371790293,), (1371790327,), (1371790330,), (1371790332,), (1371790335,), (1371790339,), (1371790344,), (1371790360,), (1371790362,), (1371790365,), (1371790369,), (1371790375,), (1371790378,), (1371790417,), (1371790418,), (1371790421,), (1371790423,), (1371790425,), (1371790427,), (1371790477,), (1371790481,), (1371790485,), (1371790488,), (1371790493,), (1371790497,), (1371790506,), (1371790510,), (1371790512,), (1371790515,), (1371790518,), (1371790520,), (1371790569,), (1371790571,), (1371790573,), (1371790576,), (1371790579,), (1371790580,)) 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 (1371789000) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24872666 , 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=24872568 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 (24872666) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24872568) result : ((1371788952,), (1371788977,), (1371789000,), (1371789027,), (1371789052,), (1371789093,), (1371789493,), (1371789524,), (1371789552,), (1371789574,), (1371789598,), (1371789626,), (1371789757,), (1371789769,), (1371789772,), (1371789775,), (1371789778,), (1371789781,), (1371789944,), (1371789968,), (1371789996,), (1371790020,), (1371790028,), (1371790034,), (1371790201,), (1371790202,), (1371790205,), (1371790206,), (1371790209,), (1371790210,), (1371790212,), (1371790213,), (1371790215,), (1371790217,), (1371790220,), (1371790221,), (1371790236,), (1371790244,), (1371790248,), (1371790251,), (1371790253,), (1371790255,), (1371790281,), (1371790283,), (1371790286,), (1371790287,), (1371790290,), (1371790293,), (1371790327,), (1371790330,), (1371790332,), (1371790335,), (1371790339,), (1371790344,), (1371790360,), (1371790362,), (1371790365,), (1371790369,), (1371790375,), (1371790378,), (1371790417,), (1371790418,), (1371790421,), (1371790423,), (1371790425,), (1371790427,), (1371790477,), (1371790481,), (1371790485,), (1371790488,), (1371790493,), (1371790497,), (1371790506,), (1371790510,), (1371790512,), (1371790515,), (1371790518,), (1371790520,), (1371790569,), (1371790571,), (1371790573,), (1371790576,), (1371790579,), (1371790580,)) 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 (1371789000) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24872667 , 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=24872568 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 (24872667) result : ((1371790062,), (1371790064,), (1371790320,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24872568) result : ((1371788952,), (1371788977,), (1371789000,), (1371789027,), (1371789052,), (1371789093,), (1371789493,), (1371789524,), (1371789552,), (1371789574,), (1371789598,), (1371789626,), (1371789757,), (1371789769,), (1371789772,), (1371789775,), (1371789778,), (1371789781,), (1371789944,), (1371789968,), (1371789996,), (1371790020,), (1371790028,), (1371790034,), (1371790201,), (1371790202,), (1371790205,), (1371790206,), (1371790209,), (1371790210,), (1371790212,), (1371790213,), (1371790215,), (1371790217,), (1371790220,), (1371790221,), (1371790236,), (1371790244,), (1371790248,), (1371790251,), (1371790253,), (1371790255,), (1371790281,), (1371790283,), (1371790286,), (1371790287,), (1371790290,), (1371790293,), (1371790327,), (1371790330,), (1371790332,), (1371790335,), (1371790339,), (1371790344,), (1371790360,), (1371790362,), (1371790365,), (1371790369,), (1371790375,), (1371790378,), (1371790417,), (1371790418,), (1371790421,), (1371790423,), (1371790425,), (1371790427,), (1371790477,), (1371790481,), (1371790485,), (1371790488,), (1371790493,), (1371790497,), (1371790506,), (1371790510,), (1371790512,), (1371790515,), (1371790518,), (1371790520,), (1371790569,), (1371790571,), (1371790573,), (1371790576,), (1371790579,), (1371790580,)) 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 (1371789000) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24872668 , 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=24872568 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 (24872668) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24872568) result : ((1371788952,), (1371788977,), (1371789000,), (1371789027,), (1371789052,), (1371789093,), (1371789493,), (1371789524,), (1371789552,), (1371789574,), (1371789598,), (1371789626,), (1371789757,), (1371789769,), (1371789772,), (1371789775,), (1371789778,), (1371789781,), (1371789944,), (1371789968,), (1371789996,), (1371790020,), (1371790028,), (1371790034,), (1371790201,), (1371790202,), (1371790205,), (1371790206,), (1371790209,), (1371790210,), (1371790212,), (1371790213,), (1371790215,), (1371790217,), (1371790220,), (1371790221,), (1371790236,), (1371790244,), (1371790248,), (1371790251,), (1371790253,), (1371790255,), (1371790281,), (1371790283,), (1371790286,), (1371790287,), (1371790290,), (1371790293,), (1371790327,), (1371790330,), (1371790332,), (1371790335,), (1371790339,), (1371790344,), (1371790360,), (1371790362,), (1371790365,), (1371790369,), (1371790375,), (1371790378,), (1371790417,), (1371790418,), (1371790421,), (1371790423,), (1371790425,), (1371790427,), (1371790477,), (1371790481,), (1371790485,), (1371790488,), (1371790493,), (1371790497,), (1371790506,), (1371790510,), (1371790512,), (1371790515,), (1371790518,), (1371790520,), (1371790569,), (1371790571,), (1371790573,), (1371790576,), (1371790579,), (1371790580,)) 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 (1371789000) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24872669 , 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=24872568 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 (24872669) result : ((1371790314,), (1371790351,), (1371790352,), (1371790446,), (1371790539,), (1371790540,), (1371790541,), (1371790607,), (1371790608,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24872568) result : ((1371788952,), (1371788977,), (1371789000,), (1371789027,), (1371789052,), (1371789093,), (1371789493,), (1371789524,), (1371789552,), (1371789574,), (1371789598,), (1371789626,), (1371789757,), (1371789769,), (1371789772,), (1371789775,), (1371789778,), (1371789781,), (1371789944,), (1371789968,), (1371789996,), (1371790020,), (1371790028,), (1371790034,), (1371790201,), (1371790202,), (1371790205,), (1371790206,), (1371790209,), (1371790210,), (1371790212,), (1371790213,), (1371790215,), (1371790217,), (1371790220,), (1371790221,), (1371790236,), (1371790244,), (1371790248,), (1371790251,), (1371790253,), (1371790255,), (1371790281,), (1371790283,), (1371790286,), (1371790287,), (1371790290,), (1371790293,), (1371790327,), (1371790330,), (1371790332,), (1371790335,), (1371790339,), (1371790344,), (1371790360,), (1371790362,), (1371790365,), (1371790369,), (1371790375,), (1371790378,), (1371790417,), (1371790418,), (1371790421,), (1371790423,), (1371790425,), (1371790427,), (1371790477,), (1371790481,), (1371790485,), (1371790488,), (1371790493,), (1371790497,), (1371790506,), (1371790510,), (1371790512,), (1371790515,), (1371790518,), (1371790520,), (1371790569,), (1371790571,), (1371790573,), (1371790576,), (1371790579,), (1371790580,)) 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 (1371789000) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24872670 , 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=24872568 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 (24872670) result : ((1371790044,), (1371790237,), (1371790238,), (1371790546,), (1371790547,), (1371790548,), (1371790549,), (1371790550,), (1371790551,), (1371790552,), (1371790611,), (1371790612,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24872568) result : ((1371788952,), (1371788977,), (1371789000,), (1371789027,), (1371789052,), (1371789093,), (1371789493,), (1371789524,), (1371789552,), (1371789574,), (1371789598,), (1371789626,), (1371789757,), (1371789769,), (1371789772,), (1371789775,), (1371789778,), (1371789781,), (1371789944,), (1371789968,), (1371789996,), (1371790020,), (1371790028,), (1371790034,), (1371790201,), (1371790202,), (1371790205,), (1371790206,), (1371790209,), (1371790210,), (1371790212,), (1371790213,), (1371790215,), (1371790217,), (1371790220,), (1371790221,), (1371790236,), (1371790244,), (1371790248,), (1371790251,), (1371790253,), (1371790255,), (1371790281,), (1371790283,), (1371790286,), (1371790287,), (1371790290,), (1371790293,), (1371790327,), (1371790330,), (1371790332,), (1371790335,), (1371790339,), (1371790344,), (1371790360,), (1371790362,), (1371790365,), (1371790369,), (1371790375,), (1371790378,), (1371790417,), (1371790418,), (1371790421,), (1371790423,), (1371790425,), (1371790427,), (1371790477,), (1371790481,), (1371790485,), (1371790488,), (1371790493,), (1371790497,), (1371790506,), (1371790510,), (1371790512,), (1371790515,), (1371790518,), (1371790520,), (1371790569,), (1371790571,), (1371790573,), (1371790576,), (1371790579,), (1371790580,)) 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 (1371789000) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24872671 , 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=24872568 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 (24872671) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24872568) result : ((1371788952,), (1371788977,), (1371789000,), (1371789027,), (1371789052,), (1371789093,), (1371789493,), (1371789524,), (1371789552,), (1371789574,), (1371789598,), (1371789626,), (1371789757,), (1371789769,), (1371789772,), (1371789775,), (1371789778,), (1371789781,), (1371789944,), (1371789968,), (1371789996,), (1371790020,), (1371790028,), (1371790034,), (1371790201,), (1371790202,), (1371790205,), (1371790206,), (1371790209,), (1371790210,), (1371790212,), (1371790213,), (1371790215,), (1371790217,), (1371790220,), (1371790221,), (1371790236,), (1371790244,), (1371790248,), (1371790251,), (1371790253,), (1371790255,), (1371790281,), (1371790283,), (1371790286,), (1371790287,), (1371790290,), (1371790293,), (1371790327,), (1371790330,), (1371790332,), (1371790335,), (1371790339,), (1371790344,), (1371790360,), (1371790362,), (1371790365,), (1371790369,), (1371790375,), (1371790378,), (1371790417,), (1371790418,), (1371790421,), (1371790423,), (1371790425,), (1371790427,), (1371790477,), (1371790481,), (1371790485,), (1371790488,), (1371790493,), (1371790497,), (1371790506,), (1371790510,), (1371790512,), (1371790515,), (1371790518,), (1371790520,), (1371790569,), (1371790571,), (1371790573,), (1371790576,), (1371790579,), (1371790580,)) 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 (1371789000) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24872672 , 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=24872568 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 (24872672) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24872568) result : ((1371788952,), (1371788977,), (1371789000,), (1371789027,), (1371789052,), (1371789093,), (1371789493,), (1371789524,), (1371789552,), (1371789574,), (1371789598,), (1371789626,), (1371789757,), (1371789769,), (1371789772,), (1371789775,), (1371789778,), (1371789781,), (1371789944,), (1371789968,), (1371789996,), (1371790020,), (1371790028,), (1371790034,), (1371790201,), (1371790202,), (1371790205,), (1371790206,), (1371790209,), (1371790210,), (1371790212,), (1371790213,), (1371790215,), (1371790217,), (1371790220,), (1371790221,), (1371790236,), (1371790244,), (1371790248,), (1371790251,), (1371790253,), (1371790255,), (1371790281,), (1371790283,), (1371790286,), (1371790287,), (1371790290,), (1371790293,), (1371790327,), (1371790330,), (1371790332,), (1371790335,), (1371790339,), (1371790344,), (1371790360,), (1371790362,), (1371790365,), (1371790369,), (1371790375,), (1371790378,), (1371790417,), (1371790418,), (1371790421,), (1371790423,), (1371790425,), (1371790427,), (1371790477,), (1371790481,), (1371790485,), (1371790488,), (1371790493,), (1371790497,), (1371790506,), (1371790510,), (1371790512,), (1371790515,), (1371790518,), (1371790520,), (1371790569,), (1371790571,), (1371790573,), (1371790576,), (1371790579,), (1371790580,)) 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 (1371789000) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24872673 , 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=24872568 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 (24872673) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24872568) result : ((1371788952,), (1371788977,), (1371789000,), (1371789027,), (1371789052,), (1371789093,), (1371789493,), (1371789524,), (1371789552,), (1371789574,), (1371789598,), (1371789626,), (1371789757,), (1371789769,), (1371789772,), (1371789775,), (1371789778,), (1371789781,), (1371789944,), (1371789968,), (1371789996,), (1371790020,), (1371790028,), (1371790034,), (1371790201,), (1371790202,), (1371790205,), (1371790206,), (1371790209,), (1371790210,), (1371790212,), (1371790213,), (1371790215,), (1371790217,), (1371790220,), (1371790221,), (1371790236,), (1371790244,), (1371790248,), (1371790251,), (1371790253,), (1371790255,), (1371790281,), (1371790283,), (1371790286,), (1371790287,), (1371790290,), (1371790293,), (1371790327,), (1371790330,), (1371790332,), (1371790335,), (1371790339,), (1371790344,), (1371790360,), (1371790362,), (1371790365,), (1371790369,), (1371790375,), (1371790378,), (1371790417,), (1371790418,), (1371790421,), (1371790423,), (1371790425,), (1371790427,), (1371790477,), (1371790481,), (1371790485,), (1371790488,), (1371790493,), (1371790497,), (1371790506,), (1371790510,), (1371790512,), (1371790515,), (1371790518,), (1371790520,), (1371790569,), (1371790571,), (1371790573,), (1371790576,), (1371790579,), (1371790580,)) 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 (1371789000) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24872674 , 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=24872568 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 (24872674) result : ((1371790039,), (1371790040,), (1371790041,), (1371790042,), (1371790230,), (1371790231,), (1371790232,), (1371790234,), (1371790235,), (1371790259,), (1371790260,), (1371790313,), (1371790534,), (1371790535,), (1371790536,), (1371790537,), (1371790604,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24872568) result : ((1371788952,), (1371788977,), (1371789000,), (1371789027,), (1371789052,), (1371789093,), (1371789493,), (1371789524,), (1371789552,), (1371789574,), (1371789598,), (1371789626,), (1371789757,), (1371789769,), (1371789772,), (1371789775,), (1371789778,), (1371789781,), (1371789944,), (1371789968,), (1371789996,), (1371790020,), (1371790028,), (1371790034,), (1371790201,), (1371790202,), (1371790205,), (1371790206,), (1371790209,), (1371790210,), (1371790212,), (1371790213,), (1371790215,), (1371790217,), (1371790220,), (1371790221,), (1371790236,), (1371790244,), (1371790248,), (1371790251,), (1371790253,), (1371790255,), (1371790281,), (1371790283,), (1371790286,), (1371790287,), (1371790290,), (1371790293,), (1371790327,), (1371790330,), (1371790332,), (1371790335,), (1371790339,), (1371790344,), (1371790360,), (1371790362,), (1371790365,), (1371790369,), (1371790375,), (1371790378,), (1371790417,), (1371790418,), (1371790421,), (1371790423,), (1371790425,), (1371790427,), (1371790477,), (1371790481,), (1371790485,), (1371790488,), (1371790493,), (1371790497,), (1371790506,), (1371790510,), (1371790512,), (1371790515,), (1371790518,), (1371790520,), (1371790569,), (1371790571,), (1371790573,), (1371790576,), (1371790579,), (1371790580,)) 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 (1371789000) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24872675 , 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=24872568 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 (24872675) result : ((1371790049,), (1371790050,), (1371790052,), (1371790054,), (1371790245,), (1371790262,), (1371790263,), (1371790264,), (1371790318,), (1371790319,), (1371790353,), (1371790354,), (1371790457,), (1371790458,), (1371790459,), (1371790460,), (1371790461,), (1371790555,), (1371790556,), (1371790557,), (1371790559,), (1371790560,), (1371790615,), (1371790616,), (1371790617,), (1371790618,), (1371790619,), (1371790638,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24872568) result : ((1371788952,), (1371788977,), (1371789000,), (1371789027,), (1371789052,), (1371789093,), (1371789493,), (1371789524,), (1371789552,), (1371789574,), (1371789598,), (1371789626,), (1371789757,), (1371789769,), (1371789772,), (1371789775,), (1371789778,), (1371789781,), (1371789944,), (1371789968,), (1371789996,), (1371790020,), (1371790028,), (1371790034,), (1371790201,), (1371790202,), (1371790205,), (1371790206,), (1371790209,), (1371790210,), (1371790212,), (1371790213,), (1371790215,), (1371790217,), (1371790220,), (1371790221,), (1371790236,), (1371790244,), (1371790248,), (1371790251,), (1371790253,), (1371790255,), (1371790281,), (1371790283,), (1371790286,), (1371790287,), (1371790290,), (1371790293,), (1371790327,), (1371790330,), (1371790332,), (1371790335,), (1371790339,), (1371790344,), (1371790360,), (1371790362,), (1371790365,), (1371790369,), (1371790375,), (1371790378,), (1371790417,), (1371790418,), (1371790421,), (1371790423,), (1371790425,), (1371790427,), (1371790477,), (1371790481,), (1371790485,), (1371790488,), (1371790493,), (1371790497,), (1371790506,), (1371790510,), (1371790512,), (1371790515,), (1371790518,), (1371790520,), (1371790569,), (1371790571,), (1371790573,), (1371790576,), (1371790579,), (1371790580,)) 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 (1371789000) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24872676 , 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=24872568 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 (24872676) result : ((1371790045,), (1371790239,), (1371790240,), (1371790241,), (1371790448,), (1371790449,), (1371790452,), (1371790453,), (1371790455,), (1371790613,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24872568) result : ((1371788952,), (1371788977,), (1371789000,), (1371789027,), (1371789052,), (1371789093,), (1371789493,), (1371789524,), (1371789552,), (1371789574,), (1371789598,), (1371789626,), (1371789757,), (1371789769,), (1371789772,), (1371789775,), (1371789778,), (1371789781,), (1371789944,), (1371789968,), (1371789996,), (1371790020,), (1371790028,), (1371790034,), (1371790201,), (1371790202,), (1371790205,), (1371790206,), (1371790209,), (1371790210,), (1371790212,), (1371790213,), (1371790215,), (1371790217,), (1371790220,), (1371790221,), (1371790236,), (1371790244,), (1371790248,), (1371790251,), (1371790253,), (1371790255,), (1371790281,), (1371790283,), (1371790286,), (1371790287,), (1371790290,), (1371790293,), (1371790327,), (1371790330,), (1371790332,), (1371790335,), (1371790339,), (1371790344,), (1371790360,), (1371790362,), (1371790365,), (1371790369,), (1371790375,), (1371790378,), (1371790417,), (1371790418,), (1371790421,), (1371790423,), (1371790425,), (1371790427,), (1371790477,), (1371790481,), (1371790485,), (1371790488,), (1371790493,), (1371790497,), (1371790506,), (1371790510,), (1371790512,), (1371790515,), (1371790518,), (1371790520,), (1371790569,), (1371790571,), (1371790573,), (1371790576,), (1371790579,), (1371790580,)) 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 (1371789000) and cspi.crop_hashtag_id = chi.id; To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24872568 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','flou','metal','cartonnette','papier','mal_croppe','Carton_gris','kraft','plastique','Carton_brun','Teint_Dans_La_Masse','autre_refus')) 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`=24872568 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','flou','metal','cartonnette','papier','mal_croppe','Carton_gris','kraft','plastique','Carton_brun','Teint_Dans_La_Masse','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 24872568, 'sub_port_id': 24872677, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745576, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 28)}, 'metal': {'main_port_id': 24872568, 'sub_port_id': 24872678, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745577, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 28)}, 'plastique': {'main_port_id': 24872568, 'sub_port_id': 24872679, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745578, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 28)}, 'papier': {'main_port_id': 24872568, 'sub_port_id': 24872680, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745579, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 28)}, 'autre_refus': {'main_port_id': 24872568, 'sub_port_id': 24872681, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745580, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 28)}, 'Carton_gris': {'main_port_id': 24872568, 'sub_port_id': 24872682, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745581, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 28)}, 'environnement': {'main_port_id': 24872568, 'sub_port_id': 24872683, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745582, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 28)}, 'mal_croppe': {'main_port_id': 24872568, 'sub_port_id': 24872684, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745583, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 28)}, 'flou': {'main_port_id': 24872568, 'sub_port_id': 24872685, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745584, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 24872568, 'sub_port_id': 24872686, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745585, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 28)}, 'Carton_brun': {'main_port_id': 24872568, 'sub_port_id': 24872687, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745586, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 28)}, 'cartonnette': {'main_port_id': 24872568, 'sub_port_id': 24872688, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16745587, 'last_updated_at': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 4, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 4, 3, 28)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24872677,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24872665 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24872678,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24872666 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24872679,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24872667 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24872680,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24872668 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24872681,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24872669 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24872682,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24872670 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24872683,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24872671 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24872684,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24872672 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24872685,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24872673 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24872686,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24872674 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24872687,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24872675 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24872688,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24872676 lien utilise dans velours : https://www.fotonower.com/velours/24872677,24872678,24872679,24872680,24872681,24872682,24872683,24872684,24872685,24872686,24872687,24872688?tags=kraft,metal,plastique,papier,autre_refus,Carton_gris,environnement,mal_croppe,flou,Teint_Dans_La_Masse,Carton_brun,cartonnette After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24872568]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1371790580, 1371790579, 1371790576, 1371790573, 1371790571, 1371790569] map_info['map_portfolio_photo'] : {24872568: [1371790580, 1371790579, 1371790576, 1371790573, 1371790571, 1371790569, 1371790520, 1371790518, 1371790515, 1371790512, 1371790510, 1371790506, 1371790497, 1371790493, 1371790488, 1371790485, 1371790481, 1371790477, 1371790427, 1371790425, 1371790423, 1371790421, 1371790418, 1371790417, 1371790378, 1371790375, 1371790369, 1371790365, 1371790362, 1371790360, 1371790344, 1371790339, 1371790335, 1371790332, 1371790330, 1371790327, 1371790293, 1371790290, 1371790287, 1371790286, 1371790283, 1371790281, 1371790255, 1371790253, 1371790251, 1371790248, 1371790244, 1371790236, 1371790221, 1371790220, 1371790217, 1371790215, 1371790213, 1371790212, 1371790210, 1371790209, 1371790206, 1371790205, 1371790202, 1371790201, 1371790034, 1371790028, 1371790020, 1371789996, 1371789968, 1371789944, 1371789781, 1371789778, 1371789775, 1371789772, 1371789769, 1371789757, 1371789626, 1371789598, 1371789574, 1371789552, 1371789524, 1371789493, 1371789093, 1371789052, 1371789027, 1371789000, 1371788977, 1371788952]} final : False mtd_id 4302 list_pids : [1371790580, 1371790579, 1371790576, 1371790573, 1371790571, 1371790569] Looping around the photos to save general results len do output : 1 /24872568. 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, '3274520') ('4302', '24872568', '1371790580', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790579', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790576', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790573', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790571', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790569', None, None, None, None, None, '3274520') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 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, '24872568', "{'kraft': 24872665, 'metal': 24872666, 'plastique': 24872667, 'papier': 24872668, 'autre_refus': 24872669, 'Carton_gris': 24872670, 'environnement': 24872671, 'mal_croppe': 24872672, 'flou': 24872673, 'Teint_Dans_La_Masse': 24872674, 'Carton_brun': 24872675, 'cartonnette': 24872676}", None, None, None, None, '3274520'), ('4302', '24872568', '1371790580', None, None, None, None, None, '3274520'), ('4302', '24872568', '1371790579', None, None, None, None, None, '3274520'), ('4302', '24872568', '1371790576', None, None, None, None, None, '3274520'), ('4302', '24872568', '1371790573', None, None, None, None, None, '3274520'), ('4302', '24872568', '1371790571', None, None, None, None, None, '3274520'), ('4302', '24872568', '1371790569', None, None, None, None, None, '3274520')] time used for this insertion : 0.02251911163330078 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.5965244770050049 time spend to save output : 0.022801637649536133 total time spend for step 1 : 0.619326114654541 step2:final Sat Jul 12 04:14:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 (24872568) 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 24872568 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1371789093,1371789052,1371789027,1371789000,1371788977,1371788952,1371789626,1371789598,1371789574,1371789552,1371789524,1371789493,1371789781,1371789778,1371789775,1371789772,1371789769,1371789757,1371790034,1371790028,1371790020,1371789996,1371789968,1371789944,1371790220,1371790221,1371790215,1371790217,1371790212,1371790213,1371790209,1371790210,1371790205,1371790206,1371790201,1371790202,1371790255,1371790253,1371790251,1371790248,1371790244,1371790236,1371790293,1371790290,1371790287,1371790286,1371790283,1371790281,1371790344,1371790339,1371790335,1371790332,1371790330,1371790327,1371790378,1371790375,1371790369,1371790365,1371790362,1371790360,1371790427,1371790425,1371790423,1371790421,1371790418,1371790417,1371790497,1371790493,1371790488,1371790485,1371790481,1371790477,1371790520,1371790518,1371790515,1371790512,1371790510,1371790506,1371790580,1371790579,1371790576,1371790573,1371790571,1371790569); 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([24872568]) Inside saveOutput : final : False verbose : True original output for save of step final : {1371790580: ('0.06406243581986218',), 1371790579: ('0.06406243581986218',), 1371790576: ('0.06406243581986218',), 1371790573: ('0.06406243581986218',), 1371790571: ('0.06406243581986218',), 1371790569: ('0.06406243581986218',)} new output for save of step final : {1371790580: ('0.06406243581986218',), 1371790579: ('0.06406243581986218',), 1371790576: ('0.06406243581986218',), 1371790573: ('0.06406243581986218',), 1371790571: ('0.06406243581986218',), 1371790569: ('0.06406243581986218',)} [1371790580, 1371790579, 1371790576, 1371790573, 1371790571, 1371790569] map_info['map_portfolio_photo'] : {24872568: [1371790580, 1371790579, 1371790576, 1371790573, 1371790571, 1371790569, 1371790520, 1371790518, 1371790515, 1371790512, 1371790510, 1371790506, 1371790497, 1371790493, 1371790488, 1371790485, 1371790481, 1371790477, 1371790427, 1371790425, 1371790423, 1371790421, 1371790418, 1371790417, 1371790378, 1371790375, 1371790369, 1371790365, 1371790362, 1371790360, 1371790344, 1371790339, 1371790335, 1371790332, 1371790330, 1371790327, 1371790293, 1371790290, 1371790287, 1371790286, 1371790283, 1371790281, 1371790255, 1371790253, 1371790251, 1371790248, 1371790244, 1371790236, 1371790221, 1371790220, 1371790217, 1371790215, 1371790213, 1371790212, 1371790210, 1371790209, 1371790206, 1371790205, 1371790202, 1371790201, 1371790034, 1371790028, 1371790020, 1371789996, 1371789968, 1371789944, 1371789781, 1371789778, 1371789775, 1371789772, 1371789769, 1371789757, 1371789626, 1371789598, 1371789574, 1371789552, 1371789524, 1371789493, 1371789093, 1371789052, 1371789027, 1371789000, 1371788977, 1371788952]} final : False mtd_id 4302 list_pids : [1371790580, 1371790579, 1371790576, 1371790573, 1371790571, 1371790569] Looping around the photos to save general results len do output : 6 /1371790580.Didn't retrieve data . /1371790579.Didn't retrieve data . /1371790576.Didn't retrieve data . /1371790573.Didn't retrieve data . /1371790571.Didn't retrieve data . /1371790569.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, '3274520') ('4302', '24872568', '1371790580', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790579', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790576', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790573', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790571', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790569', None, None, None, None, None, '3274520') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 18 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', '24872568', '1371790580', '0.06406243581986218', None, None, None, None, '3274520'), ('4302', '24872568', '1371790579', '0.06406243581986218', None, None, None, None, '3274520'), ('4302', '24872568', '1371790576', '0.06406243581986218', None, None, None, None, '3274520'), ('4302', '24872568', '1371790573', '0.06406243581986218', None, None, None, None, '3274520'), ('4302', '24872568', '1371790571', '0.06406243581986218', None, None, None, None, '3274520'), ('4302', '24872568', '1371790569', '0.06406243581986218', None, None, None, None, '3274520')] time used for this insertion : 0.024569272994995117 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.11604046821594238 time spend to save output : 0.02496504783630371 total time spend for step 2 : 0.1410055160522461 step3:velours_tree Sat Jul 12 04:14:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {24872568: [{'kraft': 24872665, 'metal': 24872666, 'plastique': 24872667, 'papier': 24872668, 'autre_refus': 24872669, 'Carton_gris': 24872670, 'environnement': 24872671, 'mal_croppe': 24872672, 'flou': 24872673, 'Teint_Dans_La_Masse': 24872674, 'Carton_brun': 24872675, 'cartonnette': 24872676}]} input_args_next_step : {24872568: ()} output_args : {24872568: [{'kraft': 24872665, 'metal': 24872666, 'plastique': 24872667, 'papier': 24872668, 'autre_refus': 24872669, 'Carton_gris': 24872670, 'environnement': 24872671, 'mal_croppe': 24872672, 'flou': 24872673, 'Teint_Dans_La_Masse': 24872674, 'Carton_brun': 24872675, 'cartonnette': 24872676}]} args : 24872568 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 : ({'kraft': 24872665, 'metal': 24872666, 'plastique': 24872667, 'papier': 24872668, 'autre_refus': 24872669, 'Carton_gris': 24872670, 'environnement': 24872671, 'mal_croppe': 24872672, 'flou': 24872673, 'Teint_Dans_La_Masse': 24872674, 'Carton_brun': 24872675, 'cartonnette': 24872676},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24872568) 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([24872568]) 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.2732079029083252 time spend to save output : 5.245208740234375e-05 total time spend for step 3 : 0.27326035499572754 step4:send_mail_cod Sat Jul 12 04:14:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {1371790580: ('0.06406243581986218',), 1371790579: ('0.06406243581986218',), 1371790576: ('0.06406243581986218',), 1371790573: ('0.06406243581986218',), 1371790571: ('0.06406243581986218',), 1371790569: ('0.06406243581986218',)} input_args_next_step : {1371790580: ()} output_args : {1371790580: ('0.06406243581986218',), 1371790579: ('0.06406243581986218',), 1371790576: ('0.06406243581986218',), 1371790573: ('0.06406243581986218',), 1371790571: ('0.06406243581986218',), 1371790569: ('0.06406243581986218',)} args : 1371790580 depend.output_id : 0 input_args_next_step : {1371790580: ('0.06406243581986218',), 1371790579: ()} output_args : {1371790580: ('0.06406243581986218',), 1371790579: ('0.06406243581986218',), 1371790576: ('0.06406243581986218',), 1371790573: ('0.06406243581986218',), 1371790571: ('0.06406243581986218',), 1371790569: ('0.06406243581986218',)} args : 1371790579 depend.output_id : 0 input_args_next_step : {1371790580: ('0.06406243581986218',), 1371790579: ('0.06406243581986218',), 1371790576: ()} output_args : {1371790580: ('0.06406243581986218',), 1371790579: ('0.06406243581986218',), 1371790576: ('0.06406243581986218',), 1371790573: ('0.06406243581986218',), 1371790571: ('0.06406243581986218',), 1371790569: ('0.06406243581986218',)} args : 1371790576 depend.output_id : 0 input_args_next_step : {1371790580: ('0.06406243581986218',), 1371790579: ('0.06406243581986218',), 1371790576: ('0.06406243581986218',), 1371790573: ()} output_args : {1371790580: ('0.06406243581986218',), 1371790579: ('0.06406243581986218',), 1371790576: ('0.06406243581986218',), 1371790573: ('0.06406243581986218',), 1371790571: ('0.06406243581986218',), 1371790569: ('0.06406243581986218',)} args : 1371790573 depend.output_id : 0 input_args_next_step : {1371790580: ('0.06406243581986218',), 1371790579: ('0.06406243581986218',), 1371790576: ('0.06406243581986218',), 1371790573: ('0.06406243581986218',), 1371790571: ()} output_args : {1371790580: ('0.06406243581986218',), 1371790579: ('0.06406243581986218',), 1371790576: ('0.06406243581986218',), 1371790573: ('0.06406243581986218',), 1371790571: ('0.06406243581986218',), 1371790569: ('0.06406243581986218',)} args : 1371790571 depend.output_id : 0 input_args_next_step : {1371790580: ('0.06406243581986218',), 1371790579: ('0.06406243581986218',), 1371790576: ('0.06406243581986218',), 1371790573: ('0.06406243581986218',), 1371790571: ('0.06406243581986218',), 1371790569: ()} output_args : {1371790580: ('0.06406243581986218',), 1371790579: ('0.06406243581986218',), 1371790576: ('0.06406243581986218',), 1371790573: ('0.06406243581986218',), 1371790571: ('0.06406243581986218',), 1371790569: ('0.06406243581986218',)} args : 1371790569 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 : {24872568: [{'kraft': 24872665, 'metal': 24872666, 'plastique': 24872667, 'papier': 24872668, 'autre_refus': 24872669, 'Carton_gris': 24872670, 'environnement': 24872671, 'mal_croppe': 24872672, 'flou': 24872673, 'Teint_Dans_La_Masse': 24872674, 'Carton_brun': 24872675, 'cartonnette': 24872676}]} input_args_next_step : {1371790580: ('0.06406243581986218',), 1371790579: ('0.06406243581986218',), 1371790576: ('0.06406243581986218',), 1371790573: ('0.06406243581986218',), 1371790571: ('0.06406243581986218',), 1371790569: ('0.06406243581986218',), 24872568: ()} output_args : {24872568: [{'kraft': 24872665, 'metal': 24872666, 'plastique': 24872667, 'papier': 24872668, 'autre_refus': 24872669, 'Carton_gris': 24872670, 'environnement': 24872671, 'mal_croppe': 24872672, 'flou': 24872673, 'Teint_Dans_La_Masse': 24872674, 'Carton_brun': 24872675, 'cartonnette': 24872676}]} args : 24872568 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 :7, first value : ('0.06406243581986218',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24872568) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1371790580,1371790579,1371790576,1371790573,1371790571,1371790569) Found this number of photos: 6 ##### Call download_photos : nb_thread : 5 begin to download photo : 1371790569 begin to download photo : 1371790573 begin to download photo : 1371790579 download finish for photo 1371790579 begin to download photo : 1371790580 download finish for photo 1371790569 begin to download photo : 1371790571 download finish for photo 1371790573 begin to download photo : 1371790576 download finish for photo 1371790580 download finish for photo 1371790571 download finish for photo 1371790576 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette248726651752286499/ imagette248726661752286499/ length of list_filenames : 6 ; length of list_pids : 6 ; length of list_args : 6 results_Auto_P24872568_12-07-2025_04_14_59.pdf 24872665 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24872665 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette248726651752286499 24872666 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24872666 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette248726661752286499 24872667 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24872667 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1371790062: '1752285845_159363_1371789027_cdb34fdc523096213f3d21f683cab115_rle_crop_3880964670_0.png', 1371790064: '1752285845_159363_1371789000_229182f938a48d56ff807a62f343cb93_rle_crop_3880964677_0.png', 1371790320: '1752286046_2420664_1371790028_8af0337f363bd14cb51b129c0a44b185_rle_crop_3880965296_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/1c1c42c6239fd6668e2c3fb2e65c6380_1271850.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/faac31a8ac0f76bddfd40fc16a3d5b0d_91475663.png change filename to text .imagette248726671752286499/ imagette248726671752286499/1752286046_2420664_1371790028_8af0337f363bd14cb51b129c0a44b185_rle_crop_3880965296_0.png.png imagette248726671752286499/1752285845_159363_1371789000_229182f938a48d56ff807a62f343cb93_rle_crop_3880964677_0.png.png imagette248726671752286499/1752285845_159363_1371789027_cdb34fdc523096213f3d21f683cab115_rle_crop_3880964670_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/431f80ec87ff8fa5805b4623d4212358_14940822.png imagette248726671752286499 24872669 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24872669 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1371790314: '1752286046_2420664_1371790028_8af0337f363bd14cb51b129c0a44b185_rle_crop_3880965304_0.png', 1371790351: '1752286086_170389_1371790202_1c5c98fda5d789de9fa5cf09881e1d1a_rle_crop_3880965508_0.png', 1371790352: '1752286086_170389_1371790201_36fab341b10c2ebf3e17be3e360419a3_rle_crop_3880965518_0.png', 1371790446: '1752286205_177037_1371790293_d0995529d0b78de25e210bffe1159061_rle_crop_3880965918_0.png', 1371790539: '1752286328_180969_1371790365_ff617da9ea92ee1e5054f99df12feb47_rle_crop_3880966784_0.png', 1371790540: '1752286328_180969_1371790362_ac5dd91a9add3720cd32cef4af33529e_rle_crop_3880966805_0.png', 1371790541: '1752286328_180969_1371790360_e5ddf07d0258bb7f40e0658bb113bb49_rle_crop_3880966822_0.png', 1371790607: '1752286406_2429991_1371790339_d4f9612a01d01bec681ff50015ac2901_rle_crop_3880967042_0.png', 1371790608: '1752286406_2429991_1371790335_e73a4cf2c09d2f9ab071fb9e45548b8f_rle_crop_3880967060_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/726e166a1dd37f59b64e07cef8f70ba6_74741521.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/b289d3e79140bf1e68ff3ccb611ad4e0_67916563.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/b289d3e79140bf1e68ff3ccb611ad4e0_88687677.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/cdf66a5fac1aa2a69ca6af6ac8916c05_858640.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/36ddea6c7d4b3d1d71be1464fead46d1_9951931.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/b9b07cae3c772999f845704f5c3ee7f9_57633474.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/36322b908d2d6397c2c56d504c76ec75_59807863.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/91058df9759e8f6ea903d4a76dfba98e_72076775.png change filename to text .imagette248726691752286499/ imagette248726691752286499/1752286406_2429991_1371790335_e73a4cf2c09d2f9ab071fb9e45548b8f_rle_crop_3880967060_0.png.png imagette248726691752286499/1752286328_180969_1371790360_e5ddf07d0258bb7f40e0658bb113bb49_rle_crop_3880966822_0.png.png imagette248726691752286499/1752286205_177037_1371790293_d0995529d0b78de25e210bffe1159061_rle_crop_3880965918_0.png.png imagette248726691752286499/1752286086_170389_1371790201_36fab341b10c2ebf3e17be3e360419a3_rle_crop_3880965518_0.png.png imagette248726691752286499/1752286086_170389_1371790202_1c5c98fda5d789de9fa5cf09881e1d1a_rle_crop_3880965508_0.png.png imagette248726691752286499/1752286046_2420664_1371790028_8af0337f363bd14cb51b129c0a44b185_rle_crop_3880965304_0.png.png imagette248726691752286499/1752286328_180969_1371790365_ff617da9ea92ee1e5054f99df12feb47_rle_crop_3880966784_0.png.png imagette248726691752286499/1752286406_2429991_1371790339_d4f9612a01d01bec681ff50015ac2901_rle_crop_3880967042_0.png.png imagette248726691752286499/1752286328_180969_1371790362_ac5dd91a9add3720cd32cef4af33529e_rle_crop_3880966805_0.png.png imagette248726721752286499/ imagette248726731752286499/ wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/4e64402770594ea1fb0e3b521115033e_10680793.png imagette248726691752286499 24872672 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24872672 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette248726721752286499 24872673 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24872673 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette248726731752286499 24872676 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24872676 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1371790045: '1752285845_159363_1371788952_5a5a06757765337be80a8dc18da16048_rle_crop_3880964700_0.png', 1371790239: '1752285926_2416834_1371789598_cad6694b5dfd7ab1a0723c3b251fe4a5_rle_crop_3880964882_0.png', 1371790240: '1752285926_2416834_1371789574_e3fb7fd4a431009b13978015fdb010b3_rle_crop_3880964902_0.png', 1371790241: '1752285926_2416834_1371789552_1b26489d75484aaad291f16eed28c8c4_rle_crop_3880964915_0.png', 1371790448: '1752286205_177037_1371790293_d0995529d0b78de25e210bffe1159061_rle_crop_3880965919_0.png', 1371790449: '1752286205_177037_1371790287_ee201271dbd392260018cfd069bf96f7_rle_crop_3880965963_0.png', 1371790452: '1752286205_177037_1371790286_1801505eb06961bc18383fd4f63a8e3f_rle_crop_3880965975_0.png', 1371790453: '1752286205_177037_1371790283_2b44142e1d0717306ad362495668f9f8_rle_crop_3880965993_0.png', 1371790455: '1752286205_177037_1371790281_8719763ba31c551b3380db442f7c8c57_rle_crop_3880966014_0.png', 1371790613: '1752286406_2429991_1371790344_5dc7c247219b306be2cacab4e876f2b3_rle_crop_3880967021_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/372df0a2a1ffb1fda808b81a4107386b_50274416.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/f68cbfc2e95103d7b06e227f9d262740_71513120.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/f1107bca794b0b6decc1b6d668daddb4_82233015.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/610c0e614947398ca37acf6f91e93c98_39105529.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/d79b94de6682ed3d49fffa1a2f8b6fdf_77867373.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/415542c607583de034e4a4ad68e1c28b_67058956.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/8b71abf52340bcd6392da708dbf75903_2279856.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/25821a1a77919aac2d6231459227f837_43256521.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/98db9ed91868acd6540c3af693909c48_15875179.png change filename to text .imagette248726761752286499/ imagette248726761752286499/1752286406_2429991_1371790344_5dc7c247219b306be2cacab4e876f2b3_rle_crop_3880967021_0.png.png imagette248726761752286499/1752286205_177037_1371790283_2b44142e1d0717306ad362495668f9f8_rle_crop_3880965993_0.png.png imagette248726761752286499/1752286205_177037_1371790281_8719763ba31c551b3380db442f7c8c57_rle_crop_3880966014_0.png.png imagette248726761752286499/1752286205_177037_1371790287_ee201271dbd392260018cfd069bf96f7_rle_crop_3880965963_0.png.png imagette248726761752286499/1752286205_177037_1371790286_1801505eb06961bc18383fd4f63a8e3f_rle_crop_3880965975_0.png.png imagette248726761752286499/1752286205_177037_1371790293_d0995529d0b78de25e210bffe1159061_rle_crop_3880965919_0.png.png imagette248726761752286499/1752285926_2416834_1371789552_1b26489d75484aaad291f16eed28c8c4_rle_crop_3880964915_0.png.png imagette248726761752286499/1752285845_159363_1371788952_5a5a06757765337be80a8dc18da16048_rle_crop_3880964700_0.png.png imagette248726761752286499/1752285926_2416834_1371789598_cad6694b5dfd7ab1a0723c3b251fe4a5_rle_crop_3880964882_0.png.png imagette248726761752286499/1752285926_2416834_1371789574_e3fb7fd4a431009b13978015fdb010b3_rle_crop_3880964902_0.png.png wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/e934244c1488959b9ecc79c8b0f5e258_94523400.png imagette248726761752286499 24872670 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24872670 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1371790044: '1752285845_159363_1371788952_5a5a06757765337be80a8dc18da16048_rle_crop_3880964704_0.png', 1371790237: '1752285926_2416834_1371789626_c09e39f95ff879a89fd0fea9f465d952_rle_crop_3880964873_0.png', 1371790238: '1752285926_2416834_1371789552_1b26489d75484aaad291f16eed28c8c4_rle_crop_3880964913_0.png', 1371790546: '1752286328_180969_1371790378_98096166555ea10c52374a18b0f54a1f_rle_crop_3880966739_0.png', 1371790547: '1752286328_180969_1371790378_98096166555ea10c52374a18b0f54a1f_rle_crop_3880966743_0.png', 1371790548: '1752286328_180969_1371790375_b548983e6eff8121a2cff7420b2ba2bf_rle_crop_3880966755_0.png', 1371790549: '1752286328_180969_1371790369_ce0c8fa1403c2c2fb1337434bcd5f036_rle_crop_3880966767_0.png', 1371790550: '1752286328_180969_1371790365_ff617da9ea92ee1e5054f99df12feb47_rle_crop_3880966783_0.png', 1371790551: '1752286328_180969_1371790362_ac5dd91a9add3720cd32cef4af33529e_rle_crop_3880966801_0.png', 1371790552: '1752286328_180969_1371790360_e5ddf07d0258bb7f40e0658bb113bb49_rle_crop_3880966820_0.png', 1371790611: '1752286406_2429991_1371790332_5c39e7a9cf697f534dc5694bc7fc1b6c_rle_crop_3880967071_0.png', 1371790612: '1752286406_2429991_1371790327_f188adac5c7f7d0435122f091ac6bb17_rle_crop_3880967100_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/2b9a542d463a1c981a62641d050c31f5_20054605.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/0422e414e6fe471e15d1da544734fe71_48692631.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/106633cf2f0af0c25e4c29c60915525a_93760506.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/ea212b341c5e4eacca5d904fcb7b0ac7_57847340.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/dfb89e6e7ba228ae7d2fe5ace580a694_59334181.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/b129f6939ac64d4e53b0ce6ea80eb2e0_41941488.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/8cb4ff7a0639c76c04d2fe064489f0f7_44836856.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/01b0d2dfc92feb493e4cb0f7c50dcd59_22371013.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/3523ef25fd23fe7bb85900678bda599e_48590092.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/665b98b240d02dc4c7a6e9eb7448867a_1297057.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/f651f43f5101e4f57fa1bf32a616d38c_64186392.png change filename to text .imagette248726701752286500/ imagette248726701752286500/1752286328_180969_1371790378_98096166555ea10c52374a18b0f54a1f_rle_crop_3880966743_0.png.png imagette248726701752286500/1752286328_180969_1371790375_b548983e6eff8121a2cff7420b2ba2bf_rle_crop_3880966755_0.png.png imagette248726701752286500/1752286328_180969_1371790365_ff617da9ea92ee1e5054f99df12feb47_rle_crop_3880966783_0.png.png imagette248726701752286500/1752285926_2416834_1371789552_1b26489d75484aaad291f16eed28c8c4_rle_crop_3880964913_0.png.png imagette248726701752286500/1752286328_180969_1371790362_ac5dd91a9add3720cd32cef4af33529e_rle_crop_3880966801_0.png.png imagette248726701752286500/1752286406_2429991_1371790332_5c39e7a9cf697f534dc5694bc7fc1b6c_rle_crop_3880967071_0.png.png imagette248726701752286500/1752285926_2416834_1371789626_c09e39f95ff879a89fd0fea9f465d952_rle_crop_3880964873_0.png.png imagette248726701752286500/1752286328_180969_1371790369_ce0c8fa1403c2c2fb1337434bcd5f036_rle_crop_3880966767_0.png.png imagette248726701752286500/1752285845_159363_1371788952_5a5a06757765337be80a8dc18da16048_rle_crop_3880964704_0.png.png imagette248726701752286500/1752286406_2429991_1371790327_f188adac5c7f7d0435122f091ac6bb17_rle_crop_3880967100_0.png.png imagette248726701752286500/1752286328_180969_1371790378_98096166555ea10c52374a18b0f54a1f_rle_crop_3880966739_0.png.png imagette248726701752286500/1752286328_180969_1371790360_e5ddf07d0258bb7f40e0658bb113bb49_rle_crop_3880966820_0.png.png wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/4f73bcc92322b725868aed8c187fb28e_39434893.png imagette248726701752286500 24872674 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24872674 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1371790235: '1752285926_2416834_1371789524_379582b0295e20ae033c8d41fd063818_rle_crop_3880964930_0.png', 1371790604: '1752286406_2429991_1371790330_790dae9518e11c6829e36b49c2bf6f40_rle_crop_3880967084_0.png', 1371790537: '1752286328_180969_1371790360_e5ddf07d0258bb7f40e0658bb113bb49_rle_crop_3880966825_0.png', 1371790536: '1752286328_180969_1371790365_ff617da9ea92ee1e5054f99df12feb47_rle_crop_3880966791_0.png', 1371790535: '1752286328_180969_1371790369_ce0c8fa1403c2c2fb1337434bcd5f036_rle_crop_3880966774_0.png', 1371790534: '1752286328_180969_1371790378_98096166555ea10c52374a18b0f54a1f_rle_crop_3880966740_0.png', 1371790313: '1752286046_2420664_1371790020_a657694412d60d12b5601a4856943750_rle_crop_3880965315_0.png', 1371790260: '1752285967_164541_1371789757_2235f2411a8f053237548a08cfeb6454_rle_crop_3880965159_0.png', 1371790259: '1752285967_164541_1371789781_aa8e81b0c1e17d4a94f98d7cade57fbe_rle_crop_3880965096_0.png', 1371790039: '1752285845_159363_1371789027_cdb34fdc523096213f3d21f683cab115_rle_crop_3880964675_0.png', 1371790234: '1752285926_2416834_1371789552_1b26489d75484aaad291f16eed28c8c4_rle_crop_3880964918_0.png', 1371790232: '1752285926_2416834_1371789574_e3fb7fd4a431009b13978015fdb010b3_rle_crop_3880964903_0.png', 1371790231: '1752285926_2416834_1371789598_cad6694b5dfd7ab1a0723c3b251fe4a5_rle_crop_3880964892_0.png', 1371790230: '1752285926_2416834_1371789626_c09e39f95ff879a89fd0fea9f465d952_rle_crop_3880964878_0.png', 1371790042: '1752285845_159363_1371788952_5a5a06757765337be80a8dc18da16048_rle_crop_3880964710_0.png', 1371790041: '1752285845_159363_1371788977_2ec027a82d4a06778bc6e750b420d09c_rle_crop_3880964695_0.png', 1371790040: '1752285845_159363_1371789000_229182f938a48d56ff807a62f343cb93_rle_crop_3880964681_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/a29b14b2c2889ac325d7625e25fcafed_14843219.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/a298f09a869a98a9278f6128b199b866_24619723.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/697089fe1ad82bf989107e2575353343_29268837.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/4424c50834e90874d59b64018d055da7_93090220.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/bb912a749e738d23ecd44f03fd487e68_87325619.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/230515b5167ef3f989154f271a17e1a0_30993068.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/8668f01df039cbf385cbb9d506884a8f_20611684.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/cb98052ac490ad4954495d88bfd2fa26_11555454.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/fae0d646b934c0dcc2490f68270a44a9_61233101.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/2aec8b6a8dfc47c1c252966089ae1332_92875099.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/4fa06b98e1f8e424f68a45ae73538d0f_3246511.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/762e4cdb0d3dc3623651aab1a1dfeb65_70160047.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/16e84bf9eca75933f1411312973ab533_4302602.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/f1ed2b12e14b475fc07c64761d85bed7_18976924.png change filename to text .wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/f81174890e8d68cd0a9ff7c92403bb86_32852888.png change filename to text .wget -O 16.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/66fea7914d9f463d86fa2140802d6c5b_42246796.png change filename to text .imagette248726741752286501/ imagette248726741752286501/1752285967_164541_1371789757_2235f2411a8f053237548a08cfeb6454_rle_crop_3880965159_0.png.png imagette248726741752286501/1752286328_180969_1371790360_e5ddf07d0258bb7f40e0658bb113bb49_rle_crop_3880966825_0.png.png imagette248726741752286501/1752285926_2416834_1371789524_379582b0295e20ae033c8d41fd063818_rle_crop_3880964930_0.png.png imagette248726741752286501/1752285926_2416834_1371789552_1b26489d75484aaad291f16eed28c8c4_rle_crop_3880964918_0.png.png imagette248726741752286501/1752286406_2429991_1371790330_790dae9518e11c6829e36b49c2bf6f40_rle_crop_3880967084_0.png.png imagette248726741752286501/1752285967_164541_1371789781_aa8e81b0c1e17d4a94f98d7cade57fbe_rle_crop_3880965096_0.png.png imagette248726741752286501/1752285845_159363_1371789000_229182f938a48d56ff807a62f343cb93_rle_crop_3880964681_0.png.png imagette248726741752286501/1752285926_2416834_1371789574_e3fb7fd4a431009b13978015fdb010b3_rle_crop_3880964903_0.png.png imagette248726741752286501/1752285845_159363_1371789027_cdb34fdc523096213f3d21f683cab115_rle_crop_3880964675_0.png.png imagette248726741752286501/1752285926_2416834_1371789598_cad6694b5dfd7ab1a0723c3b251fe4a5_rle_crop_3880964892_0.png.png imagette248726741752286501/1752286328_180969_1371790378_98096166555ea10c52374a18b0f54a1f_rle_crop_3880966740_0.png.png imagette248726741752286501/1752286328_180969_1371790365_ff617da9ea92ee1e5054f99df12feb47_rle_crop_3880966791_0.png.png imagette248726741752286501/1752286328_180969_1371790369_ce0c8fa1403c2c2fb1337434bcd5f036_rle_crop_3880966774_0.png.png imagette248726741752286501/1752285845_159363_1371788952_5a5a06757765337be80a8dc18da16048_rle_crop_3880964710_0.png.png imagette248726741752286501/1752285926_2416834_1371789626_c09e39f95ff879a89fd0fea9f465d952_rle_crop_3880964878_0.png.png imagette248726741752286501/1752285845_159363_1371788977_2ec027a82d4a06778bc6e750b420d09c_rle_crop_3880964695_0.png.png imagette248726741752286501/1752286046_2420664_1371790020_a657694412d60d12b5601a4856943750_rle_crop_3880965315_0.png.png wget -O 17.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/4ee1883bd1fae76d2448651b770913fa_69613435.png imagette248726741752286501 24872675 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24872675 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1371790459: '1752286205_177037_1371790287_ee201271dbd392260018cfd069bf96f7_rle_crop_3880965965_0.png', 1371790638: '1752286447_187563_1371790488_7c26a6a8c81974fce90fec7a67c0df60_rle_crop_3880967233_0.png', 1371790619: '1752286406_2429991_1371790327_f188adac5c7f7d0435122f091ac6bb17_rle_crop_3880967101_0.png', 1371790618: '1752286406_2429991_1371790335_e73a4cf2c09d2f9ab071fb9e45548b8f_rle_crop_3880967057_0.png', 1371790617: '1752286406_2429991_1371790339_d4f9612a01d01bec681ff50015ac2901_rle_crop_3880967041_0.png', 1371790616: '1752286406_2429991_1371790339_d4f9612a01d01bec681ff50015ac2901_rle_crop_3880967039_0.png', 1371790615: '1752286406_2429991_1371790344_5dc7c247219b306be2cacab4e876f2b3_rle_crop_3880967026_0.png', 1371790560: '1752286328_180969_1371790360_e5ddf07d0258bb7f40e0658bb113bb49_rle_crop_3880966828_0.png', 1371790559: '1752286328_180969_1371790362_ac5dd91a9add3720cd32cef4af33529e_rle_crop_3880966809_0.png', 1371790557: '1752286328_180969_1371790365_ff617da9ea92ee1e5054f99df12feb47_rle_crop_3880966789_0.png', 1371790556: '1752286328_180969_1371790369_ce0c8fa1403c2c2fb1337434bcd5f036_rle_crop_3880966775_0.png', 1371790555: '1752286328_180969_1371790375_b548983e6eff8121a2cff7420b2ba2bf_rle_crop_3880966762_0.png', 1371790461: '1752286205_177037_1371790283_2b44142e1d0717306ad362495668f9f8_rle_crop_3880965994_0.png', 1371790460: '1752286205_177037_1371790283_2b44142e1d0717306ad362495668f9f8_rle_crop_3880965992_0.png', 1371790049: '1752285845_159363_1371789027_cdb34fdc523096213f3d21f683cab115_rle_crop_3880964671_0.png', 1371790458: '1752286205_177037_1371790290_e952aa678ec33d89c4a9da2b8160d752_rle_crop_3880965946_0.png', 1371790457: '1752286205_177037_1371790293_d0995529d0b78de25e210bffe1159061_rle_crop_3880965922_0.png', 1371790354: '1752286086_170389_1371790201_36fab341b10c2ebf3e17be3e360419a3_rle_crop_3880965514_0.png', 1371790353: '1752286086_170389_1371790202_1c5c98fda5d789de9fa5cf09881e1d1a_rle_crop_3880965504_0.png', 1371790319: '1752286046_2420664_1371789996_ea8df7bcee8db537aa1210dbf821b135_rle_crop_3880965323_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/0cf6434851b51a81fb6f86d6bb70a438_71973297.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/cc9fb837a2a2da446ab8fd188713de2e_47970782.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/2e7e2bc60aaef0bcb3a7032871864f8b_23063942.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/af8e659c6059b8c1018e1b041cea7306_55168864.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/b0abefbc2cd01bc508c719f754791a28_675382.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/998083a9fec587248a25d22969aa8919_65657504.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/de678f53e8115b06e3508cb51c5beb51_36703618.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/0cea299c185848a83bfc5d630f496591_79326104.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/6cba7a21338f58d661cb038023f48ced_17156648.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/3da3161b308704ae094e796717614a21_63496153.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/240a7b90bb9d36c8b7981b26f709edbd_1188687.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/77a82780fcbb29bab739f68af81800e3_9988112.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/3a393c6fea0f7b99db7ea3958f792629_78505355.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/18f0ad1488944cab68ff8cbbb14a15ee_79007241.png change filename to text .wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/6b3f573d04195f44416aa95e10d0350e_12099730.png change filename to text .wget -O 16.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/2618f8bc387a0816fc391b620793b69a_78686441.png change filename to text .wget -O 17.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/ac438170fe03ba36b7ad8614b3adcd23_45195991.png change filename to text .wget -O 18.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/5739e31669e2c0de35950f5e0a514d6f_53844087.png change filename to text .wget -O 19.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/5739e31669e2c0de35950f5e0a514d6f_5162924.png change filename to text .imagette248726751752286502/ imagette248726751752286502/1752286328_180969_1371790362_ac5dd91a9add3720cd32cef4af33529e_rle_crop_3880966809_0.png.png imagette248726751752286502/1752286328_180969_1371790365_ff617da9ea92ee1e5054f99df12feb47_rle_crop_3880966789_0.png.png imagette248726751752286502/1752286406_2429991_1371790327_f188adac5c7f7d0435122f091ac6bb17_rle_crop_3880967101_0.png.png imagette248726751752286502/1752286205_177037_1371790283_2b44142e1d0717306ad362495668f9f8_rle_crop_3880965992_0.png.png imagette248726751752286502/1752286406_2429991_1371790339_d4f9612a01d01bec681ff50015ac2901_rle_crop_3880967039_0.png.png imagette248726751752286502/1752286406_2429991_1371790339_d4f9612a01d01bec681ff50015ac2901_rle_crop_3880967041_0.png.png imagette248726751752286502/1752286205_177037_1371790287_ee201271dbd392260018cfd069bf96f7_rle_crop_3880965965_0.png.png imagette248726751752286502/1752286406_2429991_1371790335_e73a4cf2c09d2f9ab071fb9e45548b8f_rle_crop_3880967057_0.png.png imagette248726751752286502/1752286328_180969_1371790369_ce0c8fa1403c2c2fb1337434bcd5f036_rle_crop_3880966775_0.png.png imagette248726751752286502/1752286205_177037_1371790283_2b44142e1d0717306ad362495668f9f8_rle_crop_3880965994_0.png.png imagette248726751752286502/1752286328_180969_1371790375_b548983e6eff8121a2cff7420b2ba2bf_rle_crop_3880966762_0.png.png imagette248726751752286502/1752286406_2429991_1371790344_5dc7c247219b306be2cacab4e876f2b3_rle_crop_3880967026_0.png.png imagette248726751752286502/1752286328_180969_1371790360_e5ddf07d0258bb7f40e0658bb113bb49_rle_crop_3880966828_0.png.png imagette248726751752286502/1752286046_2420664_1371789996_ea8df7bcee8db537aa1210dbf821b135_rle_crop_3880965323_0.png.png imagette248726751752286502/1752286086_170389_1371790202_1c5c98fda5d789de9fa5cf09881e1d1a_rle_crop_3880965504_0.png.png imagette248726751752286502/1752286205_177037_1371790293_d0995529d0b78de25e210bffe1159061_rle_crop_3880965922_0.png.png imagette248726751752286502/1752286205_177037_1371790290_e952aa678ec33d89c4a9da2b8160d752_rle_crop_3880965946_0.png.png imagette248726751752286502/1752285845_159363_1371789027_cdb34fdc523096213f3d21f683cab115_rle_crop_3880964671_0.png.png imagette248726751752286502/1752286447_187563_1371790488_7c26a6a8c81974fce90fec7a67c0df60_rle_crop_3880967233_0.png.png imagette248726751752286502/1752286086_170389_1371790201_36fab341b10c2ebf3e17be3e360419a3_rle_crop_3880965514_0.png.png wget -O 20.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/65eef98be4e9ec4bd850c24f5cf6c98a_34591224.png imagette248726751752286502 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=24872568 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/24872677,24872678,24872679,24872680,24872681,24872682,24872683,24872684,24872685,24872686,24872687,24872688?tags=kraft,metal,plastique,papier,autre_refus,Carton_gris,environnement,mal_croppe,flou,Teint_Dans_La_Masse,Carton_brun,cartonnette your option no_mail is active, we will not send the real mail to your client args[1371790580] : ('0.06406243581986218',) no score found for photo 1371790580 We are sending mail with results at report@fotonower.com args[1371790579] : ('0.06406243581986218',) no score found for photo 1371790579 We are sending mail with results at report@fotonower.com args[1371790576] : ('0.06406243581986218',) no score found for photo 1371790576 We are sending mail with results at report@fotonower.com args[1371790573] : ('0.06406243581986218',) no score found for photo 1371790573 We are sending mail with results at report@fotonower.com args[1371790571] : ('0.06406243581986218',) no score found for photo 1371790571 We are sending mail with results at report@fotonower.com args[1371790569] : ('0.06406243581986218',) no score found for photo 1371790569 We are sending mail with results at report@fotonower.com refus_total : 0.06406243581986218 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24872568 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_P24872568_12-07-2025_04_14_59.pdf results_Auto_P24872568_12-07-2025_04_14_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24872568_12-07-2025_04_14_59.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','24872568','results_Auto_P24872568_12-07-2025_04_14_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24872568_12-07-2025_04_14_59.pdf','pdf','','0.3','0.06406243581986218') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24872568]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1371790580, 1371790579, 1371790576, 1371790573, 1371790571, 1371790569] map_info['map_portfolio_photo'] : {24872568: [1371790580, 1371790579, 1371790576, 1371790573, 1371790571, 1371790569, 1371790520, 1371790518, 1371790515, 1371790512, 1371790510, 1371790506, 1371790497, 1371790493, 1371790488, 1371790485, 1371790481, 1371790477, 1371790427, 1371790425, 1371790423, 1371790421, 1371790418, 1371790417, 1371790378, 1371790375, 1371790369, 1371790365, 1371790362, 1371790360, 1371790344, 1371790339, 1371790335, 1371790332, 1371790330, 1371790327, 1371790293, 1371790290, 1371790287, 1371790286, 1371790283, 1371790281, 1371790255, 1371790253, 1371790251, 1371790248, 1371790244, 1371790236, 1371790221, 1371790220, 1371790217, 1371790215, 1371790213, 1371790212, 1371790210, 1371790209, 1371790206, 1371790205, 1371790202, 1371790201, 1371790034, 1371790028, 1371790020, 1371789996, 1371789968, 1371789944, 1371789781, 1371789778, 1371789775, 1371789772, 1371789769, 1371789757, 1371789626, 1371789598, 1371789574, 1371789552, 1371789524, 1371789493, 1371789093, 1371789052, 1371789027, 1371789000, 1371788977, 1371788952]} final : False mtd_id 4302 list_pids : [1371790580, 1371790579, 1371790576, 1371790573, 1371790571, 1371790569] 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, '3274520') ('4302', '24872568', '1371790580', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790579', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790576', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790573', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790571', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790569', None, None, None, None, None, '3274520') 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', '24872568', '1371790580', None, None, None, None, None, '3274520'), ('4302', '24872568', '1371790579', None, None, None, None, None, '3274520'), ('4302', '24872568', '1371790576', None, None, None, None, None, '3274520'), ('4302', '24872568', '1371790573', None, None, None, None, None, '3274520'), ('4302', '24872568', '1371790571', None, None, None, None, None, '3274520'), ('4302', '24872568', '1371790569', None, None, None, None, None, '3274520')] time used for this insertion : 0.04882216453552246 save_final save missing photos in datou_result : time spend for datou_step_exec : 5.931799650192261 time spend to save output : 0.049036502838134766 total time spend for step 4 : 5.9808361530303955 step5:split_time_score Sat Jul 12 04:15:04 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 : ['24872568'] 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 : [('24872568',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24872568) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1371790579: {'path': 'temp/1752286498_1401694_1371790579_5bf34744ffb3f09014081a53df081aa8.jpg', 'extension': 'jpg'}, 1371790580: {'path': 'temp/1752286498_1401694_1371790580_d9149c99575619af9d80dba5cd23c3cc.jpg', 'extension': 'jpg'}, 1371790569: {'path': 'temp/1752286498_1401694_1371790569_25ef490b07029b5945e9d82003f75500.jpg', 'extension': 'jpg'}, 1371790571: {'path': 'temp/1752286498_1401694_1371790571_d6c4f72477db7fb732bf260198cfd0ce.jpg', 'extension': 'jpg'}, 1371790573: {'path': 'temp/1752286498_1401694_1371790573_fba340bf55b9f662ffe30466ebd49e8f.jpg', 'extension': 'jpg'}, 1371790576: {'path': 'temp/1752286498_1401694_1371790576_746d66d0fefab079806ddd18e4d919bb.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 = 24872568; (('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 ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 24872568 group by h (('04', 84),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24872568 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 (24872568) 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 (24872568) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 12072025 24872568 Nombre de photos uploadées : 84 / 23040 (0%) 12072025 24872568 Nombre de photos taguées (types de déchets): 0 / 84 (0%) 12072025 24872568 Nombre de photos taguées (volume) : 0 / 84 (0%) [{'photo_id': 1371789093, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/e7b83e439eb79653eeb959e16b940e78.jpg', 'username': None, 'uploaded_at': 1752285677, 'text': 'image_12072025_04_00_04_010145m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1371789052, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/f7e3f226ee682db403e5674a15b7ded1.jpg', 'username': None, 'uploaded_at': 1752285677, 'text': 'image_12072025_04_00_14_010138m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1371789027, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/cdb34fdc523096213f3d21f683cab115.jpg', 'username': None, 'uploaded_at': 1752285677, 'text': 'image_12072025_04_00_24_010133m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1371789000, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/229182f938a48d56ff807a62f343cb93.jpg', 'username': None, 'uploaded_at': 1752285677, 'text': 'image_12072025_04_00_33_009127m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 4.0531158447265625e-06 ???????????????????????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.003001689910888672 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 24872568, '2025-07-12' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1972167,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.03209257125854492 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= 1972167 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1972167, 'dashboard_run_id': 1980057, 'mtr_portfolio_id': 24862874, 'dashboard_result_id': 12456358, '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_P24862874_12-07-2025_00_17_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24862879, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24862880, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24862881, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24862882, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24862883, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24862884, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24862885, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24862886, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24862887, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24862888, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24862889, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24862890, 'pht': 3726}}"}, {'dashboat_entry_day': 1972167, 'dashboard_run_id': 1980057, 'mtr_portfolio_id': 24863716, 'dashboard_result_id': 12456359, '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_P24863716_12-07-2025_00_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24863736, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24863737, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24863738, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24863739, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24863740, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24863741, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24863742, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24863743, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24863744, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24863745, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24863746, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24863747, 'pht': 3726}}"}, {'dashboat_entry_day': 1972167, 'dashboard_run_id': 1980057, 'mtr_portfolio_id': 24864264, 'dashboard_result_id': 12456360, '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_P24864264_12-07-2025_00_46_57.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24864292, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24864293, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24864294, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24864295, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24864296, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24864297, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24864298, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24864299, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24864300, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24864301, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24864302, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24864303, 'pht': 3726}}"}, {'dashboat_entry_day': 1972167, 'dashboard_run_id': 1980057, 'mtr_portfolio_id': 24864799, 'dashboard_result_id': 12456361, '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_P24864799_12-07-2025_01_02_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 24864803, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24864804, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24864805, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24864806, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24864807, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24864808, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24864809, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24864810, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24864811, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24864812, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24864813, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24864814, 'pht': 3726}}"}, {'dashboat_entry_day': 1972167, 'dashboard_run_id': 1980057, 'mtr_portfolio_id': 24865363, 'dashboard_result_id': 12456362, '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_P24865363_12-07-2025_01_17_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 24865438, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24865439, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24865440, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24865441, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24865442, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24865443, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24865444, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24865445, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24865446, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24865447, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24865448, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24865449, 'pht': 3726}}"}, {'dashboat_entry_day': 1972167, 'dashboard_run_id': 1980057, 'mtr_portfolio_id': 24866369, 'dashboard_result_id': 12456363, '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_P24866369_12-07-2025_01_32_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 24866430, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24866432, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24866433, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24866434, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24866435, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24866437, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24866438, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24866440, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24866441, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24866442, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24866443, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24866445, 'pht': 3726}}"}, {'dashboat_entry_day': 1972167, 'dashboard_run_id': 1980057, 'mtr_portfolio_id': 24867390, 'dashboard_result_id': 12456364, '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_P24867390_12-07-2025_01_46_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24867515, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24867516, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24867517, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24867518, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24867519, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24867520, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24867521, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24867522, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24867523, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24867524, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24867525, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24867526, 'pht': 3726}}"}, {'dashboat_entry_day': 1972167, 'dashboard_run_id': 1980057, 'mtr_portfolio_id': 24868411, 'dashboard_result_id': 12456365, '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_P24868411_12-07-2025_02_03_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24868440, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24868441, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24868442, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24868443, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24868444, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24868445, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24868446, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24868447, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24868448, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24868449, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24868450, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24868451, 'pht': 3726}}"}, {'dashboat_entry_day': 1972167, 'dashboard_run_id': 1980057, 'mtr_portfolio_id': 24868961, 'dashboard_result_id': 12456366, '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_P24868961_12-07-2025_02_16_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24868988, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24868989, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24868990, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24868991, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24868992, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24868993, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24868994, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24868995, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24868996, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24868997, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24868998, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24868999, 'pht': 3726}}"}, {'dashboat_entry_day': 1972167, 'dashboard_run_id': 1980057, 'mtr_portfolio_id': 24869534, 'dashboard_result_id': 12456367, '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_P24869534_12-07-2025_02_33_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24869538, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24869539, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24869540, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24869541, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24869542, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24869543, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24869544, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24869545, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24869546, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24869547, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24869548, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24869549, 'pht': 3726}}"}, {'dashboat_entry_day': 1972167, 'dashboard_run_id': 1980057, 'mtr_portfolio_id': 24869978, 'dashboard_result_id': 12456368, '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_P24869978_12-07-2025_02_47_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24870006, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24870007, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24870008, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24870009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24870010, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24870011, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24870012, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24870013, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24870014, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24870015, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24870016, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24870017, 'pht': 3726}}"}, {'dashboat_entry_day': 1972167, 'dashboard_run_id': 1980057, 'mtr_portfolio_id': 24870447, 'dashboard_result_id': 12456369, '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_P24870447_12-07-2025_03_02_57.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24870473, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24870474, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24870475, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24870476, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24870477, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24870478, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24870479, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24870480, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24870481, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24870482, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24870483, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24870484, 'pht': 3726}}"}, {'dashboat_entry_day': 1972167, 'dashboard_run_id': 1980057, 'mtr_portfolio_id': 24870835, 'dashboard_result_id': 12456370, '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_P24870835_12-07-2025_03_17_02.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24870863, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24870864, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24870865, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24870866, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24870867, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24870868, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24870869, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24870870, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24870871, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24870872, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24870873, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24870874, 'pht': 3726}}"}, {'dashboat_entry_day': 1972167, 'dashboard_run_id': 1980057, 'mtr_portfolio_id': 24871373, 'dashboard_result_id': 12456371, '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_P24871373_12-07-2025_03_33_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24871376, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24871377, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24871378, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24871379, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24871380, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24871381, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24871382, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24871383, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24871384, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24871385, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24871386, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24871387, 'pht': 3726}}"}, {'dashboat_entry_day': 1972167, 'dashboard_run_id': 1980057, 'mtr_portfolio_id': 24871764, 'dashboard_result_id': 12456372, '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_P24871764_12-07-2025_03_47_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24871792, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24871793, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24871794, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24871795, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24871796, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24871797, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24871798, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24871799, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24871800, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24871801, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24871802, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24871803, 'pht': 3726}}"}, {'dashboat_entry_day': 1972167, 'dashboard_run_id': 1980057, 'mtr_portfolio_id': 24872219, 'dashboard_result_id': 12456373, '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_P24872219_12-07-2025_04_03_02.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24872245, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24872246, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24872247, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24872248, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24872249, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24872250, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24872251, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24872252, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24872253, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24872254, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24872255, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24872256, 'pht': 3726}}"}, {'dashboat_entry_day': 1972167, 'dashboard_run_id': 1980057, 'mtr_portfolio_id': 24872568, 'dashboard_result_id': 12456374, '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_P24872568_12-07-2025_04_13_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24872665, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24872666, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24872667, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24872668, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24872669, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24872670, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24872671, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24872672, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24872673, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24872674, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24872675, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24872676, '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 = 24862874 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': 3273672, 'mtr_portfolio_id': 24862874, 'created_at': datetime.datetime(2025, 7, 12, 0, 16, 59), 'result': '0.037367531886799636', 'result_long': None, 'result_double': None}] Qualite : 0.037367531886799636 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24862874 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24862874_12-07-2025_00_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24862874 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_P24862874_12-07-2025_00_17_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24862879, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24862880, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24862881, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24862882, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24862883, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24862884, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24862885, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24862886, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24862887, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24862888, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24862889, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24862890, 'pht': 3726}}" where mtr_portfolio_id = 24862874 and dashboard_run_id = 1980057 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`=24862874 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12456358, 0.037367531886799636, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24862874_12-07-2025_00_17_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24862879, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24862880, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24862881, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24862882, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24862883, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24862884, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24862885, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24862886, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24862887, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24862888, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24862889, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24862890, '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 = 24863716 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': 3273753, 'mtr_portfolio_id': 24863716, 'created_at': datetime.datetime(2025, 7, 12, 0, 32, 58), 'result': '0.03280463110763884', 'result_long': None, 'result_double': None}] Qualite : 0.03280463110763884 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24863716 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24863716_12-07-2025_00_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24863716 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_P24863716_12-07-2025_00_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24863736, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24863737, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24863738, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24863739, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24863740, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24863741, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24863742, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24863743, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24863744, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24863745, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24863746, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24863747, 'pht': 3726}}" where mtr_portfolio_id = 24863716 and dashboard_run_id = 1980057 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`=24863716 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12456359, 0.03280463110763884, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24863716_12-07-2025_00_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24863736, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24863737, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24863738, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24863739, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24863740, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24863741, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24863742, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24863743, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24863744, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24863745, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24863746, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24863747, '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 = 24864264 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': 3273801, 'mtr_portfolio_id': 24864264, 'created_at': datetime.datetime(2025, 7, 12, 0, 46, 56), 'result': '0.045803300599373216', 'result_long': None, 'result_double': None}] Qualite : 0.045803300599373216 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24864264 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24864264_12-07-2025_00_46_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24864264 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_P24864264_12-07-2025_00_46_57.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24864292, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24864293, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24864294, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24864295, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24864296, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24864297, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24864298, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24864299, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24864300, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24864301, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24864302, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24864303, 'pht': 3726}}" where mtr_portfolio_id = 24864264 and dashboard_run_id = 1980057 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`=24864264 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12456360, 0.045803300599373216, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24864264_12-07-2025_00_46_57.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24864292, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24864293, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24864294, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24864295, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24864296, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24864297, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24864298, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24864299, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24864300, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24864301, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24864302, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24864303, '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 = 24864799 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': 3273845, 'mtr_portfolio_id': 24864799, 'created_at': datetime.datetime(2025, 7, 12, 1, 2, 58), 'result': '0.05501512360551966', 'result_long': None, 'result_double': None}] Qualite : 0.05501512360551966 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24864799 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24864799_12-07-2025_01_02_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24864799 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_P24864799_12-07-2025_01_02_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 24864803, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24864804, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24864805, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24864806, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24864807, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24864808, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24864809, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24864810, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24864811, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24864812, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24864813, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24864814, 'pht': 3726}}" where mtr_portfolio_id = 24864799 and dashboard_run_id = 1980057 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`=24864799 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12456361, 0.05501512360551966, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24864799_12-07-2025_01_02_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 24864803, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24864804, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24864805, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24864806, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24864807, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24864808, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24864809, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24864810, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24864811, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24864812, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24864813, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24864814, '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 = 24865363 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': 3273898, 'mtr_portfolio_id': 24865363, 'created_at': datetime.datetime(2025, 7, 12, 1, 16, 59), 'result': '0.03769358954030426', 'result_long': None, 'result_double': None}] Qualite : 0.03769358954030426 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24865363 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24865363_12-07-2025_01_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24865363 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_P24865363_12-07-2025_01_17_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 24865438, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24865439, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24865440, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24865441, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24865442, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24865443, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24865444, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24865445, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24865446, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24865447, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24865448, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24865449, 'pht': 3726}}" where mtr_portfolio_id = 24865363 and dashboard_run_id = 1980057 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`=24865363 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12456362, 0.03769358954030426, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24865363_12-07-2025_01_17_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 24865438, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24865439, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24865440, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24865441, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24865442, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24865443, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24865444, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24865445, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24865446, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24865447, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24865448, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24865449, '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 = 24866369 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': 3273993, 'mtr_portfolio_id': 24866369, 'created_at': datetime.datetime(2025, 7, 12, 1, 32, 57), 'result': '0.04421412132428314', 'result_long': None, 'result_double': None}] Qualite : 0.04421412132428314 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24866369 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24866369_12-07-2025_01_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24866369 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_P24866369_12-07-2025_01_32_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 24866430, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24866432, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24866433, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24866434, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24866435, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24866437, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24866438, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24866440, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24866441, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24866442, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24866443, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24866445, 'pht': 3726}}" where mtr_portfolio_id = 24866369 and dashboard_run_id = 1980057 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`=24866369 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12456363, 0.04421412132428314, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24866369_12-07-2025_01_32_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 24866430, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24866432, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24866433, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24866434, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24866435, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24866437, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24866438, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24866440, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24866441, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24866442, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24866443, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24866445, '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 = 24867390 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': 3274040, 'mtr_portfolio_id': 24867390, 'created_at': datetime.datetime(2025, 7, 12, 1, 46, 59), 'result': '0.039274434489525195', 'result_long': None, 'result_double': None}] Qualite : 0.039274434489525195 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24867390 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24867390_12-07-2025_01_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24867390 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_P24867390_12-07-2025_01_46_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24867515, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24867516, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24867517, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24867518, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24867519, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24867520, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24867521, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24867522, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24867523, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24867524, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24867525, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24867526, 'pht': 3726}}" where mtr_portfolio_id = 24867390 and dashboard_run_id = 1980057 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`=24867390 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12456364, 0.039274434489525195, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24867390_12-07-2025_01_46_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24867515, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24867516, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24867517, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24867518, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24867519, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24867520, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24867521, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24867522, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24867523, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24867524, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24867525, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24867526, '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 = 24868411 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': 3274086, 'mtr_portfolio_id': 24868411, 'created_at': datetime.datetime(2025, 7, 12, 2, 3), 'result': '0.03749161848983475', 'result_long': None, 'result_double': None}] Qualite : 0.03749161848983475 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24868411 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24868411_12-07-2025_02_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24868411 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_P24868411_12-07-2025_02_03_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24868440, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24868441, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24868442, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24868443, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24868444, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24868445, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24868446, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24868447, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24868448, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24868449, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24868450, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24868451, 'pht': 3726}}" where mtr_portfolio_id = 24868411 and dashboard_run_id = 1980057 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`=24868411 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12456365, 0.03749161848983475, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24868411_12-07-2025_02_03_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24868440, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24868441, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24868442, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24868443, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24868444, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24868445, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24868446, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24868447, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24868448, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24868449, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24868450, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24868451, '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 = 24868961 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': 3274146, 'mtr_portfolio_id': 24868961, 'created_at': datetime.datetime(2025, 7, 12, 2, 16, 57), 'result': '0.02968191619785732', 'result_long': None, 'result_double': None}] Qualite : 0.02968191619785732 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24868961 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24868961_12-07-2025_02_16_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24868961 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_P24868961_12-07-2025_02_16_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24868988, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24868989, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24868990, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24868991, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24868992, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24868993, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24868994, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24868995, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24868996, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24868997, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24868998, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24868999, 'pht': 3726}}" where mtr_portfolio_id = 24868961 and dashboard_run_id = 1980057 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`=24868961 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12456366, 0.02968191619785732, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24868961_12-07-2025_02_16_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24868988, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24868989, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24868990, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24868991, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24868992, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24868993, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24868994, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24868995, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24868996, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24868997, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24868998, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24868999, '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 = 24869534 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': 3274195, 'mtr_portfolio_id': 24869534, 'created_at': datetime.datetime(2025, 7, 12, 2, 33), 'result': '0.03656668690141409', 'result_long': None, 'result_double': None}] Qualite : 0.03656668690141409 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24869534 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24869534_12-07-2025_02_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24869534 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_P24869534_12-07-2025_02_33_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24869538, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24869539, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24869540, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24869541, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24869542, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24869543, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24869544, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24869545, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24869546, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24869547, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24869548, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24869549, 'pht': 3726}}" where mtr_portfolio_id = 24869534 and dashboard_run_id = 1980057 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`=24869534 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12456367, 0.03656668690141409, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24869534_12-07-2025_02_33_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24869538, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24869539, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24869540, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24869541, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24869542, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24869543, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24869544, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24869545, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24869546, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24869547, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24869548, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24869549, '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 = 24869978 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': 3274235, 'mtr_portfolio_id': 24869978, 'created_at': datetime.datetime(2025, 7, 12, 2, 46, 59), 'result': '0.04038063491783955', 'result_long': None, 'result_double': None}] Qualite : 0.04038063491783955 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24869978 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24869978_12-07-2025_02_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24869978 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_P24869978_12-07-2025_02_47_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24870006, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24870007, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24870008, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24870009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24870010, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24870011, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24870012, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24870013, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24870014, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24870015, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24870016, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24870017, 'pht': 3726}}" where mtr_portfolio_id = 24869978 and dashboard_run_id = 1980057 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`=24869978 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12456368, 0.04038063491783955, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24869978_12-07-2025_02_47_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24870006, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24870007, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24870008, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24870009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24870010, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24870011, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24870012, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24870013, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24870014, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24870015, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24870016, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24870017, '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 = 24870447 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': 3274281, 'mtr_portfolio_id': 24870447, 'created_at': datetime.datetime(2025, 7, 12, 3, 2, 56), 'result': '0.04984134724630969', 'result_long': None, 'result_double': None}] Qualite : 0.04984134724630969 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24870447 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24870447_12-07-2025_03_02_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24870447 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_P24870447_12-07-2025_03_02_57.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24870473, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24870474, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24870475, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24870476, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24870477, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24870478, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24870479, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24870480, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24870481, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24870482, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24870483, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24870484, 'pht': 3726}}" where mtr_portfolio_id = 24870447 and dashboard_run_id = 1980057 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`=24870447 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12456369, 0.04984134724630969, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24870447_12-07-2025_03_02_57.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24870473, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24870474, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24870475, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24870476, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24870477, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24870478, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24870479, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24870480, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24870481, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24870482, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24870483, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24870484, '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 = 24870835 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': 3274336, 'mtr_portfolio_id': 24870835, 'created_at': datetime.datetime(2025, 7, 12, 3, 17, 1), 'result': '0.05701784532078715', 'result_long': None, 'result_double': None}] Qualite : 0.05701784532078715 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24870835 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24870835_12-07-2025_03_17_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24870835 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_P24870835_12-07-2025_03_17_02.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24870863, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24870864, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24870865, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24870866, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24870867, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24870868, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24870869, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24870870, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24870871, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24870872, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24870873, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24870874, 'pht': 3726}}" where mtr_portfolio_id = 24870835 and dashboard_run_id = 1980057 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`=24870835 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12456370, 0.05701784532078715, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24870835_12-07-2025_03_17_02.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24870863, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24870864, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24870865, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24870866, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24870867, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24870868, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24870869, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24870870, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24870871, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24870872, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24870873, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24870874, '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 = 24871373 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': 3274384, 'mtr_portfolio_id': 24871373, 'created_at': datetime.datetime(2025, 7, 12, 3, 32, 59), 'result': '0.05093827072838168', 'result_long': None, 'result_double': None}] Qualite : 0.05093827072838168 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24871373 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24871373_12-07-2025_03_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24871373 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_P24871373_12-07-2025_03_33_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24871376, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24871377, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24871378, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24871379, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24871380, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24871381, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24871382, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24871383, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24871384, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24871385, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24871386, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24871387, 'pht': 3726}}" where mtr_portfolio_id = 24871373 and dashboard_run_id = 1980055 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`=24871373 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12456371, 0.05093827072838168, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24871373_12-07-2025_03_33_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24871376, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24871377, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24871378, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24871379, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24871380, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24871381, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24871382, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24871383, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24871384, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24871385, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24871386, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24871387, '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 = 24871764 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': 3274421, 'mtr_portfolio_id': 24871764, 'created_at': datetime.datetime(2025, 7, 12, 3, 46, 59), 'result': '0.03973405683915852', 'result_long': None, 'result_double': None}] Qualite : 0.03973405683915852 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24871764 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24871764_12-07-2025_03_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24871764 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_P24871764_12-07-2025_03_47_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24871792, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24871793, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24871794, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24871795, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24871796, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24871797, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24871798, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24871799, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24871800, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24871801, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24871802, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24871803, 'pht': 3726}}" where mtr_portfolio_id = 24871764 and dashboard_run_id = 1980055 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`=24871764 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12456372, 0.03973405683915852, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24871764_12-07-2025_03_47_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24871792, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24871793, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24871794, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24871795, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24871796, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24871797, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24871798, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24871799, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24871800, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24871801, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24871802, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24871803, '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 = 24872219 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': 3274462, 'mtr_portfolio_id': 24872219, 'created_at': datetime.datetime(2025, 7, 12, 4, 3, 1), 'result': '0.04850989667125513', 'result_long': None, 'result_double': None}] Qualite : 0.04850989667125513 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24872219 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24872219_12-07-2025_04_03_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24872219 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_P24872219_12-07-2025_04_03_02.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24872245, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24872246, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24872247, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24872248, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24872249, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24872250, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24872251, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24872252, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24872253, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24872254, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24872255, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24872256, 'pht': 3726}}" where mtr_portfolio_id = 24872219 and dashboard_run_id = 1980055 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`=24872219 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12456373, 0.04850989667125513, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24872219_12-07-2025_04_03_02.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24872245, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24872246, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24872247, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24872248, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24872249, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24872250, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24872251, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24872252, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24872253, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24872254, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24872255, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24872256, '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 = 24872568 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': 3274520, 'mtr_portfolio_id': 24872568, 'created_at': datetime.datetime(2025, 7, 12, 4, 14, 58), 'result': '0.06406243581986218', 'result_long': None, 'result_double': None}] Qualite : 0.06406243581986218 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24872568 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24872568_12-07-2025_04_14_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24872568 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_P24872568_12-07-2025_04_14_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24872665, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24872666, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24872667, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24872668, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24872669, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24872670, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24872671, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24872672, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24872673, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24872674, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24872675, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24872676, 'pht': 3726}}" where mtr_portfolio_id = 24872568 and dashboard_run_id = 1980055 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`=24872568 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12456374, 0.06406243581986218, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24872568_12-07-2025_04_14_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24872665, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24872666, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24872667, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24872668, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24872669, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24872670, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24872671, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24872672, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24872673, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24872674, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24872675, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24872676, '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 (24862874,24863716,24864264,24864799,24865363,24866369,24867390,24868411,24868961,24869534,24869978,24870447,24870835,24871373,24871764,24872219,24872568) result : ((1371742379,), (1371742409,), (1371742439,), (1371742467,), (1371742493,), (1371742810,), (1371742839,), (1371742869,), (1371742894,), (1371742918,), (1371742943,), (1371743083,), (1371743084,), (1371743103,), (1371743104,), (1371743131,), (1371743137,), (1371743164,), (1371743167,), (1371743191,), (1371743196,), (1371743220,), (1371743223,), (1371743306,), (1371743309,), (1371743312,), (1371743340,), (1371743358,), (1371743368,), (1371743470,), (1371743474,), (1371743479,), (1371743505,), (1371743531,), (1371743558,), (1371743769,), (1371743777,), (1371743781,), (1371743786,), (1371743808,), (1371743836,), (1371743987,), (1371744038,), (1371744092,), (1371744216,), (1371744321,), (1371744440,), (1371744789,), (1371744950,), (1371745105,), (1371745166,), (1371745248,), (1371745345,), (1371745593,), (1371745621,), (1371745663,), (1371745726,), (1371745808,), (1371745824,), (1371746189,), (1371746240,), (1371746298,), (1371746311,), (1371746325,), (1371746331,), (1371746501,), (1371746504,), (1371746508,), (1371746512,), (1371746515,), (1371746520,), (1371746569,), (1371746583,), (1371746607,), (1371746632,), (1371746659,), (1371746685,), (1371746815,), (1371746817,), (1371746818,), (1371746838,), (1371746843,), (1371746854,), (1371747126,), (1371747160,), (1371747186,), (1371747211,), (1371747235,), (1371747269,), (1371747638,), (1371747660,), (1371747687,), (1371747705,), (1371747710,), (1371747716,), (1371747773,), (1371747803,), (1371747842,), (1371747869,), (1371747882,), (1371747883,), (1371748191,), (1371748226,), (1371748292,), (1371748342,), (1371748367,), (1371748380,), (1371748740,), (1371748777,), (1371748817,), (1371748841,), (1371748871,), (1371748900,), (1371749035,), (1371749067,), (1371749121,), (1371749168,), (1371749218,), (1371749277,), (1371749616,), (1371749631,), (1371749649,), (1371749652,), (1371749653,), (1371749657,), (1371749730,), (1371749732,), (1371749735,), (1371749737,), (1371749739,), (1371749741,), (1371749784,), (1371749788,), (1371749791,), (1371749794,), (1371749799,), (1371749804,), (1371749818,), (1371749821,), (1371749823,), (1371749826,), (1371749829,), (1371749833,), (1371749877,), (1371749879,), (1371749883,), (1371749887,), (1371749891,), (1371749895,), (1371749945,), (1371749947,), (1371749949,), (1371749950,), (1371749970,), (1371749981,), (1371750000,), (1371750004,), (1371750007,), (1371750022,), (1371750048,), (1371750075,), (1371750384,), (1371750395,), (1371750398,), (1371750403,), (1371750406,), (1371750407,), (1371750451,), (1371750455,), (1371750459,), (1371750462,), (1371750467,), (1371750470,), (1371750523,), (1371750526,), (1371750528,), (1371750533,), (1371750538,), (1371750545,), (1371750621,), (1371750663,), (1371750711,), (1371750754,), (1371750800,), (1371750854,), (1371751193,), (1371751204,), (1371751218,), (1371751221,), (1371751224,), (1371751226,), (1371751298,), (1371751302,), (1371751313,), (1371751317,), (1371751321,), (1371751326,), (1371751335,), (1371751336,), (1371751343,), (1371751344,), (1371751351,), (1371751353,), (1371751356,), (1371751358,), (1371751362,), (1371751366,), (1371751374,), (1371751376,), (1371751394,), (1371751397,), (1371751399,), (1371751413,), (1371751421,), (1371751428,), (1371751438,), (1371751467,), (1371751472,), (1371751476,), (1371751480,), (1371751484,), (1371751492,), (1371751493,), (1371751495,), (1371751496,), (1371751498,), (1371751499,), (1371751501,), (1371751502,), (1371751504,), (1371751505,), (1371751508,), (1371751509,), (1371751527,), (1371751539,), (1371751544,), (1371751548,), (1371751552,), (1371751555,), (1371751613,), (1371751618,), (1371751622,), (1371751639,), (1371751665,), (1371751689,), (1371752002,), (1371752028,), (1371752051,), (1371752078,), (1371752104,), (1371752129,), (1371752184,), (1371752189,), (1371752193,), (1371752195,), (1371752198,), (1371752201,), (1371752337,), (1371752367,), (1371752392,), (1371752421,), (1371752446,), (1371752477,), (1371752620,), (1371752626,), (1371752631,), (1371752635,), (1371752639,), (1371752642,), (1371752818,), (1371752820,), (1371752824,), (1371752828,), (1371752832,), (1371752834,), (1371753104,), (1371753112,), (1371753115,), (1371753118,), (1371753120,), (1371753122,), (1371753173,), (1371753174,), (1371753177,), (1371753178,), (1371753182,), (1371753183,), (1371753189,), (1371753191,), (1371753200,), (1371753202,), (1371753207,), (1371753210,), (1371753216,), (1371753218,), (1371753221,), (1371753224,), (1371753228,), (1371753234,), (1371753581,), (1371753610,), (1371753640,), (1371753666,), (1371753691,), (1371753720,), (1371753908,), (1371753911,), (1371753915,), (1371753917,), (1371753921,), (1371753923,), (1371753927,), (1371753929,), (1371753931,), (1371753934,), (1371753935,), (1371753936,), (1371753944,), (1371753948,), (1371753952,), (1371753956,), (1371753961,), (1371753967,), (1371754076,), (1371754100,), (1371754130,), (1371754157,), (1371754182,), (1371754210,), (1371754604,), (1371754634,), (1371754669,), (1371754697,), (1371754727,), (1371754764,), (1371754875,), (1371754886,), (1371754892,), (1371754895,), (1371754905,), (1371754932,), (1371755073,), (1371755086,), (1371755089,), (1371755092,), (1371755095,), (1371755096,), (1371755158,), (1371755163,), (1371755165,), (1371755167,), (1371755169,), (1371755172,), (1371755218,), (1371755219,), (1371755221,), (1371755222,), (1371755226,), (1371755227,), (1371755229,), (1371755231,), (1371755232,), (1371755234,), (1371755237,), (1371755239,), (1371755249,), (1371755254,), (1371755259,), (1371755263,), (1371755266,), (1371755270,), (1371755321,), (1371755325,), (1371755332,), (1371755364,), (1371755411,), (1371755496,), (1371755650,), (1371755722,), (1371755786,), (1371755844,), (1371755870,), (1371755897,), (1371756004,), (1371756031,), (1371756036,), (1371756052,), (1371756079,), (1371756151,), (1371756377,), (1371756421,), (1371756510,), (1371756560,), (1371756623,), (1371756665,), (1371757110,), (1371757119,), (1371757123,), (1371757129,), (1371757172,), (1371757216,), (1371757558,), (1371757570,), (1371757572,), (1371757574,), (1371757576,), (1371757626,), (1371757629,), (1371757631,), (1371757634,), (1371757637,), (1371757640,), (1371757661,), (1371757663,), (1371757666,), (1371757668,), (1371757671,), (1371757675,), (1371757691,), (1371757694,), (1371757699,), (1371757702,), (1371757703,), (1371757706,), (1371757734,), (1371757736,), (1371757739,), (1371757743,), (1371757745,), (1371757750,), (1371757776,), (1371757779,), (1371757781,), (1371757783,), (1371757786,), (1371757789,), (1371757825,), (1371757830,), (1371757835,), (1371757839,), (1371757844,), (1371757849,), (1371757862,), (1371757870,), (1371757885,), (1371757908,), (1371757934,), (1371757961,), (1371758310,), (1371758334,), (1371758359,), (1371758382,), (1371758386,), (1371758404,), (1371758485,), (1371758498,), (1371758510,), (1371758552,), (1371758596,), (1371758636,), (1371759065,), (1371759135,), (1371759194,), (1371759254,), (1371759329,), (1371759391,), (1371760020,), (1371760075,), (1371760108,), (1371760146,), (1371760171,), (1371760195,), (1371760545,), (1371760549,), (1371760570,), (1371760576,), (1371760588,), (1371760593,), (1371760596,), (1371760598,), (1371760600,), (1371760602,), (1371760605,), (1371760607,), (1371760730,), (1371760833,), (1371760936,), (1371760993,), (1371761086,), (1371761140,), (1371761572,), (1371761631,), (1371761679,), (1371761682,), (1371761684,), (1371761687,), (1371762013,), (1371762042,), (1371762069,), (1371762094,), (1371762123,), (1371762174,), (1371762342,), (1371762372,), (1371762429,), (1371762520,), (1371762599,), (1371762662,), (1371763239,), (1371763288,), (1371763312,), (1371763315,), (1371763317,), (1371763324,), (1371763659,), (1371763663,), (1371763692,), (1371763738,), (1371763819,), (1371763888,), (1371763904,), (1371763916,), (1371763921,), (1371763924,), (1371763925,), (1371763926,), (1371764086,), (1371764112,), (1371764140,), (1371764170,), (1371764216,), (1371764267,), (1371764836,), (1371764868,), (1371764887,), (1371764913,), (1371764958,), (1371764978,), (1371765863,), (1371765866,), (1371765933,), (1371765937,), (1371766023,), (1371766030,), (1371766105,), (1371766122,), (1371766175,), (1371766196,), (1371766261,), (1371766277,), (1371766432,), (1371766474,), (1371766509,), (1371766535,), (1371766592,), (1371766622,), (1371766701,), (1371766705,), (1371766709,), (1371766711,), (1371766717,), (1371766719,), (1371766975,), (1371766977,), (1371766999,), (1371767003,), (1371767023,), (1371767028,), (1371767084,), (1371767099,), (1371767169,), (1371767188,), (1371767230,), (1371767235,), (1371767299,), (1371767323,), (1371767345,), (1371767407,), (1371767409,), (1371767415,), (1371767520,), (1371767523,), (1371767527,), (1371767531,), (1371767533,), (1371767536,), (1371767704,), (1371767706,), (1371767728,), (1371767730,), (1371767746,), (1371767789,), (1371767904,), (1371767932,), (1371767957,), (1371767984,), (1371767999,), (1371768000,), (1371768392,), (1371768431,), (1371768481,), (1371768538,), (1371768569,), (1371768674,), (1371769369,), (1371769405,), (1371769461,), (1371769523,), (1371769558,), (1371769585,), (1371769831,), (1371769857,), (1371769883,), (1371769917,), (1371769945,), (1371769979,), (1371770071,), (1371770099,), (1371770122,), (1371770148,), (1371770174,), (1371770199,), (1371770824,), (1371770863,), (1371770906,), (1371770952,), (1371771003,), (1371771056,), (1371771490,), (1371771564,), (1371771588,), (1371771631,), (1371771647,), (1371771675,), (1371771770,), (1371771774,), (1371771790,), (1371771811,), (1371771816,), (1371771836,), (1371772100,), (1371772123,), (1371772147,), (1371772175,), (1371772192,), (1371772224,), (1371772528,), (1371772550,), (1371772583,), (1371772623,), (1371772645,), (1371772666,), (1371772807,), (1371772830,), (1371772860,), (1371772886,), (1371772913,), (1371772918,), (1371773175,), (1371773198,), (1371773220,), (1371773232,), (1371773246,), (1371773254,), (1371773812,), (1371773843,), (1371773876,), (1371773932,), (1371773981,), (1371774026,), (1371774161,), (1371774164,), (1371774167,), (1371774169,), (1371774174,), (1371774180,), (1371774192,), (1371774200,), (1371774203,), (1371774205,), (1371774206,), (1371774207,), (1371774234,), (1371774237,), (1371774240,), (1371774242,), (1371774244,), (1371774247,), (1371774417,), (1371774442,), (1371774465,), (1371774492,), (1371774527,), (1371774555,), (1371774626,), (1371774636,), (1371774640,), (1371774643,), (1371774653,), (1371774655,), (1371774697,), (1371774699,), (1371774702,), (1371774703,), (1371774707,), (1371774715,), (1371774729,), (1371774734,), (1371774738,), (1371774741,), (1371774744,), (1371774745,), (1371774765,), (1371774767,), (1371774771,), (1371774773,), (1371774776,), (1371774778,), (1371774807,), (1371774809,), (1371774811,), (1371774812,), (1371774813,), (1371774814,), (1371774832,), (1371774841,), (1371774845,), (1371774849,), (1371774852,), (1371774855,), (1371774931,), (1371774936,), (1371774941,), (1371774946,), (1371774950,), (1371774953,), (1371775067,), (1371775091,), (1371775116,), (1371775139,), (1371775160,), (1371775184,), (1371775332,), (1371775333,), (1371775363,), (1371775374,), (1371775415,), (1371775424,), (1371775461,), (1371775468,), (1371775501,), (1371775516,), (1371775551,), (1371775562,), (1371775671,), (1371775706,), (1371775724,), (1371775728,), (1371775729,), (1371775730,), (1371775859,), (1371775862,), (1371775865,), (1371775868,), (1371775870,), (1371775872,), (1371776209,), (1371776254,), (1371776293,), (1371776337,), (1371776389,), (1371776415,), (1371776860,), (1371776866,), (1371776891,), (1371776901,), (1371776904,), (1371776907,), (1371776915,), (1371776917,), (1371776924,), (1371776932,), (1371776934,), (1371776942,), (1371776944,), (1371776955,), (1371776963,), (1371776965,), (1371776967,), (1371777018,), (1371777023,), (1371777039,), (1371777067,), (1371777092,), (1371777117,), (1371777255,), (1371777350,), (1371777462,), (1371777578,), (1371777682,), (1371777788,), (1371778657,), (1371778699,), (1371778754,), (1371778783,), (1371778827,), (1371778887,), (1371779059,), (1371779112,), (1371779146,), (1371779177,), (1371779213,), (1371779220,), (1371779434,), (1371779482,), (1371779527,), (1371779591,), (1371779639,), (1371779684,), (1371779998,), (1371780013,), (1371780026,), (1371780050,), (1371780072,), (1371780086,), (1371780243,), (1371780244,), (1371780248,), (1371780249,), (1371780253,), (1371780254,), (1371780259,), (1371780261,), (1371780265,), (1371780266,), (1371780271,), (1371780272,), (1371780279,), (1371780280,), (1371780282,), (1371780283,), (1371780285,), (1371780287,), (1371780313,), (1371780316,), (1371780320,), (1371780324,), (1371780326,), (1371780329,), (1371780365,), (1371780368,), (1371780371,), (1371780372,), (1371780375,), (1371780380,), (1371780392,), (1371780394,), (1371780398,), (1371780401,), (1371780408,), (1371780409,), (1371780435,), (1371780437,), (1371780440,), (1371780443,), (1371780446,), (1371780448,), (1371780471,), (1371780474,), (1371780475,), (1371780477,), (1371780479,), (1371780480,), (1371780520,), (1371780521,), (1371780523,), (1371780524,), (1371780526,), (1371780527,), (1371780529,), (1371780530,), (1371780531,), (1371780534,), (1371780535,), (1371780538,), (1371780547,), (1371780551,), (1371780556,), (1371780557,), (1371780559,), (1371780561,), (1371780603,), (1371780605,), (1371780608,), (1371780611,), (1371780614,), (1371780616,), (1371780646,), (1371780647,), (1371780649,), (1371780651,), (1371780652,), (1371780654,), (1371780662,), (1371780665,), (1371780669,), (1371780679,), (1371780684,), (1371780685,), (1371780710,), (1371780712,), (1371780716,), (1371780717,), (1371780719,), (1371780721,), (1371780771,), (1371780772,), (1371780775,), (1371780777,), (1371780781,), (1371780784,), (1371780798,), (1371780802,), (1371780805,), (1371780808,), (1371780810,), (1371780812,), (1371780845,), (1371780847,), (1371780851,), (1371780853,), (1371780855,), (1371780858,), (1371780864,), (1371780867,), (1371780870,), (1371780874,), (1371780876,), (1371780878,), (1371780958,), (1371780960,), (1371780961,), (1371780994,), (1371780996,), (1371780999,), (1371781018,), (1371781020,), (1371781024,), (1371781028,), (1371781030,), (1371781034,), (1371781060,), (1371781062,), (1371781063,), (1371781065,), (1371781068,), (1371781069,), (1371781082,), (1371781085,), (1371781086,), (1371781090,), (1371781094,), (1371781097,), (1371781134,), (1371781136,), (1371781138,), (1371781139,), (1371781140,), (1371781141,), (1371781161,), (1371781162,), (1371781164,), (1371781166,), (1371781171,), (1371781179,), (1371781184,), (1371781187,), (1371781191,), (1371781193,), (1371781196,), (1371781198,), (1371781233,), (1371781235,), (1371781236,), (1371781238,), (1371781240,), (1371781241,), (1371781279,), (1371781280,), (1371781282,), (1371781285,), (1371781286,), (1371781288,), (1371781313,), (1371781314,), (1371781315,), (1371781316,), (1371781319,), (1371781321,), (1371781325,), (1371781326,), (1371781327,), (1371781328,), (1371781330,), (1371781331,), (1371781336,), (1371781338,), (1371781339,), (1371781340,), (1371781341,), (1371781343,), (1371781373,), (1371781375,), (1371781379,), (1371781382,), (1371781385,), (1371781389,), (1371781419,), (1371781420,), (1371781422,), (1371781423,), (1371781425,), (1371781426,), (1371781428,), (1371781429,), (1371781431,), (1371781433,), (1371781435,), (1371781436,), (1371781456,), (1371781467,), (1371781472,), (1371781483,), (1371781484,), (1371781488,), (1371781513,), (1371781514,), (1371781516,), (1371781519,), (1371781522,), (1371781528,), (1371781565,), (1371781566,), (1371781568,), (1371781569,), (1371781578,), (1371781579,), (1371781580,), (1371781581,), (1371781584,), (1371781585,), (1371781586,), (1371781587,), (1371781601,), (1371781606,), (1371781608,), (1371781613,), (1371781617,), (1371781619,), (1371781651,), (1371781653,), (1371781655,), (1371781657,), (1371781659,), (1371781660,), (1371781691,), (1371781692,), (1371781695,), (1371781697,), (1371781699,), (1371781701,), (1371781703,), (1371781707,), (1371781708,), (1371781713,), (1371781714,), (1371781717,), (1371781729,), (1371781732,), (1371781734,), (1371781735,), (1371781743,), (1371781746,), (1371781774,), (1371781775,), (1371781777,), (1371781779,), (1371781781,), (1371781784,), (1371781791,), (1371781802,), (1371781805,), (1371781819,), (1371781825,), (1371781834,), (1371781877,), (1371781879,), (1371781881,), (1371781882,), (1371781883,), (1371781885,), (1371781922,), (1371781923,), (1371781925,), (1371781928,), (1371781931,), (1371781935,), (1371781942,), (1371781945,), (1371781949,), (1371781951,), (1371781954,), (1371781957,), (1371781987,), (1371781989,), (1371781993,), (1371781997,), (1371782000,), (1371782003,), (1371782050,), (1371782052,), (1371782055,), (1371782058,), (1371782061,), (1371782063,), (1371782085,), (1371782089,), (1371782092,), (1371782095,), (1371782099,), (1371782101,), (1371782136,), (1371782138,), (1371782139,), (1371782140,), (1371782142,), (1371782144,), (1371782162,), (1371782165,), (1371782168,), (1371782171,), (1371782172,), (1371782174,), (1371782199,), (1371782201,), (1371782204,), (1371782207,), (1371782209,), (1371782213,), (1371782221,), (1371782225,), (1371782228,), (1371782230,), (1371782232,), (1371782234,), (1371782276,), (1371782279,), (1371782282,), (1371782285,), (1371782289,), (1371782291,), (1371782360,), (1371782385,), (1371782419,), (1371782478,), (1371782524,), (1371782571,), (1371783353,), (1371783368,), (1371783373,), (1371783376,), (1371783379,), (1371783383,), (1371783631,), (1371783633,), (1371783648,), (1371783675,), (1371783698,), (1371784025,), (1371784051,), (1371784076,), (1371784106,), (1371784135,), (1371784162,), (1371784366,), (1371784367,), (1371784368,), (1371784369,), (1371784370,), (1371784371,), (1371784372,), (1371784373,), (1371784375,), (1371784376,), (1371784391,), (1371784398,), (1371784501,), (1371784524,), (1371784550,), (1371784573,), (1371784581,), (1371784588,), (1371784715,), (1371784717,), (1371784720,), (1371784722,), (1371784723,), (1371784725,), (1371784755,), (1371784756,), (1371784758,), (1371784760,), (1371784762,), (1371784765,), (1371784770,), (1371784772,), (1371784775,), (1371784778,), (1371784781,), (1371784785,), (1371784821,), (1371784824,), (1371784827,), (1371784829,), (1371784835,), (1371784843,), (1371784849,), (1371784851,), (1371784852,), (1371784854,), (1371784855,), (1371784857,), (1371784880,), (1371784883,), (1371784885,), (1371784887,), (1371784889,), (1371784890,), (1371784948,), (1371784949,), (1371784950,), (1371784952,), (1371784954,), (1371784956,), (1371784993,), (1371784996,), (1371785006,), (1371785011,), (1371785012,), (1371785015,), (1371785024,), (1371785027,), (1371785029,), (1371785031,), (1371785032,), (1371785034,), (1371785063,), (1371785065,), (1371785067,), (1371785069,), (1371785071,), (1371785074,), (1371785101,), (1371785102,), (1371785104,), (1371785105,), (1371785107,), (1371785108,), (1371785113,), (1371785116,), (1371785120,), (1371785126,), (1371785131,), (1371785133,), (1371785145,), (1371785147,), (1371785149,), (1371785151,), (1371785153,), (1371785154,), (1371785191,), (1371785192,), (1371785193,), (1371785194,), (1371785195,), (1371785196,), (1371785197,), (1371785198,), (1371785200,), (1371785201,), (1371785204,), (1371785205,), (1371785218,), (1371785220,), (1371785222,), (1371785223,), (1371785224,), (1371785225,), (1371785263,), (1371785266,), (1371785268,), (1371785270,), (1371785272,), (1371785274,), (1371785334,), (1371785335,), (1371785336,), (1371785337,), (1371785340,), (1371785357,), (1371785365,), (1371785368,), (1371785372,), (1371785374,), (1371785375,), (1371785376,), (1371785409,), (1371785411,), (1371785414,), (1371785417,), (1371785420,), (1371785424,), (1371785468,), (1371785470,), (1371785471,), (1371785473,), (1371785474,), (1371785475,), (1371785520,), (1371785521,), (1371785524,), (1371785525,), (1371785528,), (1371785529,), (1371785538,), (1371785540,), (1371785543,), (1371785544,), (1371785548,), (1371785551,), (1371785560,), (1371785564,), (1371785565,), (1371785569,), (1371785571,), (1371785573,), (1371785603,), (1371785604,), (1371785606,), (1371785608,), (1371785610,), (1371785614,), (1371785641,), (1371785644,), (1371785647,), (1371785650,), (1371785653,), (1371785656,), (1371785664,), (1371785668,), (1371785670,), (1371785680,), (1371785694,), (1371785703,), (1371785738,), (1371785740,), (1371785742,), (1371785743,), (1371785744,), (1371785745,), (1371785761,), (1371785772,), (1371785775,), (1371785779,), (1371785781,), (1371785783,), (1371785833,), (1371785836,), (1371785841,), (1371785846,), (1371785849,), (1371785851,), (1371785883,), (1371785886,), (1371785888,), (1371785890,), (1371785892,), (1371785894,), (1371785921,), (1371785922,), (1371785924,), (1371785925,), (1371785928,), (1371785929,), (1371785931,), (1371785933,), (1371785935,), (1371785936,), (1371785940,), (1371785941,), (1371785954,), (1371785956,), (1371785958,), (1371785961,), (1371785963,), (1371785965,), (1371786004,), (1371786007,), (1371786009,), (1371786011,), (1371786012,), (1371786013,), (1371786037,), (1371786040,), (1371786045,), (1371786049,), (1371786051,), (1371786053,), (1371786057,), (1371786061,), (1371786064,), (1371786066,), (1371786069,), (1371786070,), (1371786098,), (1371786099,), (1371786102,), (1371786105,), (1371786106,), (1371786110,), (1371786141,), (1371786142,), (1371786145,), (1371786147,), (1371786149,), (1371786152,), (1371786153,), (1371786155,), (1371786156,), (1371786158,), (1371786159,), (1371786160,), (1371786178,), (1371786179,), (1371786188,), (1371786198,), (1371786202,), (1371786206,), (1371786220,), (1371786222,), (1371786223,), (1371786225,), (1371786227,), (1371786246,), (1371786357,), (1371786383,), (1371786412,), (1371786437,), (1371786441,), (1371786442,), (1371786511,), (1371786516,), (1371786524,), (1371786547,), (1371786551,), (1371786552,), (1371786696,), (1371786700,), (1371786702,), (1371786705,), (1371786707,), (1371786708,), (1371786741,), (1371786742,), (1371786744,), (1371786746,), (1371786748,), (1371786751,), (1371786782,), (1371786783,), (1371786784,), (1371786785,), (1371786786,), (1371786787,), (1371786788,), (1371786789,), (1371786791,), (1371786792,), (1371786795,), (1371786796,), (1371786804,), (1371786808,), (1371786809,), (1371786811,), (1371786813,), (1371786815,), (1371786856,), (1371786859,), (1371786860,), (1371786862,), (1371786865,), (1371786866,), (1371786892,), (1371786894,), (1371786895,), (1371786897,), (1371786900,), (1371786902,), (1371786909,), (1371786912,), (1371786915,), (1371786918,), (1371786921,), (1371786923,), (1371786956,), (1371786957,), (1371786958,), (1371786959,), (1371786960,), (1371786962,), (1371786986,), (1371786988,), (1371786990,), (1371786992,), (1371786999,), (1371787008,), (1371787018,), (1371787019,), (1371787023,), (1371787027,), (1371787029,), (1371787031,), (1371787112,), (1371787115,), (1371787117,), (1371787118,), (1371787120,), (1371787122,), (1371787281,), (1371787285,), (1371787309,), (1371787315,), (1371787322,), (1371787323,), (1371787427,), (1371787429,), (1371787454,), (1371787456,), (1371787482,), (1371787485,), (1371787502,), (1371787503,), (1371787505,), (1371787506,), (1371787509,), (1371787510,), (1371787518,), (1371787519,), (1371787521,), (1371787525,), (1371787528,), (1371787530,), (1371787830,), (1371787852,), (1371787875,), (1371787900,), (1371787922,), (1371787947,), (1371788242,), (1371788253,), (1371788289,), (1371788330,), (1371788352,), (1371788398,), (1371788587,), (1371788639,), (1371788687,), (1371788727,), (1371788770,), (1371788952,), (1371788977,), (1371789000,), (1371789027,), (1371789052,), (1371789093,), (1371789493,), (1371789524,), (1371789552,), (1371789574,), (1371789598,), (1371789626,), (1371789757,), (1371789769,), (1371789772,), (1371789775,), (1371789778,), (1371789781,), (1371789944,), (1371789968,), (1371789996,), (1371790020,), (1371790028,), (1371790034,), (1371790201,), (1371790202,), (1371790205,), (1371790206,), (1371790209,), (1371790210,), (1371790212,), (1371790213,), (1371790215,), (1371790217,), (1371790220,), (1371790221,), (1371790236,), (1371790244,), (1371790248,), (1371790251,), (1371790253,), (1371790255,), (1371790281,), (1371790283,), (1371790286,), (1371790287,), (1371790290,), (1371790293,), (1371790327,), (1371790330,), (1371790332,), (1371790335,), (1371790339,), (1371790344,), (1371790360,), (1371790362,), (1371790365,), (1371790369,), (1371790375,), (1371790378,), (1371790417,), (1371790418,), (1371790421,), (1371790423,), (1371790425,), (1371790427,), (1371790477,), (1371790481,), (1371790485,), (1371790488,), (1371790493,), (1371790497,), (1371790506,), (1371790510,), (1371790512,), (1371790515,), (1371790518,), (1371790520,), (1371790569,), (1371790571,), (1371790573,), (1371790576,), (1371790579,), (1371790580,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'12072025': {'nb_upload': 84, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24872568]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1371790580, 1371790579, 1371790576, 1371790573, 1371790571, 1371790569] map_info['map_portfolio_photo'] : {24872568: [1371790580, 1371790579, 1371790576, 1371790573, 1371790571, 1371790569, 1371790520, 1371790518, 1371790515, 1371790512, 1371790510, 1371790506, 1371790497, 1371790493, 1371790488, 1371790485, 1371790481, 1371790477, 1371790427, 1371790425, 1371790423, 1371790421, 1371790418, 1371790417, 1371790378, 1371790375, 1371790369, 1371790365, 1371790362, 1371790360, 1371790344, 1371790339, 1371790335, 1371790332, 1371790330, 1371790327, 1371790293, 1371790290, 1371790287, 1371790286, 1371790283, 1371790281, 1371790255, 1371790253, 1371790251, 1371790248, 1371790244, 1371790236, 1371790221, 1371790220, 1371790217, 1371790215, 1371790213, 1371790212, 1371790210, 1371790209, 1371790206, 1371790205, 1371790202, 1371790201, 1371790034, 1371790028, 1371790020, 1371789996, 1371789968, 1371789944, 1371789781, 1371789778, 1371789775, 1371789772, 1371789769, 1371789757, 1371789626, 1371789598, 1371789574, 1371789552, 1371789524, 1371789493, 1371789093, 1371789052, 1371789027, 1371789000, 1371788977, 1371788952]} final : True mtd_id 4302 list_pids : [1371790580, 1371790579, 1371790576, 1371790573, 1371790571, 1371790569] Looping around the photos to save general results len do output : 1 /24872568Didn'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, '3274520') ('4302', '24872568', '1371790580', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790579', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790576', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790573', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790571', None, None, None, None, None, '3274520') ('4302', None, None, None, None, None, None, None, '3274520') ('4302', '24872568', '1371790569', None, None, None, None, None, '3274520') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 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, '24872568', 'None', None, None, None, None, '3274520'), ('4302', '24872568', '1371790580', None, None, None, None, None, '3274520'), ('4302', '24872568', '1371790579', None, None, None, None, None, '3274520'), ('4302', '24872568', '1371790576', None, None, None, None, None, '3274520'), ('4302', '24872568', '1371790573', None, None, None, None, None, '3274520'), ('4302', '24872568', '1371790571', None, None, None, None, None, '3274520'), ('4302', '24872568', '1371790569', None, None, None, None, None, '3274520')] time used for this insertion : 0.07992839813232422 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4228565692901611 time spend to save output : 0.08008646965026855 total time spend for step 5 : 1.5029430389404297 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 (3274520) 2.10user 2.46system 0:11.31elapsed 40%CPU (0avgtext+0avgdata 159304maxresident)k 8inputs+17104outputs (1major+64062minor)pagefaults 0swaps