python /home/admin/mtr/script_for_cron.py -j datou_current3 -m 20 -a ' -a 4302 -v ' -s datou_current_4302 -M 0 -S 0 -U 95,95,120 import MySQLdb succeeded Import error (python version) ['/Users/moilerat/Documents/Fotonower/install/caffe/distribute/python', '/home/admin/workarea/git/Velours/python/prod', '/home/admin/workarea/install/caffe_cuda8_python3/python', '/home/admin/workarea/install/darknet', '/home/admin/workarea/git/Velours/python', '/home/admin/workarea/install/caffe_frcnn_python3/py-faster-rcnn/caffe-fast-rcnn/python', '/home/admin/mtr/.credentials', '/home/admin/workarea/install/caffe/python', '/home/admin/workarea/install/caffe_frcnn/py-faster-rcnn/tools', '/home/admin/workarea/git/fotonowerpip', '/home/admin/workarea/install/segment-anything', '/home/admin/workarea/git/pyfvs', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/admin/.local/lib/python3.8/site-packages', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages'] Namespace(auto=False, cert_args='/home/fotonower/https/cert.pem', contextDataFile='', custom_size=0, database='', datou_id='4302', datou_id_excluded='', fifo=False, host='', is_cpu_mode=False, job='batch_current', json_args='', key_args='/home/fotonower/https/vision.fotonower.com.key', limit=1000, list_photo_ids='', local='', mtr_current_id=0, mtr_portfolio_ids='', nb_thread=1, no_current=False, offset=0, only_client=False, output_file='', password='', port=5100, rand=0, save=2, use_client=False, user_id=440, username='', verbose=True) process id : 1210431 load datou : 4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! Unexpected type seems boolean for variable list_input_json ERROR or WARNING : can't parse json string Expecting value: line 1 column 1 (char 0) Tried to parse : None was removed should we ? donnée sous forme de texte was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? id de la photo (peut être local ou global) was removed should we ? donnée sous forme de texte was removed should we ? donnée sous forme de texte was removed should we ? donnée sous forme de texte was removed should we ? None was removed should we ? donnée sous forme de nombre was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? donnée sous forme de texte was removed should we ? None was removed should we ? donnée sous forme de texte was removed should we ? [ptf_id0,ptf_id1...] was removed should we ? load thcls load pdts Running datou job : batch_current 4302 [] TODO datou_current to load to do maybe to take outside batchDatouExec SELECT * from MTRPhoto.mtr_datou_current where state = 0 AND mtr_portfolio_id is not NULL AND mtd_id = 4302 order by created_at desc LIMIT 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3798117) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3798117) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27377191 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3798117'] with mtr_portfolio_ids : ['27377191'] and first list_photo_ids : [] new path : /proc/1210431/ Name: python3 Umask: 0002 State: R (running) Tgid: 1210431 Ngid: 0 Pid: 1210431 PPid: 1210430 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1210431 NSpid: 1210431 NSpgid: 1209526 NSsid: 1209526 VmPeak: 1106856 kB VmSize: 1106856 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98868 kB VmRSS: 98868 kB RssAnon: 59844 kB RssFile: 39024 kB RssShmem: 0 kB VmData: 865608 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 608 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 58 nonvoluntary_ctxt_switches: 103 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1210431', 'Ngid': '0', 'Pid': '1210431', 'PPid': '1210430', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1210431', 'NSpid': '1210431', 'NSpgid': '1209526', 'NSsid': '1209526', 'VmPeak': '1106856 kB', 'VmSize': '1106856 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98868 kB', 'VmRSS': '98868 kB', 'RssAnon': '59844 kB', 'RssFile': '39024 kB', 'RssShmem': '0 kB', 'VmData': '865608 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '608 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '58', 'nonvoluntary_ctxt_switches': '103'} ('datou_batch_current', '1210431', '1106856', '0', '1106856', '865608', '98868', b'', 'marlene', '3798117') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (27377191) 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 (3798117 ) ) ORDER BY ph.photo_id DESC LIMIT 0, 200 We have 1 , {} SELECT mtr_photo_id, mtr_portfolio_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (27377191) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1387056068, 'portfolio_id': 27377191}, {'photo_id': 1387055655, 'portfolio_id': 27377191}, {'photo_id': 1387055647, 'portfolio_id': 27377191}, {'photo_id': 1387055645, 'portfolio_id': 27377191}, {'photo_id': 1387055643, 'portfolio_id': 27377191}, {'photo_id': 1387055613, 'portfolio_id': 27377191}, {'photo_id': 1387055611, 'portfolio_id': 27377191}, {'photo_id': 1387055599, 'portfolio_id': 27377191}, {'photo_id': 1387055598, 'portfolio_id': 27377191}, {'photo_id': 1387055593, 'portfolio_id': 27377191}, {'photo_id': 1387055589, 'portfolio_id': 27377191}, {'photo_id': 1387055585, 'portfolio_id': 27377191}, {'photo_id': 1387055583, 'portfolio_id': 27377191}, {'photo_id': 1387055579, 'portfolio_id': 27377191}, {'photo_id': 1387055405, 'portfolio_id': 27377191}, {'photo_id': 1387055404, 'portfolio_id': 27377191}, {'photo_id': 1387055401, 'portfolio_id': 27377191}, {'photo_id': 1387055335, 'portfolio_id': 27377191}, {'photo_id': 1387055317, 'portfolio_id': 27377191}, {'photo_id': 1387055315, 'portfolio_id': 27377191}, {'photo_id': 1387055312, 'portfolio_id': 27377191}, {'photo_id': 1387055310, 'portfolio_id': 27377191}, {'photo_id': 1387055299, 'portfolio_id': 27377191}, {'photo_id': 1387055255, 'portfolio_id': 27377191}, {'photo_id': 1387055252, 'portfolio_id': 27377191}, {'photo_id': 1387055249, 'portfolio_id': 27377191}, {'photo_id': 1387055234, 'portfolio_id': 27377191}, {'photo_id': 1387055231, 'portfolio_id': 27377191}, {'photo_id': 1387055228, 'portfolio_id': 27377191}, {'photo_id': 1387055210, 'portfolio_id': 27377191}, {'photo_id': 1387055205, 'portfolio_id': 27377191}, {'photo_id': 1387055200, 'portfolio_id': 27377191}, {'photo_id': 1387055196, 'portfolio_id': 27377191}, {'photo_id': 1387055193, 'portfolio_id': 27377191}, {'photo_id': 1387055176, 'portfolio_id': 27377191}, {'photo_id': 1387055174, 'portfolio_id': 27377191}, {'photo_id': 1387055170, 'portfolio_id': 27377191}, {'photo_id': 1387055167, 'portfolio_id': 27377191}, {'photo_id': 1387055164, 'portfolio_id': 27377191}, {'photo_id': 1387055162, 'portfolio_id': 27377191}, {'photo_id': 1387055156, 'portfolio_id': 27377191}, {'photo_id': 1387055155, 'portfolio_id': 27377191}, {'photo_id': 1387055153, 'portfolio_id': 27377191}, {'photo_id': 1387055146, 'portfolio_id': 27377191}, {'photo_id': 1387055137, 'portfolio_id': 27377191}, {'photo_id': 1387055134, 'portfolio_id': 27377191}, {'photo_id': 1387055131, 'portfolio_id': 27377191}, {'photo_id': 1387055129, 'portfolio_id': 27377191}, {'photo_id': 1387055079, 'portfolio_id': 27377191}, {'photo_id': 1387055075, 'portfolio_id': 27377191}, {'photo_id': 1387055064, 'portfolio_id': 27377191}, {'photo_id': 1387055035, 'portfolio_id': 27377191}, {'photo_id': 1387055032, 'portfolio_id': 27377191}, {'photo_id': 1387055028, 'portfolio_id': 27377191}, {'photo_id': 1387055025, 'portfolio_id': 27377191}, {'photo_id': 1387055017, 'portfolio_id': 27377191}, {'photo_id': 1387055014, 'portfolio_id': 27377191}, {'photo_id': 1387055011, 'portfolio_id': 27377191}, {'photo_id': 1387055008, 'portfolio_id': 27377191}, {'photo_id': 1387055006, 'portfolio_id': 27377191}, {'photo_id': 1387055004, 'portfolio_id': 27377191}, {'photo_id': 1387054997, 'portfolio_id': 27377191}, {'photo_id': 1387054995, 'portfolio_id': 27377191}, {'photo_id': 1387054992, 'portfolio_id': 27377191}, {'photo_id': 1387054988, 'portfolio_id': 27377191}, {'photo_id': 1387054985, 'portfolio_id': 27377191}, {'photo_id': 1387054982, 'portfolio_id': 27377191}, {'photo_id': 1387054959, 'portfolio_id': 27377191}, {'photo_id': 1387054949, 'portfolio_id': 27377191}, {'photo_id': 1387054934, 'portfolio_id': 27377191}, {'photo_id': 1387054931, 'portfolio_id': 27377191}, {'photo_id': 1387054916, 'portfolio_id': 27377191}, {'photo_id': 1387054905, 'portfolio_id': 27377191}, {'photo_id': 1387054828, 'portfolio_id': 27377191}, {'photo_id': 1387054825, 'portfolio_id': 27377191}, {'photo_id': 1387054821, 'portfolio_id': 27377191}, {'photo_id': 1387054755, 'portfolio_id': 27377191}, {'photo_id': 1387054752, 'portfolio_id': 27377191}, {'photo_id': 1387054749, 'portfolio_id': 27377191}, {'photo_id': 1387054745, 'portfolio_id': 27377191}, {'photo_id': 1387054721, 'portfolio_id': 27377191}, {'photo_id': 1387054678, 'portfolio_id': 27377191}] map_portfolio_id_photo_id: {27377191: [1387056068, 1387055655, 1387055647, 1387055645, 1387055643, 1387055613, 1387055611, 1387055599, 1387055598, 1387055593, 1387055589, 1387055585, 1387055583, 1387055579, 1387055405, 1387055404, 1387055401, 1387055335, 1387055317, 1387055315, 1387055312, 1387055310, 1387055299, 1387055255, 1387055252, 1387055249, 1387055234, 1387055231, 1387055228, 1387055210, 1387055205, 1387055200, 1387055196, 1387055193, 1387055176, 1387055174, 1387055170, 1387055167, 1387055164, 1387055162, 1387055156, 1387055155, 1387055153, 1387055146, 1387055137, 1387055134, 1387055131, 1387055129, 1387055079, 1387055075, 1387055064, 1387055035, 1387055032, 1387055028, 1387055025, 1387055017, 1387055014, 1387055011, 1387055008, 1387055006, 1387055004, 1387054997, 1387054995, 1387054992, 1387054988, 1387054985, 1387054982, 1387054959, 1387054949, 1387054934, 1387054931, 1387054916, 1387054905, 1387054828, 1387054825, 1387054821, 1387054755, 1387054752, 1387054749, 1387054745, 1387054721, 1387054678]} ##### Call download_photos : nb_thread : 1 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos ##### After load_data_input time to download the photos : 0.05259132385253906 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Wed Oct 1 01:02:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27377191) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} beginning of datou step ventilate_hashtags_in_portfolio : To implement ! To do loadFromThcl(), then load ParamDescType : thcl2725 get_desc_type_from_thcl : type of cat SELECT id, mtr_user_id, name, pb_hashtag_id, hashtag_id_list, button_legend_list, portfolio_id_lists, photo_hashtag_type, photo_desc_type, svm_limit, limit_tagging, is_public, live, created_at, updated_at, type_classification FROM MTRDatou.classification_theme WHERE `id` IN (2725) thcls : [{'id': 2725, 'mtr_user_id': 31, 'name': 'learn_qualipapia_rle_210302_2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Carton_brun,Carton_gris,Teint_Dans_La_Masse,autre_refus,cartonnette,environnement,kraft,metal,papier,plastique', 'svm_portfolios_learning': '3460440,3460441,3460446,3460434,3460439,3467416,3460442,3460443,3486028,3460445', 'photo_hashtag_type': 3410, 'photo_desc_type': 5186, 'type_classification': 'caffe', 'hashtag_id_list': '2107753024,2107753020,2107752385,2107752406,702398920,493012381,493202403,492628673,492668766,492725882'}] thcl {'id': 2725, 'mtr_user_id': 31, 'name': 'learn_qualipapia_rle_210302_2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Carton_brun,Carton_gris,Teint_Dans_La_Masse,autre_refus,cartonnette,environnement,kraft,metal,papier,plastique', 'svm_portfolios_learning': '3460440,3460441,3460446,3460434,3460439,3467416,3460442,3460443,3486028,3460445', 'photo_hashtag_type': 3410, 'photo_desc_type': 5186, 'type_classification': 'caffe', 'hashtag_id_list': '2107753024,2107753020,2107752385,2107752406,702398920,493012381,493202403,492628673,492668766,492725882'} Update svm_hashtag_type_desc : 5186 remove imagettes from duplicated photo Iterating over portfolio : 27377191 get user id for portfolio 27377191 get sub ptf for main ptf 27377191, type 3726 and hashtags ['cartonnette', 'Teint_Dans_La_Masse', 'papier', 'Carton_brun', 'autre_refus', 'Carton_gris', 'plastique', 'kraft', 'environnement', 'mal_croppe', 'flou', 'metal'] 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`=27377191 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','Teint_Dans_La_Masse','papier','Carton_brun','autre_refus','Carton_gris','plastique','kraft','environnement','mal_croppe','flou','metal')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27377191 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','Teint_Dans_La_Masse','papier','Carton_brun','autre_refus','Carton_gris','plastique','kraft','environnement','mal_croppe','flou','metal')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 27377191, 'sub_port_id': 27377197, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500615, 'last_updated_at': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 48, 57)}, 'kraft': {'main_port_id': 27377191, 'sub_port_id': 27377198, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500616, 'last_updated_at': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 48, 57)}, 'Carton_brun': {'main_port_id': 27377191, 'sub_port_id': 27377199, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500617, 'last_updated_at': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 48, 57)}, 'Carton_gris': {'main_port_id': 27377191, 'sub_port_id': 27377200, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500618, 'last_updated_at': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 48, 57)}, 'Teint_Dans_La_Masse': {'main_port_id': 27377191, 'sub_port_id': 27377201, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500619, 'last_updated_at': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 48, 57)}, 'cartonnette': {'main_port_id': 27377191, 'sub_port_id': 27377202, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500620, 'last_updated_at': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 48, 57)}, 'plastique': {'main_port_id': 27377191, 'sub_port_id': 27377203, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500621, 'last_updated_at': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 48, 57)}, 'autre_refus': {'main_port_id': 27377191, 'sub_port_id': 27377204, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500622, 'last_updated_at': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 48, 57)}, 'flou': {'main_port_id': 27377191, 'sub_port_id': 27377205, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500623, 'last_updated_at': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 48, 57)}, 'metal': {'main_port_id': 27377191, 'sub_port_id': 27377206, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500624, 'last_updated_at': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 48, 57)}, 'papier': {'main_port_id': 27377191, 'sub_port_id': 27377207, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500625, 'last_updated_at': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 48, 57)}, 'mal_croppe': {'main_port_id': 27377191, 'sub_port_id': 27377208, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500626, 'last_updated_at': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 1, 0, 58), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 48, 57)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27377197 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27377191 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='environnement' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377197) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377191) result : ((1387054678,), (1387054721,), (1387054745,), (1387054749,), (1387054752,), (1387054755,), (1387054821,), (1387054825,), (1387054828,), (1387054905,), (1387054916,), (1387054931,), (1387054934,), (1387054949,), (1387054959,), (1387054982,), (1387054985,), (1387054988,), (1387054992,), (1387054995,), (1387054997,), (1387055004,), (1387055006,), (1387055008,), (1387055011,), (1387055014,), (1387055017,), (1387055025,), (1387055028,), (1387055032,), (1387055035,), (1387055064,), (1387055075,), (1387055079,), (1387055129,), (1387055131,), (1387055134,), (1387055137,), (1387055146,), (1387055153,), (1387055155,), (1387055156,), (1387055162,), (1387055164,), (1387055167,), (1387055170,), (1387055174,), (1387055176,), (1387055193,), (1387055196,), (1387055200,), (1387055205,), (1387055210,), (1387055228,), (1387055231,), (1387055234,), (1387055249,), (1387055252,), (1387055255,), (1387055299,), (1387055310,), (1387055312,), (1387055315,), (1387055317,), (1387055335,), (1387055401,), (1387055404,), (1387055405,), (1387055579,), (1387055583,), (1387055585,), (1387055589,), (1387055593,), (1387055598,), (1387055599,), (1387055611,), (1387055613,), (1387055643,), (1387055645,), (1387055647,), (1387055655,), (1387056068,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in (1387055200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27377198 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27377191 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='kraft' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377198) result : ((1387055915,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377191) result : ((1387054678,), (1387054721,), (1387054745,), (1387054749,), (1387054752,), (1387054755,), (1387054821,), (1387054825,), (1387054828,), (1387054905,), (1387054916,), (1387054931,), (1387054934,), (1387054949,), (1387054959,), (1387054982,), (1387054985,), (1387054988,), (1387054992,), (1387054995,), (1387054997,), (1387055004,), (1387055006,), (1387055008,), (1387055011,), (1387055014,), (1387055017,), (1387055025,), (1387055028,), (1387055032,), (1387055035,), (1387055064,), (1387055075,), (1387055079,), (1387055129,), (1387055131,), (1387055134,), (1387055137,), (1387055146,), (1387055153,), (1387055155,), (1387055156,), (1387055162,), (1387055164,), (1387055167,), (1387055170,), (1387055174,), (1387055176,), (1387055193,), (1387055196,), (1387055200,), (1387055205,), (1387055210,), (1387055228,), (1387055231,), (1387055234,), (1387055249,), (1387055252,), (1387055255,), (1387055299,), (1387055310,), (1387055312,), (1387055315,), (1387055317,), (1387055335,), (1387055401,), (1387055404,), (1387055405,), (1387055579,), (1387055583,), (1387055585,), (1387055589,), (1387055593,), (1387055598,), (1387055599,), (1387055611,), (1387055613,), (1387055643,), (1387055645,), (1387055647,), (1387055655,), (1387056068,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in (1387055200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27377199 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27377191 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_brun' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377199) result : ((1387055023,), (1387055148,), (1387055149,), (1387055209,), (1387055573,), (1387055808,), (1387055810,), (1387055812,), (1387055814,), (1387055816,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377191) result : ((1387054678,), (1387054721,), (1387054745,), (1387054749,), (1387054752,), (1387054755,), (1387054821,), (1387054825,), (1387054828,), (1387054905,), (1387054916,), (1387054931,), (1387054934,), (1387054949,), (1387054959,), (1387054982,), (1387054985,), (1387054988,), (1387054992,), (1387054995,), (1387054997,), (1387055004,), (1387055006,), (1387055008,), (1387055011,), (1387055014,), (1387055017,), (1387055025,), (1387055028,), (1387055032,), (1387055035,), (1387055064,), (1387055075,), (1387055079,), (1387055129,), (1387055131,), (1387055134,), (1387055137,), (1387055146,), (1387055153,), (1387055155,), (1387055156,), (1387055162,), (1387055164,), (1387055167,), (1387055170,), (1387055174,), (1387055176,), (1387055193,), (1387055196,), (1387055200,), (1387055205,), (1387055210,), (1387055228,), (1387055231,), (1387055234,), (1387055249,), (1387055252,), (1387055255,), (1387055299,), (1387055310,), (1387055312,), (1387055315,), (1387055317,), (1387055335,), (1387055401,), (1387055404,), (1387055405,), (1387055579,), (1387055583,), (1387055585,), (1387055589,), (1387055593,), (1387055598,), (1387055599,), (1387055611,), (1387055613,), (1387055643,), (1387055645,), (1387055647,), (1387055655,), (1387056068,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in (1387055200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27377200 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27377191 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_gris' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377200) result : ((1387055020,), (1387055143,), (1387055144,), (1387055145,), (1387055206,), (1387055568,), (1387055569,), (1387055570,), (1387055571,), (1387055652,), (1387055653,), (1387055654,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377191) result : ((1387054678,), (1387054721,), (1387054745,), (1387054749,), (1387054752,), (1387054755,), (1387054821,), (1387054825,), (1387054828,), (1387054905,), (1387054916,), (1387054931,), (1387054934,), (1387054949,), (1387054959,), (1387054982,), (1387054985,), (1387054988,), (1387054992,), (1387054995,), (1387054997,), (1387055004,), (1387055006,), (1387055008,), (1387055011,), (1387055014,), (1387055017,), (1387055025,), (1387055028,), (1387055032,), (1387055035,), (1387055064,), (1387055075,), (1387055079,), (1387055129,), (1387055131,), (1387055134,), (1387055137,), (1387055146,), (1387055153,), (1387055155,), (1387055156,), (1387055162,), (1387055164,), (1387055167,), (1387055170,), (1387055174,), (1387055176,), (1387055193,), (1387055196,), (1387055200,), (1387055205,), (1387055210,), (1387055228,), (1387055231,), (1387055234,), (1387055249,), (1387055252,), (1387055255,), (1387055299,), (1387055310,), (1387055312,), (1387055315,), (1387055317,), (1387055335,), (1387055401,), (1387055404,), (1387055405,), (1387055579,), (1387055583,), (1387055585,), (1387055589,), (1387055593,), (1387055598,), (1387055599,), (1387055611,), (1387055613,), (1387055643,), (1387055645,), (1387055647,), (1387055655,), (1387056068,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in (1387055200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27377201 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27377191 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Teint_Dans_La_Masse' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377201) result : ((1387055140,), (1387055141,), (1387055142,), (1387055313,), (1387055314,), (1387055566,), (1387055649,), (1387055650,), (1387055651,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377191) result : ((1387054678,), (1387054721,), (1387054745,), (1387054749,), (1387054752,), (1387054755,), (1387054821,), (1387054825,), (1387054828,), (1387054905,), (1387054916,), (1387054931,), (1387054934,), (1387054949,), (1387054959,), (1387054982,), (1387054985,), (1387054988,), (1387054992,), (1387054995,), (1387054997,), (1387055004,), (1387055006,), (1387055008,), (1387055011,), (1387055014,), (1387055017,), (1387055025,), (1387055028,), (1387055032,), (1387055035,), (1387055064,), (1387055075,), (1387055079,), (1387055129,), (1387055131,), (1387055134,), (1387055137,), (1387055146,), (1387055153,), (1387055155,), (1387055156,), (1387055162,), (1387055164,), (1387055167,), (1387055170,), (1387055174,), (1387055176,), (1387055193,), (1387055196,), (1387055200,), (1387055205,), (1387055210,), (1387055228,), (1387055231,), (1387055234,), (1387055249,), (1387055252,), (1387055255,), (1387055299,), (1387055310,), (1387055312,), (1387055315,), (1387055317,), (1387055335,), (1387055401,), (1387055404,), (1387055405,), (1387055579,), (1387055583,), (1387055585,), (1387055589,), (1387055593,), (1387055598,), (1387055599,), (1387055611,), (1387055613,), (1387055643,), (1387055645,), (1387055647,), (1387055655,), (1387056068,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in (1387055200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27377202 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27377191 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='cartonnette' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377202) result : ((1387055021,), (1387055572,), (1387055656,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377191) result : ((1387054678,), (1387054721,), (1387054745,), (1387054749,), (1387054752,), (1387054755,), (1387054821,), (1387054825,), (1387054828,), (1387054905,), (1387054916,), (1387054931,), (1387054934,), (1387054949,), (1387054959,), (1387054982,), (1387054985,), (1387054988,), (1387054992,), (1387054995,), (1387054997,), (1387055004,), (1387055006,), (1387055008,), (1387055011,), (1387055014,), (1387055017,), (1387055025,), (1387055028,), (1387055032,), (1387055035,), (1387055064,), (1387055075,), (1387055079,), (1387055129,), (1387055131,), (1387055134,), (1387055137,), (1387055146,), (1387055153,), (1387055155,), (1387055156,), (1387055162,), (1387055164,), (1387055167,), (1387055170,), (1387055174,), (1387055176,), (1387055193,), (1387055196,), (1387055200,), (1387055205,), (1387055210,), (1387055228,), (1387055231,), (1387055234,), (1387055249,), (1387055252,), (1387055255,), (1387055299,), (1387055310,), (1387055312,), (1387055315,), (1387055317,), (1387055335,), (1387055401,), (1387055404,), (1387055405,), (1387055579,), (1387055583,), (1387055585,), (1387055589,), (1387055593,), (1387055598,), (1387055599,), (1387055611,), (1387055613,), (1387055643,), (1387055645,), (1387055647,), (1387055655,), (1387056068,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in (1387055200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27377203 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27377191 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='plastique' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377203) result : ((1387055024,), (1387055150,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377191) result : ((1387054678,), (1387054721,), (1387054745,), (1387054749,), (1387054752,), (1387054755,), (1387054821,), (1387054825,), (1387054828,), (1387054905,), (1387054916,), (1387054931,), (1387054934,), (1387054949,), (1387054959,), (1387054982,), (1387054985,), (1387054988,), (1387054992,), (1387054995,), (1387054997,), (1387055004,), (1387055006,), (1387055008,), (1387055011,), (1387055014,), (1387055017,), (1387055025,), (1387055028,), (1387055032,), (1387055035,), (1387055064,), (1387055075,), (1387055079,), (1387055129,), (1387055131,), (1387055134,), (1387055137,), (1387055146,), (1387055153,), (1387055155,), (1387055156,), (1387055162,), (1387055164,), (1387055167,), (1387055170,), (1387055174,), (1387055176,), (1387055193,), (1387055196,), (1387055200,), (1387055205,), (1387055210,), (1387055228,), (1387055231,), (1387055234,), (1387055249,), (1387055252,), (1387055255,), (1387055299,), (1387055310,), (1387055312,), (1387055315,), (1387055317,), (1387055335,), (1387055401,), (1387055404,), (1387055405,), (1387055579,), (1387055583,), (1387055585,), (1387055589,), (1387055593,), (1387055598,), (1387055599,), (1387055611,), (1387055613,), (1387055643,), (1387055645,), (1387055647,), (1387055655,), (1387056068,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in (1387055200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27377204 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27377191 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='autre_refus' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377204) result : ((1387055019,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377191) result : ((1387054678,), (1387054721,), (1387054745,), (1387054749,), (1387054752,), (1387054755,), (1387054821,), (1387054825,), (1387054828,), (1387054905,), (1387054916,), (1387054931,), (1387054934,), (1387054949,), (1387054959,), (1387054982,), (1387054985,), (1387054988,), (1387054992,), (1387054995,), (1387054997,), (1387055004,), (1387055006,), (1387055008,), (1387055011,), (1387055014,), (1387055017,), (1387055025,), (1387055028,), (1387055032,), (1387055035,), (1387055064,), (1387055075,), (1387055079,), (1387055129,), (1387055131,), (1387055134,), (1387055137,), (1387055146,), (1387055153,), (1387055155,), (1387055156,), (1387055162,), (1387055164,), (1387055167,), (1387055170,), (1387055174,), (1387055176,), (1387055193,), (1387055196,), (1387055200,), (1387055205,), (1387055210,), (1387055228,), (1387055231,), (1387055234,), (1387055249,), (1387055252,), (1387055255,), (1387055299,), (1387055310,), (1387055312,), (1387055315,), (1387055317,), (1387055335,), (1387055401,), (1387055404,), (1387055405,), (1387055579,), (1387055583,), (1387055585,), (1387055589,), (1387055593,), (1387055598,), (1387055599,), (1387055611,), (1387055613,), (1387055643,), (1387055645,), (1387055647,), (1387055655,), (1387056068,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in (1387055200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27377205 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27377191 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='flou' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377205) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377191) result : ((1387054678,), (1387054721,), (1387054745,), (1387054749,), (1387054752,), (1387054755,), (1387054821,), (1387054825,), (1387054828,), (1387054905,), (1387054916,), (1387054931,), (1387054934,), (1387054949,), (1387054959,), (1387054982,), (1387054985,), (1387054988,), (1387054992,), (1387054995,), (1387054997,), (1387055004,), (1387055006,), (1387055008,), (1387055011,), (1387055014,), (1387055017,), (1387055025,), (1387055028,), (1387055032,), (1387055035,), (1387055064,), (1387055075,), (1387055079,), (1387055129,), (1387055131,), (1387055134,), (1387055137,), (1387055146,), (1387055153,), (1387055155,), (1387055156,), (1387055162,), (1387055164,), (1387055167,), (1387055170,), (1387055174,), (1387055176,), (1387055193,), (1387055196,), (1387055200,), (1387055205,), (1387055210,), (1387055228,), (1387055231,), (1387055234,), (1387055249,), (1387055252,), (1387055255,), (1387055299,), (1387055310,), (1387055312,), (1387055315,), (1387055317,), (1387055335,), (1387055401,), (1387055404,), (1387055405,), (1387055579,), (1387055583,), (1387055585,), (1387055589,), (1387055593,), (1387055598,), (1387055599,), (1387055611,), (1387055613,), (1387055643,), (1387055645,), (1387055647,), (1387055655,), (1387056068,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in (1387055200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27377206 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27377191 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='metal' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377206) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377191) result : ((1387054678,), (1387054721,), (1387054745,), (1387054749,), (1387054752,), (1387054755,), (1387054821,), (1387054825,), (1387054828,), (1387054905,), (1387054916,), (1387054931,), (1387054934,), (1387054949,), (1387054959,), (1387054982,), (1387054985,), (1387054988,), (1387054992,), (1387054995,), (1387054997,), (1387055004,), (1387055006,), (1387055008,), (1387055011,), (1387055014,), (1387055017,), (1387055025,), (1387055028,), (1387055032,), (1387055035,), (1387055064,), (1387055075,), (1387055079,), (1387055129,), (1387055131,), (1387055134,), (1387055137,), (1387055146,), (1387055153,), (1387055155,), (1387055156,), (1387055162,), (1387055164,), (1387055167,), (1387055170,), (1387055174,), (1387055176,), (1387055193,), (1387055196,), (1387055200,), (1387055205,), (1387055210,), (1387055228,), (1387055231,), (1387055234,), (1387055249,), (1387055252,), (1387055255,), (1387055299,), (1387055310,), (1387055312,), (1387055315,), (1387055317,), (1387055335,), (1387055401,), (1387055404,), (1387055405,), (1387055579,), (1387055583,), (1387055585,), (1387055589,), (1387055593,), (1387055598,), (1387055599,), (1387055611,), (1387055613,), (1387055643,), (1387055645,), (1387055647,), (1387055655,), (1387056068,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in (1387055200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27377207 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27377191 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='papier' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377207) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377191) result : ((1387054678,), (1387054721,), (1387054745,), (1387054749,), (1387054752,), (1387054755,), (1387054821,), (1387054825,), (1387054828,), (1387054905,), (1387054916,), (1387054931,), (1387054934,), (1387054949,), (1387054959,), (1387054982,), (1387054985,), (1387054988,), (1387054992,), (1387054995,), (1387054997,), (1387055004,), (1387055006,), (1387055008,), (1387055011,), (1387055014,), (1387055017,), (1387055025,), (1387055028,), (1387055032,), (1387055035,), (1387055064,), (1387055075,), (1387055079,), (1387055129,), (1387055131,), (1387055134,), (1387055137,), (1387055146,), (1387055153,), (1387055155,), (1387055156,), (1387055162,), (1387055164,), (1387055167,), (1387055170,), (1387055174,), (1387055176,), (1387055193,), (1387055196,), (1387055200,), (1387055205,), (1387055210,), (1387055228,), (1387055231,), (1387055234,), (1387055249,), (1387055252,), (1387055255,), (1387055299,), (1387055310,), (1387055312,), (1387055315,), (1387055317,), (1387055335,), (1387055401,), (1387055404,), (1387055405,), (1387055579,), (1387055583,), (1387055585,), (1387055589,), (1387055593,), (1387055598,), (1387055599,), (1387055611,), (1387055613,), (1387055643,), (1387055645,), (1387055647,), (1387055655,), (1387056068,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in (1387055200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27377208 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27377191 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='mal_croppe' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377208) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27377191) result : ((1387054678,), (1387054721,), (1387054745,), (1387054749,), (1387054752,), (1387054755,), (1387054821,), (1387054825,), (1387054828,), (1387054905,), (1387054916,), (1387054931,), (1387054934,), (1387054949,), (1387054959,), (1387054982,), (1387054985,), (1387054988,), (1387054992,), (1387054995,), (1387054997,), (1387055004,), (1387055006,), (1387055008,), (1387055011,), (1387055014,), (1387055017,), (1387055025,), (1387055028,), (1387055032,), (1387055035,), (1387055064,), (1387055075,), (1387055079,), (1387055129,), (1387055131,), (1387055134,), (1387055137,), (1387055146,), (1387055153,), (1387055155,), (1387055156,), (1387055162,), (1387055164,), (1387055167,), (1387055170,), (1387055174,), (1387055176,), (1387055193,), (1387055196,), (1387055200,), (1387055205,), (1387055210,), (1387055228,), (1387055231,), (1387055234,), (1387055249,), (1387055252,), (1387055255,), (1387055299,), (1387055310,), (1387055312,), (1387055315,), (1387055317,), (1387055335,), (1387055401,), (1387055404,), (1387055405,), (1387055579,), (1387055583,), (1387055585,), (1387055589,), (1387055593,), (1387055598,), (1387055599,), (1387055611,), (1387055613,), (1387055643,), (1387055645,), (1387055647,), (1387055655,), (1387056068,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in (1387055200) and cspi.crop_hashtag_id = chi.id; To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27377191 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','Teint_Dans_La_Masse','papier','Carton_brun','autre_refus','Carton_gris','plastique','kraft','environnement','mal_croppe','flou','metal')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27377191 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','Teint_Dans_La_Masse','papier','Carton_brun','autre_refus','Carton_gris','plastique','kraft','environnement','mal_croppe','flou','metal')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 27377191, 'sub_port_id': 27377210, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500627, 'last_updated_at': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 49, 3)}, 'kraft': {'main_port_id': 27377191, 'sub_port_id': 27377211, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500628, 'last_updated_at': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 49, 3)}, 'Carton_brun': {'main_port_id': 27377191, 'sub_port_id': 27377212, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500629, 'last_updated_at': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 49, 3)}, 'Carton_gris': {'main_port_id': 27377191, 'sub_port_id': 27377213, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500630, 'last_updated_at': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 49, 3)}, 'Teint_Dans_La_Masse': {'main_port_id': 27377191, 'sub_port_id': 27377214, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500631, 'last_updated_at': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 49, 3)}, 'cartonnette': {'main_port_id': 27377191, 'sub_port_id': 27377215, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500632, 'last_updated_at': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 49, 3)}, 'plastique': {'main_port_id': 27377191, 'sub_port_id': 27377216, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500633, 'last_updated_at': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 49, 3)}, 'autre_refus': {'main_port_id': 27377191, 'sub_port_id': 27377217, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500634, 'last_updated_at': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 49, 3)}, 'flou': {'main_port_id': 27377191, 'sub_port_id': 27377218, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500635, 'last_updated_at': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 49, 3)}, 'metal': {'main_port_id': 27377191, 'sub_port_id': 27377219, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500636, 'last_updated_at': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 49, 3)}, 'papier': {'main_port_id': 27377191, 'sub_port_id': 27377220, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500637, 'last_updated_at': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 0, 49, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 49, 3)}, 'mal_croppe': {'main_port_id': 27377191, 'sub_port_id': 27377221, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18500638, 'last_updated_at': datetime.datetime(2025, 10, 1, 1, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 1, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 0, 49, 3)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27377210,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27377197 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27377211,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27377198 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27377212,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27377199 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27377213,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27377200 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27377214,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27377201 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27377215,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27377202 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27377216,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27377203 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27377217,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27377204 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27377218,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27377205 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27377219,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27377206 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27377220,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27377207 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27377221,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27377208 lien utilise dans velours : https://marlene.fotonower.com/velours/27377210,27377211,27377212,27377213,27377214,27377215,27377216,27377217,27377218,27377219,27377220,27377221?tags=environnement,kraft,Carton_brun,Carton_gris,Teint_Dans_La_Masse,cartonnette,plastique,autre_refus,flou,metal,papier,mal_croppe After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27377191]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1387056068, 1387055655, 1387055647, 1387055645, 1387055643, 1387055613, 1387055611, 1387055599, 1387055598] map_info['map_portfolio_photo'] : {27377191: [1387056068, 1387055655, 1387055647, 1387055645, 1387055643, 1387055613, 1387055611, 1387055599, 1387055598, 1387055593, 1387055589, 1387055585, 1387055583, 1387055579, 1387055405, 1387055404, 1387055401, 1387055335, 1387055317, 1387055315, 1387055312, 1387055310, 1387055299, 1387055255, 1387055252, 1387055249, 1387055234, 1387055231, 1387055228, 1387055210, 1387055205, 1387055200, 1387055196, 1387055193, 1387055176, 1387055174, 1387055170, 1387055167, 1387055164, 1387055162, 1387055156, 1387055155, 1387055153, 1387055146, 1387055137, 1387055134, 1387055131, 1387055129, 1387055079, 1387055075, 1387055064, 1387055035, 1387055032, 1387055028, 1387055025, 1387055017, 1387055014, 1387055011, 1387055008, 1387055006, 1387055004, 1387054997, 1387054995, 1387054992, 1387054988, 1387054985, 1387054982, 1387054959, 1387054949, 1387054934, 1387054931, 1387054916, 1387054905, 1387054828, 1387054825, 1387054821, 1387054755, 1387054752, 1387054749, 1387054745, 1387054721, 1387054678]} final : False mtd_id 4302 list_pids : [1387056068, 1387055655, 1387055647, 1387055645, 1387055643, 1387055613, 1387055611, 1387055599, 1387055598] Looping around the photos to save general results len do output : 1 /27377191. before output type Here is an output not treated by saveGeneral : Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387056068', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055655', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055647', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055645', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055643', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055613', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055611', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055599', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055598', None, None, None, None, None, '3798117') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '27377191', "{'environnement': 27377197, 'kraft': 27377198, 'Carton_brun': 27377199, 'Carton_gris': 27377200, 'Teint_Dans_La_Masse': 27377201, 'cartonnette': 27377202, 'plastique': 27377203, 'autre_refus': 27377204, 'flou': 27377205, 'metal': 27377206, 'papier': 27377207, 'mal_croppe': 27377208}", None, None, None, None, '3798117'), ('4302', '27377191', '1387056068', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055655', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055647', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055645', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055643', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055613', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055611', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055599', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055598', None, None, None, None, None, '3798117')] time used for this insertion : 0.03846120834350586 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.7291550636291504 time spend to save output : 0.03878450393676758 total time spend for step 1 : 1.767939567565918 step2:final Wed Oct 1 01:03:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27377191) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} Beginning of datou step final ! query to retrieve results for portfolio 27377191 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1387054678,1387054755,1387054752,1387054749,1387054745,1387054721,1387054828,1387054825,1387054821,1387055017,1387054959,1387055014,1387054949,1387054934,1387055011,1387054931,1387055008,1387054916,1387055006,1387054905,1387055004,1387054997,1387054995,1387054992,1387054988,1387054985,1387054982,1387055035,1387055032,1387055028,1387055025,1387055156,1387055079,1387055075,1387055155,1387055153,1387055064,1387055146,1387055137,1387055134,1387055131,1387055129,1387055176,1387055174,1387055170,1387055167,1387055164,1387055162,1387055210,1387055205,1387055200,1387055196,1387055193,1387055255,1387055252,1387055249,1387055234,1387055231,1387055228,1387055335,1387055317,1387055315,1387055312,1387055310,1387055299,1387055405,1387055404,1387055401,1387055593,1387055589,1387055585,1387055583,1387056068,1387055613,1387055579,1387055611,1387055655,1387055599,1387055647,1387055598,1387055645,1387055643); 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([27377191]) Inside saveOutput : final : False verbose : True original output for save of step final : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ('0.06445660284371924',), 1387055645: ('0.06445660284371924',), 1387055643: ('0.06445660284371924',), 1387055613: ('0.06445660284371924',), 1387055611: ('0.06445660284371924',), 1387055599: ('0.06445660284371924',), 1387055598: ('0.06445660284371924',)} new output for save of step final : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ('0.06445660284371924',), 1387055645: ('0.06445660284371924',), 1387055643: ('0.06445660284371924',), 1387055613: ('0.06445660284371924',), 1387055611: ('0.06445660284371924',), 1387055599: ('0.06445660284371924',), 1387055598: ('0.06445660284371924',)} [1387056068, 1387055655, 1387055647, 1387055645, 1387055643, 1387055613, 1387055611, 1387055599, 1387055598] map_info['map_portfolio_photo'] : {27377191: [1387056068, 1387055655, 1387055647, 1387055645, 1387055643, 1387055613, 1387055611, 1387055599, 1387055598, 1387055593, 1387055589, 1387055585, 1387055583, 1387055579, 1387055405, 1387055404, 1387055401, 1387055335, 1387055317, 1387055315, 1387055312, 1387055310, 1387055299, 1387055255, 1387055252, 1387055249, 1387055234, 1387055231, 1387055228, 1387055210, 1387055205, 1387055200, 1387055196, 1387055193, 1387055176, 1387055174, 1387055170, 1387055167, 1387055164, 1387055162, 1387055156, 1387055155, 1387055153, 1387055146, 1387055137, 1387055134, 1387055131, 1387055129, 1387055079, 1387055075, 1387055064, 1387055035, 1387055032, 1387055028, 1387055025, 1387055017, 1387055014, 1387055011, 1387055008, 1387055006, 1387055004, 1387054997, 1387054995, 1387054992, 1387054988, 1387054985, 1387054982, 1387054959, 1387054949, 1387054934, 1387054931, 1387054916, 1387054905, 1387054828, 1387054825, 1387054821, 1387054755, 1387054752, 1387054749, 1387054745, 1387054721, 1387054678]} final : False mtd_id 4302 list_pids : [1387056068, 1387055655, 1387055647, 1387055645, 1387055643, 1387055613, 1387055611, 1387055599, 1387055598] Looping around the photos to save general results len do output : 9 /1387056068.Didn't retrieve data . /1387055655.Didn't retrieve data . /1387055647.Didn't retrieve data . /1387055645.Didn't retrieve data . /1387055643.Didn't retrieve data . /1387055613.Didn't retrieve data . /1387055611.Didn't retrieve data . /1387055599.Didn't retrieve data . /1387055598.Didn't retrieve data . before output type Used above Used above Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387056068', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055655', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055647', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055645', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055643', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055613', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055611', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055599', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055598', None, None, None, None, None, '3798117') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 27 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '27377191', '1387056068', '0.06445660284371924', None, None, None, None, '3798117'), ('4302', '27377191', '1387055655', '0.06445660284371924', None, None, None, None, '3798117'), ('4302', '27377191', '1387055647', '0.06445660284371924', None, None, None, None, '3798117'), ('4302', '27377191', '1387055645', '0.06445660284371924', None, None, None, None, '3798117'), ('4302', '27377191', '1387055643', '0.06445660284371924', None, None, None, None, '3798117'), ('4302', '27377191', '1387055613', '0.06445660284371924', None, None, None, None, '3798117'), ('4302', '27377191', '1387055611', '0.06445660284371924', None, None, None, None, '3798117'), ('4302', '27377191', '1387055599', '0.06445660284371924', None, None, None, None, '3798117'), ('4302', '27377191', '1387055598', '0.06445660284371924', None, None, None, None, '3798117')] time used for this insertion : 0.03662228584289551 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.2456035614013672 time spend to save output : 0.03713035583496094 total time spend for step 2 : 0.2827339172363281 step3:velours_tree Wed Oct 1 01:03:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {27377191: [{'environnement': 27377197, 'kraft': 27377198, 'Carton_brun': 27377199, 'Carton_gris': 27377200, 'Teint_Dans_La_Masse': 27377201, 'cartonnette': 27377202, 'plastique': 27377203, 'autre_refus': 27377204, 'flou': 27377205, 'metal': 27377206, 'papier': 27377207, 'mal_croppe': 27377208}]} input_args_next_step : {27377191: ()} output_args : {27377191: [{'environnement': 27377197, 'kraft': 27377198, 'Carton_brun': 27377199, 'Carton_gris': 27377200, 'Teint_Dans_La_Masse': 27377201, 'cartonnette': 27377202, 'plastique': 27377203, 'autre_refus': 27377204, 'flou': 27377205, 'metal': 27377206, 'papier': 27377207, 'mal_croppe': 27377208}]} args : 27377191 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'environnement': 27377197, 'kraft': 27377198, 'Carton_brun': 27377199, 'Carton_gris': 27377200, 'Teint_Dans_La_Masse': 27377201, 'cartonnette': 27377202, 'plastique': 27377203, 'autre_refus': 27377204, 'flou': 27377205, 'metal': 27377206, 'papier': 27377207, 'mal_croppe': 27377208},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27377191) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} can't find the photo_desc_type After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27377191]) Inside saveOutput : final : False verbose : True ouput is None No outpout to save, returning out of save general time spend for datou_step_exec : 0.3213980197906494 time spend to save output : 6.031990051269531e-05 total time spend for step 3 : 0.3214583396911621 step4:send_mail_cod Wed Oct 1 01:03:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ('0.06445660284371924',), 1387055645: ('0.06445660284371924',), 1387055643: ('0.06445660284371924',), 1387055613: ('0.06445660284371924',), 1387055611: ('0.06445660284371924',), 1387055599: ('0.06445660284371924',), 1387055598: ('0.06445660284371924',)} input_args_next_step : {1387056068: ()} output_args : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ('0.06445660284371924',), 1387055645: ('0.06445660284371924',), 1387055643: ('0.06445660284371924',), 1387055613: ('0.06445660284371924',), 1387055611: ('0.06445660284371924',), 1387055599: ('0.06445660284371924',), 1387055598: ('0.06445660284371924',)} args : 1387056068 depend.output_id : 0 input_args_next_step : {1387056068: ('0.06445660284371924',), 1387055655: ()} output_args : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ('0.06445660284371924',), 1387055645: ('0.06445660284371924',), 1387055643: ('0.06445660284371924',), 1387055613: ('0.06445660284371924',), 1387055611: ('0.06445660284371924',), 1387055599: ('0.06445660284371924',), 1387055598: ('0.06445660284371924',)} args : 1387055655 depend.output_id : 0 input_args_next_step : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ()} output_args : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ('0.06445660284371924',), 1387055645: ('0.06445660284371924',), 1387055643: ('0.06445660284371924',), 1387055613: ('0.06445660284371924',), 1387055611: ('0.06445660284371924',), 1387055599: ('0.06445660284371924',), 1387055598: ('0.06445660284371924',)} args : 1387055647 depend.output_id : 0 input_args_next_step : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ('0.06445660284371924',), 1387055645: ()} output_args : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ('0.06445660284371924',), 1387055645: ('0.06445660284371924',), 1387055643: ('0.06445660284371924',), 1387055613: ('0.06445660284371924',), 1387055611: ('0.06445660284371924',), 1387055599: ('0.06445660284371924',), 1387055598: ('0.06445660284371924',)} args : 1387055645 depend.output_id : 0 input_args_next_step : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ('0.06445660284371924',), 1387055645: ('0.06445660284371924',), 1387055643: ()} output_args : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ('0.06445660284371924',), 1387055645: ('0.06445660284371924',), 1387055643: ('0.06445660284371924',), 1387055613: ('0.06445660284371924',), 1387055611: ('0.06445660284371924',), 1387055599: ('0.06445660284371924',), 1387055598: ('0.06445660284371924',)} args : 1387055643 depend.output_id : 0 input_args_next_step : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ('0.06445660284371924',), 1387055645: ('0.06445660284371924',), 1387055643: ('0.06445660284371924',), 1387055613: ()} output_args : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ('0.06445660284371924',), 1387055645: ('0.06445660284371924',), 1387055643: ('0.06445660284371924',), 1387055613: ('0.06445660284371924',), 1387055611: ('0.06445660284371924',), 1387055599: ('0.06445660284371924',), 1387055598: ('0.06445660284371924',)} args : 1387055613 depend.output_id : 0 input_args_next_step : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ('0.06445660284371924',), 1387055645: ('0.06445660284371924',), 1387055643: ('0.06445660284371924',), 1387055613: ('0.06445660284371924',), 1387055611: ()} output_args : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ('0.06445660284371924',), 1387055645: ('0.06445660284371924',), 1387055643: ('0.06445660284371924',), 1387055613: ('0.06445660284371924',), 1387055611: ('0.06445660284371924',), 1387055599: ('0.06445660284371924',), 1387055598: ('0.06445660284371924',)} args : 1387055611 depend.output_id : 0 input_args_next_step : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ('0.06445660284371924',), 1387055645: ('0.06445660284371924',), 1387055643: ('0.06445660284371924',), 1387055613: ('0.06445660284371924',), 1387055611: ('0.06445660284371924',), 1387055599: ()} output_args : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ('0.06445660284371924',), 1387055645: ('0.06445660284371924',), 1387055643: ('0.06445660284371924',), 1387055613: ('0.06445660284371924',), 1387055611: ('0.06445660284371924',), 1387055599: ('0.06445660284371924',), 1387055598: ('0.06445660284371924',)} args : 1387055599 depend.output_id : 0 input_args_next_step : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ('0.06445660284371924',), 1387055645: ('0.06445660284371924',), 1387055643: ('0.06445660284371924',), 1387055613: ('0.06445660284371924',), 1387055611: ('0.06445660284371924',), 1387055599: ('0.06445660284371924',), 1387055598: ()} output_args : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ('0.06445660284371924',), 1387055645: ('0.06445660284371924',), 1387055643: ('0.06445660284371924',), 1387055613: ('0.06445660284371924',), 1387055611: ('0.06445660284371924',), 1387055599: ('0.06445660284371924',), 1387055598: ('0.06445660284371924',)} args : 1387055598 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 : {27377191: [{'environnement': 27377197, 'kraft': 27377198, 'Carton_brun': 27377199, 'Carton_gris': 27377200, 'Teint_Dans_La_Masse': 27377201, 'cartonnette': 27377202, 'plastique': 27377203, 'autre_refus': 27377204, 'flou': 27377205, 'metal': 27377206, 'papier': 27377207, 'mal_croppe': 27377208}]} input_args_next_step : {1387056068: ('0.06445660284371924',), 1387055655: ('0.06445660284371924',), 1387055647: ('0.06445660284371924',), 1387055645: ('0.06445660284371924',), 1387055643: ('0.06445660284371924',), 1387055613: ('0.06445660284371924',), 1387055611: ('0.06445660284371924',), 1387055599: ('0.06445660284371924',), 1387055598: ('0.06445660284371924',), 27377191: ()} output_args : {27377191: [{'environnement': 27377197, 'kraft': 27377198, 'Carton_brun': 27377199, 'Carton_gris': 27377200, 'Teint_Dans_La_Masse': 27377201, 'cartonnette': 27377202, 'plastique': 27377203, 'autre_refus': 27377204, 'flou': 27377205, 'metal': 27377206, 'papier': 27377207, 'mal_croppe': 27377208}]} args : 27377191 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 :10, first value : ('0.06445660284371924',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27377191) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos_view ph WHERE photo_id IN (1387056068,1387055655,1387055647,1387055645,1387055643,1387055613,1387055611,1387055599,1387055598) Found this number of photos: 9 ##### Call download_photos : nb_thread : 5 begin to download photo : 1387055598 begin to download photo : 1387055611 begin to download photo : 1387055643 begin to download photo : 1387055647 begin to download photo : 1387056068 download finish for photo 1387055598 begin to download photo : 1387055599 download finish for photo 1387056068 download finish for photo 1387055643 begin to download photo : 1387055645 download finish for photo 1387055611 begin to download photo : 1387055613 download finish for photo 1387055647 begin to download photo : 1387055655 download finish for photo 1387055599 download finish for photo 1387055655 download finish for photo 1387055613 download finish for photo 1387055645 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 : 9 ; length of list_pids : 9 ; length of list_args : 9 results_Auto_P27377191_01-10-2025_01_03_01.pdf 27377198 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27377198 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1387055915: '1759273266_62986_1387055170_bc63648fd6946cf370d786bae9bd15e8_rle_crop_3981672123_0.png'} change filename to text .imagette273771981759273381/ imagette273771981759273381/1759273266_62986_1387055170_bc63648fd6946cf370d786bae9bd15e8_rle_crop_3981672123_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/9236ba88db1220d4e043035d2aed21c6_68694242.png imagette273771981759273381 27377202 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27377202 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1387055021: '1759272664_43443_1387054821_c9d946a2644ef9a1f05c68f212fe8c49_rle_crop_3981661303_0.png', 1387055572: '1759273145_59170_1387055200_a927f67b9e7519a3bc734ddbe38ab319_rle_crop_3981669771_0.png', 1387055656: '1759273266_62986_1387055162_f0763c6428235c9d2f198fcb0a5cd03b_rle_crop_3981672216_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/5d207798acf4972c6977990bc6f7b774_41907797.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/88374d6f6a3e47e9555b677b4eee014c_94157906.png change filename to text .imagette273772021759273381/ imagette273772021759273381/1759272664_43443_1387054821_c9d946a2644ef9a1f05c68f212fe8c49_rle_crop_3981661303_0.png.png imagette273772021759273381/1759273145_59170_1387055200_a927f67b9e7519a3bc734ddbe38ab319_rle_crop_3981669771_0.png.png imagette273772021759273381/1759273266_62986_1387055162_f0763c6428235c9d2f198fcb0a5cd03b_rle_crop_3981672216_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/42c4b0110beb1381a7e3e08b8b840c30_20530271.png imagette273772021759273381 27377203 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27377203 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1387055024: '1759272664_43443_1387054825_5c57be996dc3155a828b21b07819c41c_rle_crop_3981661283_0.png', 1387055150: '1759272785_47647_1387054721_cbac523817eb74643c0f585e6a296159_rle_crop_3981662680_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/f582e559b7a3577dae140f8e9a843ff7_21183042.png change filename to text .imagette273772031759273381/ imagette273772031759273381/1759272785_47647_1387054721_cbac523817eb74643c0f585e6a296159_rle_crop_3981662680_0.png.png imagette273772031759273381/1759272664_43443_1387054825_5c57be996dc3155a828b21b07819c41c_rle_crop_3981661283_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/34938c995f16cb15e630d1265fa4099c_40826891.png imagette273772031759273381 27377204 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27377204 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1387055019: '1759272664_43443_1387054825_5c57be996dc3155a828b21b07819c41c_rle_crop_3981661290_0.png'} change filename to text .imagette273772041759273381/ imagette273772041759273381/1759272664_43443_1387054825_5c57be996dc3155a828b21b07819c41c_rle_crop_3981661290_0.png.png imagette273772051759273381/ imagette273772061759273382/ imagette273772081759273382/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/10af1540c190f8ab40dd5bd401c3b095_76110845.png imagette273772041759273381 27377205 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27377205 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette273772051759273381 27377206 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27377206 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette273772061759273382 27377208 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27377208 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette273772081759273382 27377199 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27377199 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1387055023: '1759272664_43443_1387054825_5c57be996dc3155a828b21b07819c41c_rle_crop_3981661286_0.png', 1387055148: '1759272785_47647_1387054721_cbac523817eb74643c0f585e6a296159_rle_crop_3981662681_0.png', 1387055149: '1759272785_47647_1387054721_cbac523817eb74643c0f585e6a296159_rle_crop_3981662683_0.png', 1387055209: '1759272905_51214_1387055064_e2e54da508ae1b64c4566c2b1df27ae7_rle_crop_3981662983_0.png', 1387055573: '1759273145_59170_1387055205_227ff928a8e6eaff0e19af3784e542fd_rle_crop_3981669758_0.png', 1387055808: '1759273266_62986_1387055210_8180853b168fcb24d8d29400b0f6d0cb_rle_crop_3981672078_0.png', 1387055810: '1759273266_62986_1387055174_042995ef703b0ab0b5161e95520dec89_rle_crop_3981672099_0.png', 1387055812: '1759273266_62986_1387055174_042995ef703b0ab0b5161e95520dec89_rle_crop_3981672096_0.png', 1387055814: '1759273266_62986_1387055167_f8f4a445cc8f704fe77316cccf763931_rle_crop_3981672150_0.png', 1387055816: '1759273266_62986_1387055167_f8f4a445cc8f704fe77316cccf763931_rle_crop_3981672158_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/d6d9ad746c394d34394a47566dbb2dbf_73686981.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/6a73e9d85ee64378284c92e69c700cbf_60298579.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/bbd8a34461f24707e857210401ab6239_10215789.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/62f3d2f30074e602a3d0b2704b7bf6ca_37809751.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/3db087365151ed4c62c76361c5e98f82_15191663.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/a5c063cff745e57f870a4eecba6b34ce_90198796.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/880db7b6934d0b21ff360b444c58e960_65710337.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/d67b8226963524ff89dd37f1f9f53fee_76450418.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/2dbaa8e80a404e7a9a0ccdd18d427ad9_50156643.png change filename to text .imagette273771991759273382/ imagette273771991759273382/1759272664_43443_1387054825_5c57be996dc3155a828b21b07819c41c_rle_crop_3981661286_0.png.png imagette273771991759273382/1759272785_47647_1387054721_cbac523817eb74643c0f585e6a296159_rle_crop_3981662683_0.png.png imagette273771991759273382/1759273266_62986_1387055167_f8f4a445cc8f704fe77316cccf763931_rle_crop_3981672150_0.png.png imagette273771991759273382/1759272905_51214_1387055064_e2e54da508ae1b64c4566c2b1df27ae7_rle_crop_3981662983_0.png.png imagette273771991759273382/1759273266_62986_1387055167_f8f4a445cc8f704fe77316cccf763931_rle_crop_3981672158_0.png.png imagette273771991759273382/1759272785_47647_1387054721_cbac523817eb74643c0f585e6a296159_rle_crop_3981662681_0.png.png imagette273771991759273382/1759273266_62986_1387055210_8180853b168fcb24d8d29400b0f6d0cb_rle_crop_3981672078_0.png.png imagette273771991759273382/1759273266_62986_1387055174_042995ef703b0ab0b5161e95520dec89_rle_crop_3981672099_0.png.png imagette273771991759273382/1759273145_59170_1387055205_227ff928a8e6eaff0e19af3784e542fd_rle_crop_3981669758_0.png.png imagette273771991759273382/1759273266_62986_1387055174_042995ef703b0ab0b5161e95520dec89_rle_crop_3981672096_0.png.png wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/ff6868fce54e54f706fe6db5cd5cc61a_70379020.png imagette273771991759273382 27377200 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27377200 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1387055020: '1759272664_43443_1387054821_c9d946a2644ef9a1f05c68f212fe8c49_rle_crop_3981661296_0.png', 1387055143: '1759272785_47647_1387054752_76c55d7c07b11aaf1955f88ccb753905_rle_crop_3981662636_0.png', 1387055144: '1759272785_47647_1387054749_b3f331bdbdbfab387ee74fcb29a9e480_rle_crop_3981662656_0.png', 1387055145: '1759272785_47647_1387054745_e68b438a0a0abaaf40ebd6d36f30e5de_rle_crop_3981662669_0.png', 1387055206: '1759272905_51214_1387055064_e2e54da508ae1b64c4566c2b1df27ae7_rle_crop_3981662981_0.png', 1387055568: '1759273145_59170_1387055205_227ff928a8e6eaff0e19af3784e542fd_rle_crop_3981669759_0.png', 1387055569: '1759273145_59170_1387055205_227ff928a8e6eaff0e19af3784e542fd_rle_crop_3981669757_0.png', 1387055570: '1759273145_59170_1387055200_a927f67b9e7519a3bc734ddbe38ab319_rle_crop_3981669773_0.png', 1387055571: '1759273145_59170_1387055196_94df8c65c900d50974149de8971ffc95_rle_crop_3981669781_0.png', 1387055652: '1759273266_62986_1387055170_bc63648fd6946cf370d786bae9bd15e8_rle_crop_3981672120_0.png', 1387055653: '1759273266_62986_1387055167_f8f4a445cc8f704fe77316cccf763931_rle_crop_3981672146_0.png', 1387055654: '1759273266_62986_1387055164_18aae3fc26f35ce3d4acbf0926ebee47_rle_crop_3981672184_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/66924ce886fa4f5b175011092af14722_723673.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/827ac6bcd1d6cbb3576c3d22825c621f_18391804.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/0179aca01fc896f83c4b88cc326be794_44373370.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/e8fd8b0cc9bd217aa19db55e999f68c6_60120766.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/9dcc7064af1df73d0bb976907a3ce1d2_12490563.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/6902f62124a98bea6a67d93911bbe679_43494565.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/3e3781221bd05119e9f50b1806614c43_85792385.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/7fd2244dc401bd3d36509b2b3bb022b1_51002856.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/e73281231ee2ff41865059e7adef9c2f_92453984.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/e37e77997f4c049675e3e6623ae10051_85341209.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/08b96820a9437f05b0815e57e050edbc_86320700.png change filename to text .imagette273772001759273382/ imagette273772001759273382/1759272785_47647_1387054745_e68b438a0a0abaaf40ebd6d36f30e5de_rle_crop_3981662669_0.png.png imagette273772001759273382/1759273145_59170_1387055200_a927f67b9e7519a3bc734ddbe38ab319_rle_crop_3981669773_0.png.png imagette273772001759273382/1759273145_59170_1387055205_227ff928a8e6eaff0e19af3784e542fd_rle_crop_3981669757_0.png.png imagette273772001759273382/1759273145_59170_1387055205_227ff928a8e6eaff0e19af3784e542fd_rle_crop_3981669759_0.png.png imagette273772001759273382/1759273266_62986_1387055167_f8f4a445cc8f704fe77316cccf763931_rle_crop_3981672146_0.png.png imagette273772001759273382/1759272664_43443_1387054821_c9d946a2644ef9a1f05c68f212fe8c49_rle_crop_3981661296_0.png.png imagette273772001759273382/1759273145_59170_1387055196_94df8c65c900d50974149de8971ffc95_rle_crop_3981669781_0.png.png imagette273772001759273382/1759272905_51214_1387055064_e2e54da508ae1b64c4566c2b1df27ae7_rle_crop_3981662981_0.png.png imagette273772001759273382/1759272785_47647_1387054749_b3f331bdbdbfab387ee74fcb29a9e480_rle_crop_3981662656_0.png.png imagette273772001759273382/1759273266_62986_1387055164_18aae3fc26f35ce3d4acbf0926ebee47_rle_crop_3981672184_0.png.png imagette273772001759273382/1759273266_62986_1387055170_bc63648fd6946cf370d786bae9bd15e8_rle_crop_3981672120_0.png.png imagette273772001759273382/1759272785_47647_1387054752_76c55d7c07b11aaf1955f88ccb753905_rle_crop_3981662636_0.png.png wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/d4e0238ae7b69a144f7fef2fd610f54f_57498869.png imagette273772001759273382 27377201 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27377201 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1387055140: '1759272785_47647_1387054752_76c55d7c07b11aaf1955f88ccb753905_rle_crop_3981662641_0.png', 1387055141: '1759272785_47647_1387054749_b3f331bdbdbfab387ee74fcb29a9e480_rle_crop_3981662655_0.png', 1387055142: '1759272785_47647_1387054745_e68b438a0a0abaaf40ebd6d36f30e5de_rle_crop_3981662671_0.png', 1387055313: '1759273026_55272_1387055079_a282aba64b4e8767ae6c1eebfbd75c1d_rle_crop_3981664480_0.png', 1387055314: '1759273026_55272_1387055032_6bc1fc19c420333a98934918d50158c1_rle_crop_3981664489_0.png', 1387055566: '1759273145_59170_1387055200_a927f67b9e7519a3bc734ddbe38ab319_rle_crop_3981669770_0.png', 1387055649: '1759273266_62986_1387055210_8180853b168fcb24d8d29400b0f6d0cb_rle_crop_3981672077_0.png', 1387055650: '1759273266_62986_1387055174_042995ef703b0ab0b5161e95520dec89_rle_crop_3981672101_0.png', 1387055651: '1759273266_62986_1387055167_f8f4a445cc8f704fe77316cccf763931_rle_crop_3981672152_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/ed3bf2f3fca672e252b7fe4ca6324624_43284889.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/3d84f60ddf5cecf2a431bbcb65377cba_13310701.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/186aaa007243cd142e95b61811d826e2_66671047.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/b7871f133168f0aa0f4457fba2ac84df_91884009.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/dfb5dd319cc5dc1b719d14ac0d402812_14367534.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/4179ec03eee17967b33d8081e659c21e_7259892.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/ca20951b55ae2487172cd9c3e10a3075_6047199.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/c67dc0ee28a4f8ec0c3c8df936c75caa_1998853.png change filename to text .imagette273772011759273383/ imagette273772011759273383/1759272785_47647_1387054749_b3f331bdbdbfab387ee74fcb29a9e480_rle_crop_3981662655_0.png.png imagette273772011759273383/1759273026_55272_1387055079_a282aba64b4e8767ae6c1eebfbd75c1d_rle_crop_3981664480_0.png.png imagette273772011759273383/1759272785_47647_1387054752_76c55d7c07b11aaf1955f88ccb753905_rle_crop_3981662641_0.png.png imagette273772011759273383/1759273266_62986_1387055174_042995ef703b0ab0b5161e95520dec89_rle_crop_3981672101_0.png.png imagette273772011759273383/1759273026_55272_1387055032_6bc1fc19c420333a98934918d50158c1_rle_crop_3981664489_0.png.png imagette273772011759273383/1759273266_62986_1387055210_8180853b168fcb24d8d29400b0f6d0cb_rle_crop_3981672077_0.png.png imagette273772011759273383/1759273145_59170_1387055200_a927f67b9e7519a3bc734ddbe38ab319_rle_crop_3981669770_0.png.png imagette273772011759273383/1759272785_47647_1387054745_e68b438a0a0abaaf40ebd6d36f30e5de_rle_crop_3981662671_0.png.png imagette273772011759273383/1759273266_62986_1387055167_f8f4a445cc8f704fe77316cccf763931_rle_crop_3981672152_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/db501fc70aaf16c7e8429a792a170df9_60760250.png imagette273772011759273383 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=27377191 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/27377210,27377211,27377212,27377213,27377214,27377215,27377216,27377217,27377218,27377219,27377220,27377221?tags=environnement,kraft,Carton_brun,Carton_gris,Teint_Dans_La_Masse,cartonnette,plastique,autre_refus,flou,metal,papier,mal_croppe your option no_mail is active, we will not send the real mail to your client args[1387056068] : ('0.06445660284371924',) no score found for photo 1387056068 We are sending mail with results at report@fotonower.com args[1387055655] : ('0.06445660284371924',) no score found for photo 1387055655 We are sending mail with results at report@fotonower.com args[1387055647] : ('0.06445660284371924',) no score found for photo 1387055647 We are sending mail with results at report@fotonower.com args[1387055645] : ('0.06445660284371924',) no score found for photo 1387055645 We are sending mail with results at report@fotonower.com args[1387055643] : ('0.06445660284371924',) no score found for photo 1387055643 We are sending mail with results at report@fotonower.com args[1387055613] : ('0.06445660284371924',) no score found for photo 1387055613 We are sending mail with results at report@fotonower.com args[1387055611] : ('0.06445660284371924',) no score found for photo 1387055611 We are sending mail with results at report@fotonower.com args[1387055599] : ('0.06445660284371924',) no score found for photo 1387055599 We are sending mail with results at report@fotonower.com args[1387055598] : ('0.06445660284371924',) no score found for photo 1387055598 We are sending mail with results at report@fotonower.com refus_total : 0.06445660284371924 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27377191 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 1000 start upload file to ovh https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27377191_01-10-2025_01_03_01.pdf results_Auto_P27377191_01-10-2025_01_03_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27377191_01-10-2025_01_03_01.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','27377191','results_Auto_P27377191_01-10-2025_01_03_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27377191_01-10-2025_01_03_01.pdf','pdf','','0.19','0.06445660284371924') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27377191]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1387056068, 1387055655, 1387055647, 1387055645, 1387055643, 1387055613, 1387055611, 1387055599, 1387055598] map_info['map_portfolio_photo'] : {27377191: [1387056068, 1387055655, 1387055647, 1387055645, 1387055643, 1387055613, 1387055611, 1387055599, 1387055598, 1387055593, 1387055589, 1387055585, 1387055583, 1387055579, 1387055405, 1387055404, 1387055401, 1387055335, 1387055317, 1387055315, 1387055312, 1387055310, 1387055299, 1387055255, 1387055252, 1387055249, 1387055234, 1387055231, 1387055228, 1387055210, 1387055205, 1387055200, 1387055196, 1387055193, 1387055176, 1387055174, 1387055170, 1387055167, 1387055164, 1387055162, 1387055156, 1387055155, 1387055153, 1387055146, 1387055137, 1387055134, 1387055131, 1387055129, 1387055079, 1387055075, 1387055064, 1387055035, 1387055032, 1387055028, 1387055025, 1387055017, 1387055014, 1387055011, 1387055008, 1387055006, 1387055004, 1387054997, 1387054995, 1387054992, 1387054988, 1387054985, 1387054982, 1387054959, 1387054949, 1387054934, 1387054931, 1387054916, 1387054905, 1387054828, 1387054825, 1387054821, 1387054755, 1387054752, 1387054749, 1387054745, 1387054721, 1387054678]} final : False mtd_id 4302 list_pids : [1387056068, 1387055655, 1387055647, 1387055645, 1387055643, 1387055613, 1387055611, 1387055599, 1387055598] Looping around the photos to save general results len do output : 0 before output type Used above Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387056068', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055655', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055647', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055645', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055643', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055613', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055611', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055599', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055598', None, None, None, None, None, '3798117') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '27377191', '1387056068', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055655', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055647', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055645', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055643', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055613', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055611', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055599', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055598', None, None, None, None, None, '3798117')] time used for this insertion : 0.03530693054199219 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.814102411270142 time spend to save output : 0.03561520576477051 total time spend for step 4 : 4.849717617034912 step5:split_time_score Wed Oct 1 01:03:05 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 : ['27377191'] We expect there is only one output and this part is used while all output are not tuple or array Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 1 : VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : [('27377191',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27377191) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1387056068: {'path': 'temp/1759273380_1210431_1387056068_5081fd0aa8542c82931b31e0d44f7d8e.jpg', 'extension': 'jpg'}, 1387055598: {'path': 'temp/1759273380_1210431_1387055598_d91862d5443276e1311738aad2b56ae0.jpg', 'extension': 'jpg'}, 1387055599: {'path': 'temp/1759273380_1210431_1387055599_244ea6b7de163ab64a15bc13199ea26f.jpg', 'extension': 'jpg'}, 1387055647: {'path': 'temp/1759273380_1210431_1387055647_122babe7568dff282d98ee656ed8f2ee.jpg', 'extension': 'jpg'}, 1387055655: {'path': 'temp/1759273380_1210431_1387055655_a4f2dae92c06576e9d7f728cfee350cb.jpg', 'extension': 'jpg'}, 1387055611: {'path': 'temp/1759273380_1210431_1387055611_b0a1dae58fb82e0ea7c458064dc6b249.jpg', 'extension': 'jpg'}, 1387055613: {'path': 'temp/1759273380_1210431_1387055613_c7bb45f2c32fa5d9a27689b3e2ba0898.jpg', 'extension': 'jpg'}, 1387055643: {'path': 'temp/1759273380_1210431_1387055643_73f968bfe2d7a1e1e6e921f519a0c6fe.jpg', 'extension': 'jpg'}, 1387055645: {'path': 'temp/1759273380_1210431_1387055645_de57e7f344f6d61feb11adfc03bb6914.jpg', 'extension': 'jpg'}} map_subphoto_mainphoto : {} begin split time score SELECT app_name, token FROM MTRUser.mtr_app_api_token WHERE mtr_user_id=979 AND app_name="token_split_time_score" AND expire_at > NOW() select distinct dp.name from MTRPhoto.dashboard_entry_day ded, MTRPhoto.dashboard_places dp, MTRPhoto.dashboard_results dr where ded.dashboard_place_id = dp.id and ded.last_run_id = dr.dashboard_run_id and dp.id = ded.dashboard_place_id and dr.mtr_portfolio_id = 27377191; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm_bis',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 27377191 group by h (('00', 82),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27377191 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 (27377191) 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 (27377191) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 01102025 27377191 Nombre de photos uploadées : 82 / 23040 (0%) 01102025 27377191 Nombre de photos taguées (types de déchets): 0 / 82 (0%) 01102025 27377191 Nombre de photos taguées (volume) : 0 / 82 (0%) [{'photo_id': 1387054678, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/789adf1347434895c3ccfc2ea3489e36.jpg', 'username': None, 'uploaded_at': 1759272367, 'text': 'image_01102025_00_45_43_9136.jpg'}, {'photo_id': 1387054755, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/bf10cd785cd5aff8604014471c264909.jpg', 'username': None, 'uploaded_at': 1759272428, 'text': 'image_01102025_00_45_53_10149.jpg'}, {'photo_id': 1387054752, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/76c55d7c07b11aaf1955f88ccb753905.jpg', 'username': None, 'uploaded_at': 1759272428, 'text': 'image_01102025_00_46_14_010154m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1387054749, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/b3f331bdbdbfab387ee74fcb29a9e480.jpg', 'username': None, 'uploaded_at': 1759272428, 'text': 'image_01102025_00_46_24_010148m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 2.1457672119140625e-06 elapsed_time : order_list_meta_photo_and_scores 5.9604644775390625e-06 ?????????????????????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0035538673400878906 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 27377191, '2025-10-01' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2369419,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.6369788646697998 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= 2369419 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2369419, 'dashboard_run_id': 2376861, 'mtr_portfolio_id': 27375839, 'dashboard_result_id': 15837885, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27375839_01-10-2025_00_17_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27375884, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27375885, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27375886, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27375887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27375888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27375889, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27375890, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27375891, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27375892, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27375893, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27375894, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27375895, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2376861, 'mtr_portfolio_id': 27376525, 'dashboard_result_id': 15837886, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27376525_01-10-2025_00_33_35.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27376527, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27376528, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27376529, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27376530, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27376531, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27376532, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27376533, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27376534, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27376535, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27376536, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27376537, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27376538, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2376861, 'mtr_portfolio_id': 27376906, 'dashboard_result_id': 15837887, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27376906_01-10-2025_00_47_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27376928, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27376929, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27376930, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27376931, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27376932, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27376933, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27376934, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27376935, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27376936, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27376937, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27376938, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27376939, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2376861, 'mtr_portfolio_id': 27377191, 'dashboard_result_id': 15837888, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27377191_01-10-2025_00_59_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27377197, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27377198, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27377199, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27377200, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27377201, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27377202, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27377203, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27377204, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27377205, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27377206, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27377207, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27377208, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27375839 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3797909, 'mtr_portfolio_id': 27375839, 'created_at': datetime.datetime(2025, 10, 1, 0, 17), 'result': '0.05926231604959723', 'result_long': None, 'result_double': None}] Qualite : 0.05926231604959723 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27375839 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27375839_01-10-2025_00_17_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27375839 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27375839_01-10-2025_00_17_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27375884, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27375885, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27375886, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27375887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27375888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27375889, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27375890, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27375891, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27375892, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27375893, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27375894, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27375895, 'pht': 3726}}" where mtr_portfolio_id = 27375839 and dashboard_run_id = 2376861 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27375839 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15837885, 0.05926231604959723, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27375839_01-10-2025_00_17_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27375884, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27375885, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27375886, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27375887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27375888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27375889, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27375890, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27375891, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27375892, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27375893, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27375894, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27375895, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27376525 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3797954, 'mtr_portfolio_id': 27376525, 'created_at': datetime.datetime(2025, 10, 1, 0, 33, 34), 'result': '0.07297377682741689', 'result_long': None, 'result_double': None}] Qualite : 0.07297377682741689 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27376525 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27376525_01-10-2025_00_33_35.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27376525 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27376525_01-10-2025_00_33_35.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27376527, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27376528, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27376529, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27376530, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27376531, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27376532, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27376533, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27376534, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27376535, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27376536, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27376537, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27376538, 'pht': 3726}}" where mtr_portfolio_id = 27376525 and dashboard_run_id = 2376865 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27376525 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15837886, 0.07297377682741689, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27376525_01-10-2025_00_33_35.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27376527, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27376528, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27376529, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27376530, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27376531, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27376532, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27376533, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27376534, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27376535, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27376536, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27376537, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27376538, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27376906 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3798005, 'mtr_portfolio_id': 27376906, 'created_at': datetime.datetime(2025, 10, 1, 0, 47, 3), 'result': '0.053940660498579276', 'result_long': None, 'result_double': None}] Qualite : 0.053940660498579276 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27376906 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27376906_01-10-2025_00_47_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27376906 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27376906_01-10-2025_00_47_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27376928, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27376929, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27376930, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27376931, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27376932, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27376933, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27376934, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27376935, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27376936, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27376937, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27376938, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27376939, 'pht': 3726}}" where mtr_portfolio_id = 27376906 and dashboard_run_id = 2376865 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27376906 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15837887, 0.053940660498579276, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27376906_01-10-2025_00_47_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27376928, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27376929, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27376930, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27376931, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27376932, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27376933, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27376934, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27376935, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27376936, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27376937, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27376938, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27376939, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27377191 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3798117, 'mtr_portfolio_id': 27377191, 'created_at': datetime.datetime(2025, 10, 1, 1, 3), 'result': '0.06445660284371924', 'result_long': None, 'result_double': None}] Qualite : 0.06445660284371924 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27377191 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27377191_01-10-2025_01_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27377191 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27377191_01-10-2025_01_03_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27377197, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27377198, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27377199, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27377200, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27377201, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27377202, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27377203, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27377204, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27377205, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27377206, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27377207, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27377208, 'pht': 3726}}" where mtr_portfolio_id = 27377191 and dashboard_run_id = 2376865 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27377191 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15837888, 0.06445660284371924, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27377191_01-10-2025_01_03_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27377197, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27377198, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27377199, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27377200, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27377201, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27377202, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27377203, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27377204, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27377205, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27377206, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27377207, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27377208, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27375839,27376525,27376906,27377191) result : ((1387049350,), (1387051024,), (1387051025,), (1387051027,), (1387051041,), (1387051044,), (1387051049,), (1387051073,), (1387051318,), (1387051321,), (1387051333,), (1387051551,), (1387051617,), (1387051623,), (1387052038,), (1387052041,), (1387052204,), (1387052206,), (1387052208,), (1387052211,), (1387052272,), (1387052289,), (1387052294,), (1387052297,), (1387052453,), (1387052457,), (1387052478,), (1387052500,), (1387052502,), (1387052504,), (1387052768,), (1387052851,), (1387052908,), (1387052905,), (1387052965,), (1387052985,), (1387052989,), (1387053194,), (1387053439,), (1387053472,), (1387053474,), (1387053485,), (1387053491,), (1387053509,), (1387053515,), (1387053518,), (1387053530,), (1387053533,), (1387053536,), (1387053540,), (1387053543,), (1387053588,), (1387053595,), (1387053599,), (1387053601,), (1387053604,), (1387053618,), (1387053619,), (1387053620,), (1387053622,), (1387053626,), (1387053640,), (1387053653,), (1387053656,), (1387053660,), (1387053664,), (1387053666,), (1387053670,), (1387053673,), (1387053674,), (1387053684,), (1387053688,), (1387053691,), (1387053694,), (1387053726,), (1387053727,), (1387053738,), (1387053753,), (1387053756,), (1387053761,), (1387053767,), (1387053771,), (1387053815,), (1387053836,), (1387053839,), (1387053842,), (1387053856,), (1387053864,), (1387053868,), (1387053901,), (1387053903,), (1387053905,), (1387053908,), (1387053911,), (1387053914,), (1387053926,), (1387053928,), (1387053929,), (1387053932,), (1387053935,), (1387053938,), (1387053962,), (1387053965,), (1387053968,), (1387053971,), (1387054013,), (1387054047,), (1387054049,), (1387054069,), (1387054083,), (1387053999,), (1387054002,), (1387054003,), (1387054006,), (1387054009,), (1387054089,), (1387054091,), (1387054095,), (1387054137,), (1387054180,), (1387054182,), (1387054183,), (1387054201,), (1387054206,), (1387054210,), (1387054220,), (1387054223,), (1387054225,), (1387054229,), (1387054231,), (1387054234,), (1387054262,), (1387054270,), (1387054274,), (1387054277,), (1387054281,), (1387054289,), (1387054379,), (1387054382,), (1387054385,), (1387054420,), (1387054426,), (1387054427,), (1387054429,), (1387054454,), (1387054457,), (1387054459,), (1387054463,), (1387054467,), (1387054478,), (1387054481,), (1387054484,), (1387054487,), (1387054499,), (1387054502,), (1387054504,), (1387054506,), (1387054519,), (1387054521,), (1387054522,), (1387054525,), (1387054528,), (1387054565,), (1387054567,), (1387054569,), (1387054573,), (1387054577,), (1387054595,), (1387054598,), (1387054603,), (1387054609,), (1387054610,), (1387054612,), (1387054617,), (1387054620,), (1387054626,), (1387054628,), (1387054631,), (1387054634,), (1387054635,), (1387054636,), (1387054637,), (1387054638,), (1387054639,), (1387054651,), (1387054656,), (1387054658,), (1387054659,), (1387054660,), (1387054680,), (1387054678,), (1387054721,), (1387054745,), (1387054749,), (1387054752,), (1387054755,), (1387054821,), (1387054825,), (1387054828,), (1387054905,), (1387054916,), (1387054931,), (1387054934,), (1387054949,), (1387054959,), (1387054982,), (1387054985,), (1387054988,), (1387054992,), (1387054995,), (1387054997,), (1387055004,), (1387055006,), (1387055008,), (1387055011,), (1387055014,), (1387055017,), (1387055025,), (1387055028,), (1387055032,), (1387055035,), (1387055064,), (1387055075,), (1387055079,), (1387055129,), (1387055131,), (1387055134,), (1387055137,), (1387055146,), (1387055153,), (1387055155,), (1387055156,), (1387055162,), (1387055164,), (1387055167,), (1387055170,), (1387055174,), (1387055176,), (1387055193,), (1387055196,), (1387055200,), (1387055205,), (1387055210,), (1387055228,), (1387055231,), (1387055234,), (1387055249,), (1387055252,), (1387055255,), (1387055299,), (1387055310,), (1387055312,), (1387055315,), (1387055317,), (1387055335,), (1387055401,), (1387055404,), (1387055405,), (1387055579,), (1387055583,), (1387055585,), (1387055589,), (1387055593,), (1387055598,), (1387055599,), (1387055611,), (1387055613,), (1387055643,), (1387055645,), (1387055647,), (1387055655,), (1387056068,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'01102025': {'nb_upload': 82, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27377191]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1387056068, 1387055655, 1387055647, 1387055645, 1387055643, 1387055613, 1387055611, 1387055599, 1387055598] map_info['map_portfolio_photo'] : {27377191: [1387056068, 1387055655, 1387055647, 1387055645, 1387055643, 1387055613, 1387055611, 1387055599, 1387055598, 1387055593, 1387055589, 1387055585, 1387055583, 1387055579, 1387055405, 1387055404, 1387055401, 1387055335, 1387055317, 1387055315, 1387055312, 1387055310, 1387055299, 1387055255, 1387055252, 1387055249, 1387055234, 1387055231, 1387055228, 1387055210, 1387055205, 1387055200, 1387055196, 1387055193, 1387055176, 1387055174, 1387055170, 1387055167, 1387055164, 1387055162, 1387055156, 1387055155, 1387055153, 1387055146, 1387055137, 1387055134, 1387055131, 1387055129, 1387055079, 1387055075, 1387055064, 1387055035, 1387055032, 1387055028, 1387055025, 1387055017, 1387055014, 1387055011, 1387055008, 1387055006, 1387055004, 1387054997, 1387054995, 1387054992, 1387054988, 1387054985, 1387054982, 1387054959, 1387054949, 1387054934, 1387054931, 1387054916, 1387054905, 1387054828, 1387054825, 1387054821, 1387054755, 1387054752, 1387054749, 1387054745, 1387054721, 1387054678]} final : True mtd_id 4302 list_pids : [1387056068, 1387055655, 1387055647, 1387055645, 1387055643, 1387055613, 1387055611, 1387055599, 1387055598] Looping around the photos to save general results len do output : 1 /27377191Didn't retrieve data . before output type Here is an output not treated by saveGeneral : Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387056068', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055655', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055647', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055645', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055643', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055613', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055611', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055599', None, None, None, None, None, '3798117') ('4302', None, None, None, None, None, None, None, '3798117') ('4302', '27377191', '1387055598', None, None, None, None, None, '3798117') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '27377191', 'None', None, None, None, None, '3798117'), ('4302', '27377191', '1387056068', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055655', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055647', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055645', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055643', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055613', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055611', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055599', None, None, None, None, None, '3798117'), ('4302', '27377191', '1387055598', None, None, None, None, None, '3798117')] time used for this insertion : 0.04747891426086426 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.780022382736206 time spend to save output : 0.04770159721374512 total time spend for step 5 : 1.8277239799499512 caffe_path_current : About to save ! 2 After save, about to update current ! ret : 2 len(input) + len(total_photo_id_missing) : 1 set_done_treatment DELETE from MTRPhoto.mtr_datou_current where id in (3798117) 2.13user 2.55system 0:13.27elapsed 35%CPU (0avgtext+0avgdata 160864maxresident)k 568inputs+10808outputs (31major+64369minor)pagefaults 0swaps