python /home/admin/mtr/script_for_cron.py -j datou_current3 -m 20 -a ' -a 4742 -v ' -s datou_current_4742 -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='4742', 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 : 2842267 load datou : 4742 # 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 ! 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 13169 copy_chis is not consistent : 2 used against 1 in the step definition ! WARNING : number of outputs for step 13170 consolidate_hashtags_from_manual_portfolio is not consistent : 2 used against 1 in the step definition ! WARNING : number of inputs for step 13167 rle_unique_nms_with_priority is not consistent : 3 used against 1 in the step definition ! WARNING : number of outputs for step 13167 rle_unique_nms_with_priority is not consistent : 2 used against 1 in the step definition ! WARNING : number of outputs for step 13174 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 13168 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! Step 13171 blur_detection have less inputs used (0) than in the step definition (1) : maybe we manage optionnal inputs ! Step 13172 brightness have less inputs used (0) than in the step definition (1) : maybe we manage optionnal inputs ! Step 13173 send_mail_cod have less inputs used (4) than in the step definition (5) : maybe we manage optionnal inputs ! Step 13175 split_time_score have less inputs used (1) than in the step definition (2) : 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 13169 have datatype=11 whereas input 0 of step 13167 have datatype=2 WARNING : type of output 1 of step 13170 doesn't seem to be define in the database( WARNING : type of input 3 of step 13168 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : type of output 1 of step 13170 doesn't seem to be define in the database( WARNING : type of input 1 of step 13167 doesn't seem to be define in the database( WARNING : output 0 of step 13174 have datatype=10 whereas input 3 of step 13173 have datatype=6 WARNING : type of input 1 of step 13174 doesn't seem to be define in the database( WARNING : output 1 of step 13167 have datatype=7 whereas input 1 of step 13174 have datatype=None WARNING : type of output 1 of step 13174 doesn't seem to be define in the database( WARNING : type of input 4 of step 13168 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : type of output 1 of step 13169 doesn't seem to be define in the database( WARNING : type of input 1 of step 13170 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 : id de la photo (peut être local ou global) was removed should we ? donnée sous forme de nombre was removed should we ? None was removed should we ? donnée sous forme de texte was removed should we ? chemin de la photo was removed should we ? donnée sous forme de texte was removed should we ? [ (photo_id, photo_id_loc, hashtag_type, x0, x1, y0, y1, score), ...] was removed should we ? 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 ? chemin de la photo was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? chemin de la photo 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 ? (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 4742 [] 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 = 4742 order by created_at desc LIMIT 1 no input labels no input values UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2559007) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2559007) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20009037 AND hide_status = 0 list_input_json: {} Current got : datou_id : 4742, datou_cur_ids : ['2559007'] with mtr_portfolio_ids : ['20009037'] and first list_photo_ids : [] new path : /proc/2842267/ Name: python3 Umask: 0002 State: R (running) Tgid: 2842267 Ngid: 0 Pid: 2842267 PPid: 2842263 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2842267 NSpid: 2842267 NSpgid: 2841537 NSsid: 2841537 VmPeak: 1106840 kB VmSize: 1106840 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98468 kB VmRSS: 98468 kB RssAnon: 59752 kB RssFile: 38716 kB RssShmem: 0 kB VmData: 865592 kB VmStk: 132 kB VmExe: 2640 kB VmLib: 130468 kB VmPTE: 556 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 46 nonvoluntary_ctxt_switches: 184 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2842267', 'Ngid': '0', 'Pid': '2842267', 'PPid': '2842263', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2842267', 'NSpid': '2842267', 'NSpgid': '2841537', 'NSsid': '2841537', 'VmPeak': '1106840 kB', 'VmSize': '1106840 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98468 kB', 'VmRSS': '98468 kB', 'RssAnon': '59752 kB', 'RssFile': '38716 kB', 'RssShmem': '0 kB', 'VmData': '865592 kB', 'VmStk': '132 kB', 'VmExe': '2640 kB', 'VmLib': '130468 kB', 'VmPTE': '556 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '46', 'nonvoluntary_ctxt_switches': '184'} ('datou_batch_current', '2842267', '1106840', '0', '1106840', '865592', '98468', b'', 'marlene', '2559007') 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=4742 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=4742 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= 4742 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=4742 # 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 ! 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 13169 copy_chis is not consistent : 2 used against 1 in the step definition ! WARNING : number of outputs for step 13170 consolidate_hashtags_from_manual_portfolio is not consistent : 2 used against 1 in the step definition ! WARNING : number of inputs for step 13167 rle_unique_nms_with_priority is not consistent : 3 used against 1 in the step definition ! WARNING : number of outputs for step 13167 rle_unique_nms_with_priority is not consistent : 2 used against 1 in the step definition ! WARNING : number of outputs for step 13174 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 13168 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! Step 13171 blur_detection have less inputs used (0) than in the step definition (1) : maybe we manage optionnal inputs ! Step 13172 brightness have less inputs used (0) than in the step definition (1) : maybe we manage optionnal inputs ! Step 13173 send_mail_cod have less inputs used (4) than in the step definition (5) : maybe we manage optionnal inputs ! Step 13175 split_time_score have less inputs used (1) than in the step definition (2) : 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 13169 have datatype=11 whereas input 0 of step 13167 have datatype=2 WARNING : type of output 1 of step 13170 doesn't seem to be define in the database( WARNING : type of input 3 of step 13168 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : type of output 1 of step 13170 doesn't seem to be define in the database( WARNING : type of input 1 of step 13167 doesn't seem to be define in the database( WARNING : output 0 of step 13174 have datatype=10 whereas input 3 of step 13173 have datatype=6 WARNING : type of input 1 of step 13174 doesn't seem to be define in the database( WARNING : output 1 of step 13167 have datatype=7 whereas input 1 of step 13174 have datatype=None WARNING : type of output 1 of step 13174 doesn't seem to be define in the database( WARNING : type of input 4 of step 13168 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : type of output 1 of step 13169 doesn't seem to be define in the database( WARNING : type of input 1 of step 13170 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 : copy_chis, consolidate_hashtags_from_manual_portfolio, rle_unique_nms_with_priority, ventilate_hashtags_in_portfolio, final, blur_detection, brightness, send_mail_cod, split_time_score over limit max, limiting to limit_max 100 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 (20009037) 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 (2559007 ) ) ORDER BY ph.photo_id DESC LIMIT 0, 100 We have 3 , {} SELECT mtr_photo_id, mtr_portfolio_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (20009037) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 100 list_result: [{'photo_id': 1332248772, 'portfolio_id': 20009037}, {'photo_id': 1332248767, 'portfolio_id': 20009037}, {'photo_id': 1332248764, 'portfolio_id': 20009037}, {'photo_id': 1332248760, 'portfolio_id': 20009037}, {'photo_id': 1332248757, 'portfolio_id': 20009037}, {'photo_id': 1332248754, 'portfolio_id': 20009037}] map_portfolio_id_photo_id: {20009037: [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754]} ##### Call download_photos : nb_thread : 1 begin to download photo : 1332248772 download finish for photo 1332248772 begin to download photo : 1332248767 download finish for photo 1332248767 begin to download photo : 1332248764 download finish for photo 1332248764 begin to download photo : 1332248760 download finish for photo 1332248760 begin to download photo : 1332248757 download finish for photo 1332248757 begin to download photo : 1332248754 download finish for photo 1332248754 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 6 ; length of list_pids : 6 ; length of list_args : 6 ##### After load_data_input time to download the photos : 4.357388257980347 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load we should then remove the video here, and this would fix the bug of datou_current ! Calling datou_exec Inside datou_exec : verbose : True number of steps : 9 step1:copy_chis Thu Feb 6 09:24:32 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 (20009037) Here we display some param of map_info ! map_filenames : {'temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg': 1332248772, 'temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg': 1332248767, 'temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg': 1332248764, 'temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg': 1332248760, 'temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg': 1332248757, 'temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg': 1332248754} map_photo_id_path_extension : {1332248772: {'path': 'temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg', 'extension': 'jpg'}, 1332248767: {'path': 'temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg', 'extension': 'jpg'}, 1332248764: {'path': 'temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg', 'extension': 'jpg'}, 1332248760: {'path': 'temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg', 'extension': 'jpg'}, 1332248757: {'path': 'temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg', 'extension': 'jpg'}, 1332248754: {'path': 'temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg', 'extension': 'jpg'}} map_subphoto_mainphoto : {} Begin step datou_step_copy_crop processing picture : temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg processing picture : temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg processing picture : temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg processing picture : temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg processing picture : temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg processing picture : temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg batch 1 select photo_id, hashtag_id, `type`, x0, x1, y0, y1, score, id from MTRPhoto.crop_hashtag_ids where photo_id in ( 1332248772,1332248767,1332248764,1332248760,1332248757,1332248754) and `type` in (4855) and score>0.01and hashtag_id in (493061979,493012381) Loaded 50 chid ids of type : 4855 SELECT crop_hashtag_id, points FROM MTRPhoto.crop_polygon_points WHERE crop_hashtag_id in (3640552787,3640552795,3640552794,3640552797,3640552796,3640552799,3640552791,3640552789,3640552793,3640552792,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640550692,3640550708,3640550748,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640548749,3640548757,3640548771,3640548754,3640548779,3640548809,3640548770,3640544061,3640544083,3640544126,3640544120,3640544117,3640544112,3640544064,3640544087,3640544081,3640544098,3640544128,3640544065) SELECT * FROM MTRPhoto.crop_segments WHERE crop_hashtag_id in (3640552787,3640552795,3640552794,3640552797,3640552796,3640552799,3640552791,3640552789,3640552793,3640552792,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640550692,3640550708,3640550748,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640548749,3640548757,3640548771,3640548754,3640548779,3640548809,3640548770,3640544061,3640544083,3640544126,3640544120,3640544117,3640544112,3640544064,3640544087,3640544081,3640544098,3640544128,3640544065) SELECT * FROM MTRPhoto.crop_sum_segments WHERE crop_hashtag_id in (3640552787,3640552795,3640552794,3640552797,3640552796,3640552799,3640552791,3640552789,3640552793,3640552792,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640550692,3640550708,3640550748,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640548749,3640548757,3640548771,3640548754,3640548779,3640548809,3640548770,3640544061,3640544083,3640544126,3640544120,3640544117,3640544112,3640544064,3640544087,3640544081,3640544098,3640544128,3640544065) insert ignore into MTRPhoto.crop_hashtag_ids (photo_id, hashtag_id, `type`,x0,x1,y0,y1,score) VALUES (%s,%s,%s,%s,%s,%s,%s,%s) batch 1 Loaded 314 chid ids of type : 4857 Number RLEs to save : 0 TO DO : save crop sub photo not yet done ! map_nb_chis : {1332248754: 10, 1332248757: 9, 1332248760: 3, 1332248764: 9, 1332248767: 7, 1332248772: 12} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20009037]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : copy_chis we use saveGeneral [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754] map_info['map_portfolio_photo'] : {20009037: [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754]} final : False mtd_id 4742 list_pids : [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754] Looping around the photos to save general results len do output : 6 /1332248754Didn't retrieve data . /1332248757Didn't retrieve data . /1332248760Didn't retrieve data . /1332248764Didn't retrieve data . /1332248767Didn't retrieve data . /1332248772Didn'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 ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248772', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248767', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248764', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248760', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248757', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248754', None, None, None, None, None, '2559007') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4742', '20009037', '1332248754', 'None', None, None, None, None, '2559007'), ('4742', '20009037', '1332248757', 'None', None, None, None, None, '2559007'), ('4742', '20009037', '1332248760', 'None', None, None, None, None, '2559007'), ('4742', '20009037', '1332248764', 'None', None, None, None, None, '2559007'), ('4742', '20009037', '1332248767', 'None', None, None, None, None, '2559007'), ('4742', '20009037', '1332248772', 'None', None, None, None, None, '2559007')] time used for this insertion : 0.10579919815063477 save_final save missing photos in datou_result : time spend for datou_step_exec : 10.530344247817993 time spend to save output : 0.10613298416137695 total time spend for step 1 : 10.63647723197937 step2:consolidate_hashtags_from_manual_portfolio Thu Feb 6 09:24:43 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 ! 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 (20009037) Here we display some param of map_info ! map_filenames : {'temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg': 1332248772, 'temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg': 1332248767, 'temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg': 1332248764, 'temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg': 1332248760, 'temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg': 1332248757, 'temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg': 1332248754} map_photo_id_path_extension : {1332248772: {'path': 'temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg', 'extension': 'jpg'}, 1332248767: {'path': 'temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg', 'extension': 'jpg'}, 1332248764: {'path': 'temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg', 'extension': 'jpg'}, 1332248760: {'path': 'temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg', 'extension': 'jpg'}, 1332248757: {'path': 'temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg', 'extension': 'jpg'}, 1332248754: {'path': 'temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg', 'extension': 'jpg'}} map_subphoto_mainphoto : {} beginning of datou step consolidate_hashtags_from_manual_portfolio Iterating over portfolio : 20009037 on est dans le IF portfolio mere 26T 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`=20009037 AND mptpi.`type`=4856 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','carton','metal','pet_clair','pehd','flux_dev','film_dev_souple','ela','sac_om_plein','textiles','verre','organique','dasri','masque','encombrant','autre_non_emballage','environnement','mal_croppe','flou')) To do 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`=20009037 AND mptpi.`type`=4857 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','carton','metal','pet_clair','pehd','flux_dev','film_dev_souple','ela','sac_om_plein','textiles','verre','organique','dasri','masque','encombrant','autre_non_emballage','environnement','mal_croppe','flou')) To do 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`=9745827 AND mptpi.`type`=4856 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','carton','metal','pet_clair','pehd','flux_dev','film_dev_souple','ela','sac_om_plein','textiles','verre','organique','dasri','masque','encombrant','autre_non_emballage','environnement','mal_croppe','flou')) To do TODO : # On doit donc construire les chi a partir des informations dans les photos filles query : SELECT ph.photo_id FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20015439 AND mpp.hide_status=0 ORDER BY ph.size desc SELECT distinct chi.photo_id FROM MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids csp WHERE chi.id=csp.crop_hashtag_id AND chi.type=4855 AND csp.sub_photo_id IN (1332286186,1332287363,1332287280,1332286614,1332286599,1332286585,1332286568,1332286546,1332286517,1332286475,1332286459,1332286194,1332286191,1332286190,1332286157,1332286185,1332286182,1332286178,1332286177,1332286176,1332286175,1332286172,1332286171,1332286169,1332286168,1332286167,1332286160,1332286158) batch 1 select photo_id, hashtag_id, `type`, x0, x1, y0, y1, score, id from MTRPhoto.crop_hashtag_ids where photo_id in ( 1332248772,1332248767,1332248764,1332248760,1332248757,1332248754) and `type` in (4855) Loaded 373 chid ids of type : 4855 SELECT crop_hashtag_id, points FROM MTRPhoto.crop_polygon_points WHERE crop_hashtag_id in (3640552790,3640552798,3640552788,3640552787,3640552795,3640552794,3640552797,3640552796,3640552799,3640552791,3640552789,3640552793,3640552792,3640552540,3640552513,3640552475,3640552514,3640552506,3640552519,3640552505,3640552489,3640552545,3640552527,3640552517,3640552502,3640552501,3640552493,3640552530,3640552547,3640552490,3640552555,3640552546,3640552536,3640552510,3640552515,3640552504,3640552520,3640552483,3640552529,3640552538,3640552524,3640552508,3640552516,3640552494,3640552544,3640552487,3640552523,3640552507,3640552495,3640552543,3640552521,3640552509,3640552535,3640552534,3640552522,3640552532,3640552539,3640552500,3640552488,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640552482,3640552476,3640552486,3640552484,3640552512,3640552533,3640552541,3640552492,3640552551,3640552503,3640552498,3640552531,3640552479,3640552542,3640552497,3640552491,3640552485,3640552480,3640552481,3640552477,3640552518,3640552526,3640552548,3640552496,3640552528,3640552550,3640552553,3640550749,3640550722,3640550706,3640550745,3640550709,3640550726,3640550739,3640550725,3640550716,3640550713,3640550743,3640550738,3640550711,3640550730,3640550721,3640550729,3640550744,3640550737,3640550733,3640550695,3640550714,3640550717,3640550697,3640550723,3640550699,3640550741,3640550740,3640550698,3640550692,3640550708,3640550748,3640550720,3640550736,3640550746,3640550694,3640550724,3640550715,3640550701,3640550735,3640550707,3640550702,3640550731,3640550742,3640550703,3640550700,3640550719,3640550734,3640550728,3640550693,3640550747,3640550718,3640550712,3640550732,3640550727,3640550704,3640550696,3640550705,3640550710,3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494,3640548751,3640548761,3640548765,3640548789,3640548780,3640548782,3640548792,3640548786,3640548763,3640548785,3640548798,3640548800,3640548808,3640548764,3640548773,3640548806,3640548790,3640548802,3640548762,3640548807,3640548750,3640548768,3640548783,3640548810,3640548758,3640548804,3640548805,3640548797,3640548767,3640548794,3640548784,3640548753,3640548781,3640548791,3640548752,3640548756,3640548749,3640548757,3640548771,3640548754,3640548779,3640548809,3640548770,3640548772,3640548776,3640548778,3640548787,3640548777,3640548796,3640548803,3640548759,3640548801,3640548760,3640548775,3640548793,3640548788,3640548755,3640548766,3640548795,3640548769,3640548774,3640548799,3640544108,3640544068,3640544078,3640544109,3640544095,3640544088,3640544080,3640544127,3640544077,3640544119,3640544099,3640544096,3640544116,3640544074,3640544093,3640544066,3640544082,3640544089,3640544103,3640544067,3640544102,3640544069,3640544111,3640544091,3640544090,3640544070,3640544063,3640544114,3640544094,3640544079,3640544101,3640544062,3640544076,3640544073,3640544104,3640544092,3640544106,3640544118,3640544129,3640544110,3640544115,3640544086,3640544100,3640544097,3640544105,3640544121,3640544061,3640544083,3640544126,3640544120,3640544117,3640544112,3640544064,3640544087,3640544081,3640544098,3640544128,3640544065,3640544071,3640544107,3640544123,3640544125,3640544122,3640544085,3640544084,3640544072,3640544075,3640544130,3640544124,3640544113) SELECT * FROM MTRPhoto.crop_segments WHERE crop_hashtag_id in (3640552790,3640552798,3640552788,3640552787,3640552795,3640552794,3640552797,3640552796,3640552799,3640552791,3640552789,3640552793,3640552792,3640552540,3640552513,3640552475,3640552514,3640552506,3640552519,3640552505,3640552489,3640552545,3640552527,3640552517,3640552502,3640552501,3640552493,3640552530,3640552547,3640552490,3640552555,3640552546,3640552536,3640552510,3640552515,3640552504,3640552520,3640552483,3640552529,3640552538,3640552524,3640552508,3640552516,3640552494,3640552544,3640552487,3640552523,3640552507,3640552495,3640552543,3640552521,3640552509,3640552535,3640552534,3640552522,3640552532,3640552539,3640552500,3640552488,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640552482,3640552476,3640552486,3640552484,3640552512,3640552533,3640552541,3640552492,3640552551,3640552503,3640552498,3640552531,3640552479,3640552542,3640552497,3640552491,3640552485,3640552480,3640552481,3640552477,3640552518,3640552526,3640552548,3640552496,3640552528,3640552550,3640552553,3640550749,3640550722,3640550706,3640550745,3640550709,3640550726,3640550739,3640550725,3640550716,3640550713,3640550743,3640550738,3640550711,3640550730,3640550721,3640550729,3640550744,3640550737,3640550733,3640550695,3640550714,3640550717,3640550697,3640550723,3640550699,3640550741,3640550740,3640550698,3640550692,3640550708,3640550748,3640550720,3640550736,3640550746,3640550694,3640550724,3640550715,3640550701,3640550735,3640550707,3640550702,3640550731,3640550742,3640550703,3640550700,3640550719,3640550734,3640550728,3640550693,3640550747,3640550718,3640550712,3640550732,3640550727,3640550704,3640550696,3640550705,3640550710,3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494,3640548751,3640548761,3640548765,3640548789,3640548780,3640548782,3640548792,3640548786,3640548763,3640548785,3640548798,3640548800,3640548808,3640548764,3640548773,3640548806,3640548790,3640548802,3640548762,3640548807,3640548750,3640548768,3640548783,3640548810,3640548758,3640548804,3640548805,3640548797,3640548767,3640548794,3640548784,3640548753,3640548781,3640548791,3640548752,3640548756,3640548749,3640548757,3640548771,3640548754,3640548779,3640548809,3640548770,3640548772,3640548776,3640548778,3640548787,3640548777,3640548796,3640548803,3640548759,3640548801,3640548760,3640548775,3640548793,3640548788,3640548755,3640548766,3640548795,3640548769,3640548774,3640548799,3640544108,3640544068,3640544078,3640544109,3640544095,3640544088,3640544080,3640544127,3640544077,3640544119,3640544099,3640544096,3640544116,3640544074,3640544093,3640544066,3640544082,3640544089,3640544103,3640544067,3640544102,3640544069,3640544111,3640544091,3640544090,3640544070,3640544063,3640544114,3640544094,3640544079,3640544101,3640544062,3640544076,3640544073,3640544104,3640544092,3640544106,3640544118,3640544129,3640544110,3640544115,3640544086,3640544100,3640544097,3640544105,3640544121,3640544061,3640544083,3640544126,3640544120,3640544117,3640544112,3640544064,3640544087,3640544081,3640544098,3640544128,3640544065,3640544071,3640544107,3640544123,3640544125,3640544122,3640544085,3640544084,3640544072,3640544075,3640544130,3640544124,3640544113) SELECT * FROM MTRPhoto.crop_sum_segments WHERE crop_hashtag_id in (3640552790,3640552798,3640552788,3640552787,3640552795,3640552794,3640552797,3640552796,3640552799,3640552791,3640552789,3640552793,3640552792,3640552540,3640552513,3640552475,3640552514,3640552506,3640552519,3640552505,3640552489,3640552545,3640552527,3640552517,3640552502,3640552501,3640552493,3640552530,3640552547,3640552490,3640552555,3640552546,3640552536,3640552510,3640552515,3640552504,3640552520,3640552483,3640552529,3640552538,3640552524,3640552508,3640552516,3640552494,3640552544,3640552487,3640552523,3640552507,3640552495,3640552543,3640552521,3640552509,3640552535,3640552534,3640552522,3640552532,3640552539,3640552500,3640552488,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640552482,3640552476,3640552486,3640552484,3640552512,3640552533,3640552541,3640552492,3640552551,3640552503,3640552498,3640552531,3640552479,3640552542,3640552497,3640552491,3640552485,3640552480,3640552481,3640552477,3640552518,3640552526,3640552548,3640552496,3640552528,3640552550,3640552553,3640550749,3640550722,3640550706,3640550745,3640550709,3640550726,3640550739,3640550725,3640550716,3640550713,3640550743,3640550738,3640550711,3640550730,3640550721,3640550729,3640550744,3640550737,3640550733,3640550695,3640550714,3640550717,3640550697,3640550723,3640550699,3640550741,3640550740,3640550698,3640550692,3640550708,3640550748,3640550720,3640550736,3640550746,3640550694,3640550724,3640550715,3640550701,3640550735,3640550707,3640550702,3640550731,3640550742,3640550703,3640550700,3640550719,3640550734,3640550728,3640550693,3640550747,3640550718,3640550712,3640550732,3640550727,3640550704,3640550696,3640550705,3640550710,3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494,3640548751,3640548761,3640548765,3640548789,3640548780,3640548782,3640548792,3640548786,3640548763,3640548785,3640548798,3640548800,3640548808,3640548764,3640548773,3640548806,3640548790,3640548802,3640548762,3640548807,3640548750,3640548768,3640548783,3640548810,3640548758,3640548804,3640548805,3640548797,3640548767,3640548794,3640548784,3640548753,3640548781,3640548791,3640548752,3640548756,3640548749,3640548757,3640548771,3640548754,3640548779,3640548809,3640548770,3640548772,3640548776,3640548778,3640548787,3640548777,3640548796,3640548803,3640548759,3640548801,3640548760,3640548775,3640548793,3640548788,3640548755,3640548766,3640548795,3640548769,3640548774,3640548799,3640544108,3640544068,3640544078,3640544109,3640544095,3640544088,3640544080,3640544127,3640544077,3640544119,3640544099,3640544096,3640544116,3640544074,3640544093,3640544066,3640544082,3640544089,3640544103,3640544067,3640544102,3640544069,3640544111,3640544091,3640544090,3640544070,3640544063,3640544114,3640544094,3640544079,3640544101,3640544062,3640544076,3640544073,3640544104,3640544092,3640544106,3640544118,3640544129,3640544110,3640544115,3640544086,3640544100,3640544097,3640544105,3640544121,3640544061,3640544083,3640544126,3640544120,3640544117,3640544112,3640544064,3640544087,3640544081,3640544098,3640544128,3640544065,3640544071,3640544107,3640544123,3640544125,3640544122,3640544085,3640544084,3640544072,3640544075,3640544130,3640544124,3640544113) begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 20023595, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015439; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =20023595 and b.mtr_portfolio_id = 20015439; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 11609166, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015439; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =11609166 and b.mtr_portfolio_id = 20015439; TODO : # On doit donc construire les chi a partir des informations dans les photos filles query : SELECT ph.photo_id FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20015440 AND mpp.hide_status=0 ORDER BY ph.size desc SELECT distinct chi.photo_id FROM MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids csp WHERE chi.id=csp.crop_hashtag_id AND chi.type=4855 AND csp.sub_photo_id IN (1332286529,1332286541,1332286540,1332286539,1332286538,1332286536,1332286535,1332286534,1332286533,1332286532,1332286531,1332286530,1332286542,1332286528,1332286527,1332286526,1332286525,1332286521,1332286518,1332286516,1332286515,1332286514,1332286513,1332286512,1332286606,1332287733,1332287705,1332287659,1332287651,1332287366,1332287274,1332287272,1332287253,1332286613,1332286612,1332286610,1332286511,1332286604,1332286603,1332286553,1332286552,1332286550,1332286549,1332286548,1332286547,1332286545,1332286544,1332286543,1332286462,1332286474,1332286473,1332286472,1332286471,1332286470,1332286469,1332286468,1332286467,1332286466,1332286465,1332286463,1332286476,1332286461,1332286460,1332286458,1332286192,1332286189,1332286181,1332286179,1332286170,1332286166,1332286163,1332286162,1332286492,1332286510,1332286509,1332286508,1332286507,1332286505,1332286503,1332286500,1332286499,1332286496,1332286495,1332286493,1332286161,1332286491,1332286490,1332286489,1332286487,1332286485,1332286484,1332286483,1332286482,1332286481,1332286480,1332286479) batch 1 select photo_id, hashtag_id, `type`, x0, x1, y0, y1, score, id from MTRPhoto.crop_hashtag_ids where photo_id in ( 1332248772,1332248767,1332248760,1332248757,1332248764) and `type` in (4855) Loaded 360 chid ids of type : 4855 SELECT crop_hashtag_id, points FROM MTRPhoto.crop_polygon_points WHERE crop_hashtag_id in (3640552540,3640552513,3640552475,3640552514,3640552506,3640552519,3640552505,3640552489,3640552545,3640552527,3640552517,3640552502,3640552501,3640552493,3640552530,3640552547,3640552490,3640552555,3640552546,3640552536,3640552510,3640552515,3640552504,3640552520,3640552483,3640552529,3640552538,3640552524,3640552508,3640552516,3640552494,3640552544,3640552487,3640552523,3640552507,3640552495,3640552543,3640552521,3640552509,3640552535,3640552534,3640552522,3640552532,3640552539,3640552500,3640552488,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640552482,3640552476,3640552486,3640552484,3640552512,3640552533,3640552541,3640552492,3640552551,3640552503,3640552498,3640552531,3640552479,3640552542,3640552497,3640552491,3640552485,3640552480,3640552481,3640552477,3640552518,3640552526,3640552548,3640552496,3640552528,3640552550,3640552553,3640550749,3640550722,3640550706,3640550745,3640550709,3640550726,3640550739,3640550725,3640550716,3640550713,3640550743,3640550738,3640550711,3640550730,3640550721,3640550729,3640550744,3640550737,3640550733,3640550695,3640550714,3640550717,3640550697,3640550723,3640550699,3640550741,3640550740,3640550698,3640550692,3640550708,3640550748,3640550720,3640550736,3640550746,3640550694,3640550724,3640550715,3640550701,3640550735,3640550707,3640550702,3640550731,3640550742,3640550703,3640550700,3640550719,3640550734,3640550728,3640550693,3640550747,3640550718,3640550712,3640550732,3640550727,3640550704,3640550696,3640550705,3640550710,3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494,3640548751,3640548761,3640548765,3640548789,3640548780,3640548782,3640548792,3640548786,3640548763,3640548785,3640548798,3640548800,3640548808,3640548764,3640548773,3640548806,3640548790,3640548802,3640548762,3640548807,3640548750,3640548768,3640548783,3640548810,3640548758,3640548804,3640548805,3640548797,3640548767,3640548794,3640548784,3640548753,3640548781,3640548791,3640548752,3640548756,3640548749,3640548757,3640548771,3640548754,3640548779,3640548809,3640548770,3640548772,3640548776,3640548778,3640548787,3640548777,3640548796,3640548803,3640548759,3640548801,3640548760,3640548775,3640548793,3640548788,3640548755,3640548766,3640548795,3640548769,3640548774,3640548799,3640544108,3640544068,3640544078,3640544109,3640544095,3640544088,3640544080,3640544127,3640544077,3640544119,3640544099,3640544096,3640544116,3640544074,3640544093,3640544066,3640544082,3640544089,3640544103,3640544067,3640544102,3640544069,3640544111,3640544091,3640544090,3640544070,3640544063,3640544114,3640544094,3640544079,3640544101,3640544062,3640544076,3640544073,3640544104,3640544092,3640544106,3640544118,3640544129,3640544110,3640544115,3640544086,3640544100,3640544097,3640544105,3640544121,3640544061,3640544083,3640544126,3640544120,3640544117,3640544112,3640544064,3640544087,3640544081,3640544098,3640544128,3640544065,3640544071,3640544107,3640544123,3640544125,3640544122,3640544085,3640544084,3640544072,3640544075,3640544130,3640544124,3640544113) SELECT * FROM MTRPhoto.crop_segments WHERE crop_hashtag_id in (3640552540,3640552513,3640552475,3640552514,3640552506,3640552519,3640552505,3640552489,3640552545,3640552527,3640552517,3640552502,3640552501,3640552493,3640552530,3640552547,3640552490,3640552555,3640552546,3640552536,3640552510,3640552515,3640552504,3640552520,3640552483,3640552529,3640552538,3640552524,3640552508,3640552516,3640552494,3640552544,3640552487,3640552523,3640552507,3640552495,3640552543,3640552521,3640552509,3640552535,3640552534,3640552522,3640552532,3640552539,3640552500,3640552488,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640552482,3640552476,3640552486,3640552484,3640552512,3640552533,3640552541,3640552492,3640552551,3640552503,3640552498,3640552531,3640552479,3640552542,3640552497,3640552491,3640552485,3640552480,3640552481,3640552477,3640552518,3640552526,3640552548,3640552496,3640552528,3640552550,3640552553,3640550749,3640550722,3640550706,3640550745,3640550709,3640550726,3640550739,3640550725,3640550716,3640550713,3640550743,3640550738,3640550711,3640550730,3640550721,3640550729,3640550744,3640550737,3640550733,3640550695,3640550714,3640550717,3640550697,3640550723,3640550699,3640550741,3640550740,3640550698,3640550692,3640550708,3640550748,3640550720,3640550736,3640550746,3640550694,3640550724,3640550715,3640550701,3640550735,3640550707,3640550702,3640550731,3640550742,3640550703,3640550700,3640550719,3640550734,3640550728,3640550693,3640550747,3640550718,3640550712,3640550732,3640550727,3640550704,3640550696,3640550705,3640550710,3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494,3640548751,3640548761,3640548765,3640548789,3640548780,3640548782,3640548792,3640548786,3640548763,3640548785,3640548798,3640548800,3640548808,3640548764,3640548773,3640548806,3640548790,3640548802,3640548762,3640548807,3640548750,3640548768,3640548783,3640548810,3640548758,3640548804,3640548805,3640548797,3640548767,3640548794,3640548784,3640548753,3640548781,3640548791,3640548752,3640548756,3640548749,3640548757,3640548771,3640548754,3640548779,3640548809,3640548770,3640548772,3640548776,3640548778,3640548787,3640548777,3640548796,3640548803,3640548759,3640548801,3640548760,3640548775,3640548793,3640548788,3640548755,3640548766,3640548795,3640548769,3640548774,3640548799,3640544108,3640544068,3640544078,3640544109,3640544095,3640544088,3640544080,3640544127,3640544077,3640544119,3640544099,3640544096,3640544116,3640544074,3640544093,3640544066,3640544082,3640544089,3640544103,3640544067,3640544102,3640544069,3640544111,3640544091,3640544090,3640544070,3640544063,3640544114,3640544094,3640544079,3640544101,3640544062,3640544076,3640544073,3640544104,3640544092,3640544106,3640544118,3640544129,3640544110,3640544115,3640544086,3640544100,3640544097,3640544105,3640544121,3640544061,3640544083,3640544126,3640544120,3640544117,3640544112,3640544064,3640544087,3640544081,3640544098,3640544128,3640544065,3640544071,3640544107,3640544123,3640544125,3640544122,3640544085,3640544084,3640544072,3640544075,3640544130,3640544124,3640544113) SELECT * FROM MTRPhoto.crop_sum_segments WHERE crop_hashtag_id in (3640552540,3640552513,3640552475,3640552514,3640552506,3640552519,3640552505,3640552489,3640552545,3640552527,3640552517,3640552502,3640552501,3640552493,3640552530,3640552547,3640552490,3640552555,3640552546,3640552536,3640552510,3640552515,3640552504,3640552520,3640552483,3640552529,3640552538,3640552524,3640552508,3640552516,3640552494,3640552544,3640552487,3640552523,3640552507,3640552495,3640552543,3640552521,3640552509,3640552535,3640552534,3640552522,3640552532,3640552539,3640552500,3640552488,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640552482,3640552476,3640552486,3640552484,3640552512,3640552533,3640552541,3640552492,3640552551,3640552503,3640552498,3640552531,3640552479,3640552542,3640552497,3640552491,3640552485,3640552480,3640552481,3640552477,3640552518,3640552526,3640552548,3640552496,3640552528,3640552550,3640552553,3640550749,3640550722,3640550706,3640550745,3640550709,3640550726,3640550739,3640550725,3640550716,3640550713,3640550743,3640550738,3640550711,3640550730,3640550721,3640550729,3640550744,3640550737,3640550733,3640550695,3640550714,3640550717,3640550697,3640550723,3640550699,3640550741,3640550740,3640550698,3640550692,3640550708,3640550748,3640550720,3640550736,3640550746,3640550694,3640550724,3640550715,3640550701,3640550735,3640550707,3640550702,3640550731,3640550742,3640550703,3640550700,3640550719,3640550734,3640550728,3640550693,3640550747,3640550718,3640550712,3640550732,3640550727,3640550704,3640550696,3640550705,3640550710,3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494,3640548751,3640548761,3640548765,3640548789,3640548780,3640548782,3640548792,3640548786,3640548763,3640548785,3640548798,3640548800,3640548808,3640548764,3640548773,3640548806,3640548790,3640548802,3640548762,3640548807,3640548750,3640548768,3640548783,3640548810,3640548758,3640548804,3640548805,3640548797,3640548767,3640548794,3640548784,3640548753,3640548781,3640548791,3640548752,3640548756,3640548749,3640548757,3640548771,3640548754,3640548779,3640548809,3640548770,3640548772,3640548776,3640548778,3640548787,3640548777,3640548796,3640548803,3640548759,3640548801,3640548760,3640548775,3640548793,3640548788,3640548755,3640548766,3640548795,3640548769,3640548774,3640548799,3640544108,3640544068,3640544078,3640544109,3640544095,3640544088,3640544080,3640544127,3640544077,3640544119,3640544099,3640544096,3640544116,3640544074,3640544093,3640544066,3640544082,3640544089,3640544103,3640544067,3640544102,3640544069,3640544111,3640544091,3640544090,3640544070,3640544063,3640544114,3640544094,3640544079,3640544101,3640544062,3640544076,3640544073,3640544104,3640544092,3640544106,3640544118,3640544129,3640544110,3640544115,3640544086,3640544100,3640544097,3640544105,3640544121,3640544061,3640544083,3640544126,3640544120,3640544117,3640544112,3640544064,3640544087,3640544081,3640544098,3640544128,3640544065,3640544071,3640544107,3640544123,3640544125,3640544122,3640544085,3640544084,3640544072,3640544075,3640544130,3640544124,3640544113) begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 20023596, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015440; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =20023596 and b.mtr_portfolio_id = 20015440; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 11609167, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015440; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =11609167 and b.mtr_portfolio_id = 20015440; TODO : # On doit donc construire les chi a partir des informations dans les photos filles query : SELECT ph.photo_id FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20015441 AND mpp.hide_status=0 ORDER BY ph.size desc insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 20023597, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015441; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =20023597 and b.mtr_portfolio_id = 20015441; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 11609168, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015441; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =11609168 and b.mtr_portfolio_id = 20015441; TODO : # On doit donc construire les chi a partir des informations dans les photos filles query : SELECT ph.photo_id FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20015442 AND mpp.hide_status=0 ORDER BY ph.size desc SELECT distinct chi.photo_id FROM MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids csp WHERE chi.id=csp.crop_hashtag_id AND chi.type=4855 AND csp.sub_photo_id IN (1332286560,1332286573,1332286574,1332286575,1332286576,1332286577,1332287258,1332287285) batch 1 select photo_id, hashtag_id, `type`, x0, x1, y0, y1, score, id from MTRPhoto.crop_hashtag_ids where photo_id in ( 1332248772,1332248764,1332248767,1332248760) and `type` in (4855) Loaded 278 chid ids of type : 4855 SELECT crop_hashtag_id, points FROM MTRPhoto.crop_polygon_points WHERE crop_hashtag_id in (3640550749,3640550722,3640550706,3640550745,3640550709,3640550726,3640550739,3640550725,3640550716,3640550713,3640550743,3640550738,3640550711,3640550730,3640550721,3640550729,3640550744,3640550737,3640550733,3640550695,3640550714,3640550717,3640550697,3640550723,3640550699,3640550741,3640550740,3640550698,3640550692,3640550708,3640550748,3640550720,3640550736,3640550746,3640550694,3640550724,3640550715,3640550701,3640550735,3640550707,3640550702,3640550731,3640550742,3640550703,3640550700,3640550719,3640550734,3640550728,3640550693,3640550747,3640550718,3640550712,3640550732,3640550727,3640550704,3640550696,3640550705,3640550710,3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494,3640548751,3640548761,3640548765,3640548789,3640548780,3640548782,3640548792,3640548786,3640548763,3640548785,3640548798,3640548800,3640548808,3640548764,3640548773,3640548806,3640548790,3640548802,3640548762,3640548807,3640548750,3640548768,3640548783,3640548810,3640548758,3640548804,3640548805,3640548797,3640548767,3640548794,3640548784,3640548753,3640548781,3640548791,3640548752,3640548756,3640548749,3640548757,3640548771,3640548754,3640548779,3640548809,3640548770,3640548772,3640548776,3640548778,3640548787,3640548777,3640548796,3640548803,3640548759,3640548801,3640548760,3640548775,3640548793,3640548788,3640548755,3640548766,3640548795,3640548769,3640548774,3640548799,3640544108,3640544068,3640544078,3640544109,3640544095,3640544088,3640544080,3640544127,3640544077,3640544119,3640544099,3640544096,3640544116,3640544074,3640544093,3640544066,3640544082,3640544089,3640544103,3640544067,3640544102,3640544069,3640544111,3640544091,3640544090,3640544070,3640544063,3640544114,3640544094,3640544079,3640544101,3640544062,3640544076,3640544073,3640544104,3640544092,3640544106,3640544118,3640544129,3640544110,3640544115,3640544086,3640544100,3640544097,3640544105,3640544121,3640544061,3640544083,3640544126,3640544120,3640544117,3640544112,3640544064,3640544087,3640544081,3640544098,3640544128,3640544065,3640544071,3640544107,3640544123,3640544125,3640544122,3640544085,3640544084,3640544072,3640544075,3640544130,3640544124,3640544113) SELECT * FROM MTRPhoto.crop_segments WHERE crop_hashtag_id in (3640550749,3640550722,3640550706,3640550745,3640550709,3640550726,3640550739,3640550725,3640550716,3640550713,3640550743,3640550738,3640550711,3640550730,3640550721,3640550729,3640550744,3640550737,3640550733,3640550695,3640550714,3640550717,3640550697,3640550723,3640550699,3640550741,3640550740,3640550698,3640550692,3640550708,3640550748,3640550720,3640550736,3640550746,3640550694,3640550724,3640550715,3640550701,3640550735,3640550707,3640550702,3640550731,3640550742,3640550703,3640550700,3640550719,3640550734,3640550728,3640550693,3640550747,3640550718,3640550712,3640550732,3640550727,3640550704,3640550696,3640550705,3640550710,3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494,3640548751,3640548761,3640548765,3640548789,3640548780,3640548782,3640548792,3640548786,3640548763,3640548785,3640548798,3640548800,3640548808,3640548764,3640548773,3640548806,3640548790,3640548802,3640548762,3640548807,3640548750,3640548768,3640548783,3640548810,3640548758,3640548804,3640548805,3640548797,3640548767,3640548794,3640548784,3640548753,3640548781,3640548791,3640548752,3640548756,3640548749,3640548757,3640548771,3640548754,3640548779,3640548809,3640548770,3640548772,3640548776,3640548778,3640548787,3640548777,3640548796,3640548803,3640548759,3640548801,3640548760,3640548775,3640548793,3640548788,3640548755,3640548766,3640548795,3640548769,3640548774,3640548799,3640544108,3640544068,3640544078,3640544109,3640544095,3640544088,3640544080,3640544127,3640544077,3640544119,3640544099,3640544096,3640544116,3640544074,3640544093,3640544066,3640544082,3640544089,3640544103,3640544067,3640544102,3640544069,3640544111,3640544091,3640544090,3640544070,3640544063,3640544114,3640544094,3640544079,3640544101,3640544062,3640544076,3640544073,3640544104,3640544092,3640544106,3640544118,3640544129,3640544110,3640544115,3640544086,3640544100,3640544097,3640544105,3640544121,3640544061,3640544083,3640544126,3640544120,3640544117,3640544112,3640544064,3640544087,3640544081,3640544098,3640544128,3640544065,3640544071,3640544107,3640544123,3640544125,3640544122,3640544085,3640544084,3640544072,3640544075,3640544130,3640544124,3640544113) SELECT * FROM MTRPhoto.crop_sum_segments WHERE crop_hashtag_id in (3640550749,3640550722,3640550706,3640550745,3640550709,3640550726,3640550739,3640550725,3640550716,3640550713,3640550743,3640550738,3640550711,3640550730,3640550721,3640550729,3640550744,3640550737,3640550733,3640550695,3640550714,3640550717,3640550697,3640550723,3640550699,3640550741,3640550740,3640550698,3640550692,3640550708,3640550748,3640550720,3640550736,3640550746,3640550694,3640550724,3640550715,3640550701,3640550735,3640550707,3640550702,3640550731,3640550742,3640550703,3640550700,3640550719,3640550734,3640550728,3640550693,3640550747,3640550718,3640550712,3640550732,3640550727,3640550704,3640550696,3640550705,3640550710,3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494,3640548751,3640548761,3640548765,3640548789,3640548780,3640548782,3640548792,3640548786,3640548763,3640548785,3640548798,3640548800,3640548808,3640548764,3640548773,3640548806,3640548790,3640548802,3640548762,3640548807,3640548750,3640548768,3640548783,3640548810,3640548758,3640548804,3640548805,3640548797,3640548767,3640548794,3640548784,3640548753,3640548781,3640548791,3640548752,3640548756,3640548749,3640548757,3640548771,3640548754,3640548779,3640548809,3640548770,3640548772,3640548776,3640548778,3640548787,3640548777,3640548796,3640548803,3640548759,3640548801,3640548760,3640548775,3640548793,3640548788,3640548755,3640548766,3640548795,3640548769,3640548774,3640548799,3640544108,3640544068,3640544078,3640544109,3640544095,3640544088,3640544080,3640544127,3640544077,3640544119,3640544099,3640544096,3640544116,3640544074,3640544093,3640544066,3640544082,3640544089,3640544103,3640544067,3640544102,3640544069,3640544111,3640544091,3640544090,3640544070,3640544063,3640544114,3640544094,3640544079,3640544101,3640544062,3640544076,3640544073,3640544104,3640544092,3640544106,3640544118,3640544129,3640544110,3640544115,3640544086,3640544100,3640544097,3640544105,3640544121,3640544061,3640544083,3640544126,3640544120,3640544117,3640544112,3640544064,3640544087,3640544081,3640544098,3640544128,3640544065,3640544071,3640544107,3640544123,3640544125,3640544122,3640544085,3640544084,3640544072,3640544075,3640544130,3640544124,3640544113) begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 20023598, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015442; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =20023598 and b.mtr_portfolio_id = 20015442; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 11609169, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015442; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =11609169 and b.mtr_portfolio_id = 20015442; TODO : # On doit donc construire les chi a partir des informations dans les photos filles query : SELECT ph.photo_id FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20015443 AND mpp.hide_status=0 ORDER BY ph.size desc SELECT distinct chi.photo_id FROM MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids csp WHERE chi.id=csp.crop_hashtag_id AND chi.type=4855 AND csp.sub_photo_id IN (1332286584,1332287370) batch 1 select photo_id, hashtag_id, `type`, x0, x1, y0, y1, score, id from MTRPhoto.crop_hashtag_ids where photo_id in ( 1332248764,1332248760) and `type` in (4855) Loaded 146 chid ids of type : 4855 SELECT crop_hashtag_id, points FROM MTRPhoto.crop_polygon_points WHERE crop_hashtag_id in (3640550749,3640550722,3640550706,3640550745,3640550709,3640550726,3640550739,3640550725,3640550716,3640550713,3640550743,3640550738,3640550711,3640550730,3640550721,3640550729,3640550744,3640550737,3640550733,3640550695,3640550714,3640550717,3640550697,3640550723,3640550699,3640550741,3640550740,3640550698,3640550692,3640550708,3640550748,3640550720,3640550736,3640550746,3640550694,3640550724,3640550715,3640550701,3640550735,3640550707,3640550702,3640550731,3640550742,3640550703,3640550700,3640550719,3640550734,3640550728,3640550693,3640550747,3640550718,3640550712,3640550732,3640550727,3640550704,3640550696,3640550705,3640550710,3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494) SELECT * FROM MTRPhoto.crop_segments WHERE crop_hashtag_id in (3640550749,3640550722,3640550706,3640550745,3640550709,3640550726,3640550739,3640550725,3640550716,3640550713,3640550743,3640550738,3640550711,3640550730,3640550721,3640550729,3640550744,3640550737,3640550733,3640550695,3640550714,3640550717,3640550697,3640550723,3640550699,3640550741,3640550740,3640550698,3640550692,3640550708,3640550748,3640550720,3640550736,3640550746,3640550694,3640550724,3640550715,3640550701,3640550735,3640550707,3640550702,3640550731,3640550742,3640550703,3640550700,3640550719,3640550734,3640550728,3640550693,3640550747,3640550718,3640550712,3640550732,3640550727,3640550704,3640550696,3640550705,3640550710,3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494) SELECT * FROM MTRPhoto.crop_sum_segments WHERE crop_hashtag_id in (3640550749,3640550722,3640550706,3640550745,3640550709,3640550726,3640550739,3640550725,3640550716,3640550713,3640550743,3640550738,3640550711,3640550730,3640550721,3640550729,3640550744,3640550737,3640550733,3640550695,3640550714,3640550717,3640550697,3640550723,3640550699,3640550741,3640550740,3640550698,3640550692,3640550708,3640550748,3640550720,3640550736,3640550746,3640550694,3640550724,3640550715,3640550701,3640550735,3640550707,3640550702,3640550731,3640550742,3640550703,3640550700,3640550719,3640550734,3640550728,3640550693,3640550747,3640550718,3640550712,3640550732,3640550727,3640550704,3640550696,3640550705,3640550710,3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494) begin to find the sub_photo_id : begin to find the sub_photo_id : insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 20023599, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015443; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =20023599 and b.mtr_portfolio_id = 20015443; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 11609170, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015443; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =11609170 and b.mtr_portfolio_id = 20015443; TODO : # On doit donc construire les chi a partir des informations dans les photos filles query : SELECT ph.photo_id FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20015448 AND mpp.hide_status=0 ORDER BY ph.size desc SELECT distinct chi.photo_id FROM MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids csp WHERE chi.id=csp.crop_hashtag_id AND chi.type=4855 AND csp.sub_photo_id IN (1332286566) batch 1 select photo_id, hashtag_id, `type`, x0, x1, y0, y1, score, id from MTRPhoto.crop_hashtag_ids where photo_id in ( 1332248757) and `type` in (4855) Loaded 82 chid ids of type : 4855 SELECT crop_hashtag_id, points FROM MTRPhoto.crop_polygon_points WHERE crop_hashtag_id in (3640552540,3640552513,3640552475,3640552514,3640552506,3640552519,3640552505,3640552489,3640552545,3640552527,3640552517,3640552502,3640552501,3640552493,3640552530,3640552547,3640552490,3640552555,3640552546,3640552536,3640552510,3640552515,3640552504,3640552520,3640552483,3640552529,3640552538,3640552524,3640552508,3640552516,3640552494,3640552544,3640552487,3640552523,3640552507,3640552495,3640552543,3640552521,3640552509,3640552535,3640552534,3640552522,3640552532,3640552539,3640552500,3640552488,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640552482,3640552476,3640552486,3640552484,3640552512,3640552533,3640552541,3640552492,3640552551,3640552503,3640552498,3640552531,3640552479,3640552542,3640552497,3640552491,3640552485,3640552480,3640552481,3640552477,3640552518,3640552526,3640552548,3640552496,3640552528,3640552550,3640552553) SELECT * FROM MTRPhoto.crop_segments WHERE crop_hashtag_id in (3640552540,3640552513,3640552475,3640552514,3640552506,3640552519,3640552505,3640552489,3640552545,3640552527,3640552517,3640552502,3640552501,3640552493,3640552530,3640552547,3640552490,3640552555,3640552546,3640552536,3640552510,3640552515,3640552504,3640552520,3640552483,3640552529,3640552538,3640552524,3640552508,3640552516,3640552494,3640552544,3640552487,3640552523,3640552507,3640552495,3640552543,3640552521,3640552509,3640552535,3640552534,3640552522,3640552532,3640552539,3640552500,3640552488,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640552482,3640552476,3640552486,3640552484,3640552512,3640552533,3640552541,3640552492,3640552551,3640552503,3640552498,3640552531,3640552479,3640552542,3640552497,3640552491,3640552485,3640552480,3640552481,3640552477,3640552518,3640552526,3640552548,3640552496,3640552528,3640552550,3640552553) SELECT * FROM MTRPhoto.crop_sum_segments WHERE crop_hashtag_id in (3640552540,3640552513,3640552475,3640552514,3640552506,3640552519,3640552505,3640552489,3640552545,3640552527,3640552517,3640552502,3640552501,3640552493,3640552530,3640552547,3640552490,3640552555,3640552546,3640552536,3640552510,3640552515,3640552504,3640552520,3640552483,3640552529,3640552538,3640552524,3640552508,3640552516,3640552494,3640552544,3640552487,3640552523,3640552507,3640552495,3640552543,3640552521,3640552509,3640552535,3640552534,3640552522,3640552532,3640552539,3640552500,3640552488,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640552482,3640552476,3640552486,3640552484,3640552512,3640552533,3640552541,3640552492,3640552551,3640552503,3640552498,3640552531,3640552479,3640552542,3640552497,3640552491,3640552485,3640552480,3640552481,3640552477,3640552518,3640552526,3640552548,3640552496,3640552528,3640552550,3640552553) begin to find the sub_photo_id : insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 20023602, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015448; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =20023602 and b.mtr_portfolio_id = 20015448; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 11609173, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015448; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =11609173 and b.mtr_portfolio_id = 20015448; TODO : # On doit donc construire les chi a partir des informations dans les photos filles query : SELECT ph.photo_id FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20015450 AND mpp.hide_status=0 ORDER BY ph.size desc SELECT distinct chi.photo_id FROM MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids csp WHERE chi.id=csp.crop_hashtag_id AND chi.type=4855 AND csp.sub_photo_id IN (1332286180,1332286477) batch 1 select photo_id, hashtag_id, `type`, x0, x1, y0, y1, score, id from MTRPhoto.crop_hashtag_ids where photo_id in ( 1332248760,1332248772) and `type` in (4855) Loaded 128 chid ids of type : 4855 SELECT crop_hashtag_id, points FROM MTRPhoto.crop_polygon_points WHERE crop_hashtag_id in (3640550749,3640550722,3640550706,3640550745,3640550709,3640550726,3640550739,3640550725,3640550716,3640550713,3640550743,3640550738,3640550711,3640550730,3640550721,3640550729,3640550744,3640550737,3640550733,3640550695,3640550714,3640550717,3640550697,3640550723,3640550699,3640550741,3640550740,3640550698,3640550692,3640550708,3640550748,3640550720,3640550736,3640550746,3640550694,3640550724,3640550715,3640550701,3640550735,3640550707,3640550702,3640550731,3640550742,3640550703,3640550700,3640550719,3640550734,3640550728,3640550693,3640550747,3640550718,3640550712,3640550732,3640550727,3640550704,3640550696,3640550705,3640550710,3640544108,3640544068,3640544078,3640544109,3640544095,3640544088,3640544080,3640544127,3640544077,3640544119,3640544099,3640544096,3640544116,3640544074,3640544093,3640544066,3640544082,3640544089,3640544103,3640544067,3640544102,3640544069,3640544111,3640544091,3640544090,3640544070,3640544063,3640544114,3640544094,3640544079,3640544101,3640544062,3640544076,3640544073,3640544104,3640544092,3640544106,3640544118,3640544129,3640544110,3640544115,3640544086,3640544100,3640544097,3640544105,3640544121,3640544061,3640544083,3640544126,3640544120,3640544117,3640544112,3640544064,3640544087,3640544081,3640544098,3640544128,3640544065,3640544071,3640544107,3640544123,3640544125,3640544122,3640544085,3640544084,3640544072,3640544075,3640544130,3640544124,3640544113) SELECT * FROM MTRPhoto.crop_segments WHERE crop_hashtag_id in (3640550749,3640550722,3640550706,3640550745,3640550709,3640550726,3640550739,3640550725,3640550716,3640550713,3640550743,3640550738,3640550711,3640550730,3640550721,3640550729,3640550744,3640550737,3640550733,3640550695,3640550714,3640550717,3640550697,3640550723,3640550699,3640550741,3640550740,3640550698,3640550692,3640550708,3640550748,3640550720,3640550736,3640550746,3640550694,3640550724,3640550715,3640550701,3640550735,3640550707,3640550702,3640550731,3640550742,3640550703,3640550700,3640550719,3640550734,3640550728,3640550693,3640550747,3640550718,3640550712,3640550732,3640550727,3640550704,3640550696,3640550705,3640550710,3640544108,3640544068,3640544078,3640544109,3640544095,3640544088,3640544080,3640544127,3640544077,3640544119,3640544099,3640544096,3640544116,3640544074,3640544093,3640544066,3640544082,3640544089,3640544103,3640544067,3640544102,3640544069,3640544111,3640544091,3640544090,3640544070,3640544063,3640544114,3640544094,3640544079,3640544101,3640544062,3640544076,3640544073,3640544104,3640544092,3640544106,3640544118,3640544129,3640544110,3640544115,3640544086,3640544100,3640544097,3640544105,3640544121,3640544061,3640544083,3640544126,3640544120,3640544117,3640544112,3640544064,3640544087,3640544081,3640544098,3640544128,3640544065,3640544071,3640544107,3640544123,3640544125,3640544122,3640544085,3640544084,3640544072,3640544075,3640544130,3640544124,3640544113) SELECT * FROM MTRPhoto.crop_sum_segments WHERE crop_hashtag_id in (3640550749,3640550722,3640550706,3640550745,3640550709,3640550726,3640550739,3640550725,3640550716,3640550713,3640550743,3640550738,3640550711,3640550730,3640550721,3640550729,3640550744,3640550737,3640550733,3640550695,3640550714,3640550717,3640550697,3640550723,3640550699,3640550741,3640550740,3640550698,3640550692,3640550708,3640550748,3640550720,3640550736,3640550746,3640550694,3640550724,3640550715,3640550701,3640550735,3640550707,3640550702,3640550731,3640550742,3640550703,3640550700,3640550719,3640550734,3640550728,3640550693,3640550747,3640550718,3640550712,3640550732,3640550727,3640550704,3640550696,3640550705,3640550710,3640544108,3640544068,3640544078,3640544109,3640544095,3640544088,3640544080,3640544127,3640544077,3640544119,3640544099,3640544096,3640544116,3640544074,3640544093,3640544066,3640544082,3640544089,3640544103,3640544067,3640544102,3640544069,3640544111,3640544091,3640544090,3640544070,3640544063,3640544114,3640544094,3640544079,3640544101,3640544062,3640544076,3640544073,3640544104,3640544092,3640544106,3640544118,3640544129,3640544110,3640544115,3640544086,3640544100,3640544097,3640544105,3640544121,3640544061,3640544083,3640544126,3640544120,3640544117,3640544112,3640544064,3640544087,3640544081,3640544098,3640544128,3640544065,3640544071,3640544107,3640544123,3640544125,3640544122,3640544085,3640544084,3640544072,3640544075,3640544130,3640544124,3640544113) begin to find the sub_photo_id : begin to find the sub_photo_id : insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 20023604, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015450; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =20023604 and b.mtr_portfolio_id = 20015450; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 11609175, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015450; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =11609175 and b.mtr_portfolio_id = 20015450; TODO : # On doit donc construire les chi a partir des informations dans les photos filles query : SELECT ph.photo_id FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20015451 AND mpp.hide_status=0 ORDER BY ph.size desc insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 20023605, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015451; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =20023605 and b.mtr_portfolio_id = 20015451; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 11609176, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015451; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =11609176 and b.mtr_portfolio_id = 20015451; TODO : # On doit donc construire les chi a partir des informations dans les photos filles query : SELECT ph.photo_id FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20015452 AND mpp.hide_status=0 ORDER BY ph.size desc insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 20023606, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015452; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =20023606 and b.mtr_portfolio_id = 20015452; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 11609177, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015452; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =11609177 and b.mtr_portfolio_id = 20015452; TODO : # On doit donc construire les chi a partir des informations dans les photos filles query : SELECT ph.photo_id FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20015453 AND mpp.hide_status=0 ORDER BY ph.size desc insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 20023607, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015453; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =20023607 and b.mtr_portfolio_id = 20015453; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 11609178, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015453; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =11609178 and b.mtr_portfolio_id = 20015453; TODO : # On doit donc construire les chi a partir des informations dans les photos filles query : SELECT ph.photo_id FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20015454 AND mpp.hide_status=0 ORDER BY ph.size desc insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 20023608, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015454; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =20023608 and b.mtr_portfolio_id = 20015454; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 11609179, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015454; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =11609179 and b.mtr_portfolio_id = 20015454; TODO : # On doit donc construire les chi a partir des informations dans les photos filles query : SELECT ph.photo_id FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20015455 AND mpp.hide_status=0 ORDER BY ph.size desc SELECT distinct chi.photo_id FROM MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids csp WHERE chi.id=csp.crop_hashtag_id AND chi.type=4855 AND csp.sub_photo_id IN (1332286504,1332286506) batch 1 select photo_id, hashtag_id, `type`, x0, x1, y0, y1, score, id from MTRPhoto.crop_hashtag_ids where photo_id in ( 1332248764) and `type` in (4855) Loaded 88 chid ids of type : 4855 SELECT crop_hashtag_id, points FROM MTRPhoto.crop_polygon_points WHERE crop_hashtag_id in (3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494) SELECT * FROM MTRPhoto.crop_segments WHERE crop_hashtag_id in (3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494) SELECT * FROM MTRPhoto.crop_sum_segments WHERE crop_hashtag_id in (3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494) begin to find the sub_photo_id : insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 20023609, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015455; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =20023609 and b.mtr_portfolio_id = 20015455; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 11609180, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015455; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =11609180 and b.mtr_portfolio_id = 20015455; TODO : # On doit donc construire les chi a partir des informations dans les photos filles query : SELECT ph.photo_id FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20015457 AND mpp.hide_status=0 ORDER BY ph.size desc SELECT distinct chi.photo_id FROM MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids csp WHERE chi.id=csp.crop_hashtag_id AND chi.type=4855 AND csp.sub_photo_id IN (1332286537,1332287359,1332287361) batch 1 select photo_id, hashtag_id, `type`, x0, x1, y0, y1, score, id from MTRPhoto.crop_hashtag_ids where photo_id in ( 1332248757,1332248764) and `type` in (4855) Loaded 170 chid ids of type : 4855 SELECT crop_hashtag_id, points FROM MTRPhoto.crop_polygon_points WHERE crop_hashtag_id in (3640552540,3640552513,3640552475,3640552514,3640552506,3640552519,3640552505,3640552489,3640552545,3640552527,3640552517,3640552502,3640552501,3640552493,3640552530,3640552547,3640552490,3640552555,3640552546,3640552536,3640552510,3640552515,3640552504,3640552520,3640552483,3640552529,3640552538,3640552524,3640552508,3640552516,3640552494,3640552544,3640552487,3640552523,3640552507,3640552495,3640552543,3640552521,3640552509,3640552535,3640552534,3640552522,3640552532,3640552539,3640552500,3640552488,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640552482,3640552476,3640552486,3640552484,3640552512,3640552533,3640552541,3640552492,3640552551,3640552503,3640552498,3640552531,3640552479,3640552542,3640552497,3640552491,3640552485,3640552480,3640552481,3640552477,3640552518,3640552526,3640552548,3640552496,3640552528,3640552550,3640552553,3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494) SELECT * FROM MTRPhoto.crop_segments WHERE crop_hashtag_id in (3640552540,3640552513,3640552475,3640552514,3640552506,3640552519,3640552505,3640552489,3640552545,3640552527,3640552517,3640552502,3640552501,3640552493,3640552530,3640552547,3640552490,3640552555,3640552546,3640552536,3640552510,3640552515,3640552504,3640552520,3640552483,3640552529,3640552538,3640552524,3640552508,3640552516,3640552494,3640552544,3640552487,3640552523,3640552507,3640552495,3640552543,3640552521,3640552509,3640552535,3640552534,3640552522,3640552532,3640552539,3640552500,3640552488,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640552482,3640552476,3640552486,3640552484,3640552512,3640552533,3640552541,3640552492,3640552551,3640552503,3640552498,3640552531,3640552479,3640552542,3640552497,3640552491,3640552485,3640552480,3640552481,3640552477,3640552518,3640552526,3640552548,3640552496,3640552528,3640552550,3640552553,3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494) SELECT * FROM MTRPhoto.crop_sum_segments WHERE crop_hashtag_id in (3640552540,3640552513,3640552475,3640552514,3640552506,3640552519,3640552505,3640552489,3640552545,3640552527,3640552517,3640552502,3640552501,3640552493,3640552530,3640552547,3640552490,3640552555,3640552546,3640552536,3640552510,3640552515,3640552504,3640552520,3640552483,3640552529,3640552538,3640552524,3640552508,3640552516,3640552494,3640552544,3640552487,3640552523,3640552507,3640552495,3640552543,3640552521,3640552509,3640552535,3640552534,3640552522,3640552532,3640552539,3640552500,3640552488,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640552482,3640552476,3640552486,3640552484,3640552512,3640552533,3640552541,3640552492,3640552551,3640552503,3640552498,3640552531,3640552479,3640552542,3640552497,3640552491,3640552485,3640552480,3640552481,3640552477,3640552518,3640552526,3640552548,3640552496,3640552528,3640552550,3640552553,3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494) begin to find the sub_photo_id : begin to find the sub_photo_id : insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 20023610, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015457; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =20023610 and b.mtr_portfolio_id = 20015457; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 11609181, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015457; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =11609181 and b.mtr_portfolio_id = 20015457; TODO : # On doit donc construire les chi a partir des informations dans les photos filles query : SELECT ph.photo_id FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20015458 AND mpp.hide_status=0 ORDER BY ph.size desc SELECT distinct chi.photo_id FROM MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids csp WHERE chi.id=csp.crop_hashtag_id AND chi.type=4855 AND csp.sub_photo_id IN (1332287674,1332287751,1332287745,1332287726,1332287722,1332287719,1332287712,1332287701,1332287698,1332287682,1332286602,1332287644,1332287636,1332287632,1332287629,1332287625,1332287374,1332287357,1332286624) batch 1 select photo_id, hashtag_id, `type`, x0, x1, y0, y1, score, id from MTRPhoto.crop_hashtag_ids where photo_id in ( 1332248767,1332248757,1332248772,1332248760,1332248764,1332248754) and `type` in (4855) Loaded 373 chid ids of type : 4855 SELECT crop_hashtag_id, points FROM MTRPhoto.crop_polygon_points WHERE crop_hashtag_id in (3640552790,3640552798,3640552788,3640552787,3640552795,3640552794,3640552797,3640552796,3640552799,3640552791,3640552789,3640552793,3640552792,3640552540,3640552513,3640552475,3640552514,3640552506,3640552519,3640552505,3640552489,3640552545,3640552527,3640552517,3640552502,3640552501,3640552493,3640552530,3640552547,3640552490,3640552555,3640552546,3640552536,3640552510,3640552515,3640552504,3640552520,3640552483,3640552529,3640552538,3640552524,3640552508,3640552516,3640552494,3640552544,3640552487,3640552523,3640552507,3640552495,3640552543,3640552521,3640552509,3640552535,3640552534,3640552522,3640552532,3640552539,3640552500,3640552488,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640552482,3640552476,3640552486,3640552484,3640552512,3640552533,3640552541,3640552492,3640552551,3640552503,3640552498,3640552531,3640552479,3640552542,3640552497,3640552491,3640552485,3640552480,3640552481,3640552477,3640552518,3640552526,3640552548,3640552496,3640552528,3640552550,3640552553,3640550749,3640550722,3640550706,3640550745,3640550709,3640550726,3640550739,3640550725,3640550716,3640550713,3640550743,3640550738,3640550711,3640550730,3640550721,3640550729,3640550744,3640550737,3640550733,3640550695,3640550714,3640550717,3640550697,3640550723,3640550699,3640550741,3640550740,3640550698,3640550692,3640550708,3640550748,3640550720,3640550736,3640550746,3640550694,3640550724,3640550715,3640550701,3640550735,3640550707,3640550702,3640550731,3640550742,3640550703,3640550700,3640550719,3640550734,3640550728,3640550693,3640550747,3640550718,3640550712,3640550732,3640550727,3640550704,3640550696,3640550705,3640550710,3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494,3640548751,3640548761,3640548765,3640548789,3640548780,3640548782,3640548792,3640548786,3640548763,3640548785,3640548798,3640548800,3640548808,3640548764,3640548773,3640548806,3640548790,3640548802,3640548762,3640548807,3640548750,3640548768,3640548783,3640548810,3640548758,3640548804,3640548805,3640548797,3640548767,3640548794,3640548784,3640548753,3640548781,3640548791,3640548752,3640548756,3640548749,3640548757,3640548771,3640548754,3640548779,3640548809,3640548770,3640548772,3640548776,3640548778,3640548787,3640548777,3640548796,3640548803,3640548759,3640548801,3640548760,3640548775,3640548793,3640548788,3640548755,3640548766,3640548795,3640548769,3640548774,3640548799,3640544108,3640544068,3640544078,3640544109,3640544095,3640544088,3640544080,3640544127,3640544077,3640544119,3640544099,3640544096,3640544116,3640544074,3640544093,3640544066,3640544082,3640544089,3640544103,3640544067,3640544102,3640544069,3640544111,3640544091,3640544090,3640544070,3640544063,3640544114,3640544094,3640544079,3640544101,3640544062,3640544076,3640544073,3640544104,3640544092,3640544106,3640544118,3640544129,3640544110,3640544115,3640544086,3640544100,3640544097,3640544105,3640544121,3640544061,3640544083,3640544126,3640544120,3640544117,3640544112,3640544064,3640544087,3640544081,3640544098,3640544128,3640544065,3640544071,3640544107,3640544123,3640544125,3640544122,3640544085,3640544084,3640544072,3640544075,3640544130,3640544124,3640544113) SELECT * FROM MTRPhoto.crop_segments WHERE crop_hashtag_id in (3640552790,3640552798,3640552788,3640552787,3640552795,3640552794,3640552797,3640552796,3640552799,3640552791,3640552789,3640552793,3640552792,3640552540,3640552513,3640552475,3640552514,3640552506,3640552519,3640552505,3640552489,3640552545,3640552527,3640552517,3640552502,3640552501,3640552493,3640552530,3640552547,3640552490,3640552555,3640552546,3640552536,3640552510,3640552515,3640552504,3640552520,3640552483,3640552529,3640552538,3640552524,3640552508,3640552516,3640552494,3640552544,3640552487,3640552523,3640552507,3640552495,3640552543,3640552521,3640552509,3640552535,3640552534,3640552522,3640552532,3640552539,3640552500,3640552488,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640552482,3640552476,3640552486,3640552484,3640552512,3640552533,3640552541,3640552492,3640552551,3640552503,3640552498,3640552531,3640552479,3640552542,3640552497,3640552491,3640552485,3640552480,3640552481,3640552477,3640552518,3640552526,3640552548,3640552496,3640552528,3640552550,3640552553,3640550749,3640550722,3640550706,3640550745,3640550709,3640550726,3640550739,3640550725,3640550716,3640550713,3640550743,3640550738,3640550711,3640550730,3640550721,3640550729,3640550744,3640550737,3640550733,3640550695,3640550714,3640550717,3640550697,3640550723,3640550699,3640550741,3640550740,3640550698,3640550692,3640550708,3640550748,3640550720,3640550736,3640550746,3640550694,3640550724,3640550715,3640550701,3640550735,3640550707,3640550702,3640550731,3640550742,3640550703,3640550700,3640550719,3640550734,3640550728,3640550693,3640550747,3640550718,3640550712,3640550732,3640550727,3640550704,3640550696,3640550705,3640550710,3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494,3640548751,3640548761,3640548765,3640548789,3640548780,3640548782,3640548792,3640548786,3640548763,3640548785,3640548798,3640548800,3640548808,3640548764,3640548773,3640548806,3640548790,3640548802,3640548762,3640548807,3640548750,3640548768,3640548783,3640548810,3640548758,3640548804,3640548805,3640548797,3640548767,3640548794,3640548784,3640548753,3640548781,3640548791,3640548752,3640548756,3640548749,3640548757,3640548771,3640548754,3640548779,3640548809,3640548770,3640548772,3640548776,3640548778,3640548787,3640548777,3640548796,3640548803,3640548759,3640548801,3640548760,3640548775,3640548793,3640548788,3640548755,3640548766,3640548795,3640548769,3640548774,3640548799,3640544108,3640544068,3640544078,3640544109,3640544095,3640544088,3640544080,3640544127,3640544077,3640544119,3640544099,3640544096,3640544116,3640544074,3640544093,3640544066,3640544082,3640544089,3640544103,3640544067,3640544102,3640544069,3640544111,3640544091,3640544090,3640544070,3640544063,3640544114,3640544094,3640544079,3640544101,3640544062,3640544076,3640544073,3640544104,3640544092,3640544106,3640544118,3640544129,3640544110,3640544115,3640544086,3640544100,3640544097,3640544105,3640544121,3640544061,3640544083,3640544126,3640544120,3640544117,3640544112,3640544064,3640544087,3640544081,3640544098,3640544128,3640544065,3640544071,3640544107,3640544123,3640544125,3640544122,3640544085,3640544084,3640544072,3640544075,3640544130,3640544124,3640544113) SELECT * FROM MTRPhoto.crop_sum_segments WHERE crop_hashtag_id in (3640552790,3640552798,3640552788,3640552787,3640552795,3640552794,3640552797,3640552796,3640552799,3640552791,3640552789,3640552793,3640552792,3640552540,3640552513,3640552475,3640552514,3640552506,3640552519,3640552505,3640552489,3640552545,3640552527,3640552517,3640552502,3640552501,3640552493,3640552530,3640552547,3640552490,3640552555,3640552546,3640552536,3640552510,3640552515,3640552504,3640552520,3640552483,3640552529,3640552538,3640552524,3640552508,3640552516,3640552494,3640552544,3640552487,3640552523,3640552507,3640552495,3640552543,3640552521,3640552509,3640552535,3640552534,3640552522,3640552532,3640552539,3640552500,3640552488,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640552482,3640552476,3640552486,3640552484,3640552512,3640552533,3640552541,3640552492,3640552551,3640552503,3640552498,3640552531,3640552479,3640552542,3640552497,3640552491,3640552485,3640552480,3640552481,3640552477,3640552518,3640552526,3640552548,3640552496,3640552528,3640552550,3640552553,3640550749,3640550722,3640550706,3640550745,3640550709,3640550726,3640550739,3640550725,3640550716,3640550713,3640550743,3640550738,3640550711,3640550730,3640550721,3640550729,3640550744,3640550737,3640550733,3640550695,3640550714,3640550717,3640550697,3640550723,3640550699,3640550741,3640550740,3640550698,3640550692,3640550708,3640550748,3640550720,3640550736,3640550746,3640550694,3640550724,3640550715,3640550701,3640550735,3640550707,3640550702,3640550731,3640550742,3640550703,3640550700,3640550719,3640550734,3640550728,3640550693,3640550747,3640550718,3640550712,3640550732,3640550727,3640550704,3640550696,3640550705,3640550710,3640550466,3640550455,3640550475,3640550478,3640550465,3640550486,3640550469,3640550497,3640550476,3640550521,3640550511,3640550499,3640550489,3640550523,3640550485,3640550512,3640550493,3640550519,3640550500,3640550473,3640550446,3640550492,3640550482,3640550451,3640550445,3640550487,3640550471,3640550449,3640550460,3640550474,3640550442,3640550506,3640550498,3640550450,3640550509,3640550472,3640550518,3640550443,3640550467,3640550484,3640550458,3640550468,3640550461,3640550479,3640550441,3640550490,3640550470,3640550463,3640550528,3640550454,3640550525,3640550488,3640550514,3640550448,3640550452,3640550459,3640550457,3640550527,3640550495,3640550456,3640550464,3640550501,3640550510,3640550453,3640550516,3640550504,3640550491,3640550480,3640550520,3640550444,3640550447,3640550522,3640550505,3640550515,3640550462,3640550517,3640550507,3640550481,3640550526,3640550513,3640550508,3640550503,3640550483,3640550477,3640550496,3640550524,3640550502,3640550494,3640548751,3640548761,3640548765,3640548789,3640548780,3640548782,3640548792,3640548786,3640548763,3640548785,3640548798,3640548800,3640548808,3640548764,3640548773,3640548806,3640548790,3640548802,3640548762,3640548807,3640548750,3640548768,3640548783,3640548810,3640548758,3640548804,3640548805,3640548797,3640548767,3640548794,3640548784,3640548753,3640548781,3640548791,3640548752,3640548756,3640548749,3640548757,3640548771,3640548754,3640548779,3640548809,3640548770,3640548772,3640548776,3640548778,3640548787,3640548777,3640548796,3640548803,3640548759,3640548801,3640548760,3640548775,3640548793,3640548788,3640548755,3640548766,3640548795,3640548769,3640548774,3640548799,3640544108,3640544068,3640544078,3640544109,3640544095,3640544088,3640544080,3640544127,3640544077,3640544119,3640544099,3640544096,3640544116,3640544074,3640544093,3640544066,3640544082,3640544089,3640544103,3640544067,3640544102,3640544069,3640544111,3640544091,3640544090,3640544070,3640544063,3640544114,3640544094,3640544079,3640544101,3640544062,3640544076,3640544073,3640544104,3640544092,3640544106,3640544118,3640544129,3640544110,3640544115,3640544086,3640544100,3640544097,3640544105,3640544121,3640544061,3640544083,3640544126,3640544120,3640544117,3640544112,3640544064,3640544087,3640544081,3640544098,3640544128,3640544065,3640544071,3640544107,3640544123,3640544125,3640544122,3640544085,3640544084,3640544072,3640544075,3640544130,3640544124,3640544113) begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 20023611, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015458; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =20023611 and b.mtr_portfolio_id = 20015458; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 11609182, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015458; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =11609182 and b.mtr_portfolio_id = 20015458; TODO : # On doit donc construire les chi a partir des informations dans les photos filles query : SELECT ph.photo_id FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20015460 AND mpp.hide_status=0 ORDER BY ph.size desc SELECT distinct chi.photo_id FROM MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids csp WHERE chi.id=csp.crop_hashtag_id AND chi.type=4855 AND csp.sub_photo_id IN (1332287259) batch 1 select photo_id, hashtag_id, `type`, x0, x1, y0, y1, score, id from MTRPhoto.crop_hashtag_ids where photo_id in ( 1332248767) and `type` in (4855) Loaded 62 chid ids of type : 4855 SELECT crop_hashtag_id, points FROM MTRPhoto.crop_polygon_points WHERE crop_hashtag_id in (3640548751,3640548761,3640548765,3640548789,3640548780,3640548782,3640548792,3640548786,3640548763,3640548785,3640548798,3640548800,3640548808,3640548764,3640548773,3640548806,3640548790,3640548802,3640548762,3640548807,3640548750,3640548768,3640548783,3640548810,3640548758,3640548804,3640548805,3640548797,3640548767,3640548794,3640548784,3640548753,3640548781,3640548791,3640548752,3640548756,3640548749,3640548757,3640548771,3640548754,3640548779,3640548809,3640548770,3640548772,3640548776,3640548778,3640548787,3640548777,3640548796,3640548803,3640548759,3640548801,3640548760,3640548775,3640548793,3640548788,3640548755,3640548766,3640548795,3640548769,3640548774,3640548799) SELECT * FROM MTRPhoto.crop_segments WHERE crop_hashtag_id in (3640548751,3640548761,3640548765,3640548789,3640548780,3640548782,3640548792,3640548786,3640548763,3640548785,3640548798,3640548800,3640548808,3640548764,3640548773,3640548806,3640548790,3640548802,3640548762,3640548807,3640548750,3640548768,3640548783,3640548810,3640548758,3640548804,3640548805,3640548797,3640548767,3640548794,3640548784,3640548753,3640548781,3640548791,3640548752,3640548756,3640548749,3640548757,3640548771,3640548754,3640548779,3640548809,3640548770,3640548772,3640548776,3640548778,3640548787,3640548777,3640548796,3640548803,3640548759,3640548801,3640548760,3640548775,3640548793,3640548788,3640548755,3640548766,3640548795,3640548769,3640548774,3640548799) SELECT * FROM MTRPhoto.crop_sum_segments WHERE crop_hashtag_id in (3640548751,3640548761,3640548765,3640548789,3640548780,3640548782,3640548792,3640548786,3640548763,3640548785,3640548798,3640548800,3640548808,3640548764,3640548773,3640548806,3640548790,3640548802,3640548762,3640548807,3640548750,3640548768,3640548783,3640548810,3640548758,3640548804,3640548805,3640548797,3640548767,3640548794,3640548784,3640548753,3640548781,3640548791,3640548752,3640548756,3640548749,3640548757,3640548771,3640548754,3640548779,3640548809,3640548770,3640548772,3640548776,3640548778,3640548787,3640548777,3640548796,3640548803,3640548759,3640548801,3640548760,3640548775,3640548793,3640548788,3640548755,3640548766,3640548795,3640548769,3640548774,3640548799) begin to find the sub_photo_id : insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 20023600, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015460; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =20023600 and b.mtr_portfolio_id = 20015460; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 11609171, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015460; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =11609171 and b.mtr_portfolio_id = 20015460; TODO : # On doit donc construire les chi a partir des informations dans les photos filles query : SELECT ph.photo_id FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20015461 AND mpp.hide_status=0 ORDER BY ph.size desc SELECT distinct chi.photo_id FROM MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids csp WHERE chi.id=csp.crop_hashtag_id AND chi.type=4855 AND csp.sub_photo_id IN (1332287640,1332287294,1332287295,1332287297,1332287300,1332287301,1332287302,1332287305,1332287306,1332287308,1332287309,1332287310,1332287311,1332287312,1332287376,1332287291,1332287647,1332287655,1332287663,1332287667,1332287678,1332287690,1332287694,1332287708,1332287715,1332287729,1332287736,1332287739,1332287742,1332287749,1332286620,1332286165,1332286187,1332286478,1332286488,1332286519,1332286520,1332286522,1332286551,1332286558,1332286564,1332286565,1332286567,1332286579,1332286601,1332286164,1332286622,1332287262,1332287265,1332287267,1332287271,1332287275,1332287276,1332287277,1332287278,1332287281,1332287284,1332287287,1332287288,1332287289) batch 1 select photo_id, hashtag_id, `type`, x0, x1, y0, y1, score, id from MTRPhoto.crop_hashtag_ids where photo_id in ( 1332248772,1332248767,1332248760,1332248764,1332248757,1332248754) and `type` in (4855) Loaded 373 chid ids of type : 4855 SELECT crop_hashtag_id, points FROM MTRPhoto.crop_polygon_points WHERE crop_hashtag_id in (3640552787,3640552788,3640552789,3640552790,3640552791,3640552792,3640552793,3640552794,3640552795,3640552796,3640552797,3640552798,3640552799,3640552474,3640552475,3640552476,3640552477,3640552478,3640552479,3640552480,3640552481,3640552482,3640552483,3640552484,3640552485,3640552486,3640552487,3640552488,3640552489,3640552490,3640552491,3640552492,3640552493,3640552494,3640552495,3640552496,3640552497,3640552498,3640552499,3640552500,3640552501,3640552502,3640552503,3640552504,3640552505,3640552506,3640552507,3640552508,3640552509,3640552510,3640552511,3640552512,3640552513,3640552514,3640552515,3640552516,3640552517,3640552518,3640552519,3640552520,3640552521,3640552522,3640552523,3640552524,3640552525,3640552526,3640552527,3640552528,3640552529,3640552530,3640552531,3640552532,3640552533,3640552534,3640552535,3640552536,3640552537,3640552538,3640552539,3640552540,3640552541,3640552542,3640552543,3640552544,3640552545,3640552546,3640552547,3640552548,3640552549,3640552550,3640552551,3640552552,3640552553,3640552554,3640552555,3640550692,3640550693,3640550694,3640550695,3640550696,3640550697,3640550698,3640550699,3640550700,3640550701,3640550702,3640550703,3640550704,3640550705,3640550706,3640550707,3640550708,3640550709,3640550710,3640550711,3640550712,3640550713,3640550714,3640550715,3640550716,3640550717,3640550718,3640550719,3640550720,3640550721,3640550722,3640550723,3640550724,3640550725,3640550726,3640550727,3640550728,3640550729,3640550730,3640550731,3640550732,3640550733,3640550734,3640550735,3640550736,3640550737,3640550738,3640550739,3640550740,3640550741,3640550742,3640550743,3640550744,3640550745,3640550746,3640550747,3640550748,3640550749,3640550441,3640550442,3640550443,3640550444,3640550445,3640550446,3640550447,3640550448,3640550449,3640550450,3640550451,3640550452,3640550453,3640550454,3640550455,3640550456,3640550457,3640550458,3640550459,3640550460,3640550461,3640550462,3640550463,3640550464,3640550465,3640550466,3640550467,3640550468,3640550469,3640550470,3640550471,3640550472,3640550473,3640550474,3640550475,3640550476,3640550477,3640550478,3640550479,3640550480,3640550481,3640550482,3640550483,3640550484,3640550485,3640550486,3640550487,3640550488,3640550489,3640550490,3640550491,3640550492,3640550493,3640550494,3640550495,3640550496,3640550497,3640550498,3640550499,3640550500,3640550501,3640550502,3640550503,3640550504,3640550505,3640550506,3640550507,3640550508,3640550509,3640550510,3640550511,3640550512,3640550513,3640550514,3640550515,3640550516,3640550517,3640550518,3640550519,3640550520,3640550521,3640550522,3640550523,3640550524,3640550525,3640550526,3640550527,3640550528,3640548749,3640548750,3640548751,3640548752,3640548753,3640548754,3640548755,3640548756,3640548757,3640548758,3640548759,3640548760,3640548761,3640548762,3640548763,3640548764,3640548765,3640548766,3640548767,3640548768,3640548769,3640548770,3640548771,3640548772,3640548773,3640548774,3640548775,3640548776,3640548777,3640548778,3640548779,3640548780,3640548781,3640548782,3640548783,3640548784,3640548785,3640548786,3640548787,3640548788,3640548789,3640548790,3640548791,3640548792,3640548793,3640548794,3640548795,3640548796,3640548797,3640548798,3640548799,3640548800,3640548801,3640548802,3640548803,3640548804,3640548805,3640548806,3640548807,3640548808,3640548809,3640548810,3640544061,3640544062,3640544063,3640544064,3640544065,3640544066,3640544067,3640544068,3640544069,3640544070,3640544071,3640544072,3640544073,3640544074,3640544075,3640544076,3640544077,3640544078,3640544079,3640544080,3640544081,3640544082,3640544083,3640544084,3640544085,3640544086,3640544087,3640544088,3640544089,3640544090,3640544091,3640544092,3640544093,3640544094,3640544095,3640544096,3640544097,3640544098,3640544099,3640544100,3640544101,3640544102,3640544103,3640544104,3640544105,3640544106,3640544107,3640544108,3640544109,3640544110,3640544111,3640544112,3640544113,3640544114,3640544115,3640544116,3640544117,3640544118,3640544119,3640544120,3640544121,3640544122,3640544123,3640544124,3640544125,3640544126,3640544127,3640544128,3640544129,3640544130) SELECT * FROM MTRPhoto.crop_segments WHERE crop_hashtag_id in (3640552787,3640552788,3640552789,3640552790,3640552791,3640552792,3640552793,3640552794,3640552795,3640552796,3640552797,3640552798,3640552799,3640552474,3640552475,3640552476,3640552477,3640552478,3640552479,3640552480,3640552481,3640552482,3640552483,3640552484,3640552485,3640552486,3640552487,3640552488,3640552489,3640552490,3640552491,3640552492,3640552493,3640552494,3640552495,3640552496,3640552497,3640552498,3640552499,3640552500,3640552501,3640552502,3640552503,3640552504,3640552505,3640552506,3640552507,3640552508,3640552509,3640552510,3640552511,3640552512,3640552513,3640552514,3640552515,3640552516,3640552517,3640552518,3640552519,3640552520,3640552521,3640552522,3640552523,3640552524,3640552525,3640552526,3640552527,3640552528,3640552529,3640552530,3640552531,3640552532,3640552533,3640552534,3640552535,3640552536,3640552537,3640552538,3640552539,3640552540,3640552541,3640552542,3640552543,3640552544,3640552545,3640552546,3640552547,3640552548,3640552549,3640552550,3640552551,3640552552,3640552553,3640552554,3640552555,3640550692,3640550693,3640550694,3640550695,3640550696,3640550697,3640550698,3640550699,3640550700,3640550701,3640550702,3640550703,3640550704,3640550705,3640550706,3640550707,3640550708,3640550709,3640550710,3640550711,3640550712,3640550713,3640550714,3640550715,3640550716,3640550717,3640550718,3640550719,3640550720,3640550721,3640550722,3640550723,3640550724,3640550725,3640550726,3640550727,3640550728,3640550729,3640550730,3640550731,3640550732,3640550733,3640550734,3640550735,3640550736,3640550737,3640550738,3640550739,3640550740,3640550741,3640550742,3640550743,3640550744,3640550745,3640550746,3640550747,3640550748,3640550749,3640550441,3640550442,3640550443,3640550444,3640550445,3640550446,3640550447,3640550448,3640550449,3640550450,3640550451,3640550452,3640550453,3640550454,3640550455,3640550456,3640550457,3640550458,3640550459,3640550460,3640550461,3640550462,3640550463,3640550464,3640550465,3640550466,3640550467,3640550468,3640550469,3640550470,3640550471,3640550472,3640550473,3640550474,3640550475,3640550476,3640550477,3640550478,3640550479,3640550480,3640550481,3640550482,3640550483,3640550484,3640550485,3640550486,3640550487,3640550488,3640550489,3640550490,3640550491,3640550492,3640550493,3640550494,3640550495,3640550496,3640550497,3640550498,3640550499,3640550500,3640550501,3640550502,3640550503,3640550504,3640550505,3640550506,3640550507,3640550508,3640550509,3640550510,3640550511,3640550512,3640550513,3640550514,3640550515,3640550516,3640550517,3640550518,3640550519,3640550520,3640550521,3640550522,3640550523,3640550524,3640550525,3640550526,3640550527,3640550528,3640548749,3640548750,3640548751,3640548752,3640548753,3640548754,3640548755,3640548756,3640548757,3640548758,3640548759,3640548760,3640548761,3640548762,3640548763,3640548764,3640548765,3640548766,3640548767,3640548768,3640548769,3640548770,3640548771,3640548772,3640548773,3640548774,3640548775,3640548776,3640548777,3640548778,3640548779,3640548780,3640548781,3640548782,3640548783,3640548784,3640548785,3640548786,3640548787,3640548788,3640548789,3640548790,3640548791,3640548792,3640548793,3640548794,3640548795,3640548796,3640548797,3640548798,3640548799,3640548800,3640548801,3640548802,3640548803,3640548804,3640548805,3640548806,3640548807,3640548808,3640548809,3640548810,3640544061,3640544062,3640544063,3640544064,3640544065,3640544066,3640544067,3640544068,3640544069,3640544070,3640544071,3640544072,3640544073,3640544074,3640544075,3640544076,3640544077,3640544078,3640544079,3640544080,3640544081,3640544082,3640544083,3640544084,3640544085,3640544086,3640544087,3640544088,3640544089,3640544090,3640544091,3640544092,3640544093,3640544094,3640544095,3640544096,3640544097,3640544098,3640544099,3640544100,3640544101,3640544102,3640544103,3640544104,3640544105,3640544106,3640544107,3640544108,3640544109,3640544110,3640544111,3640544112,3640544113,3640544114,3640544115,3640544116,3640544117,3640544118,3640544119,3640544120,3640544121,3640544122,3640544123,3640544124,3640544125,3640544126,3640544127,3640544128,3640544129,3640544130) SELECT * FROM MTRPhoto.crop_sum_segments WHERE crop_hashtag_id in (3640552787,3640552788,3640552789,3640552790,3640552791,3640552792,3640552793,3640552794,3640552795,3640552796,3640552797,3640552798,3640552799,3640552474,3640552475,3640552476,3640552477,3640552478,3640552479,3640552480,3640552481,3640552482,3640552483,3640552484,3640552485,3640552486,3640552487,3640552488,3640552489,3640552490,3640552491,3640552492,3640552493,3640552494,3640552495,3640552496,3640552497,3640552498,3640552499,3640552500,3640552501,3640552502,3640552503,3640552504,3640552505,3640552506,3640552507,3640552508,3640552509,3640552510,3640552511,3640552512,3640552513,3640552514,3640552515,3640552516,3640552517,3640552518,3640552519,3640552520,3640552521,3640552522,3640552523,3640552524,3640552525,3640552526,3640552527,3640552528,3640552529,3640552530,3640552531,3640552532,3640552533,3640552534,3640552535,3640552536,3640552537,3640552538,3640552539,3640552540,3640552541,3640552542,3640552543,3640552544,3640552545,3640552546,3640552547,3640552548,3640552549,3640552550,3640552551,3640552552,3640552553,3640552554,3640552555,3640550692,3640550693,3640550694,3640550695,3640550696,3640550697,3640550698,3640550699,3640550700,3640550701,3640550702,3640550703,3640550704,3640550705,3640550706,3640550707,3640550708,3640550709,3640550710,3640550711,3640550712,3640550713,3640550714,3640550715,3640550716,3640550717,3640550718,3640550719,3640550720,3640550721,3640550722,3640550723,3640550724,3640550725,3640550726,3640550727,3640550728,3640550729,3640550730,3640550731,3640550732,3640550733,3640550734,3640550735,3640550736,3640550737,3640550738,3640550739,3640550740,3640550741,3640550742,3640550743,3640550744,3640550745,3640550746,3640550747,3640550748,3640550749,3640550441,3640550442,3640550443,3640550444,3640550445,3640550446,3640550447,3640550448,3640550449,3640550450,3640550451,3640550452,3640550453,3640550454,3640550455,3640550456,3640550457,3640550458,3640550459,3640550460,3640550461,3640550462,3640550463,3640550464,3640550465,3640550466,3640550467,3640550468,3640550469,3640550470,3640550471,3640550472,3640550473,3640550474,3640550475,3640550476,3640550477,3640550478,3640550479,3640550480,3640550481,3640550482,3640550483,3640550484,3640550485,3640550486,3640550487,3640550488,3640550489,3640550490,3640550491,3640550492,3640550493,3640550494,3640550495,3640550496,3640550497,3640550498,3640550499,3640550500,3640550501,3640550502,3640550503,3640550504,3640550505,3640550506,3640550507,3640550508,3640550509,3640550510,3640550511,3640550512,3640550513,3640550514,3640550515,3640550516,3640550517,3640550518,3640550519,3640550520,3640550521,3640550522,3640550523,3640550524,3640550525,3640550526,3640550527,3640550528,3640548749,3640548750,3640548751,3640548752,3640548753,3640548754,3640548755,3640548756,3640548757,3640548758,3640548759,3640548760,3640548761,3640548762,3640548763,3640548764,3640548765,3640548766,3640548767,3640548768,3640548769,3640548770,3640548771,3640548772,3640548773,3640548774,3640548775,3640548776,3640548777,3640548778,3640548779,3640548780,3640548781,3640548782,3640548783,3640548784,3640548785,3640548786,3640548787,3640548788,3640548789,3640548790,3640548791,3640548792,3640548793,3640548794,3640548795,3640548796,3640548797,3640548798,3640548799,3640548800,3640548801,3640548802,3640548803,3640548804,3640548805,3640548806,3640548807,3640548808,3640548809,3640548810,3640544061,3640544062,3640544063,3640544064,3640544065,3640544066,3640544067,3640544068,3640544069,3640544070,3640544071,3640544072,3640544073,3640544074,3640544075,3640544076,3640544077,3640544078,3640544079,3640544080,3640544081,3640544082,3640544083,3640544084,3640544085,3640544086,3640544087,3640544088,3640544089,3640544090,3640544091,3640544092,3640544093,3640544094,3640544095,3640544096,3640544097,3640544098,3640544099,3640544100,3640544101,3640544102,3640544103,3640544104,3640544105,3640544106,3640544107,3640544108,3640544109,3640544110,3640544111,3640544112,3640544113,3640544114,3640544115,3640544116,3640544117,3640544118,3640544119,3640544120,3640544121,3640544122,3640544123,3640544124,3640544125,3640544126,3640544127,3640544128,3640544129,3640544130) begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 20023612, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015461; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =20023612 and b.mtr_portfolio_id = 20015461; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 13431365, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015461; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =13431365 and b.mtr_portfolio_id = 20015461; TODO : # On doit donc construire les chi a partir des informations dans les photos filles query : SELECT ph.photo_id FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20015462 AND mpp.hide_status=0 ORDER BY ph.size desc SELECT distinct chi.photo_id FROM MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids csp WHERE chi.id=csp.crop_hashtag_id AND chi.type=4855 AND csp.sub_photo_id IN (1332287290,1332286623,1332286627,1332287252,1332287257,1332287260,1332287261,1332287263,1332287264,1332287266,1332287282,1332287283,1332286621,1332287292,1332287293,1332287296,1332287298,1332287299,1332287357,1332287360,1332287374,1332287375,1332287671,1332287686,1332286559,1332286174,1332286183,1332286184,1332286188,1332286195,1332286486,1332286494,1332286497,1332286498,1332286502,1332286523,1332286173,1332286561,1332286562,1332286563,1332286578,1332286589,1332286600,1332286605,1332286608,1332286609,1332286611,1332286619) batch 1 select photo_id, hashtag_id, `type`, x0, x1, y0, y1, score, id from MTRPhoto.crop_hashtag_ids where photo_id in ( 1332248767,1332248764,1332248760,1332248754,1332248772,1332248757) and `type` in (4855) Loaded 373 chid ids of type : 4855 SELECT crop_hashtag_id, points FROM MTRPhoto.crop_polygon_points WHERE crop_hashtag_id in (3640552787,3640552788,3640552789,3640552790,3640552791,3640552792,3640552793,3640552794,3640552795,3640552796,3640552797,3640552798,3640552799,3640552474,3640552475,3640552476,3640552477,3640552478,3640552479,3640552480,3640552481,3640552482,3640552483,3640552484,3640552485,3640552486,3640552487,3640552488,3640552489,3640552490,3640552491,3640552492,3640552493,3640552494,3640552495,3640552496,3640552497,3640552498,3640552499,3640552500,3640552501,3640552502,3640552503,3640552504,3640552505,3640552506,3640552507,3640552508,3640552509,3640552510,3640552511,3640552512,3640552513,3640552514,3640552515,3640552516,3640552517,3640552518,3640552519,3640552520,3640552521,3640552522,3640552523,3640552524,3640552525,3640552526,3640552527,3640552528,3640552529,3640552530,3640552531,3640552532,3640552533,3640552534,3640552535,3640552536,3640552537,3640552538,3640552539,3640552540,3640552541,3640552542,3640552543,3640552544,3640552545,3640552546,3640552547,3640552548,3640552549,3640552550,3640552551,3640552552,3640552553,3640552554,3640552555,3640550692,3640550693,3640550694,3640550695,3640550696,3640550697,3640550698,3640550699,3640550700,3640550701,3640550702,3640550703,3640550704,3640550705,3640550706,3640550707,3640550708,3640550709,3640550710,3640550711,3640550712,3640550713,3640550714,3640550715,3640550716,3640550717,3640550718,3640550719,3640550720,3640550721,3640550722,3640550723,3640550724,3640550725,3640550726,3640550727,3640550728,3640550729,3640550730,3640550731,3640550732,3640550733,3640550734,3640550735,3640550736,3640550737,3640550738,3640550739,3640550740,3640550741,3640550742,3640550743,3640550744,3640550745,3640550746,3640550747,3640550748,3640550749,3640550441,3640550442,3640550443,3640550444,3640550445,3640550446,3640550447,3640550448,3640550449,3640550450,3640550451,3640550452,3640550453,3640550454,3640550455,3640550456,3640550457,3640550458,3640550459,3640550460,3640550461,3640550462,3640550463,3640550464,3640550465,3640550466,3640550467,3640550468,3640550469,3640550470,3640550471,3640550472,3640550473,3640550474,3640550475,3640550476,3640550477,3640550478,3640550479,3640550480,3640550481,3640550482,3640550483,3640550484,3640550485,3640550486,3640550487,3640550488,3640550489,3640550490,3640550491,3640550492,3640550493,3640550494,3640550495,3640550496,3640550497,3640550498,3640550499,3640550500,3640550501,3640550502,3640550503,3640550504,3640550505,3640550506,3640550507,3640550508,3640550509,3640550510,3640550511,3640550512,3640550513,3640550514,3640550515,3640550516,3640550517,3640550518,3640550519,3640550520,3640550521,3640550522,3640550523,3640550524,3640550525,3640550526,3640550527,3640550528,3640548749,3640548750,3640548751,3640548752,3640548753,3640548754,3640548755,3640548756,3640548757,3640548758,3640548759,3640548760,3640548761,3640548762,3640548763,3640548764,3640548765,3640548766,3640548767,3640548768,3640548769,3640548770,3640548771,3640548772,3640548773,3640548774,3640548775,3640548776,3640548777,3640548778,3640548779,3640548780,3640548781,3640548782,3640548783,3640548784,3640548785,3640548786,3640548787,3640548788,3640548789,3640548790,3640548791,3640548792,3640548793,3640548794,3640548795,3640548796,3640548797,3640548798,3640548799,3640548800,3640548801,3640548802,3640548803,3640548804,3640548805,3640548806,3640548807,3640548808,3640548809,3640548810,3640544061,3640544062,3640544063,3640544064,3640544065,3640544066,3640544067,3640544068,3640544069,3640544070,3640544071,3640544072,3640544073,3640544074,3640544075,3640544076,3640544077,3640544078,3640544079,3640544080,3640544081,3640544082,3640544083,3640544084,3640544085,3640544086,3640544087,3640544088,3640544089,3640544090,3640544091,3640544092,3640544093,3640544094,3640544095,3640544096,3640544097,3640544098,3640544099,3640544100,3640544101,3640544102,3640544103,3640544104,3640544105,3640544106,3640544107,3640544108,3640544109,3640544110,3640544111,3640544112,3640544113,3640544114,3640544115,3640544116,3640544117,3640544118,3640544119,3640544120,3640544121,3640544122,3640544123,3640544124,3640544125,3640544126,3640544127,3640544128,3640544129,3640544130) SELECT * FROM MTRPhoto.crop_segments WHERE crop_hashtag_id in (3640552787,3640552788,3640552789,3640552790,3640552791,3640552792,3640552793,3640552794,3640552795,3640552796,3640552797,3640552798,3640552799,3640552474,3640552475,3640552476,3640552477,3640552478,3640552479,3640552480,3640552481,3640552482,3640552483,3640552484,3640552485,3640552486,3640552487,3640552488,3640552489,3640552490,3640552491,3640552492,3640552493,3640552494,3640552495,3640552496,3640552497,3640552498,3640552499,3640552500,3640552501,3640552502,3640552503,3640552504,3640552505,3640552506,3640552507,3640552508,3640552509,3640552510,3640552511,3640552512,3640552513,3640552514,3640552515,3640552516,3640552517,3640552518,3640552519,3640552520,3640552521,3640552522,3640552523,3640552524,3640552525,3640552526,3640552527,3640552528,3640552529,3640552530,3640552531,3640552532,3640552533,3640552534,3640552535,3640552536,3640552537,3640552538,3640552539,3640552540,3640552541,3640552542,3640552543,3640552544,3640552545,3640552546,3640552547,3640552548,3640552549,3640552550,3640552551,3640552552,3640552553,3640552554,3640552555,3640550692,3640550693,3640550694,3640550695,3640550696,3640550697,3640550698,3640550699,3640550700,3640550701,3640550702,3640550703,3640550704,3640550705,3640550706,3640550707,3640550708,3640550709,3640550710,3640550711,3640550712,3640550713,3640550714,3640550715,3640550716,3640550717,3640550718,3640550719,3640550720,3640550721,3640550722,3640550723,3640550724,3640550725,3640550726,3640550727,3640550728,3640550729,3640550730,3640550731,3640550732,3640550733,3640550734,3640550735,3640550736,3640550737,3640550738,3640550739,3640550740,3640550741,3640550742,3640550743,3640550744,3640550745,3640550746,3640550747,3640550748,3640550749,3640550441,3640550442,3640550443,3640550444,3640550445,3640550446,3640550447,3640550448,3640550449,3640550450,3640550451,3640550452,3640550453,3640550454,3640550455,3640550456,3640550457,3640550458,3640550459,3640550460,3640550461,3640550462,3640550463,3640550464,3640550465,3640550466,3640550467,3640550468,3640550469,3640550470,3640550471,3640550472,3640550473,3640550474,3640550475,3640550476,3640550477,3640550478,3640550479,3640550480,3640550481,3640550482,3640550483,3640550484,3640550485,3640550486,3640550487,3640550488,3640550489,3640550490,3640550491,3640550492,3640550493,3640550494,3640550495,3640550496,3640550497,3640550498,3640550499,3640550500,3640550501,3640550502,3640550503,3640550504,3640550505,3640550506,3640550507,3640550508,3640550509,3640550510,3640550511,3640550512,3640550513,3640550514,3640550515,3640550516,3640550517,3640550518,3640550519,3640550520,3640550521,3640550522,3640550523,3640550524,3640550525,3640550526,3640550527,3640550528,3640548749,3640548750,3640548751,3640548752,3640548753,3640548754,3640548755,3640548756,3640548757,3640548758,3640548759,3640548760,3640548761,3640548762,3640548763,3640548764,3640548765,3640548766,3640548767,3640548768,3640548769,3640548770,3640548771,3640548772,3640548773,3640548774,3640548775,3640548776,3640548777,3640548778,3640548779,3640548780,3640548781,3640548782,3640548783,3640548784,3640548785,3640548786,3640548787,3640548788,3640548789,3640548790,3640548791,3640548792,3640548793,3640548794,3640548795,3640548796,3640548797,3640548798,3640548799,3640548800,3640548801,3640548802,3640548803,3640548804,3640548805,3640548806,3640548807,3640548808,3640548809,3640548810,3640544061,3640544062,3640544063,3640544064,3640544065,3640544066,3640544067,3640544068,3640544069,3640544070,3640544071,3640544072,3640544073,3640544074,3640544075,3640544076,3640544077,3640544078,3640544079,3640544080,3640544081,3640544082,3640544083,3640544084,3640544085,3640544086,3640544087,3640544088,3640544089,3640544090,3640544091,3640544092,3640544093,3640544094,3640544095,3640544096,3640544097,3640544098,3640544099,3640544100,3640544101,3640544102,3640544103,3640544104,3640544105,3640544106,3640544107,3640544108,3640544109,3640544110,3640544111,3640544112,3640544113,3640544114,3640544115,3640544116,3640544117,3640544118,3640544119,3640544120,3640544121,3640544122,3640544123,3640544124,3640544125,3640544126,3640544127,3640544128,3640544129,3640544130) SELECT * FROM MTRPhoto.crop_sum_segments WHERE crop_hashtag_id in (3640552787,3640552788,3640552789,3640552790,3640552791,3640552792,3640552793,3640552794,3640552795,3640552796,3640552797,3640552798,3640552799,3640552474,3640552475,3640552476,3640552477,3640552478,3640552479,3640552480,3640552481,3640552482,3640552483,3640552484,3640552485,3640552486,3640552487,3640552488,3640552489,3640552490,3640552491,3640552492,3640552493,3640552494,3640552495,3640552496,3640552497,3640552498,3640552499,3640552500,3640552501,3640552502,3640552503,3640552504,3640552505,3640552506,3640552507,3640552508,3640552509,3640552510,3640552511,3640552512,3640552513,3640552514,3640552515,3640552516,3640552517,3640552518,3640552519,3640552520,3640552521,3640552522,3640552523,3640552524,3640552525,3640552526,3640552527,3640552528,3640552529,3640552530,3640552531,3640552532,3640552533,3640552534,3640552535,3640552536,3640552537,3640552538,3640552539,3640552540,3640552541,3640552542,3640552543,3640552544,3640552545,3640552546,3640552547,3640552548,3640552549,3640552550,3640552551,3640552552,3640552553,3640552554,3640552555,3640550692,3640550693,3640550694,3640550695,3640550696,3640550697,3640550698,3640550699,3640550700,3640550701,3640550702,3640550703,3640550704,3640550705,3640550706,3640550707,3640550708,3640550709,3640550710,3640550711,3640550712,3640550713,3640550714,3640550715,3640550716,3640550717,3640550718,3640550719,3640550720,3640550721,3640550722,3640550723,3640550724,3640550725,3640550726,3640550727,3640550728,3640550729,3640550730,3640550731,3640550732,3640550733,3640550734,3640550735,3640550736,3640550737,3640550738,3640550739,3640550740,3640550741,3640550742,3640550743,3640550744,3640550745,3640550746,3640550747,3640550748,3640550749,3640550441,3640550442,3640550443,3640550444,3640550445,3640550446,3640550447,3640550448,3640550449,3640550450,3640550451,3640550452,3640550453,3640550454,3640550455,3640550456,3640550457,3640550458,3640550459,3640550460,3640550461,3640550462,3640550463,3640550464,3640550465,3640550466,3640550467,3640550468,3640550469,3640550470,3640550471,3640550472,3640550473,3640550474,3640550475,3640550476,3640550477,3640550478,3640550479,3640550480,3640550481,3640550482,3640550483,3640550484,3640550485,3640550486,3640550487,3640550488,3640550489,3640550490,3640550491,3640550492,3640550493,3640550494,3640550495,3640550496,3640550497,3640550498,3640550499,3640550500,3640550501,3640550502,3640550503,3640550504,3640550505,3640550506,3640550507,3640550508,3640550509,3640550510,3640550511,3640550512,3640550513,3640550514,3640550515,3640550516,3640550517,3640550518,3640550519,3640550520,3640550521,3640550522,3640550523,3640550524,3640550525,3640550526,3640550527,3640550528,3640548749,3640548750,3640548751,3640548752,3640548753,3640548754,3640548755,3640548756,3640548757,3640548758,3640548759,3640548760,3640548761,3640548762,3640548763,3640548764,3640548765,3640548766,3640548767,3640548768,3640548769,3640548770,3640548771,3640548772,3640548773,3640548774,3640548775,3640548776,3640548777,3640548778,3640548779,3640548780,3640548781,3640548782,3640548783,3640548784,3640548785,3640548786,3640548787,3640548788,3640548789,3640548790,3640548791,3640548792,3640548793,3640548794,3640548795,3640548796,3640548797,3640548798,3640548799,3640548800,3640548801,3640548802,3640548803,3640548804,3640548805,3640548806,3640548807,3640548808,3640548809,3640548810,3640544061,3640544062,3640544063,3640544064,3640544065,3640544066,3640544067,3640544068,3640544069,3640544070,3640544071,3640544072,3640544073,3640544074,3640544075,3640544076,3640544077,3640544078,3640544079,3640544080,3640544081,3640544082,3640544083,3640544084,3640544085,3640544086,3640544087,3640544088,3640544089,3640544090,3640544091,3640544092,3640544093,3640544094,3640544095,3640544096,3640544097,3640544098,3640544099,3640544100,3640544101,3640544102,3640544103,3640544104,3640544105,3640544106,3640544107,3640544108,3640544109,3640544110,3640544111,3640544112,3640544113,3640544114,3640544115,3640544116,3640544117,3640544118,3640544119,3640544120,3640544121,3640544122,3640544123,3640544124,3640544125,3640544126,3640544127,3640544128,3640544129,3640544130) begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 20023613, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015462; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =20023613 and b.mtr_portfolio_id = 20015462; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 13431366, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015462; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =13431366 and b.mtr_portfolio_id = 20015462; TODO : # On doit donc construire les chi a partir des informations dans les photos filles query : SELECT ph.photo_id FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20015463 AND mpp.hide_status=0 ORDER BY ph.size desc SELECT distinct chi.photo_id FROM MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids csp WHERE chi.id=csp.crop_hashtag_id AND chi.type=4855 AND csp.sub_photo_id IN (1332286159,1332286569,1332287254,1332287255,1332287256,1332287273,1332287286,1332287303,1332287304,1332287307) batch 1 select photo_id, hashtag_id, `type`, x0, x1, y0, y1, score, id from MTRPhoto.crop_hashtag_ids where photo_id in ( 1332248772,1332248757,1332248764,1332248760) and `type` in (4855) Loaded 298 chid ids of type : 4855 SELECT crop_hashtag_id, points FROM MTRPhoto.crop_polygon_points WHERE crop_hashtag_id in (3640552474,3640552475,3640552476,3640552477,3640552478,3640552479,3640552480,3640552481,3640552482,3640552483,3640552484,3640552485,3640552486,3640552487,3640552488,3640552489,3640552490,3640552491,3640552492,3640552493,3640552494,3640552495,3640552496,3640552497,3640552498,3640552499,3640552500,3640552501,3640552502,3640552503,3640552504,3640552505,3640552506,3640552507,3640552508,3640552509,3640552510,3640552511,3640552512,3640552513,3640552514,3640552515,3640552516,3640552517,3640552518,3640552519,3640552520,3640552521,3640552522,3640552523,3640552524,3640552525,3640552526,3640552527,3640552528,3640552529,3640552530,3640552531,3640552532,3640552533,3640552534,3640552535,3640552536,3640552537,3640552538,3640552539,3640552540,3640552541,3640552542,3640552543,3640552544,3640552545,3640552546,3640552547,3640552548,3640552549,3640552550,3640552551,3640552552,3640552553,3640552554,3640552555,3640550692,3640550693,3640550694,3640550695,3640550696,3640550697,3640550698,3640550699,3640550700,3640550701,3640550702,3640550703,3640550704,3640550705,3640550706,3640550707,3640550708,3640550709,3640550710,3640550711,3640550712,3640550713,3640550714,3640550715,3640550716,3640550717,3640550718,3640550719,3640550720,3640550721,3640550722,3640550723,3640550724,3640550725,3640550726,3640550727,3640550728,3640550729,3640550730,3640550731,3640550732,3640550733,3640550734,3640550735,3640550736,3640550737,3640550738,3640550739,3640550740,3640550741,3640550742,3640550743,3640550744,3640550745,3640550746,3640550747,3640550748,3640550749,3640550441,3640550442,3640550443,3640550444,3640550445,3640550446,3640550447,3640550448,3640550449,3640550450,3640550451,3640550452,3640550453,3640550454,3640550455,3640550456,3640550457,3640550458,3640550459,3640550460,3640550461,3640550462,3640550463,3640550464,3640550465,3640550466,3640550467,3640550468,3640550469,3640550470,3640550471,3640550472,3640550473,3640550474,3640550475,3640550476,3640550477,3640550478,3640550479,3640550480,3640550481,3640550482,3640550483,3640550484,3640550485,3640550486,3640550487,3640550488,3640550489,3640550490,3640550491,3640550492,3640550493,3640550494,3640550495,3640550496,3640550497,3640550498,3640550499,3640550500,3640550501,3640550502,3640550503,3640550504,3640550505,3640550506,3640550507,3640550508,3640550509,3640550510,3640550511,3640550512,3640550513,3640550514,3640550515,3640550516,3640550517,3640550518,3640550519,3640550520,3640550521,3640550522,3640550523,3640550524,3640550525,3640550526,3640550527,3640550528,3640544061,3640544062,3640544063,3640544064,3640544065,3640544066,3640544067,3640544068,3640544069,3640544070,3640544071,3640544072,3640544073,3640544074,3640544075,3640544076,3640544077,3640544078,3640544079,3640544080,3640544081,3640544082,3640544083,3640544084,3640544085,3640544086,3640544087,3640544088,3640544089,3640544090,3640544091,3640544092,3640544093,3640544094,3640544095,3640544096,3640544097,3640544098,3640544099,3640544100,3640544101,3640544102,3640544103,3640544104,3640544105,3640544106,3640544107,3640544108,3640544109,3640544110,3640544111,3640544112,3640544113,3640544114,3640544115,3640544116,3640544117,3640544118,3640544119,3640544120,3640544121,3640544122,3640544123,3640544124,3640544125,3640544126,3640544127,3640544128,3640544129,3640544130) SELECT * FROM MTRPhoto.crop_segments WHERE crop_hashtag_id in (3640552474,3640552475,3640552476,3640552477,3640552478,3640552479,3640552480,3640552481,3640552482,3640552483,3640552484,3640552485,3640552486,3640552487,3640552488,3640552489,3640552490,3640552491,3640552492,3640552493,3640552494,3640552495,3640552496,3640552497,3640552498,3640552499,3640552500,3640552501,3640552502,3640552503,3640552504,3640552505,3640552506,3640552507,3640552508,3640552509,3640552510,3640552511,3640552512,3640552513,3640552514,3640552515,3640552516,3640552517,3640552518,3640552519,3640552520,3640552521,3640552522,3640552523,3640552524,3640552525,3640552526,3640552527,3640552528,3640552529,3640552530,3640552531,3640552532,3640552533,3640552534,3640552535,3640552536,3640552537,3640552538,3640552539,3640552540,3640552541,3640552542,3640552543,3640552544,3640552545,3640552546,3640552547,3640552548,3640552549,3640552550,3640552551,3640552552,3640552553,3640552554,3640552555,3640550692,3640550693,3640550694,3640550695,3640550696,3640550697,3640550698,3640550699,3640550700,3640550701,3640550702,3640550703,3640550704,3640550705,3640550706,3640550707,3640550708,3640550709,3640550710,3640550711,3640550712,3640550713,3640550714,3640550715,3640550716,3640550717,3640550718,3640550719,3640550720,3640550721,3640550722,3640550723,3640550724,3640550725,3640550726,3640550727,3640550728,3640550729,3640550730,3640550731,3640550732,3640550733,3640550734,3640550735,3640550736,3640550737,3640550738,3640550739,3640550740,3640550741,3640550742,3640550743,3640550744,3640550745,3640550746,3640550747,3640550748,3640550749,3640550441,3640550442,3640550443,3640550444,3640550445,3640550446,3640550447,3640550448,3640550449,3640550450,3640550451,3640550452,3640550453,3640550454,3640550455,3640550456,3640550457,3640550458,3640550459,3640550460,3640550461,3640550462,3640550463,3640550464,3640550465,3640550466,3640550467,3640550468,3640550469,3640550470,3640550471,3640550472,3640550473,3640550474,3640550475,3640550476,3640550477,3640550478,3640550479,3640550480,3640550481,3640550482,3640550483,3640550484,3640550485,3640550486,3640550487,3640550488,3640550489,3640550490,3640550491,3640550492,3640550493,3640550494,3640550495,3640550496,3640550497,3640550498,3640550499,3640550500,3640550501,3640550502,3640550503,3640550504,3640550505,3640550506,3640550507,3640550508,3640550509,3640550510,3640550511,3640550512,3640550513,3640550514,3640550515,3640550516,3640550517,3640550518,3640550519,3640550520,3640550521,3640550522,3640550523,3640550524,3640550525,3640550526,3640550527,3640550528,3640544061,3640544062,3640544063,3640544064,3640544065,3640544066,3640544067,3640544068,3640544069,3640544070,3640544071,3640544072,3640544073,3640544074,3640544075,3640544076,3640544077,3640544078,3640544079,3640544080,3640544081,3640544082,3640544083,3640544084,3640544085,3640544086,3640544087,3640544088,3640544089,3640544090,3640544091,3640544092,3640544093,3640544094,3640544095,3640544096,3640544097,3640544098,3640544099,3640544100,3640544101,3640544102,3640544103,3640544104,3640544105,3640544106,3640544107,3640544108,3640544109,3640544110,3640544111,3640544112,3640544113,3640544114,3640544115,3640544116,3640544117,3640544118,3640544119,3640544120,3640544121,3640544122,3640544123,3640544124,3640544125,3640544126,3640544127,3640544128,3640544129,3640544130) SELECT * FROM MTRPhoto.crop_sum_segments WHERE crop_hashtag_id in (3640552474,3640552475,3640552476,3640552477,3640552478,3640552479,3640552480,3640552481,3640552482,3640552483,3640552484,3640552485,3640552486,3640552487,3640552488,3640552489,3640552490,3640552491,3640552492,3640552493,3640552494,3640552495,3640552496,3640552497,3640552498,3640552499,3640552500,3640552501,3640552502,3640552503,3640552504,3640552505,3640552506,3640552507,3640552508,3640552509,3640552510,3640552511,3640552512,3640552513,3640552514,3640552515,3640552516,3640552517,3640552518,3640552519,3640552520,3640552521,3640552522,3640552523,3640552524,3640552525,3640552526,3640552527,3640552528,3640552529,3640552530,3640552531,3640552532,3640552533,3640552534,3640552535,3640552536,3640552537,3640552538,3640552539,3640552540,3640552541,3640552542,3640552543,3640552544,3640552545,3640552546,3640552547,3640552548,3640552549,3640552550,3640552551,3640552552,3640552553,3640552554,3640552555,3640550692,3640550693,3640550694,3640550695,3640550696,3640550697,3640550698,3640550699,3640550700,3640550701,3640550702,3640550703,3640550704,3640550705,3640550706,3640550707,3640550708,3640550709,3640550710,3640550711,3640550712,3640550713,3640550714,3640550715,3640550716,3640550717,3640550718,3640550719,3640550720,3640550721,3640550722,3640550723,3640550724,3640550725,3640550726,3640550727,3640550728,3640550729,3640550730,3640550731,3640550732,3640550733,3640550734,3640550735,3640550736,3640550737,3640550738,3640550739,3640550740,3640550741,3640550742,3640550743,3640550744,3640550745,3640550746,3640550747,3640550748,3640550749,3640550441,3640550442,3640550443,3640550444,3640550445,3640550446,3640550447,3640550448,3640550449,3640550450,3640550451,3640550452,3640550453,3640550454,3640550455,3640550456,3640550457,3640550458,3640550459,3640550460,3640550461,3640550462,3640550463,3640550464,3640550465,3640550466,3640550467,3640550468,3640550469,3640550470,3640550471,3640550472,3640550473,3640550474,3640550475,3640550476,3640550477,3640550478,3640550479,3640550480,3640550481,3640550482,3640550483,3640550484,3640550485,3640550486,3640550487,3640550488,3640550489,3640550490,3640550491,3640550492,3640550493,3640550494,3640550495,3640550496,3640550497,3640550498,3640550499,3640550500,3640550501,3640550502,3640550503,3640550504,3640550505,3640550506,3640550507,3640550508,3640550509,3640550510,3640550511,3640550512,3640550513,3640550514,3640550515,3640550516,3640550517,3640550518,3640550519,3640550520,3640550521,3640550522,3640550523,3640550524,3640550525,3640550526,3640550527,3640550528,3640544061,3640544062,3640544063,3640544064,3640544065,3640544066,3640544067,3640544068,3640544069,3640544070,3640544071,3640544072,3640544073,3640544074,3640544075,3640544076,3640544077,3640544078,3640544079,3640544080,3640544081,3640544082,3640544083,3640544084,3640544085,3640544086,3640544087,3640544088,3640544089,3640544090,3640544091,3640544092,3640544093,3640544094,3640544095,3640544096,3640544097,3640544098,3640544099,3640544100,3640544101,3640544102,3640544103,3640544104,3640544105,3640544106,3640544107,3640544108,3640544109,3640544110,3640544111,3640544112,3640544113,3640544114,3640544115,3640544116,3640544117,3640544118,3640544119,3640544120,3640544121,3640544122,3640544123,3640544124,3640544125,3640544126,3640544127,3640544128,3640544129,3640544130) begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : begin to find the sub_photo_id : insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 20023601, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015463; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =20023601 and b.mtr_portfolio_id = 20015463; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 11609172, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015463; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =11609172 and b.mtr_portfolio_id = 20015463; TODO : # On doit donc construire les chi a partir des informations dans les photos filles query : SELECT ph.photo_id FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20015464 AND mpp.hide_status=0 ORDER BY ph.size desc SELECT distinct chi.photo_id FROM MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids csp WHERE chi.id=csp.crop_hashtag_id AND chi.type=4855 AND csp.sub_photo_id IN (1332286193) batch 1 select photo_id, hashtag_id, `type`, x0, x1, y0, y1, score, id from MTRPhoto.crop_hashtag_ids where photo_id in ( 1332248757) and `type` in (4855) Loaded 82 chid ids of type : 4855 SELECT crop_hashtag_id, points FROM MTRPhoto.crop_polygon_points WHERE crop_hashtag_id in (3640552540,3640552513,3640552475,3640552514,3640552506,3640552519,3640552505,3640552489,3640552545,3640552527,3640552517,3640552502,3640552501,3640552493,3640552530,3640552547,3640552490,3640552555,3640552546,3640552536,3640552510,3640552515,3640552504,3640552520,3640552483,3640552529,3640552538,3640552524,3640552508,3640552516,3640552494,3640552544,3640552487,3640552523,3640552507,3640552495,3640552543,3640552521,3640552509,3640552535,3640552534,3640552522,3640552532,3640552539,3640552500,3640552488,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640552482,3640552476,3640552486,3640552484,3640552512,3640552533,3640552541,3640552492,3640552551,3640552503,3640552498,3640552531,3640552479,3640552542,3640552497,3640552491,3640552485,3640552480,3640552481,3640552477,3640552518,3640552526,3640552548,3640552496,3640552528,3640552550,3640552553) SELECT * FROM MTRPhoto.crop_segments WHERE crop_hashtag_id in (3640552540,3640552513,3640552475,3640552514,3640552506,3640552519,3640552505,3640552489,3640552545,3640552527,3640552517,3640552502,3640552501,3640552493,3640552530,3640552547,3640552490,3640552555,3640552546,3640552536,3640552510,3640552515,3640552504,3640552520,3640552483,3640552529,3640552538,3640552524,3640552508,3640552516,3640552494,3640552544,3640552487,3640552523,3640552507,3640552495,3640552543,3640552521,3640552509,3640552535,3640552534,3640552522,3640552532,3640552539,3640552500,3640552488,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640552482,3640552476,3640552486,3640552484,3640552512,3640552533,3640552541,3640552492,3640552551,3640552503,3640552498,3640552531,3640552479,3640552542,3640552497,3640552491,3640552485,3640552480,3640552481,3640552477,3640552518,3640552526,3640552548,3640552496,3640552528,3640552550,3640552553) SELECT * FROM MTRPhoto.crop_sum_segments WHERE crop_hashtag_id in (3640552540,3640552513,3640552475,3640552514,3640552506,3640552519,3640552505,3640552489,3640552545,3640552527,3640552517,3640552502,3640552501,3640552493,3640552530,3640552547,3640552490,3640552555,3640552546,3640552536,3640552510,3640552515,3640552504,3640552520,3640552483,3640552529,3640552538,3640552524,3640552508,3640552516,3640552494,3640552544,3640552487,3640552523,3640552507,3640552495,3640552543,3640552521,3640552509,3640552535,3640552534,3640552522,3640552532,3640552539,3640552500,3640552488,3640552474,3640552549,3640552552,3640552525,3640552478,3640552554,3640552511,3640552499,3640552537,3640552482,3640552476,3640552486,3640552484,3640552512,3640552533,3640552541,3640552492,3640552551,3640552503,3640552498,3640552531,3640552479,3640552542,3640552497,3640552491,3640552485,3640552480,3640552481,3640552477,3640552518,3640552526,3640552548,3640552496,3640552528,3640552550,3640552553) begin to find the sub_photo_id : insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 20023603, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015464; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =20023603 and b.mtr_portfolio_id = 20015464; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id) select 11609174, mtr_photo_id, 0 from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20015464; update MTRUser.mtr_portfolio_photos as a inner join MTRUser.mtr_portfolio_photos as b on a.mtr_photo_id = b.mtr_photo_id set a.hide_status = b.hide_status where a.mtr_portfolio_id =11609174 and b.mtr_portfolio_id = 20015464; UPDATE MTRPhoto.mtr_port_to_port_ids set last_updated_at_asc=NOW(), updated_at=NOW() WHERE id in (12747461,12747462,12747463,12747464,12747465,12747470,12747472,12747473,12747474,12747475,12747476,12747477,12747479,12747480,12747482,12747483,12747484,12747485,12747486); UPDATE MTRPhoto.mtr_port_to_port_ids set last_updated_at_asc=NOW(), updated_at=NOW() WHERE id in (12754709,12754710,12754711,12754712,12754713,12754716,12754718,12754719,12754720,12754721,12754722,12754723,12754724,12754725,12754714,12754726,12754727,12754715,12754717); UPDATE MTRPhoto.mtr_port_to_port_ids set last_updated_at_asc=NOW(), updated_at=NOW() WHERE id in (5732902,5732903,5732904,5732905,5732906,5732909,5732911,5732912,5732913,5732914,5732915,5732916,5732917,5732918,5732907,7242867,7242868,5732908,5732910); To test ! Use context local managing function ! After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20009037]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : consolidate_hashtags_from_manual_portfolio we use saveGeneral [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754] map_info['map_portfolio_photo'] : {20009037: [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754]} final : False mtd_id 4742 list_pids : [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754] Looping around the photos to save general results len do output : 6 /Tassign value string error string indices must be integers invalid literal for int() with base 10: 'T' 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 : [('4742', '20009037', '1332248772', '0', '0', '-1.0', '501120777', '1.0', '2559007'), ('4742', '20009037', '1332248767', '0', '0', '-1.0', '501120777', '1.0', '2559007'), ('4742', '20009037', '1332248764', '0', '0', '-1.0', '501120777', '1.0', '2559007'), ('4742', '20009037', '1332248760', '0', '0', '-1.0', '501120777', '1.0', '2559007'), ('4742', '20009037', '1332248757', '0', '0', '-1.0', '501120777', '1.0', '2559007'), ('4742', '20009037', '1332248754', '0', '0', '-1.0', '501120777', '1.0', '2559007')] time used for this insertion : 0.01190495491027832 save_final save missing photos in datou_result : time spend for datou_step_exec : 23.58624243736267 time spend to save output : 0.012061834335327148 total time spend for step 2 : 23.598304271697998 step3:rle_unique_nms_with_priority Thu Feb 6 09:25:06 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 : ['temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg', 'temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg', 'temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg', 'temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg', 'temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg', 'temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg'] We expect there is only one output and this part is used while all output are not tuple or array We expect there is only one output and this part is used while all output are not tuple or array We expect there is only one output and this part is used while all output are not tuple or array We expect there is only one output and this part is used while all output are not tuple or array We expect there is only one output and this part is used while all output are not tuple or array We expect there is only one output and this part is used while all output are not tuple or array VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :6, first value : ['temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg'] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20009037) Here we display some param of map_info ! map_filenames : {'temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg': 1332248772, 'temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg': 1332248767, 'temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg': 1332248764, 'temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg': 1332248760, 'temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg': 1332248757, 'temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg': 1332248754} map_photo_id_path_extension : {1332248772: {'path': 'temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg', 'extension': 'jpg'}, 1332248767: {'path': 'temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg', 'extension': 'jpg'}, 1332248764: {'path': 'temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg', 'extension': 'jpg'}, 1332248760: {'path': 'temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg', 'extension': 'jpg'}, 1332248757: {'path': 'temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg', 'extension': 'jpg'}, 1332248754: {'path': 'temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg', 'extension': 'jpg'}} map_subphoto_mainphoto : {} Begin step rle-unique-nms on traite la photo : temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg on traite la photo : temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg on traite la photo : temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg on traite la photo : temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg on traite la photo : temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg on traite la photo : temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg batch 1 select photo_id, hashtag_id, `type`, x0, x1, y0, y1, score, id from MTRPhoto.crop_hashtag_ids where photo_id in ( 1332248772,1332248767,1332248764,1332248760,1332248757,1332248754) and `type` in (4857) and hashtag_id in (493012381,2107760329,605975549,492626781,1608424396,530726390,492631919,494789423,2107761555,492741797,2107761554,2107760238,628944319,2107755846,492628673,492774966,492668766) Loaded 206 chid ids of type : 4857 SELECT crop_hashtag_id, points FROM MTRPhoto.crop_polygon_points WHERE crop_hashtag_id in (3640969307,3640969257,3640969258,3640969259,3640969260,3640969261,3640969262,3640969263,3640969264,3640969265,3640969266,3640969309,3640969310,3640969311,3640969308,3640969444,3640969439,3640969337,3640969339,3640969340,3640969341,3640969334,3640969342,3640969343,3640969344,3640969345,3640969346,3640969347,3640969348,3640969349,3640969335,3640969350,3640969351,3640969336,3640969352,3640969338,3640969353,3640969354,3640969356,3640969355,3640969267,3640969268,3640969269,3640969270,3640969271,3640969272,3640969273,3640969449,3640969274,3640969275,3640969445,3640969577,3640969578,3640969576,3640969575,3640969585,3640969312,3640969313,3640969314,3640969358,3640969359,3640969360,3640969361,3640969369,3640969362,3640969363,3640969364,3640969365,3640969366,3640969367,3640969357,3640969368,3640969276,3640969277,3640969278,3640969440,3640969437,3640969429,3640969579,3640969315,3640969321,3640969320,3640969316,3640969317,3640969318,3640969319,3640969322,3640969371,3640969388,3640969372,3640969373,3640969389,3640969370,3640969374,3640969375,3640969376,3640969377,3640969378,3640969379,3640969380,3640969381,3640969382,3640969383,3640969384,3640969385,3640969386,3640969387,3640969279,3640969280,3640969281,3640969282,3640969283,3640969284,3640969285,3640969286,3640969287,3640969442,3640969443,3640969438,3640969430,3640969431,3640969432,3640969433,3640969446,3640969447,3640969580,3640969323,3640969324,3640969325,3640969326,3640969327,3640969392,3640969393,3640969394,3640969395,3640969390,3640969396,3640969397,3640969398,3640969399,3640969400,3640969448,3640969401,3640969402,3640969391,3640969403,3640969288,3640969289,3640969451,3640969290,3640969291,3640969292,3640969293,3640969294,3640969434,3640969468,3640969329,3640969328,3640969332,3640969330,3640969331,3640969333,3640969407,3640969408,3640969428,3640969409,3640969410,3640969411,3640969412,3640969413,3640969414,3640969415,3640969416,3640969417,3640969404,3640969418,3640969419,3640969420,3640969421,3640969405,3640969422,3640969406,3640969423,3640969426,3640969424,3640969425,3640969427,3640969295,3640969296,3640969297,3640969298,3640969299,3640969300,3640969301,3640969302,3640969303,3640969304,3640969305,3640969306,3640969441,3640969435,3640969436,3640969581,3640969583,3640969584,3640969582) SELECT * FROM MTRPhoto.crop_segments WHERE crop_hashtag_id in (3640969307,3640969257,3640969258,3640969259,3640969260,3640969261,3640969262,3640969263,3640969264,3640969265,3640969266,3640969309,3640969310,3640969311,3640969308,3640969444,3640969439,3640969337,3640969339,3640969340,3640969341,3640969334,3640969342,3640969343,3640969344,3640969345,3640969346,3640969347,3640969348,3640969349,3640969335,3640969350,3640969351,3640969336,3640969352,3640969338,3640969353,3640969354,3640969356,3640969355,3640969267,3640969268,3640969269,3640969270,3640969271,3640969272,3640969273,3640969449,3640969274,3640969275,3640969445,3640969577,3640969578,3640969576,3640969575,3640969585,3640969312,3640969313,3640969314,3640969358,3640969359,3640969360,3640969361,3640969369,3640969362,3640969363,3640969364,3640969365,3640969366,3640969367,3640969357,3640969368,3640969276,3640969277,3640969278,3640969440,3640969437,3640969429,3640969579,3640969315,3640969321,3640969320,3640969316,3640969317,3640969318,3640969319,3640969322,3640969371,3640969388,3640969372,3640969373,3640969389,3640969370,3640969374,3640969375,3640969376,3640969377,3640969378,3640969379,3640969380,3640969381,3640969382,3640969383,3640969384,3640969385,3640969386,3640969387,3640969279,3640969280,3640969281,3640969282,3640969283,3640969284,3640969285,3640969286,3640969287,3640969442,3640969443,3640969438,3640969430,3640969431,3640969432,3640969433,3640969446,3640969447,3640969580,3640969323,3640969324,3640969325,3640969326,3640969327,3640969392,3640969393,3640969394,3640969395,3640969390,3640969396,3640969397,3640969398,3640969399,3640969400,3640969448,3640969401,3640969402,3640969391,3640969403,3640969288,3640969289,3640969451,3640969290,3640969291,3640969292,3640969293,3640969294,3640969434,3640969468,3640969329,3640969328,3640969332,3640969330,3640969331,3640969333,3640969407,3640969408,3640969428,3640969409,3640969410,3640969411,3640969412,3640969413,3640969414,3640969415,3640969416,3640969417,3640969404,3640969418,3640969419,3640969420,3640969421,3640969405,3640969422,3640969406,3640969423,3640969426,3640969424,3640969425,3640969427,3640969295,3640969296,3640969297,3640969298,3640969299,3640969300,3640969301,3640969302,3640969303,3640969304,3640969305,3640969306,3640969441,3640969435,3640969436,3640969581,3640969583,3640969584,3640969582) SELECT * FROM MTRPhoto.crop_sum_segments WHERE crop_hashtag_id in (3640969307,3640969257,3640969258,3640969259,3640969260,3640969261,3640969262,3640969263,3640969264,3640969265,3640969266,3640969309,3640969310,3640969311,3640969308,3640969444,3640969439,3640969337,3640969339,3640969340,3640969341,3640969334,3640969342,3640969343,3640969344,3640969345,3640969346,3640969347,3640969348,3640969349,3640969335,3640969350,3640969351,3640969336,3640969352,3640969338,3640969353,3640969354,3640969356,3640969355,3640969267,3640969268,3640969269,3640969270,3640969271,3640969272,3640969273,3640969449,3640969274,3640969275,3640969445,3640969577,3640969578,3640969576,3640969575,3640969585,3640969312,3640969313,3640969314,3640969358,3640969359,3640969360,3640969361,3640969369,3640969362,3640969363,3640969364,3640969365,3640969366,3640969367,3640969357,3640969368,3640969276,3640969277,3640969278,3640969440,3640969437,3640969429,3640969579,3640969315,3640969321,3640969320,3640969316,3640969317,3640969318,3640969319,3640969322,3640969371,3640969388,3640969372,3640969373,3640969389,3640969370,3640969374,3640969375,3640969376,3640969377,3640969378,3640969379,3640969380,3640969381,3640969382,3640969383,3640969384,3640969385,3640969386,3640969387,3640969279,3640969280,3640969281,3640969282,3640969283,3640969284,3640969285,3640969286,3640969287,3640969442,3640969443,3640969438,3640969430,3640969431,3640969432,3640969433,3640969446,3640969447,3640969580,3640969323,3640969324,3640969325,3640969326,3640969327,3640969392,3640969393,3640969394,3640969395,3640969390,3640969396,3640969397,3640969398,3640969399,3640969400,3640969448,3640969401,3640969402,3640969391,3640969403,3640969288,3640969289,3640969451,3640969290,3640969291,3640969292,3640969293,3640969294,3640969434,3640969468,3640969329,3640969328,3640969332,3640969330,3640969331,3640969333,3640969407,3640969408,3640969428,3640969409,3640969410,3640969411,3640969412,3640969413,3640969414,3640969415,3640969416,3640969417,3640969404,3640969418,3640969419,3640969420,3640969421,3640969405,3640969422,3640969406,3640969423,3640969426,3640969424,3640969425,3640969427,3640969295,3640969296,3640969297,3640969298,3640969299,3640969300,3640969301,3640969302,3640969303,3640969304,3640969305,3640969306,3640969441,3640969435,3640969436,3640969581,3640969583,3640969584,3640969582) seulement à utiliser dans la step consolidation insert ignore into MTRPhoto.crop_hashtag_ids (photo_id, hashtag_id, `type`,x0,x1,y0,y1,score) VALUES (%s,%s,%s,%s,%s,%s,%s,%s) batch 1 Loaded 63 chid ids of type : 4857 Number RLEs to save : 0 TO DO : save crop sub photo not yet done ! save time : 0.03169393539428711 seulement à utiliser dans la step consolidation insert ignore into MTRPhoto.crop_hashtag_ids (photo_id, hashtag_id, `type`,x0,x1,y0,y1,score) VALUES (%s,%s,%s,%s,%s,%s,%s,%s) batch 1 Loaded 52 chid ids of type : 4857 Number RLEs to save : 0 TO DO : save crop sub photo not yet done ! save time : 0.03269028663635254 seulement à utiliser dans la step consolidation insert ignore into MTRPhoto.crop_hashtag_ids (photo_id, hashtag_id, `type`,x0,x1,y0,y1,score) VALUES (%s,%s,%s,%s,%s,%s,%s,%s) batch 1 Loaded 71 chid ids of type : 4857 Number RLEs to save : 0 TO DO : save crop sub photo not yet done ! save time : 0.0361175537109375 seulement à utiliser dans la step consolidation insert ignore into MTRPhoto.crop_hashtag_ids (photo_id, hashtag_id, `type`,x0,x1,y0,y1,score) VALUES (%s,%s,%s,%s,%s,%s,%s,%s) batch 1 Loaded 45 chid ids of type : 4857 Number RLEs to save : 0 TO DO : save crop sub photo not yet done ! save time : 0.029941797256469727 seulement à utiliser dans la step consolidation insert ignore into MTRPhoto.crop_hashtag_ids (photo_id, hashtag_id, `type`,x0,x1,y0,y1,score) VALUES (%s,%s,%s,%s,%s,%s,%s,%s) batch 1 Loaded 68 chid ids of type : 4857 Number RLEs to save : 0 TO DO : save crop sub photo not yet done ! save time : 0.6356852054595947 seulement à utiliser dans la step consolidation insert ignore into MTRPhoto.crop_hashtag_ids (photo_id, hashtag_id, `type`,x0,x1,y0,y1,score) VALUES (%s,%s,%s,%s,%s,%s,%s,%s) batch 1 Loaded 15 chid ids of type : 4857 Number RLEs to save : 0 TO DO : save crop sub photo not yet done ! save time : 0.027404069900512695 INSERT IGNORE INTO MTRPhoto.photo_carac_ratio (`photo_id`, `hashtag_type`, `hashtag_id`, `ratio`) VALUES (%s, %s, %s, %s) on duplicate key update `ratio` = VALUES(`ratio`) map_output_result : {1332248772: (0.04239726331228413, 'Should be the crop_list due to order', 0.015597599697228869), 1332248767: (0.04239726331228413, 'Should be the crop_list due to order', 0.0), 1332248764: (0.04239726331228413, 'Should be the crop_list due to order', 0.09944653561468741), 1332248760: (0.04239726331228413, 'Should be the crop_list due to order', 0.10043601073102604), 1332248757: (0.04239726331228413, 'Should be the crop_list due to order', 0.03890343383076243), 1332248754: (0.04239726331228413, 'Should be the crop_list due to order', 0.0)} End step rle-unique-nms After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20009037]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : rle_unique_nms_with_priority we use saveGeneral [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754] map_info['map_portfolio_photo'] : {20009037: [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754]} final : False mtd_id 4742 list_pids : [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754] Looping around the photos to save general results len do output : 6 /1332248772.Didn't retrieve data . /1332248767.Didn't retrieve data . /1332248764.Didn't retrieve data . /1332248760.Didn't retrieve data . /1332248757.Didn't retrieve data . /1332248754.Didn't retrieve data . before output type Used above Here is an output not treated by saveGeneral : Managing all output in save final without adding information in the mtr_datou_result ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248772', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248767', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248764', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248760', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248757', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248754', None, None, None, None, None, '2559007') 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 : [('4742', '20009037', '1332248772', '0.04239726331228413', None, None, None, None, '2559007'), ('4742', '20009037', '1332248767', '0.04239726331228413', None, None, None, None, '2559007'), ('4742', '20009037', '1332248764', '0.04239726331228413', None, None, None, None, '2559007'), ('4742', '20009037', '1332248760', '0.04239726331228413', None, None, None, None, '2559007'), ('4742', '20009037', '1332248757', '0.04239726331228413', None, None, None, None, '2559007'), ('4742', '20009037', '1332248754', '0.04239726331228413', None, None, None, None, '2559007')] time used for this insertion : 0.012033939361572266 save_final save missing photos in datou_result : time spend for datou_step_exec : 10.752018928527832 time spend to save output : 0.01254415512084961 total time spend for step 3 : 10.764563083648682 step4:ventilate_hashtags_in_portfolio Thu Feb 6 09:25:17 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 ! 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 (20009037) Here we display some param of map_info ! map_filenames : {'temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg': 1332248772, 'temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg': 1332248767, 'temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg': 1332248764, 'temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg': 1332248760, 'temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg': 1332248757, 'temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg': 1332248754} map_photo_id_path_extension : {1332248772: {'path': 'temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg', 'extension': 'jpg'}, 1332248767: {'path': 'temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg', 'extension': 'jpg'}, 1332248764: {'path': 'temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg', 'extension': 'jpg'}, 1332248760: {'path': 'temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg', 'extension': 'jpg'}, 1332248757: {'path': 'temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg', 'extension': 'jpg'}, 1332248754: {'path': 'temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg', 'extension': 'jpg'}} map_subphoto_mainphoto : {} beginning of datou step ventilate_hashtags_in_portfolio : To implement ! Iterating over portfolio : 20009037 get user id for portfolio 20009037 get sub ptf for main ptf 20009037, type 4857 and hashtags ['papier', 'carton', 'metal', 'pet_clair', 'pehd', 'flux_dev', 'film_dev_souple', 'ela', 'sac_om_plein', 'textiles', 'verre', 'organique', 'dasri', 'masque', 'encombrant', 'autre_non_emballage', 'environnement', 'mal_croppe', 'flou', 'pet_fonce', 'pet_opaque', 'barquette_opaque', 'film_plastique', 'autre_emballage', 'sac'] 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`=20009037 AND mptpi.`type`=4857 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','carton','metal','pet_clair','pehd','flux_dev','film_dev_souple','ela','sac_om_plein','textiles','verre','organique','dasri','masque','encombrant','autre_non_emballage','environnement','mal_croppe','flou','pet_fonce','pet_opaque','barquette_opaque','film_plastique','autre_emballage','sac')) AND mptpi.`min_score`=0.1 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`=20009037 AND mptpi.`type`=4857 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','carton','metal','pet_clair','pehd','flux_dev','film_dev_souple','ela','sac_om_plein','textiles','verre','organique','dasri','masque','encombrant','autre_non_emballage','environnement','mal_croppe','flou','pet_fonce','pet_opaque','barquette_opaque','film_plastique','autre_emballage','sac')) AND mptpi.`min_score`=0.1 To do returned map {'papier': {'main_port_id': 20009037, 'sub_port_id': 20023595, 'hashtag': 'papier', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754709, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'carton': {'main_port_id': 20009037, 'sub_port_id': 20023596, 'hashtag': 'carton', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754710, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'metal': {'main_port_id': 20009037, 'sub_port_id': 20023597, 'hashtag': 'metal', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754711, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'pet_clair': {'main_port_id': 20009037, 'sub_port_id': 20023598, 'hashtag': 'pet_clair', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754712, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'pehd': {'main_port_id': 20009037, 'sub_port_id': 20023599, 'hashtag': 'pehd', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754713, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'flux_dev': {'main_port_id': 20009037, 'sub_port_id': 20023600, 'hashtag': 'flux_dev', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754714, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'film_dev_souple': {'main_port_id': 20009037, 'sub_port_id': 20023601, 'hashtag': 'film_dev_souple', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754715, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'ela': {'main_port_id': 20009037, 'sub_port_id': 20023602, 'hashtag': 'ela', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754716, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'sac_om_plein': {'main_port_id': 20009037, 'sub_port_id': 20023603, 'hashtag': 'sac_om_plein', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754717, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'textiles': {'main_port_id': 20009037, 'sub_port_id': 20023604, 'hashtag': 'textiles', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754718, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'verre': {'main_port_id': 20009037, 'sub_port_id': 20023605, 'hashtag': 'verre', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754719, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'organique': {'main_port_id': 20009037, 'sub_port_id': 20023606, 'hashtag': 'organique', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754720, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'dasri': {'main_port_id': 20009037, 'sub_port_id': 20023607, 'hashtag': 'dasri', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754721, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'masque': {'main_port_id': 20009037, 'sub_port_id': 20023608, 'hashtag': 'masque', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754722, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'encombrant': {'main_port_id': 20009037, 'sub_port_id': 20023609, 'hashtag': 'encombrant', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754723, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'autre_non_emballage': {'main_port_id': 20009037, 'sub_port_id': 20023610, 'hashtag': 'autre_non_emballage', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754724, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'environnement': {'main_port_id': 20009037, 'sub_port_id': 20023611, 'hashtag': 'environnement', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754725, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'mal_croppe': {'main_port_id': 20009037, 'sub_port_id': 20023612, 'hashtag': 'mal_croppe', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754726, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'flou': {'main_port_id': 20009037, 'sub_port_id': 20023613, 'hashtag': 'flou', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754727, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'pet_fonce': {'main_port_id': 20009037, 'sub_port_id': 20023614, 'hashtag': 'pet_fonce', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754728, 'last_updated_at': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 1, 28, 17, 38, 37)}, 'pet_opaque': {'main_port_id': 20009037, 'sub_port_id': 20023615, 'hashtag': 'pet_opaque', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754729, 'last_updated_at': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 1, 28, 17, 38, 37)}, 'barquette_opaque': {'main_port_id': 20009037, 'sub_port_id': 20023616, 'hashtag': 'barquette_opaque', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754730, 'last_updated_at': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 1, 28, 17, 38, 37)}, 'film_plastique': {'main_port_id': 20009037, 'sub_port_id': 20023617, 'hashtag': 'film_plastique', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754731, 'last_updated_at': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 1, 28, 17, 38, 37)}, 'autre_emballage': {'main_port_id': 20009037, 'sub_port_id': 20023618, 'hashtag': 'autre_emballage', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754732, 'last_updated_at': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 1, 28, 17, 38, 37)}, 'sac': {'main_port_id': 20009037, 'sub_port_id': 20023619, 'hashtag': 'sac', 'pht': 4857, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12754733, 'last_updated_at': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 37), 'last_updated_at_asc': datetime.datetime(2025, 1, 28, 17, 38, 37)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023595 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 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; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023596 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='carton' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023597 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 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; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023598 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='pet_clair' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023599 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='pehd' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023600 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='flux_dev' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023601 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='film_dev_souple' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023602 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='ela' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023603 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='sac_om_plein' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023604 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='textiles' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023605 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='verre' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023606 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='organique' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023607 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='dasri' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023608 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='masque' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023609 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='encombrant' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023610 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='autre_non_emballage' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023611 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 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; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023612 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 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; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023613 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 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; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023614 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='pet_fonce' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023615 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='pet_opaque' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023616 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='barquette_opaque' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023617 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='film_plastique' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023618 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='autre_emballage' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20023619 , sub_photo_id, 775,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=20009037 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.1 AND chi.type=4857 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='sac' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_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`=20009037 AND mptpi.`type`=4856 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','carton','metal','pet_clair','pehd','flux_dev','film_dev_souple','ela','sac_om_plein','textiles','verre','organique','dasri','masque','encombrant','autre_non_emballage','environnement','mal_croppe','flou','pet_fonce','pet_opaque','barquette_opaque','film_plastique','autre_emballage','sac')) AND mptpi.`min_score`=0.1 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`=20009037 AND mptpi.`type`=4856 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','carton','metal','pet_clair','pehd','flux_dev','film_dev_souple','ela','sac_om_plein','textiles','verre','organique','dasri','masque','encombrant','autre_non_emballage','environnement','mal_croppe','flou','pet_fonce','pet_opaque','barquette_opaque','film_plastique','autre_emballage','sac')) AND mptpi.`min_score`=0.1 To do returned map {'papier': {'main_port_id': 20009037, 'sub_port_id': 20015439, 'hashtag': 'papier', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747461, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'carton': {'main_port_id': 20009037, 'sub_port_id': 20015440, 'hashtag': 'carton', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747462, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'metal': {'main_port_id': 20009037, 'sub_port_id': 20015441, 'hashtag': 'metal', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747463, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'pet_clair': {'main_port_id': 20009037, 'sub_port_id': 20015442, 'hashtag': 'pet_clair', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747464, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'pehd': {'main_port_id': 20009037, 'sub_port_id': 20015443, 'hashtag': 'pehd', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747465, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'pet_fonce': {'main_port_id': 20009037, 'sub_port_id': 20015444, 'hashtag': 'pet_fonce', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747466, 'last_updated_at': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 1, 28, 13, 21, 26)}, 'pet_opaque': {'main_port_id': 20009037, 'sub_port_id': 20015445, 'hashtag': 'pet_opaque', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747467, 'last_updated_at': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 1, 28, 13, 21, 26)}, 'barquette_opaque': {'main_port_id': 20009037, 'sub_port_id': 20015446, 'hashtag': 'barquette_opaque', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747468, 'last_updated_at': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 1, 28, 13, 21, 26)}, 'film_plastique': {'main_port_id': 20009037, 'sub_port_id': 20015447, 'hashtag': 'film_plastique', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747469, 'last_updated_at': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 1, 28, 13, 21, 26)}, 'ela': {'main_port_id': 20009037, 'sub_port_id': 20015448, 'hashtag': 'ela', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747470, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'sac': {'main_port_id': 20009037, 'sub_port_id': 20015449, 'hashtag': 'sac', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747471, 'last_updated_at': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 1, 28, 13, 21, 26)}, 'textiles': {'main_port_id': 20009037, 'sub_port_id': 20015450, 'hashtag': 'textiles', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747472, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'verre': {'main_port_id': 20009037, 'sub_port_id': 20015451, 'hashtag': 'verre', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747473, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'organique': {'main_port_id': 20009037, 'sub_port_id': 20015452, 'hashtag': 'organique', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747474, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'dasri': {'main_port_id': 20009037, 'sub_port_id': 20015453, 'hashtag': 'dasri', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747475, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'masque': {'main_port_id': 20009037, 'sub_port_id': 20015454, 'hashtag': 'masque', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747476, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'encombrant': {'main_port_id': 20009037, 'sub_port_id': 20015455, 'hashtag': 'encombrant', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747477, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'autre_emballage': {'main_port_id': 20009037, 'sub_port_id': 20015456, 'hashtag': 'autre_emballage', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747478, 'last_updated_at': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 1, 28, 13, 21, 26)}, 'autre_non_emballage': {'main_port_id': 20009037, 'sub_port_id': 20015457, 'hashtag': 'autre_non_emballage', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747479, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'environnement': {'main_port_id': 20009037, 'sub_port_id': 20015458, 'hashtag': 'environnement', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747480, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'flux_dev': {'main_port_id': 20009037, 'sub_port_id': 20015460, 'hashtag': 'flux_dev', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747482, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'mal_croppe': {'main_port_id': 20009037, 'sub_port_id': 20015461, 'hashtag': 'mal_croppe', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747483, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'flou': {'main_port_id': 20009037, 'sub_port_id': 20015462, 'hashtag': 'flou', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747484, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'film_dev_souple': {'main_port_id': 20009037, 'sub_port_id': 20015463, 'hashtag': 'film_dev_souple', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747485, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 1, 28, 13, 21, 26), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}, 'sac_om_plein': {'main_port_id': 20009037, 'sub_port_id': 20015464, 'hashtag': 'sac_om_plein', 'pht': 4856, 'min_score': 0.1, 'mtr_user_id': 775, 'id': 12747486, 'last_updated_at': datetime.datetime(2025, 2, 6, 9, 25, 6), 'last_updated_at_desc': datetime.datetime(2025, 2, 5, 10, 54, 38), 'last_updated_at_asc': datetime.datetime(2025, 2, 6, 9, 25, 6)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015439,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023595 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015440,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023596 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015441,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023597 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015442,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023598 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015443,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023599 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015444,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023614 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015445,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023615 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015446,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023616 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015447,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023617 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015448,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023602 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015449,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023619 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015450,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023604 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015451,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023605 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015452,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023606 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015453,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023607 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015454,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023608 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015455,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023609 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015456,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023618 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015457,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023610 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015458,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023611 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015460,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023600 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015461,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023612 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015462,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023613 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015463,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023601 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20015464,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20023603 insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id , mtr_user_id, created_at) select 20015460,mtr_photo_id,775,now() from MTRUser.mtr_portfolio_photos where hide_status = 0 and mtr_portfolio_id in (20015444); insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id , mtr_user_id, created_at) select 20015460,mtr_photo_id,775,now() from MTRUser.mtr_portfolio_photos where hide_status = 0 and mtr_portfolio_id in (20015445); insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id , mtr_user_id, created_at) select 20015460,mtr_photo_id,775,now() from MTRUser.mtr_portfolio_photos where hide_status = 0 and mtr_portfolio_id in (20015446); insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id , mtr_user_id, created_at) select 20015463,mtr_photo_id,775,now() from MTRUser.mtr_portfolio_photos where hide_status = 0 and mtr_portfolio_id in (20015447); insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id , mtr_user_id, created_at) select 20015464,mtr_photo_id,775,now() from MTRUser.mtr_portfolio_photos where hide_status = 0 and mtr_portfolio_id in (20015449); insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id , mtr_user_id, created_at) select 20015460,mtr_photo_id,775,now() from MTRUser.mtr_portfolio_photos where hide_status = 0 and mtr_portfolio_id in (20015456); lien utilise dans velours : https://www.fotonower.com/velours/20015439,20015440,20015441,20015442,20015443,20015448,20015450,20015451,20015452,20015453,20015454,20015455,20015457,20015458,20015460,20015461,20015462,20015463,20015464?tags=papier,carton,metal,pet_clair,pehd,ela,textiles,verre,organique,dasri,masque,encombrant,autre_non_emballage,environnement,flux_dev,mal_croppe,flou,film_dev_souple,sac_om_plein&datou_id_consolidate=4742&port_consolidate=20009037 After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20009037]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754] map_info['map_portfolio_photo'] : {20009037: [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754]} final : False mtd_id 4742 list_pids : [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754] Looping around the photos to save general results len do output : 1 /20009037. 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 ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248772', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248767', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248764', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248760', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248757', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248754', None, None, None, None, None, '2559007') 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 : [('4742', None, '20009037', "{'papier': 20023595, 'carton': 20023596, 'metal': 20023597, 'pet_clair': 20023598, 'pehd': 20023599, 'flux_dev': 20023600, 'film_dev_souple': 20023601, 'ela': 20023602, 'sac_om_plein': 20023603, 'textiles': 20023604, 'verre': 20023605, 'organique': 20023606, 'dasri': 20023607, 'masque': 20023608, 'encombrant': 20023609, 'autre_non_emballage': 20023610, 'environnement': 20023611, 'mal_croppe': 20023612, 'flou': 20023613, 'pet_fonce': 20023614, 'pet_opaque': 20023615, 'barquette_opaque': 20023616, 'film_plastique': 20023617, 'autre_emballage': 20023618, 'sac': 20023619}", None, None, None, None, '2559007'), ('4742', '20009037', '1332248772', None, None, None, None, None, '2559007'), ('4742', '20009037', '1332248767', None, None, None, None, None, '2559007'), ('4742', '20009037', '1332248764', None, None, None, None, None, '2559007'), ('4742', '20009037', '1332248760', None, None, None, None, None, '2559007'), ('4742', '20009037', '1332248757', None, None, None, None, None, '2559007'), ('4742', '20009037', '1332248754', None, None, None, None, None, '2559007')] time used for this insertion : 0.014488697052001953 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.0095858573913574 time spend to save output : 0.014730691909790039 total time spend for step 4 : 1.0243165493011475 step5:final Thu Feb 6 09:25:18 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 : {1332248772: (0.04239726331228413, 'Should be the crop_list due to order', 0.015597599697228869), 1332248767: (0.04239726331228413, 'Should be the crop_list due to order', 0.0), 1332248764: (0.04239726331228413, 'Should be the crop_list due to order', 0.09944653561468741), 1332248760: (0.04239726331228413, 'Should be the crop_list due to order', 0.10043601073102604), 1332248757: (0.04239726331228413, 'Should be the crop_list due to order', 0.03890343383076243), 1332248754: (0.04239726331228413, 'Should be the crop_list due to order', 0.0)} input_args_next_step : {1332248772: ()} output_args : {1332248772: (0.04239726331228413, 'Should be the crop_list due to order', 0.015597599697228869), 1332248767: (0.04239726331228413, 'Should be the crop_list due to order', 0.0), 1332248764: (0.04239726331228413, 'Should be the crop_list due to order', 0.09944653561468741), 1332248760: (0.04239726331228413, 'Should be the crop_list due to order', 0.10043601073102604), 1332248757: (0.04239726331228413, 'Should be the crop_list due to order', 0.03890343383076243), 1332248754: (0.04239726331228413, 'Should be the crop_list due to order', 0.0)} args : 1332248772 depend.output_id : 0 input_args_next_step : {1332248772: (0.04239726331228413,), 1332248767: ()} output_args : {1332248772: (0.04239726331228413, 'Should be the crop_list due to order', 0.015597599697228869), 1332248767: (0.04239726331228413, 'Should be the crop_list due to order', 0.0), 1332248764: (0.04239726331228413, 'Should be the crop_list due to order', 0.09944653561468741), 1332248760: (0.04239726331228413, 'Should be the crop_list due to order', 0.10043601073102604), 1332248757: (0.04239726331228413, 'Should be the crop_list due to order', 0.03890343383076243), 1332248754: (0.04239726331228413, 'Should be the crop_list due to order', 0.0)} args : 1332248767 depend.output_id : 0 input_args_next_step : {1332248772: (0.04239726331228413,), 1332248767: (0.04239726331228413,), 1332248764: ()} output_args : {1332248772: (0.04239726331228413, 'Should be the crop_list due to order', 0.015597599697228869), 1332248767: (0.04239726331228413, 'Should be the crop_list due to order', 0.0), 1332248764: (0.04239726331228413, 'Should be the crop_list due to order', 0.09944653561468741), 1332248760: (0.04239726331228413, 'Should be the crop_list due to order', 0.10043601073102604), 1332248757: (0.04239726331228413, 'Should be the crop_list due to order', 0.03890343383076243), 1332248754: (0.04239726331228413, 'Should be the crop_list due to order', 0.0)} args : 1332248764 depend.output_id : 0 input_args_next_step : {1332248772: (0.04239726331228413,), 1332248767: (0.04239726331228413,), 1332248764: (0.04239726331228413,), 1332248760: ()} output_args : {1332248772: (0.04239726331228413, 'Should be the crop_list due to order', 0.015597599697228869), 1332248767: (0.04239726331228413, 'Should be the crop_list due to order', 0.0), 1332248764: (0.04239726331228413, 'Should be the crop_list due to order', 0.09944653561468741), 1332248760: (0.04239726331228413, 'Should be the crop_list due to order', 0.10043601073102604), 1332248757: (0.04239726331228413, 'Should be the crop_list due to order', 0.03890343383076243), 1332248754: (0.04239726331228413, 'Should be the crop_list due to order', 0.0)} args : 1332248760 depend.output_id : 0 input_args_next_step : {1332248772: (0.04239726331228413,), 1332248767: (0.04239726331228413,), 1332248764: (0.04239726331228413,), 1332248760: (0.04239726331228413,), 1332248757: ()} output_args : {1332248772: (0.04239726331228413, 'Should be the crop_list due to order', 0.015597599697228869), 1332248767: (0.04239726331228413, 'Should be the crop_list due to order', 0.0), 1332248764: (0.04239726331228413, 'Should be the crop_list due to order', 0.09944653561468741), 1332248760: (0.04239726331228413, 'Should be the crop_list due to order', 0.10043601073102604), 1332248757: (0.04239726331228413, 'Should be the crop_list due to order', 0.03890343383076243), 1332248754: (0.04239726331228413, 'Should be the crop_list due to order', 0.0)} args : 1332248757 depend.output_id : 0 input_args_next_step : {1332248772: (0.04239726331228413,), 1332248767: (0.04239726331228413,), 1332248764: (0.04239726331228413,), 1332248760: (0.04239726331228413,), 1332248757: (0.04239726331228413,), 1332248754: ()} output_args : {1332248772: (0.04239726331228413, 'Should be the crop_list due to order', 0.015597599697228869), 1332248767: (0.04239726331228413, 'Should be the crop_list due to order', 0.0), 1332248764: (0.04239726331228413, 'Should be the crop_list due to order', 0.09944653561468741), 1332248760: (0.04239726331228413, 'Should be the crop_list due to order', 0.10043601073102604), 1332248757: (0.04239726331228413, 'Should be the crop_list due to order', 0.03890343383076243), 1332248754: (0.04239726331228413, 'Should be the crop_list due to order', 0.0)} args : 1332248754 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :6, first value : (0.04239726331228413,) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20009037) Here we display some param of map_info ! map_filenames : {'temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg': 1332248772, 'temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg': 1332248767, 'temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg': 1332248764, 'temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg': 1332248760, 'temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg': 1332248757, 'temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg': 1332248754} map_photo_id_path_extension : {1332248772: {'path': 'temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg', 'extension': 'jpg'}, 1332248767: {'path': 'temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg', 'extension': 'jpg'}, 1332248764: {'path': 'temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg', 'extension': 'jpg'}, 1332248760: {'path': 'temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg', 'extension': 'jpg'}, 1332248757: {'path': 'temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg', 'extension': 'jpg'}, 1332248754: {'path': 'temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg', 'extension': 'jpg'}} map_subphoto_mainphoto : {} Beginning of datou step final ! SELECT completion_json FROM MTRPhoto.dashboard_results WHERE mtr_portfolio_id = 20009037 AND dashboard_run_id IN (SELECT last_run_id FROM MTRPhoto.dashboard_entry_day); query to retrieve results for portfolio 20009037 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 4857 and photo_id in (1332248757,1332248767,1332248760,1332248764,1332248772); 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([20009037]) Inside saveOutput : final : False verbose : True original output for save of step final : {1332248772: ('0.09235593779601126',), 1332248767: ('0.09235593779601126',), 1332248764: ('0.09235593779601126',), 1332248760: ('0.09235593779601126',), 1332248757: ('0.09235593779601126',), 1332248754: ('0.09235593779601126',)} new output for save of step final : {1332248772: ('0.09235593779601126',), 1332248767: ('0.09235593779601126',), 1332248764: ('0.09235593779601126',), 1332248760: ('0.09235593779601126',), 1332248757: ('0.09235593779601126',), 1332248754: ('0.09235593779601126',)} [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754] map_info['map_portfolio_photo'] : {20009037: [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754]} final : False mtd_id 4742 list_pids : [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754] Looping around the photos to save general results len do output : 6 /1332248772.Didn't retrieve data . /1332248767.Didn't retrieve data . /1332248764.Didn't retrieve data . /1332248760.Didn't retrieve data . /1332248757.Didn't retrieve data . /1332248754.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 ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248772', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248767', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248764', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248760', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248757', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248754', None, None, None, None, None, '2559007') 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 : [('4742', '20009037', '1332248772', '0.09235593779601126', None, None, None, None, '2559007'), ('4742', '20009037', '1332248767', '0.09235593779601126', None, None, None, None, '2559007'), ('4742', '20009037', '1332248764', '0.09235593779601126', None, None, None, None, '2559007'), ('4742', '20009037', '1332248760', '0.09235593779601126', None, None, None, None, '2559007'), ('4742', '20009037', '1332248757', '0.09235593779601126', None, None, None, None, '2559007'), ('4742', '20009037', '1332248754', '0.09235593779601126', None, None, None, None, '2559007')] time used for this insertion : 0.012211084365844727 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06129145622253418 time spend to save output : 0.01269984245300293 total time spend for step 5 : 0.07399129867553711 step6:blur_detection Thu Feb 6 09:25:18 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 ! 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 (20009037) Here we display some param of map_info ! map_filenames : {'temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg': 1332248772, 'temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg': 1332248767, 'temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg': 1332248764, 'temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg': 1332248760, 'temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg': 1332248757, 'temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg': 1332248754} map_photo_id_path_extension : {1332248772: {'path': 'temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg', 'extension': 'jpg'}, 1332248767: {'path': 'temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg', 'extension': 'jpg'}, 1332248764: {'path': 'temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg', 'extension': 'jpg'}, 1332248760: {'path': 'temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg', 'extension': 'jpg'}, 1332248757: {'path': 'temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg', 'extension': 'jpg'}, 1332248754: {'path': 'temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg', 'extension': 'jpg'}} map_subphoto_mainphoto : {} inside step blur_detection toutes les photos sont déjà traitées, on saute les calculs score_blur_detection : {1332248757: [(1332248757, 2895.5133619786798, 492609224)], 1332248772: [(1332248772, 1802.4160809415116, 2107751945)], 1332248764: [(1332248764, 1557.3910225558648, 2107751945)], 1332248767: [(1332248767, 1429.608936699342, 2107751945)], 1332248760: [(1332248760, 1119.8295623520703, 2107751945)], 1332248754: [(1332248754, 474.4688700801042, 492688767)]} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20009037]) Inside saveOutput : final : False verbose : True select photo_hashtag_type from MTRDatou.classification_theme where id = 3523 begin to insert list_values into class_photo_scores : length of list_valuse in save_photo_hashtag_id_thcl_score : 6 insert into MTRPhoto.class_photo_score (thcl, photo_id, hashtag_id, score) values (%s,%s,%s,%s) on duplicate key update score = values(score) time used for this insertion : 0.008783578872680664 begin to insert list_values into photo_hahstag_ids : length of list_valuse in save_photo_hashtag_id_type : 6 insert ignore into MTRBack.photo_hashtag_ids (photo_id, hashtag_id, type) values (%s,%s,%s) insert ignore into MTRBack.photo_hashtag_ids (photo_id, hashtag_id, type) values (%s,%s,%s) first line : ('1332248757', '492609224', '4570') ... last line : ('1332248754', '492688767', '4570') time used for this insertion : 0.013934850692749023 save missing photos in datou_result : time spend for datou_step_exec : 0.023990631103515625 time spend to save output : 0.027049779891967773 total time spend for step 6 : 0.0510404109954834 step7:brightness Thu Feb 6 09:25:18 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 ! 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 (20009037) Here we display some param of map_info ! map_filenames : {'temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg': 1332248772, 'temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg': 1332248767, 'temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg': 1332248764, 'temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg': 1332248760, 'temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg': 1332248757, 'temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg': 1332248754} map_photo_id_path_extension : {1332248772: {'path': 'temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg', 'extension': 'jpg'}, 1332248767: {'path': 'temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg', 'extension': 'jpg'}, 1332248764: {'path': 'temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg', 'extension': 'jpg'}, 1332248760: {'path': 'temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg', 'extension': 'jpg'}, 1332248757: {'path': 'temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg', 'extension': 'jpg'}, 1332248754: {'path': 'temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg', 'extension': 'jpg'}} map_subphoto_mainphoto : {} inside step calcul brightness toutes les photos sont déjà traitées, on saute les calculs brightness_score : {1332248764: [(1332248764, -0.18721489902707764, 496442774)], 1332248772: [(1332248772, -0.20090225351392088, 496442774)], 1332248767: [(1332248767, -0.20403622851561315, 496442774)], 1332248754: [(1332248754, -0.29204186002003973, 496442774)], 1332248757: [(1332248757, -0.3246507664646548, 496442774)], 1332248760: [(1332248760, -0.375305259778927, 496442774)]} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20009037]) Inside saveOutput : final : False verbose : True select photo_hashtag_type from MTRDatou.classification_theme where id = 1154 begin to insert list_values into class_photo_scores : length of list_valuse in save_photo_hashtag_id_thcl_score : 6 insert into MTRPhoto.class_photo_score (thcl, photo_id, hashtag_id, score) values (%s,%s,%s,%s) on duplicate key update score = values(score) time used for this insertion : 0.008942604064941406 begin to insert list_values into photo_hahstag_ids : length of list_valuse in save_photo_hashtag_id_type : 6 insert ignore into MTRBack.photo_hashtag_ids (photo_id, hashtag_id, type) values (%s,%s,%s) insert ignore into MTRBack.photo_hashtag_ids (photo_id, hashtag_id, type) values (%s,%s,%s) first line : ('1332248764', '496442774', '1426') ... last line : ('1332248760', '496442774', '1426') time used for this insertion : 0.007943868637084961 save missing photos in datou_result : time spend for datou_step_exec : 0.026523351669311523 time spend to save output : 0.021463871002197266 total time spend for step 7 : 0.04798722267150879 step8:send_mail_cod Thu Feb 6 09:25:18 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 : {1332248757: [(1332248757, 2895.5133619786798, 492609224)], 1332248772: [(1332248772, 1802.4160809415116, 2107751945)], 1332248764: [(1332248764, 1557.3910225558648, 2107751945)], 1332248767: [(1332248767, 1429.608936699342, 2107751945)], 1332248760: [(1332248760, 1119.8295623520703, 2107751945)], 1332248754: [(1332248754, 474.4688700801042, 492688767)]} input_args_next_step : {1332248757: ()} output_args : {1332248757: [(1332248757, 2895.5133619786798, 492609224)], 1332248772: [(1332248772, 1802.4160809415116, 2107751945)], 1332248764: [(1332248764, 1557.3910225558648, 2107751945)], 1332248767: [(1332248767, 1429.608936699342, 2107751945)], 1332248760: [(1332248760, 1119.8295623520703, 2107751945)], 1332248754: [(1332248754, 474.4688700801042, 492688767)]} args : 1332248757 depend.output_id : 0 input_args_next_step : {1332248757: ((1332248757, 2895.5133619786798, 492609224),), 1332248772: ()} output_args : {1332248757: [(1332248757, 2895.5133619786798, 492609224)], 1332248772: [(1332248772, 1802.4160809415116, 2107751945)], 1332248764: [(1332248764, 1557.3910225558648, 2107751945)], 1332248767: [(1332248767, 1429.608936699342, 2107751945)], 1332248760: [(1332248760, 1119.8295623520703, 2107751945)], 1332248754: [(1332248754, 474.4688700801042, 492688767)]} args : 1332248772 depend.output_id : 0 input_args_next_step : {1332248757: ((1332248757, 2895.5133619786798, 492609224),), 1332248772: ((1332248772, 1802.4160809415116, 2107751945),), 1332248764: ()} output_args : {1332248757: [(1332248757, 2895.5133619786798, 492609224)], 1332248772: [(1332248772, 1802.4160809415116, 2107751945)], 1332248764: [(1332248764, 1557.3910225558648, 2107751945)], 1332248767: [(1332248767, 1429.608936699342, 2107751945)], 1332248760: [(1332248760, 1119.8295623520703, 2107751945)], 1332248754: [(1332248754, 474.4688700801042, 492688767)]} args : 1332248764 depend.output_id : 0 input_args_next_step : {1332248757: ((1332248757, 2895.5133619786798, 492609224),), 1332248772: ((1332248772, 1802.4160809415116, 2107751945),), 1332248764: ((1332248764, 1557.3910225558648, 2107751945),), 1332248767: ()} output_args : {1332248757: [(1332248757, 2895.5133619786798, 492609224)], 1332248772: [(1332248772, 1802.4160809415116, 2107751945)], 1332248764: [(1332248764, 1557.3910225558648, 2107751945)], 1332248767: [(1332248767, 1429.608936699342, 2107751945)], 1332248760: [(1332248760, 1119.8295623520703, 2107751945)], 1332248754: [(1332248754, 474.4688700801042, 492688767)]} args : 1332248767 depend.output_id : 0 input_args_next_step : {1332248757: ((1332248757, 2895.5133619786798, 492609224),), 1332248772: ((1332248772, 1802.4160809415116, 2107751945),), 1332248764: ((1332248764, 1557.3910225558648, 2107751945),), 1332248767: ((1332248767, 1429.608936699342, 2107751945),), 1332248760: ()} output_args : {1332248757: [(1332248757, 2895.5133619786798, 492609224)], 1332248772: [(1332248772, 1802.4160809415116, 2107751945)], 1332248764: [(1332248764, 1557.3910225558648, 2107751945)], 1332248767: [(1332248767, 1429.608936699342, 2107751945)], 1332248760: [(1332248760, 1119.8295623520703, 2107751945)], 1332248754: [(1332248754, 474.4688700801042, 492688767)]} args : 1332248760 depend.output_id : 0 input_args_next_step : {1332248757: ((1332248757, 2895.5133619786798, 492609224),), 1332248772: ((1332248772, 1802.4160809415116, 2107751945),), 1332248764: ((1332248764, 1557.3910225558648, 2107751945),), 1332248767: ((1332248767, 1429.608936699342, 2107751945),), 1332248760: ((1332248760, 1119.8295623520703, 2107751945),), 1332248754: ()} output_args : {1332248757: [(1332248757, 2895.5133619786798, 492609224)], 1332248772: [(1332248772, 1802.4160809415116, 2107751945)], 1332248764: [(1332248764, 1557.3910225558648, 2107751945)], 1332248767: [(1332248767, 1429.608936699342, 2107751945)], 1332248760: [(1332248760, 1119.8295623520703, 2107751945)], 1332248754: [(1332248754, 474.4688700801042, 492688767)]} args : 1332248754 depend.output_id : 0 complete output_args for input 1 : {1332248764: [(1332248764, -0.18721489902707764, 496442774)], 1332248772: [(1332248772, -0.20090225351392088, 496442774)], 1332248767: [(1332248767, -0.20403622851561315, 496442774)], 1332248754: [(1332248754, -0.29204186002003973, 496442774)], 1332248757: [(1332248757, -0.3246507664646548, 496442774)], 1332248760: [(1332248760, -0.375305259778927, 496442774)]} input_args_next_step : {1332248757: ((1332248757, 2895.5133619786798, 492609224),), 1332248772: ((1332248772, 1802.4160809415116, 2107751945),), 1332248764: ((1332248764, 1557.3910225558648, 2107751945),), 1332248767: ((1332248767, 1429.608936699342, 2107751945),), 1332248760: ((1332248760, 1119.8295623520703, 2107751945),), 1332248754: ((1332248754, 474.4688700801042, 492688767),)} output_args : {1332248764: [(1332248764, -0.18721489902707764, 496442774)], 1332248772: [(1332248772, -0.20090225351392088, 496442774)], 1332248767: [(1332248767, -0.20403622851561315, 496442774)], 1332248754: [(1332248754, -0.29204186002003973, 496442774)], 1332248757: [(1332248757, -0.3246507664646548, 496442774)], 1332248760: [(1332248760, -0.375305259778927, 496442774)]} args : 1332248764 depend.output_id : 0 input_args_next_step : {1332248757: ((1332248757, 2895.5133619786798, 492609224),), 1332248772: ((1332248772, 1802.4160809415116, 2107751945),), 1332248764: ((1332248764, 1557.3910225558648, 2107751945), (1332248764, -0.18721489902707764, 496442774)), 1332248767: ((1332248767, 1429.608936699342, 2107751945),), 1332248760: ((1332248760, 1119.8295623520703, 2107751945),), 1332248754: ((1332248754, 474.4688700801042, 492688767),)} output_args : {1332248764: [(1332248764, -0.18721489902707764, 496442774)], 1332248772: [(1332248772, -0.20090225351392088, 496442774)], 1332248767: [(1332248767, -0.20403622851561315, 496442774)], 1332248754: [(1332248754, -0.29204186002003973, 496442774)], 1332248757: [(1332248757, -0.3246507664646548, 496442774)], 1332248760: [(1332248760, -0.375305259778927, 496442774)]} args : 1332248772 depend.output_id : 0 input_args_next_step : {1332248757: ((1332248757, 2895.5133619786798, 492609224),), 1332248772: ((1332248772, 1802.4160809415116, 2107751945), (1332248772, -0.20090225351392088, 496442774)), 1332248764: ((1332248764, 1557.3910225558648, 2107751945), (1332248764, -0.18721489902707764, 496442774)), 1332248767: ((1332248767, 1429.608936699342, 2107751945),), 1332248760: ((1332248760, 1119.8295623520703, 2107751945),), 1332248754: ((1332248754, 474.4688700801042, 492688767),)} output_args : {1332248764: [(1332248764, -0.18721489902707764, 496442774)], 1332248772: [(1332248772, -0.20090225351392088, 496442774)], 1332248767: [(1332248767, -0.20403622851561315, 496442774)], 1332248754: [(1332248754, -0.29204186002003973, 496442774)], 1332248757: [(1332248757, -0.3246507664646548, 496442774)], 1332248760: [(1332248760, -0.375305259778927, 496442774)]} args : 1332248767 depend.output_id : 0 input_args_next_step : {1332248757: ((1332248757, 2895.5133619786798, 492609224),), 1332248772: ((1332248772, 1802.4160809415116, 2107751945), (1332248772, -0.20090225351392088, 496442774)), 1332248764: ((1332248764, 1557.3910225558648, 2107751945), (1332248764, -0.18721489902707764, 496442774)), 1332248767: ((1332248767, 1429.608936699342, 2107751945), (1332248767, -0.20403622851561315, 496442774)), 1332248760: ((1332248760, 1119.8295623520703, 2107751945),), 1332248754: ((1332248754, 474.4688700801042, 492688767),)} output_args : {1332248764: [(1332248764, -0.18721489902707764, 496442774)], 1332248772: [(1332248772, -0.20090225351392088, 496442774)], 1332248767: [(1332248767, -0.20403622851561315, 496442774)], 1332248754: [(1332248754, -0.29204186002003973, 496442774)], 1332248757: [(1332248757, -0.3246507664646548, 496442774)], 1332248760: [(1332248760, -0.375305259778927, 496442774)]} args : 1332248754 depend.output_id : 0 input_args_next_step : {1332248757: ((1332248757, 2895.5133619786798, 492609224),), 1332248772: ((1332248772, 1802.4160809415116, 2107751945), (1332248772, -0.20090225351392088, 496442774)), 1332248764: ((1332248764, 1557.3910225558648, 2107751945), (1332248764, -0.18721489902707764, 496442774)), 1332248767: ((1332248767, 1429.608936699342, 2107751945), (1332248767, -0.20403622851561315, 496442774)), 1332248760: ((1332248760, 1119.8295623520703, 2107751945),), 1332248754: ((1332248754, 474.4688700801042, 492688767), (1332248754, -0.29204186002003973, 496442774))} output_args : {1332248764: [(1332248764, -0.18721489902707764, 496442774)], 1332248772: [(1332248772, -0.20090225351392088, 496442774)], 1332248767: [(1332248767, -0.20403622851561315, 496442774)], 1332248754: [(1332248754, -0.29204186002003973, 496442774)], 1332248757: [(1332248757, -0.3246507664646548, 496442774)], 1332248760: [(1332248760, -0.375305259778927, 496442774)]} args : 1332248757 depend.output_id : 0 input_args_next_step : {1332248757: ((1332248757, 2895.5133619786798, 492609224), (1332248757, -0.3246507664646548, 496442774)), 1332248772: ((1332248772, 1802.4160809415116, 2107751945), (1332248772, -0.20090225351392088, 496442774)), 1332248764: ((1332248764, 1557.3910225558648, 2107751945), (1332248764, -0.18721489902707764, 496442774)), 1332248767: ((1332248767, 1429.608936699342, 2107751945), (1332248767, -0.20403622851561315, 496442774)), 1332248760: ((1332248760, 1119.8295623520703, 2107751945),), 1332248754: ((1332248754, 474.4688700801042, 492688767), (1332248754, -0.29204186002003973, 496442774))} output_args : {1332248764: [(1332248764, -0.18721489902707764, 496442774)], 1332248772: [(1332248772, -0.20090225351392088, 496442774)], 1332248767: [(1332248767, -0.20403622851561315, 496442774)], 1332248754: [(1332248754, -0.29204186002003973, 496442774)], 1332248757: [(1332248757, -0.3246507664646548, 496442774)], 1332248760: [(1332248760, -0.375305259778927, 496442774)]} args : 1332248760 depend.output_id : 0 complete output_args for input 2 : {1332248772: ('0.09235593779601126',), 1332248767: ('0.09235593779601126',), 1332248764: ('0.09235593779601126',), 1332248760: ('0.09235593779601126',), 1332248757: ('0.09235593779601126',), 1332248754: ('0.09235593779601126',)} input_args_next_step : {1332248757: ((1332248757, 2895.5133619786798, 492609224), (1332248757, -0.3246507664646548, 496442774)), 1332248772: ((1332248772, 1802.4160809415116, 2107751945), (1332248772, -0.20090225351392088, 496442774)), 1332248764: ((1332248764, 1557.3910225558648, 2107751945), (1332248764, -0.18721489902707764, 496442774)), 1332248767: ((1332248767, 1429.608936699342, 2107751945), (1332248767, -0.20403622851561315, 496442774)), 1332248760: ((1332248760, 1119.8295623520703, 2107751945), (1332248760, -0.375305259778927, 496442774)), 1332248754: ((1332248754, 474.4688700801042, 492688767), (1332248754, -0.29204186002003973, 496442774))} output_args : {1332248772: ('0.09235593779601126',), 1332248767: ('0.09235593779601126',), 1332248764: ('0.09235593779601126',), 1332248760: ('0.09235593779601126',), 1332248757: ('0.09235593779601126',), 1332248754: ('0.09235593779601126',)} args : 1332248772 depend.output_id : 0 input_args_next_step : {1332248757: ((1332248757, 2895.5133619786798, 492609224), (1332248757, -0.3246507664646548, 496442774)), 1332248772: ((1332248772, 1802.4160809415116, 2107751945), (1332248772, -0.20090225351392088, 496442774), '0.09235593779601126'), 1332248764: ((1332248764, 1557.3910225558648, 2107751945), (1332248764, -0.18721489902707764, 496442774)), 1332248767: ((1332248767, 1429.608936699342, 2107751945), (1332248767, -0.20403622851561315, 496442774)), 1332248760: ((1332248760, 1119.8295623520703, 2107751945), (1332248760, -0.375305259778927, 496442774)), 1332248754: ((1332248754, 474.4688700801042, 492688767), (1332248754, -0.29204186002003973, 496442774))} output_args : {1332248772: ('0.09235593779601126',), 1332248767: ('0.09235593779601126',), 1332248764: ('0.09235593779601126',), 1332248760: ('0.09235593779601126',), 1332248757: ('0.09235593779601126',), 1332248754: ('0.09235593779601126',)} args : 1332248767 depend.output_id : 0 input_args_next_step : {1332248757: ((1332248757, 2895.5133619786798, 492609224), (1332248757, -0.3246507664646548, 496442774)), 1332248772: ((1332248772, 1802.4160809415116, 2107751945), (1332248772, -0.20090225351392088, 496442774), '0.09235593779601126'), 1332248764: ((1332248764, 1557.3910225558648, 2107751945), (1332248764, -0.18721489902707764, 496442774)), 1332248767: ((1332248767, 1429.608936699342, 2107751945), (1332248767, -0.20403622851561315, 496442774), '0.09235593779601126'), 1332248760: ((1332248760, 1119.8295623520703, 2107751945), (1332248760, -0.375305259778927, 496442774)), 1332248754: ((1332248754, 474.4688700801042, 492688767), (1332248754, -0.29204186002003973, 496442774))} output_args : {1332248772: ('0.09235593779601126',), 1332248767: ('0.09235593779601126',), 1332248764: ('0.09235593779601126',), 1332248760: ('0.09235593779601126',), 1332248757: ('0.09235593779601126',), 1332248754: ('0.09235593779601126',)} args : 1332248764 depend.output_id : 0 input_args_next_step : {1332248757: ((1332248757, 2895.5133619786798, 492609224), (1332248757, -0.3246507664646548, 496442774)), 1332248772: ((1332248772, 1802.4160809415116, 2107751945), (1332248772, -0.20090225351392088, 496442774), '0.09235593779601126'), 1332248764: ((1332248764, 1557.3910225558648, 2107751945), (1332248764, -0.18721489902707764, 496442774), '0.09235593779601126'), 1332248767: ((1332248767, 1429.608936699342, 2107751945), (1332248767, -0.20403622851561315, 496442774), '0.09235593779601126'), 1332248760: ((1332248760, 1119.8295623520703, 2107751945), (1332248760, -0.375305259778927, 496442774)), 1332248754: ((1332248754, 474.4688700801042, 492688767), (1332248754, -0.29204186002003973, 496442774))} output_args : {1332248772: ('0.09235593779601126',), 1332248767: ('0.09235593779601126',), 1332248764: ('0.09235593779601126',), 1332248760: ('0.09235593779601126',), 1332248757: ('0.09235593779601126',), 1332248754: ('0.09235593779601126',)} args : 1332248760 depend.output_id : 0 input_args_next_step : {1332248757: ((1332248757, 2895.5133619786798, 492609224), (1332248757, -0.3246507664646548, 496442774)), 1332248772: ((1332248772, 1802.4160809415116, 2107751945), (1332248772, -0.20090225351392088, 496442774), '0.09235593779601126'), 1332248764: ((1332248764, 1557.3910225558648, 2107751945), (1332248764, -0.18721489902707764, 496442774), '0.09235593779601126'), 1332248767: ((1332248767, 1429.608936699342, 2107751945), (1332248767, -0.20403622851561315, 496442774), '0.09235593779601126'), 1332248760: ((1332248760, 1119.8295623520703, 2107751945), (1332248760, -0.375305259778927, 496442774), '0.09235593779601126'), 1332248754: ((1332248754, 474.4688700801042, 492688767), (1332248754, -0.29204186002003973, 496442774))} output_args : {1332248772: ('0.09235593779601126',), 1332248767: ('0.09235593779601126',), 1332248764: ('0.09235593779601126',), 1332248760: ('0.09235593779601126',), 1332248757: ('0.09235593779601126',), 1332248754: ('0.09235593779601126',)} args : 1332248757 depend.output_id : 0 input_args_next_step : {1332248757: ((1332248757, 2895.5133619786798, 492609224), (1332248757, -0.3246507664646548, 496442774), '0.09235593779601126'), 1332248772: ((1332248772, 1802.4160809415116, 2107751945), (1332248772, -0.20090225351392088, 496442774), '0.09235593779601126'), 1332248764: ((1332248764, 1557.3910225558648, 2107751945), (1332248764, -0.18721489902707764, 496442774), '0.09235593779601126'), 1332248767: ((1332248767, 1429.608936699342, 2107751945), (1332248767, -0.20403622851561315, 496442774), '0.09235593779601126'), 1332248760: ((1332248760, 1119.8295623520703, 2107751945), (1332248760, -0.375305259778927, 496442774), '0.09235593779601126'), 1332248754: ((1332248754, 474.4688700801042, 492688767), (1332248754, -0.29204186002003973, 496442774))} output_args : {1332248772: ('0.09235593779601126',), 1332248767: ('0.09235593779601126',), 1332248764: ('0.09235593779601126',), 1332248760: ('0.09235593779601126',), 1332248757: ('0.09235593779601126',), 1332248754: ('0.09235593779601126',)} args : 1332248754 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 : {20009037: [{'papier': 20023595, 'carton': 20023596, 'metal': 20023597, 'pet_clair': 20023598, 'pehd': 20023599, 'flux_dev': 20023600, 'film_dev_souple': 20023601, 'ela': 20023602, 'sac_om_plein': 20023603, 'textiles': 20023604, 'verre': 20023605, 'organique': 20023606, 'dasri': 20023607, 'masque': 20023608, 'encombrant': 20023609, 'autre_non_emballage': 20023610, 'environnement': 20023611, 'mal_croppe': 20023612, 'flou': 20023613, 'pet_fonce': 20023614, 'pet_opaque': 20023615, 'barquette_opaque': 20023616, 'film_plastique': 20023617, 'autre_emballage': 20023618, 'sac': 20023619}]} input_args_next_step : {1332248757: ((1332248757, 2895.5133619786798, 492609224), (1332248757, -0.3246507664646548, 496442774), '0.09235593779601126'), 1332248772: ((1332248772, 1802.4160809415116, 2107751945), (1332248772, -0.20090225351392088, 496442774), '0.09235593779601126'), 1332248764: ((1332248764, 1557.3910225558648, 2107751945), (1332248764, -0.18721489902707764, 496442774), '0.09235593779601126'), 1332248767: ((1332248767, 1429.608936699342, 2107751945), (1332248767, -0.20403622851561315, 496442774), '0.09235593779601126'), 1332248760: ((1332248760, 1119.8295623520703, 2107751945), (1332248760, -0.375305259778927, 496442774), '0.09235593779601126'), 1332248754: ((1332248754, 474.4688700801042, 492688767), (1332248754, -0.29204186002003973, 496442774), '0.09235593779601126'), 20009037: ()} output_args : {20009037: [{'papier': 20023595, 'carton': 20023596, 'metal': 20023597, 'pet_clair': 20023598, 'pehd': 20023599, 'flux_dev': 20023600, 'film_dev_souple': 20023601, 'ela': 20023602, 'sac_om_plein': 20023603, 'textiles': 20023604, 'verre': 20023605, 'organique': 20023606, 'dasri': 20023607, 'masque': 20023608, 'encombrant': 20023609, 'autre_non_emballage': 20023610, 'environnement': 20023611, 'mal_croppe': 20023612, 'flou': 20023613, 'pet_fonce': 20023614, 'pet_opaque': 20023615, 'barquette_opaque': 20023616, 'film_plastique': 20023617, 'autre_emballage': 20023618, 'sac': 20023619}]} args : 20009037 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 : ((1332248757, 2895.5133619786798, 492609224), (1332248757, -0.3246507664646548, 496442774), '0.09235593779601126') After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20009037) Here we display some param of map_info ! map_filenames : {'temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg': 1332248772, 'temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg': 1332248767, 'temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg': 1332248764, 'temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg': 1332248760, 'temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg': 1332248757, 'temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg': 1332248754} map_photo_id_path_extension : {1332248772: {'path': 'temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg', 'extension': 'jpg'}, 1332248767: {'path': 'temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg', 'extension': 'jpg'}, 1332248764: {'path': 'temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg', 'extension': 'jpg'}, 1332248760: {'path': 'temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg', 'extension': 'jpg'}, 1332248757: {'path': 'temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg', 'extension': 'jpg'}, 1332248754: {'path': 'temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg', 'extension': 'jpg'}} 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 results_COD_P20009037_06-02-2025_09_25_18.pdf 20023603 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=20023603 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1332286193: '1738065687_2567418_1332248757_789a8cba874309fff1be36b521ab8e1a_rle_crop_3640552504_0.png'} change filename to text .imagette200236031738830318/ imagette200236031738830318/1738065687_2567418_1332248757_789a8cba874309fff1be36b521ab8e1a_rle_crop_3640552504_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/1/28/968bc3fe6282c17852e48b8bcd3530dd_25433114.png imagette200236031738830318 20023604 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=20023604 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1332286180: '1738065687_2567418_1332248760_b1937b1db2a81fccec57b1dd8a7e3498_rle_crop_3640550726_0.png', 1332286477: '1738065687_2567418_1332248772_61434a25ef5e0fda695cc3c4c8690435_rle_crop_3640544110_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/1/28/7698d75b8a3a5d601a04dcb3b32b57be_55438964.png change filename to text .imagette200236041738830318/ imagette200236041738830318/1738065687_2567418_1332248772_61434a25ef5e0fda695cc3c4c8690435_rle_crop_3640544110_0.png.png imagette200236041738830318/1738065687_2567418_1332248760_b1937b1db2a81fccec57b1dd8a7e3498_rle_crop_3640550726_0.png.png imagette200236051738830319/ imagette200236061738830319/ imagette200236071738830319/ imagette200236081738830319/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/1/28/2987c72e4012c5d908243afdd987092b_96374035.png imagette200236041738830318 20023605 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=20023605 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette200236051738830319 20023606 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=20023606 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette200236061738830319 20023607 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=20023607 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette200236071738830319 20023608 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=20023608 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette200236081738830319 20023609 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=20023609 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1332286504: '1738065687_2567418_1332248764_10cfaecd698bdaed0fa13af0b60b42d1_rle_crop_3640550482_0.png', 1332286506: '1738065687_2567418_1332248764_10cfaecd698bdaed0fa13af0b60b42d1_rle_crop_3640550487_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/1/28/c7f237007b324f518cd66c029d42ad9f_35336743.png change filename to text .imagette200236091738830319/ imagette200236091738830319/1738065687_2567418_1332248764_10cfaecd698bdaed0fa13af0b60b42d1_rle_crop_3640550487_0.png.png imagette200236091738830319/1738065687_2567418_1332248764_10cfaecd698bdaed0fa13af0b60b42d1_rle_crop_3640550482_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/1/28/5fcd844c4d3de213ae12a29671ca5a67_43749065.png imagette200236091738830319 20023610 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=20023610 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1332286537: '1738065687_2567418_1332248757_789a8cba874309fff1be36b521ab8e1a_rle_crop_3640552516_0.png', 1332287359: '1738065687_2567418_1332248764_10cfaecd698bdaed0fa13af0b60b42d1_rle_crop_3640550477_0.png', 1332287361: '1738065687_2567418_1332248764_10cfaecd698bdaed0fa13af0b60b42d1_rle_crop_3640550502_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/1/28/d64e67da087b3776d0ed85b17a149ef3_41163900.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/1/28/5d83920e59e5cb735b63c486f2a1ac27_97313495.png change filename to text .imagette200236101738830319/ imagette200236101738830319/1738065687_2567418_1332248757_789a8cba874309fff1be36b521ab8e1a_rle_crop_3640552516_0.png.png imagette200236101738830319/1738065687_2567418_1332248764_10cfaecd698bdaed0fa13af0b60b42d1_rle_crop_3640550477_0.png.png imagette200236101738830319/1738065687_2567418_1332248764_10cfaecd698bdaed0fa13af0b60b42d1_rle_crop_3640550502_0.png.png imagette200236191738830320/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/1/28/5297b10e0e673c50cb1a8df9be4ce64b_86015072.png imagette200236101738830319 20023619 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=20023619 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette200236191738830320 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=20009037 and hashtag_type = 4857 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/20015439,20015440,20015441,20015442,20015443,20015448,20015450,20015451,20015452,20015453,20015454,20015455,20015457,20015458,20015460,20015461,20015462,20015463,20015464?tags=papier,carton,metal,pet_clair,pehd,ela,textiles,verre,organique,dasri,masque,encombrant,autre_non_emballage,environnement,flux_dev,mal_croppe,flou,film_dev_souple,sac_om_plein&datou_id_consolidate=4742&port_consolidate=20009037 your option no_mail is active, we will not send the real mail to your client args[1332248772] : ((1332248772, 1802.4160809415116, 2107751945), (1332248772, -0.20090225351392088, 496442774), '0.09235593779601126') apple ((1332248772, 1802.4160809415116, 2107751945), (1332248772, -0.20090225351392088, 496442774), '0.09235593779601126') We are sending mail with results at kexin@fotonower.com args[1332248767] : ((1332248767, 1429.608936699342, 2107751945), (1332248767, -0.20403622851561315, 496442774), '0.09235593779601126') apple ((1332248767, 1429.608936699342, 2107751945), (1332248767, -0.20403622851561315, 496442774), '0.09235593779601126') We are sending mail with results at kexin@fotonower.com args[1332248764] : ((1332248764, 1557.3910225558648, 2107751945), (1332248764, -0.18721489902707764, 496442774), '0.09235593779601126') apple ((1332248764, 1557.3910225558648, 2107751945), (1332248764, -0.18721489902707764, 496442774), '0.09235593779601126') We are sending mail with results at kexin@fotonower.com args[1332248760] : ((1332248760, 1119.8295623520703, 2107751945), (1332248760, -0.375305259778927, 496442774), '0.09235593779601126') apple ((1332248760, 1119.8295623520703, 2107751945), (1332248760, -0.375305259778927, 496442774), '0.09235593779601126') We are sending mail with results at kexin@fotonower.com args[1332248757] : ((1332248757, 2895.5133619786798, 492609224), (1332248757, -0.3246507664646548, 496442774), '0.09235593779601126') apple ((1332248757, 2895.5133619786798, 492609224), (1332248757, -0.3246507664646548, 496442774), '0.09235593779601126') We are sending mail with results at kexin@fotonower.com args[1332248754] : ((1332248754, 474.4688700801042, 492688767), (1332248754, -0.29204186002003973, 496442774), '0.09235593779601126') apple ((1332248754, 474.4688700801042, 492688767), (1332248754, -0.29204186002003973, 496442774), '0.09235593779601126') We are sending mail with results at kexin@fotonower.com refus_total : 0.09235593779601126 2022-04-13 10:29:59 0 start upload file to ovh https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20009037_06-02-2025_09_25_18.pdf results_COD_P20009037_06-02-2025_09_25_18.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20009037_06-02-2025_09_25_18.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4742','20009037','results_COD_P20009037_06-02-2025_09_25_18.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20009037_06-02-2025_09_25_18.pdf','pdf','','0.46','0.09235593779601126') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20009037]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754] map_info['map_portfolio_photo'] : {20009037: [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754]} final : False mtd_id 4742 list_pids : [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754] 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 ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248772', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248767', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248764', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248760', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248757', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248754', None, None, None, None, None, '2559007') 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 : [('4742', '20009037', '1332248772', None, None, None, None, None, '2559007'), ('4742', '20009037', '1332248767', None, None, None, None, None, '2559007'), ('4742', '20009037', '1332248764', None, None, None, None, None, '2559007'), ('4742', '20009037', '1332248760', None, None, None, None, None, '2559007'), ('4742', '20009037', '1332248757', None, None, None, None, None, '2559007'), ('4742', '20009037', '1332248754', None, None, None, None, None, '2559007')] time used for this insertion : 0.01279139518737793 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.704441785812378 time spend to save output : 0.012930154800415039 total time spend for step 8 : 3.717371940612793 step9:split_time_score Thu Feb 6 09:25:22 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 ! 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 :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20009037) Here we display some param of map_info ! map_filenames : {'temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg': 1332248772, 'temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg': 1332248767, 'temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg': 1332248764, 'temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg': 1332248760, 'temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg': 1332248757, 'temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg': 1332248754} map_photo_id_path_extension : {1332248772: {'path': 'temp/1738830270_2842267_1332248772_61434a25ef5e0fda695cc3c4c8690435.jpg', 'extension': 'jpg'}, 1332248767: {'path': 'temp/1738830270_2842267_1332248767_80d84f6e7ed3fa036762e94b19f2325b.jpg', 'extension': 'jpg'}, 1332248764: {'path': 'temp/1738830270_2842267_1332248764_10cfaecd698bdaed0fa13af0b60b42d1.jpg', 'extension': 'jpg'}, 1332248760: {'path': 'temp/1738830270_2842267_1332248760_b1937b1db2a81fccec57b1dd8a7e3498.jpg', 'extension': 'jpg'}, 1332248757: {'path': 'temp/1738830270_2842267_1332248757_789a8cba874309fff1be36b521ab8e1a.jpg', 'extension': 'jpg'}, 1332248754: {'path': 'temp/1738830270_2842267_1332248754_d093846ecc50c1163b7bb7a0385a96c8.jpg', 'extension': 'jpg'}} map_subphoto_mainphoto : {} begin split time score SELECT app_name, token FROM MTRUser.mtr_app_api_token WHERE mtr_user_id=1107 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 = 20009037; (('SyctomXV_Mask_23Q4',),) 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 = 20009037 group by h (('35', 1), ('37', 5)) 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=20009037 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 (20009037) 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 (20009037) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 28012025 20009037 Nombre de photos uploadées : 6 / 23040 (0%) 28012025 20009037 Nombre de photos taguées (types de déchets): 0 / 6 (0%) 28012025 20009037 Nombre de photos taguées (volume) : 0 / 6 (0%) [{'photo_id': 1332248754, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/1/28/d093846ecc50c1163b7bb7a0385a96c8.jpg', 'username': None, 'uploaded_at': 1738055670, 'text': 'IMG_20250128_083554.jpg'}, {'photo_id': 1332248757, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/1/28/789a8cba874309fff1be36b521ab8e1a.jpg', 'username': None, 'uploaded_at': 1738055670, 'text': 'IMG_20250128_083714.jpg'}, {'photo_id': 1332248767, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/1/28/80d84f6e7ed3fa036762e94b19f2325b.jpg', 'username': None, 'uploaded_at': 1738055670, 'text': 'IMG_20250128_083735.jpg'}, {'photo_id': 1332248760, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/1/28/b1937b1db2a81fccec57b1dd8a7e3498.jpg', 'username': None, 'uploaded_at': 1738055670, 'text': 'IMG_20250128_083718.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.6689300537109375e-06 elapsed_time : order_list_meta_photo_and_scores 6.198883056640625e-06 ?????? elapsed_time : fill_and_build_computed_from_old_data 0.0003695487976074219 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 188, 20009037, '2025-01-28' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1559196,1107,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.11761999130249023 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= 1559196 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1559196, 'dashboard_run_id': 1567001, 'mtr_portfolio_id': 20009036, 'dashboard_result_id': 8554157, 'hashtag': '_______entrant', 'completion_json': "{'max_time_prod_two_photos': 0, 'car_plate': 'FF415PK', 'plate_origin_photo': 1332248694, 'plate_crop_photo': 0, 'plate_crops': {'hashtag': 'plate_crops', 'sub_port_id': 0, 'pht': 4403}, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20009036_04-02-2025_10_59_34.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20021096, 'pht': 4857}, 'carton': {'hashtag': 'carton', 'sub_port_id': 20021097, 'pht': 4857}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20021098, 'pht': 4857}, 'pet_clair': {'hashtag': 'pet_clair', 'sub_port_id': 20021099, 'pht': 4857}, 'pehd': {'hashtag': 'pehd', 'sub_port_id': 20021100, 'pht': 4857}, 'pet_fonce': {'hashtag': 'pet_fonce', 'sub_port_id': 20021115, 'pht': 4857}, 'pet_opaque': {'hashtag': 'pet_opaque', 'sub_port_id': 20021116, 'pht': 4857}, 'barquette_opaque': {'hashtag': 'barquette_opaque', 'sub_port_id': 20021117, 'pht': 4857}, 'film_plastique': {'hashtag': 'film_plastique', 'sub_port_id': 20021118, 'pht': 4857}, 'ela': {'hashtag': 'ela', 'sub_port_id': 20021103, 'pht': 4857}, 'sac': {'hashtag': 'sac', 'sub_port_id': 20021120, 'pht': 4857}, 'textiles': {'hashtag': 'textiles', 'sub_port_id': 20021105, 'pht': 4857}, 'verre': {'hashtag': 'verre', 'sub_port_id': 20021106, 'pht': 4857}, 'organique': {'hashtag': 'organique', 'sub_port_id': 20021107, 'pht': 4857}, 'dasri': {'hashtag': 'dasri', 'sub_port_id': 20021108, 'pht': 4857}, 'masque': {'hashtag': 'masque', 'sub_port_id': 20021109, 'pht': 4857}, 'encombrant': {'hashtag': 'encombrant', 'sub_port_id': 20021110, 'pht': 4857}, 'autre_emballage': {'hashtag': 'autre_emballage', 'sub_port_id': 20021119, 'pht': 4857}, 'autre_non_emballage': {'hashtag': 'autre_non_emballage', 'sub_port_id': 20021111, 'pht': 4857}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20021112, 'pht': 4857}, 'autre': {'hashtag': 'autre', 'sub_port_id': 20014530, 'pht': 4855}, 'flux_dev': {'hashtag': 'flux_dev', 'sub_port_id': 20021101, 'pht': 4857}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20021113, 'pht': 4857}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20021114, 'pht': 4857}, 'film_dev_souple': {'hashtag': 'film_dev_souple', 'sub_port_id': 20021102, 'pht': 4857}, 'sac_om_plein': {'hashtag': 'sac_om_plein', 'sub_port_id': 20021104, 'pht': 4857}}"}, {'dashboat_entry_day': 1559196, 'dashboard_run_id': 1567001, 'mtr_portfolio_id': 20009037, 'dashboard_result_id': 8554158, 'hashtag': '_______entrant', 'completion_json': "{'max_time_prod_two_photos': 0, 'car_plate': 'FE560FJ', 'plate_origin_photo': 1332248754, 'plate_crop_photo': 0, 'plate_crops': {'hashtag': 'plate_crops', 'sub_port_id': 0, 'pht': 4403}, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20009037_05-02-2025_10_54_38.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20023595, 'pht': 4857}, 'carton': {'hashtag': 'carton', 'sub_port_id': 20023596, 'pht': 4857}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20023597, 'pht': 4857}, 'pet_clair': {'hashtag': 'pet_clair', 'sub_port_id': 20023598, 'pht': 4857}, 'pehd': {'hashtag': 'pehd', 'sub_port_id': 20023599, 'pht': 4857}, 'pet_fonce': {'hashtag': 'pet_fonce', 'sub_port_id': 20023614, 'pht': 4857}, 'pet_opaque': {'hashtag': 'pet_opaque', 'sub_port_id': 20023615, 'pht': 4857}, 'barquette_opaque': {'hashtag': 'barquette_opaque', 'sub_port_id': 20023616, 'pht': 4857}, 'film_plastique': {'hashtag': 'film_plastique', 'sub_port_id': 20023617, 'pht': 4857}, 'ela': {'hashtag': 'ela', 'sub_port_id': 20023602, 'pht': 4857}, 'sac': {'hashtag': 'sac', 'sub_port_id': 20023619, 'pht': 4857}, 'textiles': {'hashtag': 'textiles', 'sub_port_id': 20023604, 'pht': 4857}, 'verre': {'hashtag': 'verre', 'sub_port_id': 20023605, 'pht': 4857}, 'organique': {'hashtag': 'organique', 'sub_port_id': 20023606, 'pht': 4857}, 'dasri': {'hashtag': 'dasri', 'sub_port_id': 20023607, 'pht': 4857}, 'masque': {'hashtag': 'masque', 'sub_port_id': 20023608, 'pht': 4857}, 'encombrant': {'hashtag': 'encombrant', 'sub_port_id': 20023609, 'pht': 4857}, 'autre_emballage': {'hashtag': 'autre_emballage', 'sub_port_id': 20023618, 'pht': 4857}, 'autre_non_emballage': {'hashtag': 'autre_non_emballage', 'sub_port_id': 20023610, 'pht': 4857}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20023611, 'pht': 4857}, 'autre': {'hashtag': 'autre', 'sub_port_id': 20015433, 'pht': 4855}, 'flux_dev': {'hashtag': 'flux_dev', 'sub_port_id': 20023600, 'pht': 4857}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20023612, 'pht': 4857}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20023613, 'pht': 4857}, 'film_dev_souple': {'hashtag': 'film_dev_souple', 'sub_port_id': 20023601, 'pht': 4857}, 'sac_om_plein': {'hashtag': 'sac_om_plein', 'sub_port_id': 20023603, 'pht': 4857}}"}, {'dashboat_entry_day': 1559196, 'dashboard_run_id': 1567001, 'mtr_portfolio_id': 20009038, 'dashboard_result_id': 8554159, 'hashtag': '_______entrant', 'completion_json': "{'max_time_prod_two_photos': 0, 'car_plate': 'EV144SX', 'plate_origin_photo': 1332248980, 'plate_crop_photo': 0, 'plate_crops': {'hashtag': 'plate_crops', 'sub_port_id': 0, 'pht': 4403}, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20009038_31-01-2025_04_06_56.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20041946, 'pht': 4857}, 'carton': {'hashtag': 'carton', 'sub_port_id': 20041947, 'pht': 4857}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20041948, 'pht': 4857}, 'pet_clair': {'hashtag': 'pet_clair', 'sub_port_id': 20041949, 'pht': 4857}, 'pehd': {'hashtag': 'pehd', 'sub_port_id': 20041950, 'pht': 4857}, 'pet_fonce': {'hashtag': 'pet_fonce', 'sub_port_id': 20041965, 'pht': 4857}, 'pet_opaque': {'hashtag': 'pet_opaque', 'sub_port_id': 20041966, 'pht': 4857}, 'barquette_opaque': {'hashtag': 'barquette_opaque', 'sub_port_id': 20041967, 'pht': 4857}, 'film_plastique': {'hashtag': 'film_plastique', 'sub_port_id': 20041968, 'pht': 4857}, 'ela': {'hashtag': 'ela', 'sub_port_id': 20041953, 'pht': 4857}, 'sac': {'hashtag': 'sac', 'sub_port_id': 20041970, 'pht': 4857}, 'textiles': {'hashtag': 'textiles', 'sub_port_id': 20041955, 'pht': 4857}, 'verre': {'hashtag': 'verre', 'sub_port_id': 20041956, 'pht': 4857}, 'organique': {'hashtag': 'organique', 'sub_port_id': 20041957, 'pht': 4857}, 'dasri': {'hashtag': 'dasri', 'sub_port_id': 20041958, 'pht': 4857}, 'masque': {'hashtag': 'masque', 'sub_port_id': 20041959, 'pht': 4857}, 'encombrant': {'hashtag': 'encombrant', 'sub_port_id': 20041960, 'pht': 4857}, 'autre_emballage': {'hashtag': 'autre_emballage', 'sub_port_id': 20041969, 'pht': 4857}, 'autre_non_emballage': {'hashtag': 'autre_non_emballage', 'sub_port_id': 20041961, 'pht': 4857}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20041962, 'pht': 4857}, 'autre': {'hashtag': 'autre', 'sub_port_id': 20014134, 'pht': 4855}, 'flux_dev': {'hashtag': 'flux_dev', 'sub_port_id': 20041951, 'pht': 4857}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20041963, 'pht': 4857}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20041964, 'pht': 4857}, 'film_dev_souple': {'hashtag': 'film_dev_souple', 'sub_port_id': 20041952, 'pht': 4857}, 'sac_om_plein': {'hashtag': 'sac_om_plein', 'sub_port_id': 20041954, 'pht': 4857}}"}, {'dashboat_entry_day': 1559196, 'dashboard_run_id': 1567001, 'mtr_portfolio_id': 20009039, 'dashboard_result_id': 8554160, 'hashtag': '_______entrant', 'completion_json': "{'max_time_prod_two_photos': 0, 'car_plate': 'FG416XE', 'plate_origin_photo': 1332249184, 'plate_crop_photo': 0, 'plate_crops': {'hashtag': 'plate_crops', 'sub_port_id': 0, 'pht': 4403}, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20009039_31-01-2025_04_08_57.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20044485, 'pht': 4857}, 'carton': {'hashtag': 'carton', 'sub_port_id': 20044486, 'pht': 4857}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20044487, 'pht': 4857}, 'pet_clair': {'hashtag': 'pet_clair', 'sub_port_id': 20044488, 'pht': 4857}, 'pehd': {'hashtag': 'pehd', 'sub_port_id': 20044489, 'pht': 4857}, 'pet_fonce': {'hashtag': 'pet_fonce', 'sub_port_id': 20044504, 'pht': 4857}, 'pet_opaque': {'hashtag': 'pet_opaque', 'sub_port_id': 20044505, 'pht': 4857}, 'barquette_opaque': {'hashtag': 'barquette_opaque', 'sub_port_id': 20044506, 'pht': 4857}, 'film_plastique': {'hashtag': 'film_plastique', 'sub_port_id': 20044507, 'pht': 4857}, 'ela': {'hashtag': 'ela', 'sub_port_id': 20044492, 'pht': 4857}, 'sac': {'hashtag': 'sac', 'sub_port_id': 20044509, 'pht': 4857}, 'textiles': {'hashtag': 'textiles', 'sub_port_id': 20044494, 'pht': 4857}, 'verre': {'hashtag': 'verre', 'sub_port_id': 20044495, 'pht': 4857}, 'organique': {'hashtag': 'organique', 'sub_port_id': 20044496, 'pht': 4857}, 'dasri': {'hashtag': 'dasri', 'sub_port_id': 20044497, 'pht': 4857}, 'masque': {'hashtag': 'masque', 'sub_port_id': 20044498, 'pht': 4857}, 'encombrant': {'hashtag': 'encombrant', 'sub_port_id': 20044499, 'pht': 4857}, 'autre_emballage': {'hashtag': 'autre_emballage', 'sub_port_id': 20044508, 'pht': 4857}, 'autre_non_emballage': {'hashtag': 'autre_non_emballage', 'sub_port_id': 20044500, 'pht': 4857}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20044501, 'pht': 4857}, 'autre': {'hashtag': 'autre', 'sub_port_id': 20012161, 'pht': 4855}, 'flux_dev': {'hashtag': 'flux_dev', 'sub_port_id': 20044490, 'pht': 4857}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20044502, 'pht': 4857}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20044503, 'pht': 4857}, 'film_dev_souple': {'hashtag': 'film_dev_souple', 'sub_port_id': 20044491, 'pht': 4857}, 'sac_om_plein': {'hashtag': 'sac_om_plein', 'sub_port_id': 20044493, 'pht': 4857}}"}, {'dashboat_entry_day': 1559196, 'dashboard_run_id': 1567001, 'mtr_portfolio_id': 20014721, 'dashboard_result_id': 8554161, 'hashtag': '_______entrant', 'completion_json': "{'max_time_prod_two_photos': 0, 'car_plate': 'EW212AL', 'plate_origin_photo': 1332271603, 'plate_crop_photo': 0, 'plate_crops': {'hashtag': 'plate_crops', 'sub_port_id': 0, 'pht': 4403}, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20014721_31-01-2025_04_10_51.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20045632, 'pht': 4857}, 'carton': {'hashtag': 'carton', 'sub_port_id': 20045633, 'pht': 4857}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20045634, 'pht': 4857}, 'pet_clair': {'hashtag': 'pet_clair', 'sub_port_id': 20045635, 'pht': 4857}, 'pehd': {'hashtag': 'pehd', 'sub_port_id': 20045636, 'pht': 4857}, 'pet_fonce': {'hashtag': 'pet_fonce', 'sub_port_id': 20045651, 'pht': 4857}, 'pet_opaque': {'hashtag': 'pet_opaque', 'sub_port_id': 20045652, 'pht': 4857}, 'barquette_opaque': {'hashtag': 'barquette_opaque', 'sub_port_id': 20045653, 'pht': 4857}, 'film_plastique': {'hashtag': 'film_plastique', 'sub_port_id': 20045654, 'pht': 4857}, 'ela': {'hashtag': 'ela', 'sub_port_id': 20045639, 'pht': 4857}, 'sac': {'hashtag': 'sac', 'sub_port_id': 20045656, 'pht': 4857}, 'textiles': {'hashtag': 'textiles', 'sub_port_id': 20045641, 'pht': 4857}, 'verre': {'hashtag': 'verre', 'sub_port_id': 20045642, 'pht': 4857}, 'organique': {'hashtag': 'organique', 'sub_port_id': 20045643, 'pht': 4857}, 'dasri': {'hashtag': 'dasri', 'sub_port_id': 20045644, 'pht': 4857}, 'masque': {'hashtag': 'masque', 'sub_port_id': 20045645, 'pht': 4857}, 'encombrant': {'hashtag': 'encombrant', 'sub_port_id': 20045646, 'pht': 4857}, 'autre_emballage': {'hashtag': 'autre_emballage', 'sub_port_id': 20045655, 'pht': 4857}, 'autre_non_emballage': {'hashtag': 'autre_non_emballage', 'sub_port_id': 20045647, 'pht': 4857}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20045648, 'pht': 4857}, 'autre': {'hashtag': 'autre', 'sub_port_id': 20015267, 'pht': 4855}, 'flux_dev': {'hashtag': 'flux_dev', 'sub_port_id': 20045637, 'pht': 4857}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20045649, 'pht': 4857}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20045650, 'pht': 4857}, 'film_dev_souple': {'hashtag': 'film_dev_souple', 'sub_port_id': 20045638, 'pht': 4857}, 'sac_om_plein': {'hashtag': 'sac_om_plein', 'sub_port_id': 20045640, 'pht': 4857}}"}] 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 = 20009036 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4742 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4742, 'mtr_datou_current_id': 2544345, 'mtr_portfolio_id': 20009036, 'created_at': datetime.datetime(2025, 2, 4, 10, 59, 34), 'result': '0.2416338046956962', 'result_long': None, 'result_double': None}] Qualite : 0.2416338046956962 select url from MTRUser.mtr_files where mtd_id = 4742 and mtr_portfolio_id = 20009036 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20009036_04-02-2025_10_59_34.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20009036 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'car_plate': 'FF415PK', 'plate_origin_photo': 1332248694, 'plate_crop_photo': 0, 'plate_crops': {'hashtag': 'plate_crops', 'sub_port_id': 0, 'pht': 4403}, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20009036_04-02-2025_10_59_34.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20021096, 'pht': 4857}, 'carton': {'hashtag': 'carton', 'sub_port_id': 20021097, 'pht': 4857}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20021098, 'pht': 4857}, 'pet_clair': {'hashtag': 'pet_clair', 'sub_port_id': 20021099, 'pht': 4857}, 'pehd': {'hashtag': 'pehd', 'sub_port_id': 20021100, 'pht': 4857}, 'pet_fonce': {'hashtag': 'pet_fonce', 'sub_port_id': 20021115, 'pht': 4857}, 'pet_opaque': {'hashtag': 'pet_opaque', 'sub_port_id': 20021116, 'pht': 4857}, 'barquette_opaque': {'hashtag': 'barquette_opaque', 'sub_port_id': 20021117, 'pht': 4857}, 'film_plastique': {'hashtag': 'film_plastique', 'sub_port_id': 20021118, 'pht': 4857}, 'ela': {'hashtag': 'ela', 'sub_port_id': 20021103, 'pht': 4857}, 'sac': {'hashtag': 'sac', 'sub_port_id': 20021120, 'pht': 4857}, 'textiles': {'hashtag': 'textiles', 'sub_port_id': 20021105, 'pht': 4857}, 'verre': {'hashtag': 'verre', 'sub_port_id': 20021106, 'pht': 4857}, 'organique': {'hashtag': 'organique', 'sub_port_id': 20021107, 'pht': 4857}, 'dasri': {'hashtag': 'dasri', 'sub_port_id': 20021108, 'pht': 4857}, 'masque': {'hashtag': 'masque', 'sub_port_id': 20021109, 'pht': 4857}, 'encombrant': {'hashtag': 'encombrant', 'sub_port_id': 20021110, 'pht': 4857}, 'autre_emballage': {'hashtag': 'autre_emballage', 'sub_port_id': 20021119, 'pht': 4857}, 'autre_non_emballage': {'hashtag': 'autre_non_emballage', 'sub_port_id': 20021111, 'pht': 4857}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20021112, 'pht': 4857}, 'autre': {'hashtag': 'autre', 'sub_port_id': 20014530, 'pht': 4855}, 'flux_dev': {'hashtag': 'flux_dev', 'sub_port_id': 20021101, 'pht': 4857}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20021113, 'pht': 4857}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20021114, 'pht': 4857}, 'film_dev_souple': {'hashtag': 'film_dev_souple', 'sub_port_id': 20021102, 'pht': 4857}, 'sac_om_plein': {'hashtag': 'sac_om_plein', 'sub_port_id': 20021104, 'pht': 4857}}" where mtr_portfolio_id = 20009036 and dashboard_run_id = 1567001 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4742 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=4742 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= 4742 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=4742 # 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 ! 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 13169 copy_chis is not consistent : 2 used against 1 in the step definition ! WARNING : number of outputs for step 13170 consolidate_hashtags_from_manual_portfolio is not consistent : 2 used against 1 in the step definition ! WARNING : number of inputs for step 13167 rle_unique_nms_with_priority is not consistent : 3 used against 1 in the step definition ! WARNING : number of outputs for step 13167 rle_unique_nms_with_priority is not consistent : 2 used against 1 in the step definition ! WARNING : number of outputs for step 13174 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 13168 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! Step 13171 blur_detection have less inputs used (0) than in the step definition (1) : maybe we manage optionnal inputs ! Step 13172 brightness have less inputs used (0) than in the step definition (1) : maybe we manage optionnal inputs ! Step 13173 send_mail_cod have less inputs used (4) than in the step definition (5) : maybe we manage optionnal inputs ! Step 13175 split_time_score have less inputs used (1) than in the step definition (2) : 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 13169 have datatype=11 whereas input 0 of step 13167 have datatype=2 WARNING : type of output 1 of step 13170 doesn't seem to be define in the database( WARNING : type of input 3 of step 13168 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : type of output 1 of step 13170 doesn't seem to be define in the database( WARNING : type of input 1 of step 13167 doesn't seem to be define in the database( WARNING : output 0 of step 13174 have datatype=10 whereas input 3 of step 13173 have datatype=6 WARNING : type of input 1 of step 13174 doesn't seem to be define in the database( WARNING : output 1 of step 13167 have datatype=7 whereas input 1 of step 13174 have datatype=None WARNING : type of output 1 of step 13174 doesn't seem to be define in the database( WARNING : type of input 4 of step 13168 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : type of output 1 of step 13169 doesn't seem to be define in the database( WARNING : type of input 1 of step 13170 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`=20009036 AND mptpi.`type`=4857 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8554157, 0.2416338046956962, "{'max_time_prod_two_photos': 0, 'car_plate': 'FF415PK', 'plate_origin_photo': 1332248694, 'plate_crop_photo': 0, 'plate_crops': {'hashtag': 'plate_crops', 'sub_port_id': 0, 'pht': 4403}, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20009036_04-02-2025_10_59_34.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20021096, 'pht': 4857}, 'carton': {'hashtag': 'carton', 'sub_port_id': 20021097, 'pht': 4857}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20021098, 'pht': 4857}, 'pet_clair': {'hashtag': 'pet_clair', 'sub_port_id': 20021099, 'pht': 4857}, 'pehd': {'hashtag': 'pehd', 'sub_port_id': 20021100, 'pht': 4857}, 'pet_fonce': {'hashtag': 'pet_fonce', 'sub_port_id': 20021115, 'pht': 4857}, 'pet_opaque': {'hashtag': 'pet_opaque', 'sub_port_id': 20021116, 'pht': 4857}, 'barquette_opaque': {'hashtag': 'barquette_opaque', 'sub_port_id': 20021117, 'pht': 4857}, 'film_plastique': {'hashtag': 'film_plastique', 'sub_port_id': 20021118, 'pht': 4857}, 'ela': {'hashtag': 'ela', 'sub_port_id': 20021103, 'pht': 4857}, 'sac': {'hashtag': 'sac', 'sub_port_id': 20021120, 'pht': 4857}, 'textiles': {'hashtag': 'textiles', 'sub_port_id': 20021105, 'pht': 4857}, 'verre': {'hashtag': 'verre', 'sub_port_id': 20021106, 'pht': 4857}, 'organique': {'hashtag': 'organique', 'sub_port_id': 20021107, 'pht': 4857}, 'dasri': {'hashtag': 'dasri', 'sub_port_id': 20021108, 'pht': 4857}, 'masque': {'hashtag': 'masque', 'sub_port_id': 20021109, 'pht': 4857}, 'encombrant': {'hashtag': 'encombrant', 'sub_port_id': 20021110, 'pht': 4857}, 'autre_emballage': {'hashtag': 'autre_emballage', 'sub_port_id': 20021119, 'pht': 4857}, 'autre_non_emballage': {'hashtag': 'autre_non_emballage', 'sub_port_id': 20021111, 'pht': 4857}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20021112, 'pht': 4857}, 'autre': {'hashtag': 'autre', 'sub_port_id': 20014530, 'pht': 4855}, 'flux_dev': {'hashtag': 'flux_dev', 'sub_port_id': 20021101, 'pht': 4857}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20021113, 'pht': 4857}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20021114, 'pht': 4857}, 'film_dev_souple': {'hashtag': 'film_dev_souple', 'sub_port_id': 20021102, 'pht': 4857}, 'sac_om_plein': {'hashtag': 'sac_om_plein', 'sub_port_id': 20021104, 'pht': 4857}}") 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 = 20009037 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4742 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4742, 'mtr_datou_current_id': 2559007, 'mtr_portfolio_id': 20009037, 'created_at': datetime.datetime(2025, 2, 6, 9, 25, 18), 'result': '0.09235593779601126', 'result_long': None, 'result_double': None}] Qualite : 0.09235593779601126 select url from MTRUser.mtr_files where mtd_id = 4742 and mtr_portfolio_id = 20009037 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20009037_06-02-2025_09_25_18.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20009037 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'car_plate': 'FE560FJ', 'plate_origin_photo': 1332248754, 'plate_crop_photo': 0, 'plate_crops': {'hashtag': 'plate_crops', 'sub_port_id': 0, 'pht': 4403}, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20009037_06-02-2025_09_25_18.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20023595, 'pht': 4857}, 'carton': {'hashtag': 'carton', 'sub_port_id': 20023596, 'pht': 4857}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20023597, 'pht': 4857}, 'pet_clair': {'hashtag': 'pet_clair', 'sub_port_id': 20023598, 'pht': 4857}, 'pehd': {'hashtag': 'pehd', 'sub_port_id': 20023599, 'pht': 4857}, 'pet_fonce': {'hashtag': 'pet_fonce', 'sub_port_id': 20023614, 'pht': 4857}, 'pet_opaque': {'hashtag': 'pet_opaque', 'sub_port_id': 20023615, 'pht': 4857}, 'barquette_opaque': {'hashtag': 'barquette_opaque', 'sub_port_id': 20023616, 'pht': 4857}, 'film_plastique': {'hashtag': 'film_plastique', 'sub_port_id': 20023617, 'pht': 4857}, 'ela': {'hashtag': 'ela', 'sub_port_id': 20023602, 'pht': 4857}, 'sac': {'hashtag': 'sac', 'sub_port_id': 20023619, 'pht': 4857}, 'textiles': {'hashtag': 'textiles', 'sub_port_id': 20023604, 'pht': 4857}, 'verre': {'hashtag': 'verre', 'sub_port_id': 20023605, 'pht': 4857}, 'organique': {'hashtag': 'organique', 'sub_port_id': 20023606, 'pht': 4857}, 'dasri': {'hashtag': 'dasri', 'sub_port_id': 20023607, 'pht': 4857}, 'masque': {'hashtag': 'masque', 'sub_port_id': 20023608, 'pht': 4857}, 'encombrant': {'hashtag': 'encombrant', 'sub_port_id': 20023609, 'pht': 4857}, 'autre_emballage': {'hashtag': 'autre_emballage', 'sub_port_id': 20023618, 'pht': 4857}, 'autre_non_emballage': {'hashtag': 'autre_non_emballage', 'sub_port_id': 20023610, 'pht': 4857}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20023611, 'pht': 4857}, 'autre': {'hashtag': 'autre', 'sub_port_id': 20015433, 'pht': 4855}, 'flux_dev': {'hashtag': 'flux_dev', 'sub_port_id': 20023600, 'pht': 4857}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20023612, 'pht': 4857}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20023613, 'pht': 4857}, 'film_dev_souple': {'hashtag': 'film_dev_souple', 'sub_port_id': 20023601, 'pht': 4857}, 'sac_om_plein': {'hashtag': 'sac_om_plein', 'sub_port_id': 20023603, 'pht': 4857}}" where mtr_portfolio_id = 20009037 and dashboard_run_id = 1567001 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4742 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=4742 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= 4742 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=4742 # 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 ! 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 13169 copy_chis is not consistent : 2 used against 1 in the step definition ! WARNING : number of outputs for step 13170 consolidate_hashtags_from_manual_portfolio is not consistent : 2 used against 1 in the step definition ! WARNING : number of inputs for step 13167 rle_unique_nms_with_priority is not consistent : 3 used against 1 in the step definition ! WARNING : number of outputs for step 13167 rle_unique_nms_with_priority is not consistent : 2 used against 1 in the step definition ! WARNING : number of outputs for step 13174 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 13168 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! Step 13171 blur_detection have less inputs used (0) than in the step definition (1) : maybe we manage optionnal inputs ! Step 13172 brightness have less inputs used (0) than in the step definition (1) : maybe we manage optionnal inputs ! Step 13173 send_mail_cod have less inputs used (4) than in the step definition (5) : maybe we manage optionnal inputs ! Step 13175 split_time_score have less inputs used (1) than in the step definition (2) : 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 13169 have datatype=11 whereas input 0 of step 13167 have datatype=2 WARNING : type of output 1 of step 13170 doesn't seem to be define in the database( WARNING : type of input 3 of step 13168 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : type of output 1 of step 13170 doesn't seem to be define in the database( WARNING : type of input 1 of step 13167 doesn't seem to be define in the database( WARNING : output 0 of step 13174 have datatype=10 whereas input 3 of step 13173 have datatype=6 WARNING : type of input 1 of step 13174 doesn't seem to be define in the database( WARNING : output 1 of step 13167 have datatype=7 whereas input 1 of step 13174 have datatype=None WARNING : type of output 1 of step 13174 doesn't seem to be define in the database( WARNING : type of input 4 of step 13168 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : type of output 1 of step 13169 doesn't seem to be define in the database( WARNING : type of input 1 of step 13170 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`=20009037 AND mptpi.`type`=4857 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8554158, 0.09235593779601126, "{'max_time_prod_two_photos': 0, 'car_plate': 'FE560FJ', 'plate_origin_photo': 1332248754, 'plate_crop_photo': 0, 'plate_crops': {'hashtag': 'plate_crops', 'sub_port_id': 0, 'pht': 4403}, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20009037_06-02-2025_09_25_18.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20023595, 'pht': 4857}, 'carton': {'hashtag': 'carton', 'sub_port_id': 20023596, 'pht': 4857}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20023597, 'pht': 4857}, 'pet_clair': {'hashtag': 'pet_clair', 'sub_port_id': 20023598, 'pht': 4857}, 'pehd': {'hashtag': 'pehd', 'sub_port_id': 20023599, 'pht': 4857}, 'pet_fonce': {'hashtag': 'pet_fonce', 'sub_port_id': 20023614, 'pht': 4857}, 'pet_opaque': {'hashtag': 'pet_opaque', 'sub_port_id': 20023615, 'pht': 4857}, 'barquette_opaque': {'hashtag': 'barquette_opaque', 'sub_port_id': 20023616, 'pht': 4857}, 'film_plastique': {'hashtag': 'film_plastique', 'sub_port_id': 20023617, 'pht': 4857}, 'ela': {'hashtag': 'ela', 'sub_port_id': 20023602, 'pht': 4857}, 'sac': {'hashtag': 'sac', 'sub_port_id': 20023619, 'pht': 4857}, 'textiles': {'hashtag': 'textiles', 'sub_port_id': 20023604, 'pht': 4857}, 'verre': {'hashtag': 'verre', 'sub_port_id': 20023605, 'pht': 4857}, 'organique': {'hashtag': 'organique', 'sub_port_id': 20023606, 'pht': 4857}, 'dasri': {'hashtag': 'dasri', 'sub_port_id': 20023607, 'pht': 4857}, 'masque': {'hashtag': 'masque', 'sub_port_id': 20023608, 'pht': 4857}, 'encombrant': {'hashtag': 'encombrant', 'sub_port_id': 20023609, 'pht': 4857}, 'autre_emballage': {'hashtag': 'autre_emballage', 'sub_port_id': 20023618, 'pht': 4857}, 'autre_non_emballage': {'hashtag': 'autre_non_emballage', 'sub_port_id': 20023610, 'pht': 4857}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20023611, 'pht': 4857}, 'autre': {'hashtag': 'autre', 'sub_port_id': 20015433, 'pht': 4855}, 'flux_dev': {'hashtag': 'flux_dev', 'sub_port_id': 20023600, 'pht': 4857}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20023612, 'pht': 4857}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20023613, 'pht': 4857}, 'film_dev_souple': {'hashtag': 'film_dev_souple', 'sub_port_id': 20023601, 'pht': 4857}, 'sac_om_plein': {'hashtag': 'sac_om_plein', 'sub_port_id': 20023603, 'pht': 4857}}") 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 = 20009038 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4742 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4742, 'mtr_datou_current_id': 2531415, 'mtr_portfolio_id': 20009038, 'created_at': datetime.datetime(2025, 1, 31, 4, 6, 56), 'result': '0.35672133904831', 'result_long': None, 'result_double': None}] Qualite : 0.35672133904831 select url from MTRUser.mtr_files where mtd_id = 4742 and mtr_portfolio_id = 20009038 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20009038_31-01-2025_04_06_56.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20009038 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'car_plate': 'EV144SX', 'plate_origin_photo': 1332248980, 'plate_crop_photo': 0, 'plate_crops': {'hashtag': 'plate_crops', 'sub_port_id': 0, 'pht': 4403}, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20009038_31-01-2025_04_06_56.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20041946, 'pht': 4857}, 'carton': {'hashtag': 'carton', 'sub_port_id': 20041947, 'pht': 4857}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20041948, 'pht': 4857}, 'pet_clair': {'hashtag': 'pet_clair', 'sub_port_id': 20041949, 'pht': 4857}, 'pehd': {'hashtag': 'pehd', 'sub_port_id': 20041950, 'pht': 4857}, 'pet_fonce': {'hashtag': 'pet_fonce', 'sub_port_id': 20041965, 'pht': 4857}, 'pet_opaque': {'hashtag': 'pet_opaque', 'sub_port_id': 20041966, 'pht': 4857}, 'barquette_opaque': {'hashtag': 'barquette_opaque', 'sub_port_id': 20041967, 'pht': 4857}, 'film_plastique': {'hashtag': 'film_plastique', 'sub_port_id': 20041968, 'pht': 4857}, 'ela': {'hashtag': 'ela', 'sub_port_id': 20041953, 'pht': 4857}, 'sac': {'hashtag': 'sac', 'sub_port_id': 20041970, 'pht': 4857}, 'textiles': {'hashtag': 'textiles', 'sub_port_id': 20041955, 'pht': 4857}, 'verre': {'hashtag': 'verre', 'sub_port_id': 20041956, 'pht': 4857}, 'organique': {'hashtag': 'organique', 'sub_port_id': 20041957, 'pht': 4857}, 'dasri': {'hashtag': 'dasri', 'sub_port_id': 20041958, 'pht': 4857}, 'masque': {'hashtag': 'masque', 'sub_port_id': 20041959, 'pht': 4857}, 'encombrant': {'hashtag': 'encombrant', 'sub_port_id': 20041960, 'pht': 4857}, 'autre_emballage': {'hashtag': 'autre_emballage', 'sub_port_id': 20041969, 'pht': 4857}, 'autre_non_emballage': {'hashtag': 'autre_non_emballage', 'sub_port_id': 20041961, 'pht': 4857}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20041962, 'pht': 4857}, 'autre': {'hashtag': 'autre', 'sub_port_id': 20014134, 'pht': 4855}, 'flux_dev': {'hashtag': 'flux_dev', 'sub_port_id': 20041951, 'pht': 4857}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20041963, 'pht': 4857}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20041964, 'pht': 4857}, 'film_dev_souple': {'hashtag': 'film_dev_souple', 'sub_port_id': 20041952, 'pht': 4857}, 'sac_om_plein': {'hashtag': 'sac_om_plein', 'sub_port_id': 20041954, 'pht': 4857}}" where mtr_portfolio_id = 20009038 and dashboard_run_id = 1567001 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4742 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=4742 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= 4742 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=4742 # 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 ! 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 13169 copy_chis is not consistent : 2 used against 1 in the step definition ! WARNING : number of outputs for step 13170 consolidate_hashtags_from_manual_portfolio is not consistent : 2 used against 1 in the step definition ! WARNING : number of inputs for step 13167 rle_unique_nms_with_priority is not consistent : 3 used against 1 in the step definition ! WARNING : number of outputs for step 13167 rle_unique_nms_with_priority is not consistent : 2 used against 1 in the step definition ! WARNING : number of outputs for step 13174 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 13168 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! Step 13171 blur_detection have less inputs used (0) than in the step definition (1) : maybe we manage optionnal inputs ! Step 13172 brightness have less inputs used (0) than in the step definition (1) : maybe we manage optionnal inputs ! Step 13173 send_mail_cod have less inputs used (4) than in the step definition (5) : maybe we manage optionnal inputs ! Step 13175 split_time_score have less inputs used (1) than in the step definition (2) : 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 13169 have datatype=11 whereas input 0 of step 13167 have datatype=2 WARNING : type of output 1 of step 13170 doesn't seem to be define in the database( WARNING : type of input 3 of step 13168 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : type of output 1 of step 13170 doesn't seem to be define in the database( WARNING : type of input 1 of step 13167 doesn't seem to be define in the database( WARNING : output 0 of step 13174 have datatype=10 whereas input 3 of step 13173 have datatype=6 WARNING : type of input 1 of step 13174 doesn't seem to be define in the database( WARNING : output 1 of step 13167 have datatype=7 whereas input 1 of step 13174 have datatype=None WARNING : type of output 1 of step 13174 doesn't seem to be define in the database( WARNING : type of input 4 of step 13168 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : type of output 1 of step 13169 doesn't seem to be define in the database( WARNING : type of input 1 of step 13170 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`=20009038 AND mptpi.`type`=4857 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8554159, 0.35672133904831, "{'max_time_prod_two_photos': 0, 'car_plate': 'EV144SX', 'plate_origin_photo': 1332248980, 'plate_crop_photo': 0, 'plate_crops': {'hashtag': 'plate_crops', 'sub_port_id': 0, 'pht': 4403}, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20009038_31-01-2025_04_06_56.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20041946, 'pht': 4857}, 'carton': {'hashtag': 'carton', 'sub_port_id': 20041947, 'pht': 4857}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20041948, 'pht': 4857}, 'pet_clair': {'hashtag': 'pet_clair', 'sub_port_id': 20041949, 'pht': 4857}, 'pehd': {'hashtag': 'pehd', 'sub_port_id': 20041950, 'pht': 4857}, 'pet_fonce': {'hashtag': 'pet_fonce', 'sub_port_id': 20041965, 'pht': 4857}, 'pet_opaque': {'hashtag': 'pet_opaque', 'sub_port_id': 20041966, 'pht': 4857}, 'barquette_opaque': {'hashtag': 'barquette_opaque', 'sub_port_id': 20041967, 'pht': 4857}, 'film_plastique': {'hashtag': 'film_plastique', 'sub_port_id': 20041968, 'pht': 4857}, 'ela': {'hashtag': 'ela', 'sub_port_id': 20041953, 'pht': 4857}, 'sac': {'hashtag': 'sac', 'sub_port_id': 20041970, 'pht': 4857}, 'textiles': {'hashtag': 'textiles', 'sub_port_id': 20041955, 'pht': 4857}, 'verre': {'hashtag': 'verre', 'sub_port_id': 20041956, 'pht': 4857}, 'organique': {'hashtag': 'organique', 'sub_port_id': 20041957, 'pht': 4857}, 'dasri': {'hashtag': 'dasri', 'sub_port_id': 20041958, 'pht': 4857}, 'masque': {'hashtag': 'masque', 'sub_port_id': 20041959, 'pht': 4857}, 'encombrant': {'hashtag': 'encombrant', 'sub_port_id': 20041960, 'pht': 4857}, 'autre_emballage': {'hashtag': 'autre_emballage', 'sub_port_id': 20041969, 'pht': 4857}, 'autre_non_emballage': {'hashtag': 'autre_non_emballage', 'sub_port_id': 20041961, 'pht': 4857}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20041962, 'pht': 4857}, 'autre': {'hashtag': 'autre', 'sub_port_id': 20014134, 'pht': 4855}, 'flux_dev': {'hashtag': 'flux_dev', 'sub_port_id': 20041951, 'pht': 4857}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20041963, 'pht': 4857}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20041964, 'pht': 4857}, 'film_dev_souple': {'hashtag': 'film_dev_souple', 'sub_port_id': 20041952, 'pht': 4857}, 'sac_om_plein': {'hashtag': 'sac_om_plein', 'sub_port_id': 20041954, 'pht': 4857}}") 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 = 20009039 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4742 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4742, 'mtr_datou_current_id': 2531416, 'mtr_portfolio_id': 20009039, 'created_at': datetime.datetime(2025, 1, 31, 4, 8, 57), 'result': '0.41445498571866823', 'result_long': None, 'result_double': None}] Qualite : 0.41445498571866823 select url from MTRUser.mtr_files where mtd_id = 4742 and mtr_portfolio_id = 20009039 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20009039_31-01-2025_04_08_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20009039 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'car_plate': 'FG416XE', 'plate_origin_photo': 1332249184, 'plate_crop_photo': 0, 'plate_crops': {'hashtag': 'plate_crops', 'sub_port_id': 0, 'pht': 4403}, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20009039_31-01-2025_04_08_57.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20044485, 'pht': 4857}, 'carton': {'hashtag': 'carton', 'sub_port_id': 20044486, 'pht': 4857}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20044487, 'pht': 4857}, 'pet_clair': {'hashtag': 'pet_clair', 'sub_port_id': 20044488, 'pht': 4857}, 'pehd': {'hashtag': 'pehd', 'sub_port_id': 20044489, 'pht': 4857}, 'pet_fonce': {'hashtag': 'pet_fonce', 'sub_port_id': 20044504, 'pht': 4857}, 'pet_opaque': {'hashtag': 'pet_opaque', 'sub_port_id': 20044505, 'pht': 4857}, 'barquette_opaque': {'hashtag': 'barquette_opaque', 'sub_port_id': 20044506, 'pht': 4857}, 'film_plastique': {'hashtag': 'film_plastique', 'sub_port_id': 20044507, 'pht': 4857}, 'ela': {'hashtag': 'ela', 'sub_port_id': 20044492, 'pht': 4857}, 'sac': {'hashtag': 'sac', 'sub_port_id': 20044509, 'pht': 4857}, 'textiles': {'hashtag': 'textiles', 'sub_port_id': 20044494, 'pht': 4857}, 'verre': {'hashtag': 'verre', 'sub_port_id': 20044495, 'pht': 4857}, 'organique': {'hashtag': 'organique', 'sub_port_id': 20044496, 'pht': 4857}, 'dasri': {'hashtag': 'dasri', 'sub_port_id': 20044497, 'pht': 4857}, 'masque': {'hashtag': 'masque', 'sub_port_id': 20044498, 'pht': 4857}, 'encombrant': {'hashtag': 'encombrant', 'sub_port_id': 20044499, 'pht': 4857}, 'autre_emballage': {'hashtag': 'autre_emballage', 'sub_port_id': 20044508, 'pht': 4857}, 'autre_non_emballage': {'hashtag': 'autre_non_emballage', 'sub_port_id': 20044500, 'pht': 4857}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20044501, 'pht': 4857}, 'autre': {'hashtag': 'autre', 'sub_port_id': 20012161, 'pht': 4855}, 'flux_dev': {'hashtag': 'flux_dev', 'sub_port_id': 20044490, 'pht': 4857}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20044502, 'pht': 4857}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20044503, 'pht': 4857}, 'film_dev_souple': {'hashtag': 'film_dev_souple', 'sub_port_id': 20044491, 'pht': 4857}, 'sac_om_plein': {'hashtag': 'sac_om_plein', 'sub_port_id': 20044493, 'pht': 4857}}" where mtr_portfolio_id = 20009039 and dashboard_run_id = 1567001 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4742 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=4742 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= 4742 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=4742 # 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 ! 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 13169 copy_chis is not consistent : 2 used against 1 in the step definition ! WARNING : number of outputs for step 13170 consolidate_hashtags_from_manual_portfolio is not consistent : 2 used against 1 in the step definition ! WARNING : number of inputs for step 13167 rle_unique_nms_with_priority is not consistent : 3 used against 1 in the step definition ! WARNING : number of outputs for step 13167 rle_unique_nms_with_priority is not consistent : 2 used against 1 in the step definition ! WARNING : number of outputs for step 13174 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 13168 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! Step 13171 blur_detection have less inputs used (0) than in the step definition (1) : maybe we manage optionnal inputs ! Step 13172 brightness have less inputs used (0) than in the step definition (1) : maybe we manage optionnal inputs ! Step 13173 send_mail_cod have less inputs used (4) than in the step definition (5) : maybe we manage optionnal inputs ! Step 13175 split_time_score have less inputs used (1) than in the step definition (2) : 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 13169 have datatype=11 whereas input 0 of step 13167 have datatype=2 WARNING : type of output 1 of step 13170 doesn't seem to be define in the database( WARNING : type of input 3 of step 13168 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : type of output 1 of step 13170 doesn't seem to be define in the database( WARNING : type of input 1 of step 13167 doesn't seem to be define in the database( WARNING : output 0 of step 13174 have datatype=10 whereas input 3 of step 13173 have datatype=6 WARNING : type of input 1 of step 13174 doesn't seem to be define in the database( WARNING : output 1 of step 13167 have datatype=7 whereas input 1 of step 13174 have datatype=None WARNING : type of output 1 of step 13174 doesn't seem to be define in the database( WARNING : type of input 4 of step 13168 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : type of output 1 of step 13169 doesn't seem to be define in the database( WARNING : type of input 1 of step 13170 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`=20009039 AND mptpi.`type`=4857 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8554160, 0.41445498571866823, "{'max_time_prod_two_photos': 0, 'car_plate': 'FG416XE', 'plate_origin_photo': 1332249184, 'plate_crop_photo': 0, 'plate_crops': {'hashtag': 'plate_crops', 'sub_port_id': 0, 'pht': 4403}, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20009039_31-01-2025_04_08_57.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20044485, 'pht': 4857}, 'carton': {'hashtag': 'carton', 'sub_port_id': 20044486, 'pht': 4857}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20044487, 'pht': 4857}, 'pet_clair': {'hashtag': 'pet_clair', 'sub_port_id': 20044488, 'pht': 4857}, 'pehd': {'hashtag': 'pehd', 'sub_port_id': 20044489, 'pht': 4857}, 'pet_fonce': {'hashtag': 'pet_fonce', 'sub_port_id': 20044504, 'pht': 4857}, 'pet_opaque': {'hashtag': 'pet_opaque', 'sub_port_id': 20044505, 'pht': 4857}, 'barquette_opaque': {'hashtag': 'barquette_opaque', 'sub_port_id': 20044506, 'pht': 4857}, 'film_plastique': {'hashtag': 'film_plastique', 'sub_port_id': 20044507, 'pht': 4857}, 'ela': {'hashtag': 'ela', 'sub_port_id': 20044492, 'pht': 4857}, 'sac': {'hashtag': 'sac', 'sub_port_id': 20044509, 'pht': 4857}, 'textiles': {'hashtag': 'textiles', 'sub_port_id': 20044494, 'pht': 4857}, 'verre': {'hashtag': 'verre', 'sub_port_id': 20044495, 'pht': 4857}, 'organique': {'hashtag': 'organique', 'sub_port_id': 20044496, 'pht': 4857}, 'dasri': {'hashtag': 'dasri', 'sub_port_id': 20044497, 'pht': 4857}, 'masque': {'hashtag': 'masque', 'sub_port_id': 20044498, 'pht': 4857}, 'encombrant': {'hashtag': 'encombrant', 'sub_port_id': 20044499, 'pht': 4857}, 'autre_emballage': {'hashtag': 'autre_emballage', 'sub_port_id': 20044508, 'pht': 4857}, 'autre_non_emballage': {'hashtag': 'autre_non_emballage', 'sub_port_id': 20044500, 'pht': 4857}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20044501, 'pht': 4857}, 'autre': {'hashtag': 'autre', 'sub_port_id': 20012161, 'pht': 4855}, 'flux_dev': {'hashtag': 'flux_dev', 'sub_port_id': 20044490, 'pht': 4857}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20044502, 'pht': 4857}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20044503, 'pht': 4857}, 'film_dev_souple': {'hashtag': 'film_dev_souple', 'sub_port_id': 20044491, 'pht': 4857}, 'sac_om_plein': {'hashtag': 'sac_om_plein', 'sub_port_id': 20044493, 'pht': 4857}}") 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 = 20014721 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4742 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4742, 'mtr_datou_current_id': 2531417, 'mtr_portfolio_id': 20014721, 'created_at': datetime.datetime(2025, 1, 31, 4, 10, 51), 'result': '0.30978496398103206', 'result_long': None, 'result_double': None}] Qualite : 0.30978496398103206 select url from MTRUser.mtr_files where mtd_id = 4742 and mtr_portfolio_id = 20014721 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20014721_31-01-2025_04_10_51.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20014721 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'car_plate': 'EW212AL', 'plate_origin_photo': 1332271603, 'plate_crop_photo': 0, 'plate_crops': {'hashtag': 'plate_crops', 'sub_port_id': 0, 'pht': 4403}, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20014721_31-01-2025_04_10_51.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20045632, 'pht': 4857}, 'carton': {'hashtag': 'carton', 'sub_port_id': 20045633, 'pht': 4857}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20045634, 'pht': 4857}, 'pet_clair': {'hashtag': 'pet_clair', 'sub_port_id': 20045635, 'pht': 4857}, 'pehd': {'hashtag': 'pehd', 'sub_port_id': 20045636, 'pht': 4857}, 'pet_fonce': {'hashtag': 'pet_fonce', 'sub_port_id': 20045651, 'pht': 4857}, 'pet_opaque': {'hashtag': 'pet_opaque', 'sub_port_id': 20045652, 'pht': 4857}, 'barquette_opaque': {'hashtag': 'barquette_opaque', 'sub_port_id': 20045653, 'pht': 4857}, 'film_plastique': {'hashtag': 'film_plastique', 'sub_port_id': 20045654, 'pht': 4857}, 'ela': {'hashtag': 'ela', 'sub_port_id': 20045639, 'pht': 4857}, 'sac': {'hashtag': 'sac', 'sub_port_id': 20045656, 'pht': 4857}, 'textiles': {'hashtag': 'textiles', 'sub_port_id': 20045641, 'pht': 4857}, 'verre': {'hashtag': 'verre', 'sub_port_id': 20045642, 'pht': 4857}, 'organique': {'hashtag': 'organique', 'sub_port_id': 20045643, 'pht': 4857}, 'dasri': {'hashtag': 'dasri', 'sub_port_id': 20045644, 'pht': 4857}, 'masque': {'hashtag': 'masque', 'sub_port_id': 20045645, 'pht': 4857}, 'encombrant': {'hashtag': 'encombrant', 'sub_port_id': 20045646, 'pht': 4857}, 'autre_emballage': {'hashtag': 'autre_emballage', 'sub_port_id': 20045655, 'pht': 4857}, 'autre_non_emballage': {'hashtag': 'autre_non_emballage', 'sub_port_id': 20045647, 'pht': 4857}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20045648, 'pht': 4857}, 'autre': {'hashtag': 'autre', 'sub_port_id': 20015267, 'pht': 4855}, 'flux_dev': {'hashtag': 'flux_dev', 'sub_port_id': 20045637, 'pht': 4857}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20045649, 'pht': 4857}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20045650, 'pht': 4857}, 'film_dev_souple': {'hashtag': 'film_dev_souple', 'sub_port_id': 20045638, 'pht': 4857}, 'sac_om_plein': {'hashtag': 'sac_om_plein', 'sub_port_id': 20045640, 'pht': 4857}}" where mtr_portfolio_id = 20014721 and dashboard_run_id = 1567001 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4742 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=4742 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= 4742 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=4742 # 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 ! 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 13169 copy_chis is not consistent : 2 used against 1 in the step definition ! WARNING : number of outputs for step 13170 consolidate_hashtags_from_manual_portfolio is not consistent : 2 used against 1 in the step definition ! WARNING : number of inputs for step 13167 rle_unique_nms_with_priority is not consistent : 3 used against 1 in the step definition ! WARNING : number of outputs for step 13167 rle_unique_nms_with_priority is not consistent : 2 used against 1 in the step definition ! WARNING : number of outputs for step 13174 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 13168 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! Step 13171 blur_detection have less inputs used (0) than in the step definition (1) : maybe we manage optionnal inputs ! Step 13172 brightness have less inputs used (0) than in the step definition (1) : maybe we manage optionnal inputs ! Step 13173 send_mail_cod have less inputs used (4) than in the step definition (5) : maybe we manage optionnal inputs ! Step 13175 split_time_score have less inputs used (1) than in the step definition (2) : 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 13169 have datatype=11 whereas input 0 of step 13167 have datatype=2 WARNING : type of output 1 of step 13170 doesn't seem to be define in the database( WARNING : type of input 3 of step 13168 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : type of output 1 of step 13170 doesn't seem to be define in the database( WARNING : type of input 1 of step 13167 doesn't seem to be define in the database( WARNING : output 0 of step 13174 have datatype=10 whereas input 3 of step 13173 have datatype=6 WARNING : type of input 1 of step 13174 doesn't seem to be define in the database( WARNING : output 1 of step 13167 have datatype=7 whereas input 1 of step 13174 have datatype=None WARNING : type of output 1 of step 13174 doesn't seem to be define in the database( WARNING : type of input 4 of step 13168 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : type of output 1 of step 13169 doesn't seem to be define in the database( WARNING : type of input 1 of step 13170 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`=20014721 AND mptpi.`type`=4857 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8554161, 0.30978496398103206, "{'max_time_prod_two_photos': 0, 'car_plate': 'EW212AL', 'plate_origin_photo': 1332271603, 'plate_crop_photo': 0, 'plate_crops': {'hashtag': 'plate_crops', 'sub_port_id': 0, 'pht': 4403}, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_COD_P20014721_31-01-2025_04_10_51.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20045632, 'pht': 4857}, 'carton': {'hashtag': 'carton', 'sub_port_id': 20045633, 'pht': 4857}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20045634, 'pht': 4857}, 'pet_clair': {'hashtag': 'pet_clair', 'sub_port_id': 20045635, 'pht': 4857}, 'pehd': {'hashtag': 'pehd', 'sub_port_id': 20045636, 'pht': 4857}, 'pet_fonce': {'hashtag': 'pet_fonce', 'sub_port_id': 20045651, 'pht': 4857}, 'pet_opaque': {'hashtag': 'pet_opaque', 'sub_port_id': 20045652, 'pht': 4857}, 'barquette_opaque': {'hashtag': 'barquette_opaque', 'sub_port_id': 20045653, 'pht': 4857}, 'film_plastique': {'hashtag': 'film_plastique', 'sub_port_id': 20045654, 'pht': 4857}, 'ela': {'hashtag': 'ela', 'sub_port_id': 20045639, 'pht': 4857}, 'sac': {'hashtag': 'sac', 'sub_port_id': 20045656, 'pht': 4857}, 'textiles': {'hashtag': 'textiles', 'sub_port_id': 20045641, 'pht': 4857}, 'verre': {'hashtag': 'verre', 'sub_port_id': 20045642, 'pht': 4857}, 'organique': {'hashtag': 'organique', 'sub_port_id': 20045643, 'pht': 4857}, 'dasri': {'hashtag': 'dasri', 'sub_port_id': 20045644, 'pht': 4857}, 'masque': {'hashtag': 'masque', 'sub_port_id': 20045645, 'pht': 4857}, 'encombrant': {'hashtag': 'encombrant', 'sub_port_id': 20045646, 'pht': 4857}, 'autre_emballage': {'hashtag': 'autre_emballage', 'sub_port_id': 20045655, 'pht': 4857}, 'autre_non_emballage': {'hashtag': 'autre_non_emballage', 'sub_port_id': 20045647, 'pht': 4857}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20045648, 'pht': 4857}, 'autre': {'hashtag': 'autre', 'sub_port_id': 20015267, 'pht': 4855}, 'flux_dev': {'hashtag': 'flux_dev', 'sub_port_id': 20045637, 'pht': 4857}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20045649, 'pht': 4857}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20045650, 'pht': 4857}, 'film_dev_souple': {'hashtag': 'film_dev_souple', 'sub_port_id': 20045638, 'pht': 4857}, 'sac_om_plein': {'hashtag': 'sac_om_plein', 'sub_port_id': 20045640, 'pht': 4857}}") 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 (20009036,20009037,20009038,20009039,20014721) result : ((1332248694,), (1332248700,), (1332248705,), (1332248708,), (1332248714,), (1332248719,), (1332248754,), (1332248757,), (1332248760,), (1332248764,), (1332248767,), (1332248772,), (1332248980,), (1332248993,), (1332248996,), (1332249016,), (1332249018,), (1332249023,), (1332249097,), (1332249160,), (1332249176,), (1332249184,), (1332249198,), (1332249210,), (1332249496,), (1332249502,), (1332249506,), (1332249511,), (1332249515,), (1332271603,), (1332271604,), (1332271611,), (1332271615,), (1332271619,), (1332271623,), (1332271652,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'28012025': {'nb_upload': 6, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20009037]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754] map_info['map_portfolio_photo'] : {20009037: [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754]} final : True mtd_id 4742 list_pids : [1332248772, 1332248767, 1332248764, 1332248760, 1332248757, 1332248754] Looping around the photos to save general results len do output : 1 /20009037Didn'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 ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248772', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248767', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248764', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248760', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248757', None, None, None, None, None, '2559007') ('4742', None, None, None, None, None, None, None, '2559007') ('4742', '20009037', '1332248754', None, None, None, None, None, '2559007') 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 : [('4742', None, '20009037', 'None', None, None, None, None, '2559007'), ('4742', '20009037', '1332248772', None, None, None, None, None, '2559007'), ('4742', '20009037', '1332248767', None, None, None, None, None, '2559007'), ('4742', '20009037', '1332248764', None, None, None, None, None, '2559007'), ('4742', '20009037', '1332248760', None, None, None, None, None, '2559007'), ('4742', '20009037', '1332248757', None, None, None, None, None, '2559007'), ('4742', '20009037', '1332248754', None, None, None, None, None, '2559007')] time used for this insertion : 0.014281749725341797 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.7105412483215332 time spend to save output : 0.014561653137207031 total time spend for step 9 : 1.7251029014587402 caffe_path_current : About to save ! 2 After save, about to update current ! ret : 2 len(input) + len(total_photo_id_missing) : 6 set_done_treatment DELETE from MTRPhoto.mtr_datou_current where id in (2559007) 3.95user 1.84system 1:00.00elapsed 9%CPU (0avgtext+0avgdata 222556maxresident)k 848inputs+56896outputs (0major+251628minor)pagefaults 0swaps