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 : 404646 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 (2766999) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2766999) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22481383 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2766999'] with mtr_portfolio_ids : ['22481383'] and first list_photo_ids : [] new path : /proc/404646/ Name: python3 Umask: 0002 State: R (running) Tgid: 404646 Ngid: 0 Pid: 404646 PPid: 404645 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 404646 NSpid: 404646 NSpgid: 403096 NSsid: 403096 VmPeak: 1107228 kB VmSize: 1107228 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98756 kB VmRSS: 98756 kB RssAnon: 60184 kB RssFile: 38572 kB RssShmem: 0 kB VmData: 865976 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 556 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 46 nonvoluntary_ctxt_switches: 138 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '404646', 'Ngid': '0', 'Pid': '404646', 'PPid': '404645', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '404646', 'NSpid': '404646', 'NSpgid': '403096', 'NSsid': '403096', 'VmPeak': '1107228 kB', 'VmSize': '1107228 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98756 kB', 'VmRSS': '98756 kB', 'RssAnon': '60184 kB', 'RssFile': '38572 kB', 'RssShmem': '0 kB', 'VmData': '865976 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '556 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '46', 'nonvoluntary_ctxt_switches': '138'} ('datou_batch_current', '404646', '1107228', '0', '1107228', '865976', '98756', b'', 'marlene', '2766999') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (22481383) 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 (2766999 ) ) 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 (22481383) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1354092482, 'portfolio_id': 22481383}, {'photo_id': 1354091920, 'portfolio_id': 22481383}, {'photo_id': 1354091836, 'portfolio_id': 22481383}, {'photo_id': 1354091761, 'portfolio_id': 22481383}, {'photo_id': 1354091688, 'portfolio_id': 22481383}, {'photo_id': 1354091609, 'portfolio_id': 22481383}, {'photo_id': 1354091558, 'portfolio_id': 22481383}, {'photo_id': 1354091218, 'portfolio_id': 22481383}, {'photo_id': 1354091193, 'portfolio_id': 22481383}, {'photo_id': 1354091165, 'portfolio_id': 22481383}, {'photo_id': 1354091139, 'portfolio_id': 22481383}, {'photo_id': 1354091108, 'portfolio_id': 22481383}, {'photo_id': 1354091081, 'portfolio_id': 22481383}, {'photo_id': 1354090926, 'portfolio_id': 22481383}, {'photo_id': 1354090918, 'portfolio_id': 22481383}, {'photo_id': 1354090913, 'portfolio_id': 22481383}, {'photo_id': 1354090729, 'portfolio_id': 22481383}, {'photo_id': 1354090724, 'portfolio_id': 22481383}, {'photo_id': 1354090699, 'portfolio_id': 22481383}, {'photo_id': 1354090601, 'portfolio_id': 22481383}, {'photo_id': 1354090572, 'portfolio_id': 22481383}, {'photo_id': 1354090547, 'portfolio_id': 22481383}, {'photo_id': 1354090521, 'portfolio_id': 22481383}, {'photo_id': 1354090507, 'portfolio_id': 22481383}, {'photo_id': 1354090504, 'portfolio_id': 22481383}, {'photo_id': 1354090461, 'portfolio_id': 22481383}, {'photo_id': 1354090451, 'portfolio_id': 22481383}, {'photo_id': 1354090447, 'portfolio_id': 22481383}, {'photo_id': 1354090443, 'portfolio_id': 22481383}, {'photo_id': 1354090440, 'portfolio_id': 22481383}, {'photo_id': 1354090437, 'portfolio_id': 22481383}, {'photo_id': 1354090411, 'portfolio_id': 22481383}, {'photo_id': 1354090410, 'portfolio_id': 22481383}, {'photo_id': 1354090401, 'portfolio_id': 22481383}, {'photo_id': 1354090394, 'portfolio_id': 22481383}, {'photo_id': 1354090331, 'portfolio_id': 22481383}, {'photo_id': 1354090328, 'portfolio_id': 22481383}, {'photo_id': 1354090322, 'portfolio_id': 22481383}, {'photo_id': 1354090311, 'portfolio_id': 22481383}, {'photo_id': 1354090300, 'portfolio_id': 22481383}, {'photo_id': 1354090275, 'portfolio_id': 22481383}, {'photo_id': 1354090274, 'portfolio_id': 22481383}, {'photo_id': 1354090273, 'portfolio_id': 22481383}, {'photo_id': 1354090272, 'portfolio_id': 22481383}, {'photo_id': 1354090270, 'portfolio_id': 22481383}, {'photo_id': 1354090267, 'portfolio_id': 22481383}, {'photo_id': 1354090152, 'portfolio_id': 22481383}, {'photo_id': 1354090150, 'portfolio_id': 22481383}, {'photo_id': 1354090146, 'portfolio_id': 22481383}, {'photo_id': 1354090144, 'portfolio_id': 22481383}, {'photo_id': 1354090100, 'portfolio_id': 22481383}, {'photo_id': 1354090094, 'portfolio_id': 22481383}, {'photo_id': 1354090092, 'portfolio_id': 22481383}, {'photo_id': 1354090087, 'portfolio_id': 22481383}, {'photo_id': 1354090028, 'portfolio_id': 22481383}, {'photo_id': 1354090025, 'portfolio_id': 22481383}, {'photo_id': 1354090023, 'portfolio_id': 22481383}, {'photo_id': 1354090019, 'portfolio_id': 22481383}, {'photo_id': 1354090014, 'portfolio_id': 22481383}, {'photo_id': 1354089980, 'portfolio_id': 22481383}, {'photo_id': 1354089976, 'portfolio_id': 22481383}, {'photo_id': 1354089972, 'portfolio_id': 22481383}, {'photo_id': 1354089965, 'portfolio_id': 22481383}, {'photo_id': 1354089953, 'portfolio_id': 22481383}, {'photo_id': 1354089911, 'portfolio_id': 22481383}, {'photo_id': 1354089908, 'portfolio_id': 22481383}, {'photo_id': 1354089903, 'portfolio_id': 22481383}] map_portfolio_id_photo_id: {22481383: [1354092482, 1354091920, 1354091836, 1354091761, 1354091688, 1354091609, 1354091558, 1354091218, 1354091193, 1354091165, 1354091139, 1354091108, 1354091081, 1354090926, 1354090918, 1354090913, 1354090729, 1354090724, 1354090699, 1354090601, 1354090572, 1354090547, 1354090521, 1354090507, 1354090504, 1354090461, 1354090451, 1354090447, 1354090443, 1354090440, 1354090437, 1354090411, 1354090410, 1354090401, 1354090394, 1354090331, 1354090328, 1354090322, 1354090311, 1354090300, 1354090275, 1354090274, 1354090273, 1354090272, 1354090270, 1354090267, 1354090152, 1354090150, 1354090146, 1354090144, 1354090100, 1354090094, 1354090092, 1354090087, 1354090028, 1354090025, 1354090023, 1354090019, 1354090014, 1354089980, 1354089976, 1354089972, 1354089965, 1354089953, 1354089911, 1354089908, 1354089903]} ##### 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.016242504119873047 #### 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 Tue Apr 29 02:32:29 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 (22481383) 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 : 22481383 get user id for portfolio 22481383 get sub ptf for main ptf 22481383, type 3726 and hashtags ['environnement', 'metal', 'plastique', 'flou', 'cartonnette', 'kraft', 'mal_croppe', 'Carton_brun', 'Carton_gris', 'autre_refus', 'Teint_Dans_La_Masse', 'papier'] 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`=22481383 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','metal','plastique','flou','cartonnette','kraft','mal_croppe','Carton_brun','Carton_gris','autre_refus','Teint_Dans_La_Masse','papier')) 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`=22481383 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','metal','plastique','flou','cartonnette','kraft','mal_croppe','Carton_brun','Carton_gris','autre_refus','Teint_Dans_La_Masse','papier')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 22481383, 'sub_port_id': 22481384, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14922991, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 56)}, 'Carton_gris': {'main_port_id': 22481383, 'sub_port_id': 22481385, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14922992, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 56)}, 'environnement': {'main_port_id': 22481383, 'sub_port_id': 22481386, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14922993, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 56)}, 'autre_refus': {'main_port_id': 22481383, 'sub_port_id': 22481387, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14922994, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 56)}, 'kraft': {'main_port_id': 22481383, 'sub_port_id': 22481388, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14922995, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 56)}, 'metal': {'main_port_id': 22481383, 'sub_port_id': 22481389, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14922996, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 56)}, 'Teint_Dans_La_Masse': {'main_port_id': 22481383, 'sub_port_id': 22481390, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14922997, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 56)}, 'papier': {'main_port_id': 22481383, 'sub_port_id': 22481391, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14922998, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 56)}, 'flou': {'main_port_id': 22481383, 'sub_port_id': 22481392, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14922999, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 56)}, 'cartonnette': {'main_port_id': 22481383, 'sub_port_id': 22481393, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14923000, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 56)}, 'plastique': {'main_port_id': 22481383, 'sub_port_id': 22481394, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14923001, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 56)}, 'Carton_brun': {'main_port_id': 22481383, 'sub_port_id': 22481395, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14923002, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 56)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22481384 , 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=22481383 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 (22481384) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22481383) result : ((1354089903,), (1354089908,), (1354089911,), (1354089953,), (1354089965,), (1354089972,), (1354089976,), (1354089980,), (1354090014,), (1354090019,), (1354090023,), (1354090025,), (1354090028,), (1354090087,), (1354090092,), (1354090094,), (1354090100,), (1354090144,), (1354090146,), (1354090150,), (1354090152,), (1354090267,), (1354090270,), (1354090272,), (1354090273,), (1354090274,), (1354090275,), (1354090300,), (1354090311,), (1354090322,), (1354090328,), (1354090331,), (1354090394,), (1354090401,), (1354090410,), (1354090411,), (1354090437,), (1354090440,), (1354090443,), (1354090447,), (1354090451,), (1354090461,), (1354090504,), (1354090507,), (1354090521,), (1354090547,), (1354090572,), (1354090601,), (1354090699,), (1354090724,), (1354090729,), (1354090913,), (1354090918,), (1354090926,), (1354091081,), (1354091108,), (1354091139,), (1354091165,), (1354091193,), (1354091218,), (1354091558,), (1354091609,), (1354091688,), (1354091761,), (1354091836,), (1354091920,), (1354092482,)) 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 (1354090300,1354090100) 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 22481385 , 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=22481383 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 (22481385) result : ((1354090614,), (1354090792,), (1354090793,), (1354091006,), (1354091007,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22481383) result : ((1354089903,), (1354089908,), (1354089911,), (1354089953,), (1354089965,), (1354089972,), (1354089976,), (1354089980,), (1354090014,), (1354090019,), (1354090023,), (1354090025,), (1354090028,), (1354090087,), (1354090092,), (1354090094,), (1354090100,), (1354090144,), (1354090146,), (1354090150,), (1354090152,), (1354090267,), (1354090270,), (1354090272,), (1354090273,), (1354090274,), (1354090275,), (1354090300,), (1354090311,), (1354090322,), (1354090328,), (1354090331,), (1354090394,), (1354090401,), (1354090410,), (1354090411,), (1354090437,), (1354090440,), (1354090443,), (1354090447,), (1354090451,), (1354090461,), (1354090504,), (1354090507,), (1354090521,), (1354090547,), (1354090572,), (1354090601,), (1354090699,), (1354090724,), (1354090729,), (1354090913,), (1354090918,), (1354090926,), (1354091081,), (1354091108,), (1354091139,), (1354091165,), (1354091193,), (1354091218,), (1354091558,), (1354091609,), (1354091688,), (1354091761,), (1354091836,), (1354091920,), (1354092482,)) 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 (1354090300,1354090100) 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 22481386 , 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=22481383 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 (22481386) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22481383) result : ((1354089903,), (1354089908,), (1354089911,), (1354089953,), (1354089965,), (1354089972,), (1354089976,), (1354089980,), (1354090014,), (1354090019,), (1354090023,), (1354090025,), (1354090028,), (1354090087,), (1354090092,), (1354090094,), (1354090100,), (1354090144,), (1354090146,), (1354090150,), (1354090152,), (1354090267,), (1354090270,), (1354090272,), (1354090273,), (1354090274,), (1354090275,), (1354090300,), (1354090311,), (1354090322,), (1354090328,), (1354090331,), (1354090394,), (1354090401,), (1354090410,), (1354090411,), (1354090437,), (1354090440,), (1354090443,), (1354090447,), (1354090451,), (1354090461,), (1354090504,), (1354090507,), (1354090521,), (1354090547,), (1354090572,), (1354090601,), (1354090699,), (1354090724,), (1354090729,), (1354090913,), (1354090918,), (1354090926,), (1354091081,), (1354091108,), (1354091139,), (1354091165,), (1354091193,), (1354091218,), (1354091558,), (1354091609,), (1354091688,), (1354091761,), (1354091836,), (1354091920,), (1354092482,)) 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 (1354090300,1354090100) 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 22481387 , 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=22481383 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 (22481387) result : ((1354093092,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22481383) result : ((1354089903,), (1354089908,), (1354089911,), (1354089953,), (1354089965,), (1354089972,), (1354089976,), (1354089980,), (1354090014,), (1354090019,), (1354090023,), (1354090025,), (1354090028,), (1354090087,), (1354090092,), (1354090094,), (1354090100,), (1354090144,), (1354090146,), (1354090150,), (1354090152,), (1354090267,), (1354090270,), (1354090272,), (1354090273,), (1354090274,), (1354090275,), (1354090300,), (1354090311,), (1354090322,), (1354090328,), (1354090331,), (1354090394,), (1354090401,), (1354090410,), (1354090411,), (1354090437,), (1354090440,), (1354090443,), (1354090447,), (1354090451,), (1354090461,), (1354090504,), (1354090507,), (1354090521,), (1354090547,), (1354090572,), (1354090601,), (1354090699,), (1354090724,), (1354090729,), (1354090913,), (1354090918,), (1354090926,), (1354091081,), (1354091108,), (1354091139,), (1354091165,), (1354091193,), (1354091218,), (1354091558,), (1354091609,), (1354091688,), (1354091761,), (1354091836,), (1354091920,), (1354092482,)) 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 (1354090300,1354090100) 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 22481388 , 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=22481383 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 (22481388) result : ((1354090652,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22481383) result : ((1354089903,), (1354089908,), (1354089911,), (1354089953,), (1354089965,), (1354089972,), (1354089976,), (1354089980,), (1354090014,), (1354090019,), (1354090023,), (1354090025,), (1354090028,), (1354090087,), (1354090092,), (1354090094,), (1354090100,), (1354090144,), (1354090146,), (1354090150,), (1354090152,), (1354090267,), (1354090270,), (1354090272,), (1354090273,), (1354090274,), (1354090275,), (1354090300,), (1354090311,), (1354090322,), (1354090328,), (1354090331,), (1354090394,), (1354090401,), (1354090410,), (1354090411,), (1354090437,), (1354090440,), (1354090443,), (1354090447,), (1354090451,), (1354090461,), (1354090504,), (1354090507,), (1354090521,), (1354090547,), (1354090572,), (1354090601,), (1354090699,), (1354090724,), (1354090729,), (1354090913,), (1354090918,), (1354090926,), (1354091081,), (1354091108,), (1354091139,), (1354091165,), (1354091193,), (1354091218,), (1354091558,), (1354091609,), (1354091688,), (1354091761,), (1354091836,), (1354091920,), (1354092482,)) 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 (1354090300,1354090100) 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 22481389 , 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=22481383 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 (22481389) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22481383) result : ((1354089903,), (1354089908,), (1354089911,), (1354089953,), (1354089965,), (1354089972,), (1354089976,), (1354089980,), (1354090014,), (1354090019,), (1354090023,), (1354090025,), (1354090028,), (1354090087,), (1354090092,), (1354090094,), (1354090100,), (1354090144,), (1354090146,), (1354090150,), (1354090152,), (1354090267,), (1354090270,), (1354090272,), (1354090273,), (1354090274,), (1354090275,), (1354090300,), (1354090311,), (1354090322,), (1354090328,), (1354090331,), (1354090394,), (1354090401,), (1354090410,), (1354090411,), (1354090437,), (1354090440,), (1354090443,), (1354090447,), (1354090451,), (1354090461,), (1354090504,), (1354090507,), (1354090521,), (1354090547,), (1354090572,), (1354090601,), (1354090699,), (1354090724,), (1354090729,), (1354090913,), (1354090918,), (1354090926,), (1354091081,), (1354091108,), (1354091139,), (1354091165,), (1354091193,), (1354091218,), (1354091558,), (1354091609,), (1354091688,), (1354091761,), (1354091836,), (1354091920,), (1354092482,)) 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 (1354090300,1354090100) 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 22481390 , 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=22481383 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 (22481390) result : ((1354090497,), (1354090617,), (1354090618,), (1354090619,), (1354090620,), (1354090752,), (1354090753,), (1354090754,), (1354090755,), (1354090756,), (1354090757,), (1354090758,), (1354090760,), (1354090761,), (1354090762,), (1354090787,), (1354090788,), (1354090789,), (1354091002,), (1354091003,), (1354092824,), (1354093086,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22481383) result : ((1354089903,), (1354089908,), (1354089911,), (1354089953,), (1354089965,), (1354089972,), (1354089976,), (1354089980,), (1354090014,), (1354090019,), (1354090023,), (1354090025,), (1354090028,), (1354090087,), (1354090092,), (1354090094,), (1354090100,), (1354090144,), (1354090146,), (1354090150,), (1354090152,), (1354090267,), (1354090270,), (1354090272,), (1354090273,), (1354090274,), (1354090275,), (1354090300,), (1354090311,), (1354090322,), (1354090328,), (1354090331,), (1354090394,), (1354090401,), (1354090410,), (1354090411,), (1354090437,), (1354090440,), (1354090443,), (1354090447,), (1354090451,), (1354090461,), (1354090504,), (1354090507,), (1354090521,), (1354090547,), (1354090572,), (1354090601,), (1354090699,), (1354090724,), (1354090729,), (1354090913,), (1354090918,), (1354090926,), (1354091081,), (1354091108,), (1354091139,), (1354091165,), (1354091193,), (1354091218,), (1354091558,), (1354091609,), (1354091688,), (1354091761,), (1354091836,), (1354091920,), (1354092482,)) 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 (1354090300,1354090100) 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 22481391 , 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=22481383 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 (22481391) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22481383) result : ((1354089903,), (1354089908,), (1354089911,), (1354089953,), (1354089965,), (1354089972,), (1354089976,), (1354089980,), (1354090014,), (1354090019,), (1354090023,), (1354090025,), (1354090028,), (1354090087,), (1354090092,), (1354090094,), (1354090100,), (1354090144,), (1354090146,), (1354090150,), (1354090152,), (1354090267,), (1354090270,), (1354090272,), (1354090273,), (1354090274,), (1354090275,), (1354090300,), (1354090311,), (1354090322,), (1354090328,), (1354090331,), (1354090394,), (1354090401,), (1354090410,), (1354090411,), (1354090437,), (1354090440,), (1354090443,), (1354090447,), (1354090451,), (1354090461,), (1354090504,), (1354090507,), (1354090521,), (1354090547,), (1354090572,), (1354090601,), (1354090699,), (1354090724,), (1354090729,), (1354090913,), (1354090918,), (1354090926,), (1354091081,), (1354091108,), (1354091139,), (1354091165,), (1354091193,), (1354091218,), (1354091558,), (1354091609,), (1354091688,), (1354091761,), (1354091836,), (1354091920,), (1354092482,)) 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 (1354090300,1354090100) 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 22481392 , 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=22481383 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 (22481392) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22481383) result : ((1354089903,), (1354089908,), (1354089911,), (1354089953,), (1354089965,), (1354089972,), (1354089976,), (1354089980,), (1354090014,), (1354090019,), (1354090023,), (1354090025,), (1354090028,), (1354090087,), (1354090092,), (1354090094,), (1354090100,), (1354090144,), (1354090146,), (1354090150,), (1354090152,), (1354090267,), (1354090270,), (1354090272,), (1354090273,), (1354090274,), (1354090275,), (1354090300,), (1354090311,), (1354090322,), (1354090328,), (1354090331,), (1354090394,), (1354090401,), (1354090410,), (1354090411,), (1354090437,), (1354090440,), (1354090443,), (1354090447,), (1354090451,), (1354090461,), (1354090504,), (1354090507,), (1354090521,), (1354090547,), (1354090572,), (1354090601,), (1354090699,), (1354090724,), (1354090729,), (1354090913,), (1354090918,), (1354090926,), (1354091081,), (1354091108,), (1354091139,), (1354091165,), (1354091193,), (1354091218,), (1354091558,), (1354091609,), (1354091688,), (1354091761,), (1354091836,), (1354091920,), (1354092482,)) 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 (1354090300,1354090100) 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 22481393 , 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=22481383 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 (22481393) result : ((1354090621,), (1354090764,), (1354090766,), (1354091009,), (1354091010,), (1354091011,), (1354093095,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22481383) result : ((1354089903,), (1354089908,), (1354089911,), (1354089953,), (1354089965,), (1354089972,), (1354089976,), (1354089980,), (1354090014,), (1354090019,), (1354090023,), (1354090025,), (1354090028,), (1354090087,), (1354090092,), (1354090094,), (1354090100,), (1354090144,), (1354090146,), (1354090150,), (1354090152,), (1354090267,), (1354090270,), (1354090272,), (1354090273,), (1354090274,), (1354090275,), (1354090300,), (1354090311,), (1354090322,), (1354090328,), (1354090331,), (1354090394,), (1354090401,), (1354090410,), (1354090411,), (1354090437,), (1354090440,), (1354090443,), (1354090447,), (1354090451,), (1354090461,), (1354090504,), (1354090507,), (1354090521,), (1354090547,), (1354090572,), (1354090601,), (1354090699,), (1354090724,), (1354090729,), (1354090913,), (1354090918,), (1354090926,), (1354091081,), (1354091108,), (1354091139,), (1354091165,), (1354091193,), (1354091218,), (1354091558,), (1354091609,), (1354091688,), (1354091761,), (1354091836,), (1354091920,), (1354092482,)) 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 (1354090300,1354090100) 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 22481394 , 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=22481383 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 (22481394) result : ((1354090644,), (1354090645,), (1354090646,), (1354090806,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22481383) result : ((1354089903,), (1354089908,), (1354089911,), (1354089953,), (1354089965,), (1354089972,), (1354089976,), (1354089980,), (1354090014,), (1354090019,), (1354090023,), (1354090025,), (1354090028,), (1354090087,), (1354090092,), (1354090094,), (1354090100,), (1354090144,), (1354090146,), (1354090150,), (1354090152,), (1354090267,), (1354090270,), (1354090272,), (1354090273,), (1354090274,), (1354090275,), (1354090300,), (1354090311,), (1354090322,), (1354090328,), (1354090331,), (1354090394,), (1354090401,), (1354090410,), (1354090411,), (1354090437,), (1354090440,), (1354090443,), (1354090447,), (1354090451,), (1354090461,), (1354090504,), (1354090507,), (1354090521,), (1354090547,), (1354090572,), (1354090601,), (1354090699,), (1354090724,), (1354090729,), (1354090913,), (1354090918,), (1354090926,), (1354091081,), (1354091108,), (1354091139,), (1354091165,), (1354091193,), (1354091218,), (1354091558,), (1354091609,), (1354091688,), (1354091761,), (1354091836,), (1354091920,), (1354092482,)) 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 (1354090300,1354090100) 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 22481395 , 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=22481383 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 (22481395) result : ((1354090498,), (1354090630,), (1354090631,), (1354090633,), (1354090634,), (1354090774,), (1354090796,), (1354090797,), (1354090798,), (1354090799,), (1354090800,), (1354091013,), (1354091014,), (1354091015,), (1354091016,), (1354092829,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22481383) result : ((1354089903,), (1354089908,), (1354089911,), (1354089953,), (1354089965,), (1354089972,), (1354089976,), (1354089980,), (1354090014,), (1354090019,), (1354090023,), (1354090025,), (1354090028,), (1354090087,), (1354090092,), (1354090094,), (1354090100,), (1354090144,), (1354090146,), (1354090150,), (1354090152,), (1354090267,), (1354090270,), (1354090272,), (1354090273,), (1354090274,), (1354090275,), (1354090300,), (1354090311,), (1354090322,), (1354090328,), (1354090331,), (1354090394,), (1354090401,), (1354090410,), (1354090411,), (1354090437,), (1354090440,), (1354090443,), (1354090447,), (1354090451,), (1354090461,), (1354090504,), (1354090507,), (1354090521,), (1354090547,), (1354090572,), (1354090601,), (1354090699,), (1354090724,), (1354090729,), (1354090913,), (1354090918,), (1354090926,), (1354091081,), (1354091108,), (1354091139,), (1354091165,), (1354091193,), (1354091218,), (1354091558,), (1354091609,), (1354091688,), (1354091761,), (1354091836,), (1354091920,), (1354092482,)) 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 (1354090300,1354090100) 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`=22481383 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','metal','plastique','flou','cartonnette','kraft','mal_croppe','Carton_brun','Carton_gris','autre_refus','Teint_Dans_La_Masse','papier')) 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`=22481383 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','metal','plastique','flou','cartonnette','kraft','mal_croppe','Carton_brun','Carton_gris','autre_refus','Teint_Dans_La_Masse','papier')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 22481383, 'sub_port_id': 22481396, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14923003, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 57)}, 'Carton_gris': {'main_port_id': 22481383, 'sub_port_id': 22481397, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14923004, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 57)}, 'environnement': {'main_port_id': 22481383, 'sub_port_id': 22481398, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14923005, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 57)}, 'autre_refus': {'main_port_id': 22481383, 'sub_port_id': 22481399, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14923006, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 57)}, 'kraft': {'main_port_id': 22481383, 'sub_port_id': 22481400, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14923007, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 57)}, 'metal': {'main_port_id': 22481383, 'sub_port_id': 22481401, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14923008, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 57)}, 'Teint_Dans_La_Masse': {'main_port_id': 22481383, 'sub_port_id': 22481402, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14923009, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 57)}, 'papier': {'main_port_id': 22481383, 'sub_port_id': 22481403, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14923010, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 57)}, 'flou': {'main_port_id': 22481383, 'sub_port_id': 22481404, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14923011, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 57)}, 'cartonnette': {'main_port_id': 22481383, 'sub_port_id': 22481405, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14923012, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 57)}, 'plastique': {'main_port_id': 22481383, 'sub_port_id': 22481406, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14923013, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 57)}, 'Carton_brun': {'main_port_id': 22481383, 'sub_port_id': 22481407, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14923014, 'last_updated_at': datetime.datetime(2025, 4, 29, 2, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 29, 2, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 29, 2, 18, 57)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22481396,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22481384 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22481397,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22481385 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22481398,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22481386 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22481399,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22481387 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22481400,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22481388 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22481401,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22481389 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22481402,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22481390 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22481403,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22481391 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22481404,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22481392 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22481405,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22481393 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22481406,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22481394 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22481407,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22481395 lien utilise dans velours : https://www.fotonower.com/velours/22481396,22481397,22481398,22481399,22481400,22481401,22481402,22481403,22481404,22481405,22481406,22481407?tags=mal_croppe,Carton_gris,environnement,autre_refus,kraft,metal,Teint_Dans_La_Masse,papier,flou,cartonnette,plastique,Carton_brun After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22481383]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1354092482, 1354091920, 1354091836, 1354091761, 1354091688, 1354091609, 1354091558, 1354091218, 1354091193, 1354091165, 1354091139, 1354091108, 1354091081] map_info['map_portfolio_photo'] : {22481383: [1354092482, 1354091920, 1354091836, 1354091761, 1354091688, 1354091609, 1354091558, 1354091218, 1354091193, 1354091165, 1354091139, 1354091108, 1354091081, 1354090926, 1354090918, 1354090913, 1354090729, 1354090724, 1354090699, 1354090601, 1354090572, 1354090547, 1354090521, 1354090507, 1354090504, 1354090461, 1354090451, 1354090447, 1354090443, 1354090440, 1354090437, 1354090411, 1354090410, 1354090401, 1354090394, 1354090331, 1354090328, 1354090322, 1354090311, 1354090300, 1354090275, 1354090274, 1354090273, 1354090272, 1354090270, 1354090267, 1354090152, 1354090150, 1354090146, 1354090144, 1354090100, 1354090094, 1354090092, 1354090087, 1354090028, 1354090025, 1354090023, 1354090019, 1354090014, 1354089980, 1354089976, 1354089972, 1354089965, 1354089953, 1354089911, 1354089908, 1354089903]} final : False mtd_id 4302 list_pids : [1354092482, 1354091920, 1354091836, 1354091761, 1354091688, 1354091609, 1354091558, 1354091218, 1354091193, 1354091165, 1354091139, 1354091108, 1354091081] Looping around the photos to save general results len do output : 1 /22481383. 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, '2766999') ('4302', '22481383', '1354092482', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091920', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091836', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091761', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091688', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091609', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091558', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091218', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091193', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091165', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091139', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091108', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091081', None, None, None, None, None, '2766999') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 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, '22481383', "{'mal_croppe': 22481384, 'Carton_gris': 22481385, 'environnement': 22481386, 'autre_refus': 22481387, 'kraft': 22481388, 'metal': 22481389, 'Teint_Dans_La_Masse': 22481390, 'papier': 22481391, 'flou': 22481392, 'cartonnette': 22481393, 'plastique': 22481394, 'Carton_brun': 22481395}", None, None, None, None, '2766999'), ('4302', '22481383', '1354092482', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091920', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091836', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091761', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091688', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091609', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091558', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091218', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091193', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091165', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091139', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091108', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091081', None, None, None, None, None, '2766999')] time used for this insertion : 0.017574548721313477 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.48322534561157227 time spend to save output : 0.0179901123046875 total time spend for step 1 : 0.5012154579162598 step2:final Tue Apr 29 02:32:30 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 (22481383) 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 22481383 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1354089911,1354089908,1354089903,1354089980,1354089976,1354089972,1354089965,1354089953,1354090028,1354090025,1354090023,1354090019,1354090014,1354090100,1354090094,1354090092,1354090087,1354090152,1354090150,1354090146,1354090144,1354090275,1354090274,1354090273,1354090272,1354090270,1354090267,1354090331,1354090328,1354090322,1354090311,1354090300,1354090411,1354090410,1354090401,1354090394,1354090461,1354090451,1354090447,1354090443,1354090440,1354090437,1354090601,1354090572,1354090547,1354090521,1354090507,1354090504,1354090729,1354090724,1354090699,1354090926,1354090918,1354090913,1354091218,1354091193,1354091165,1354091139,1354091108,1354091081,1354091920,1354091836,1354091761,1354091688,1354091609,1354091558,1354092482); 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([22481383]) Inside saveOutput : final : False verbose : True original output for save of step final : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ('0.05665771005721219',), 1354091108: ('0.05665771005721219',), 1354091081: ('0.05665771005721219',)} new output for save of step final : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ('0.05665771005721219',), 1354091108: ('0.05665771005721219',), 1354091081: ('0.05665771005721219',)} [1354092482, 1354091920, 1354091836, 1354091761, 1354091688, 1354091609, 1354091558, 1354091218, 1354091193, 1354091165, 1354091139, 1354091108, 1354091081] map_info['map_portfolio_photo'] : {22481383: [1354092482, 1354091920, 1354091836, 1354091761, 1354091688, 1354091609, 1354091558, 1354091218, 1354091193, 1354091165, 1354091139, 1354091108, 1354091081, 1354090926, 1354090918, 1354090913, 1354090729, 1354090724, 1354090699, 1354090601, 1354090572, 1354090547, 1354090521, 1354090507, 1354090504, 1354090461, 1354090451, 1354090447, 1354090443, 1354090440, 1354090437, 1354090411, 1354090410, 1354090401, 1354090394, 1354090331, 1354090328, 1354090322, 1354090311, 1354090300, 1354090275, 1354090274, 1354090273, 1354090272, 1354090270, 1354090267, 1354090152, 1354090150, 1354090146, 1354090144, 1354090100, 1354090094, 1354090092, 1354090087, 1354090028, 1354090025, 1354090023, 1354090019, 1354090014, 1354089980, 1354089976, 1354089972, 1354089965, 1354089953, 1354089911, 1354089908, 1354089903]} final : False mtd_id 4302 list_pids : [1354092482, 1354091920, 1354091836, 1354091761, 1354091688, 1354091609, 1354091558, 1354091218, 1354091193, 1354091165, 1354091139, 1354091108, 1354091081] Looping around the photos to save general results len do output : 13 /1354092482.Didn't retrieve data . /1354091920.Didn't retrieve data . /1354091836.Didn't retrieve data . /1354091761.Didn't retrieve data . /1354091688.Didn't retrieve data . /1354091609.Didn't retrieve data . /1354091558.Didn't retrieve data . /1354091218.Didn't retrieve data . /1354091193.Didn't retrieve data . /1354091165.Didn't retrieve data . /1354091139.Didn't retrieve data . /1354091108.Didn't retrieve data . /1354091081.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, '2766999') ('4302', '22481383', '1354092482', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091920', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091836', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091761', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091688', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091609', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091558', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091218', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091193', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091165', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091139', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091108', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091081', None, None, None, None, None, '2766999') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 39 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', '22481383', '1354092482', '0.05665771005721219', None, None, None, None, '2766999'), ('4302', '22481383', '1354091920', '0.05665771005721219', None, None, None, None, '2766999'), ('4302', '22481383', '1354091836', '0.05665771005721219', None, None, None, None, '2766999'), ('4302', '22481383', '1354091761', '0.05665771005721219', None, None, None, None, '2766999'), ('4302', '22481383', '1354091688', '0.05665771005721219', None, None, None, None, '2766999'), ('4302', '22481383', '1354091609', '0.05665771005721219', None, None, None, None, '2766999'), ('4302', '22481383', '1354091558', '0.05665771005721219', None, None, None, None, '2766999'), ('4302', '22481383', '1354091218', '0.05665771005721219', None, None, None, None, '2766999'), ('4302', '22481383', '1354091193', '0.05665771005721219', None, None, None, None, '2766999'), ('4302', '22481383', '1354091165', '0.05665771005721219', None, None, None, None, '2766999'), ('4302', '22481383', '1354091139', '0.05665771005721219', None, None, None, None, '2766999'), ('4302', '22481383', '1354091108', '0.05665771005721219', None, None, None, None, '2766999'), ('4302', '22481383', '1354091081', '0.05665771005721219', None, None, None, None, '2766999')] time used for this insertion : 0.014468193054199219 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06695437431335449 time spend to save output : 0.015128374099731445 total time spend for step 2 : 0.08208274841308594 step3:velours_tree Tue Apr 29 02:32:30 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 : {22481383: [{'mal_croppe': 22481384, 'Carton_gris': 22481385, 'environnement': 22481386, 'autre_refus': 22481387, 'kraft': 22481388, 'metal': 22481389, 'Teint_Dans_La_Masse': 22481390, 'papier': 22481391, 'flou': 22481392, 'cartonnette': 22481393, 'plastique': 22481394, 'Carton_brun': 22481395}]} input_args_next_step : {22481383: ()} output_args : {22481383: [{'mal_croppe': 22481384, 'Carton_gris': 22481385, 'environnement': 22481386, 'autre_refus': 22481387, 'kraft': 22481388, 'metal': 22481389, 'Teint_Dans_La_Masse': 22481390, 'papier': 22481391, 'flou': 22481392, 'cartonnette': 22481393, 'plastique': 22481394, 'Carton_brun': 22481395}]} args : 22481383 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 : ({'mal_croppe': 22481384, 'Carton_gris': 22481385, 'environnement': 22481386, 'autre_refus': 22481387, 'kraft': 22481388, 'metal': 22481389, 'Teint_Dans_La_Masse': 22481390, 'papier': 22481391, 'flou': 22481392, 'cartonnette': 22481393, 'plastique': 22481394, 'Carton_brun': 22481395},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22481383) 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([22481383]) 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.3315927982330322 time spend to save output : 0.0001010894775390625 total time spend for step 3 : 0.3316938877105713 step4:send_mail_cod Tue Apr 29 02:32:30 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 : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ('0.05665771005721219',), 1354091108: ('0.05665771005721219',), 1354091081: ('0.05665771005721219',)} input_args_next_step : {1354092482: ()} output_args : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ('0.05665771005721219',), 1354091108: ('0.05665771005721219',), 1354091081: ('0.05665771005721219',)} args : 1354092482 depend.output_id : 0 input_args_next_step : {1354092482: ('0.05665771005721219',), 1354091920: ()} output_args : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ('0.05665771005721219',), 1354091108: ('0.05665771005721219',), 1354091081: ('0.05665771005721219',)} args : 1354091920 depend.output_id : 0 input_args_next_step : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ()} output_args : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ('0.05665771005721219',), 1354091108: ('0.05665771005721219',), 1354091081: ('0.05665771005721219',)} args : 1354091836 depend.output_id : 0 input_args_next_step : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ()} output_args : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ('0.05665771005721219',), 1354091108: ('0.05665771005721219',), 1354091081: ('0.05665771005721219',)} args : 1354091761 depend.output_id : 0 input_args_next_step : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ()} output_args : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ('0.05665771005721219',), 1354091108: ('0.05665771005721219',), 1354091081: ('0.05665771005721219',)} args : 1354091688 depend.output_id : 0 input_args_next_step : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ()} output_args : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ('0.05665771005721219',), 1354091108: ('0.05665771005721219',), 1354091081: ('0.05665771005721219',)} args : 1354091609 depend.output_id : 0 input_args_next_step : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ()} output_args : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ('0.05665771005721219',), 1354091108: ('0.05665771005721219',), 1354091081: ('0.05665771005721219',)} args : 1354091558 depend.output_id : 0 input_args_next_step : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ()} output_args : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ('0.05665771005721219',), 1354091108: ('0.05665771005721219',), 1354091081: ('0.05665771005721219',)} args : 1354091218 depend.output_id : 0 input_args_next_step : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ()} output_args : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ('0.05665771005721219',), 1354091108: ('0.05665771005721219',), 1354091081: ('0.05665771005721219',)} args : 1354091193 depend.output_id : 0 input_args_next_step : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ()} output_args : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ('0.05665771005721219',), 1354091108: ('0.05665771005721219',), 1354091081: ('0.05665771005721219',)} args : 1354091165 depend.output_id : 0 input_args_next_step : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ()} output_args : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ('0.05665771005721219',), 1354091108: ('0.05665771005721219',), 1354091081: ('0.05665771005721219',)} args : 1354091139 depend.output_id : 0 input_args_next_step : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ('0.05665771005721219',), 1354091108: ()} output_args : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ('0.05665771005721219',), 1354091108: ('0.05665771005721219',), 1354091081: ('0.05665771005721219',)} args : 1354091108 depend.output_id : 0 input_args_next_step : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ('0.05665771005721219',), 1354091108: ('0.05665771005721219',), 1354091081: ()} output_args : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ('0.05665771005721219',), 1354091108: ('0.05665771005721219',), 1354091081: ('0.05665771005721219',)} args : 1354091081 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 : {22481383: [{'mal_croppe': 22481384, 'Carton_gris': 22481385, 'environnement': 22481386, 'autre_refus': 22481387, 'kraft': 22481388, 'metal': 22481389, 'Teint_Dans_La_Masse': 22481390, 'papier': 22481391, 'flou': 22481392, 'cartonnette': 22481393, 'plastique': 22481394, 'Carton_brun': 22481395}]} input_args_next_step : {1354092482: ('0.05665771005721219',), 1354091920: ('0.05665771005721219',), 1354091836: ('0.05665771005721219',), 1354091761: ('0.05665771005721219',), 1354091688: ('0.05665771005721219',), 1354091609: ('0.05665771005721219',), 1354091558: ('0.05665771005721219',), 1354091218: ('0.05665771005721219',), 1354091193: ('0.05665771005721219',), 1354091165: ('0.05665771005721219',), 1354091139: ('0.05665771005721219',), 1354091108: ('0.05665771005721219',), 1354091081: ('0.05665771005721219',), 22481383: ()} output_args : {22481383: [{'mal_croppe': 22481384, 'Carton_gris': 22481385, 'environnement': 22481386, 'autre_refus': 22481387, 'kraft': 22481388, 'metal': 22481389, 'Teint_Dans_La_Masse': 22481390, 'papier': 22481391, 'flou': 22481392, 'cartonnette': 22481393, 'plastique': 22481394, 'Carton_brun': 22481395}]} args : 22481383 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 :14, first value : ('0.05665771005721219',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22481383) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1354092482,1354091920,1354091836,1354091761,1354091688,1354091609,1354091558,1354091218,1354091193,1354091165,1354091139,1354091108,1354091081) Found this number of photos: 13 ##### Call download_photos : nb_thread : 5 begin to download photo : 1354091081 begin to download photo : 1354091165 begin to download photo : 1354091558 begin to download photo : 1354091761 begin to download photo : 1354092482 download finish for photo 1354091558 begin to download photo : 1354091609 download finish for photo 1354092482 download finish for photo 1354091081 begin to download photo : 1354091108 download finish for photo 1354091761 begin to download photo : 1354091836 download finish for photo 1354091165 begin to download photo : 1354091193 download finish for photo 1354091609 begin to download photo : 1354091688 download finish for photo 1354091836 begin to download photo : 1354091920 download finish for photo 1354091193 begin to download photo : 1354091218 download finish for photo 1354091108 begin to download photo : 1354091139 download finish for photo 1354091688 download finish for photo 1354091920 download finish for photo 1354091218 download finish for photo 1354091139 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette224813841745886751/ length of list_filenames : 13 ; length of list_pids : 13 ; length of list_args : 13 results_Auto_P22481383_29-04-2025_02_32_31.pdf 22481384 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22481384 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224813841745886751 22481387 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22481387 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1354093092: '1745886671_3854010_1354090724_ba7f4164220e8f83fb80aef25829c3e3_rle_crop_3772027542_0.png'} change filename to text .imagette224813871745886751/ imagette224813871745886751/1745886671_3854010_1354090724_ba7f4164220e8f83fb80aef25829c3e3_rle_crop_3772027542_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/c72184fc581da5966334b29d7c58c7b8_20416690.png imagette224813871745886751 22481388 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22481388 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1354090652: '1745886303_3850288_1354090267_adca20dfc151c5106094913c4c3a5124_rle_crop_3772015012_0.png'} change filename to text .imagette224813881745886751/ imagette224813881745886751/1745886303_3850288_1354090267_adca20dfc151c5106094913c4c3a5124_rle_crop_3772015012_0.png.png imagette224813891745886751/ imagette224813921745886751/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/e351cfcb70f719a24eab953899f2c8a0_28563464.png imagette224813881745886751 22481389 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22481389 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224813891745886751 22481392 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22481392 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224813921745886751 22481393 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22481393 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1354090621: '1745886303_3850288_1354090270_1925000f15e0ed4731865fb188c9240f_rle_crop_3772014994_0.png', 1354090764: '1745886348_3619125_1354090025_060ca1c38d8df12bc0963cc43b1d93d4_rle_crop_3772015262_0.png', 1354090766: '1745886348_3619125_1354090014_aedbd69d43e21fbae5079fa48118dee4_rle_crop_3772015316_0.png', 1354091009: '1745886431_3851658_1354090028_a6d0448a30382cfc8e4dd1df8c8baf94_rle_crop_3772024702_0.png', 1354091010: '1745886431_3851658_1354089976_60e2241462fc715128a8b06c938cf081_rle_crop_3772024927_0.png', 1354091011: '1745886431_3851658_1354089972_e687fc30e211f06a41cf90553de15d84_rle_crop_3772025155_0.png', 1354093095: '1745886671_3854010_1354090724_ba7f4164220e8f83fb80aef25829c3e3_rle_crop_3772027539_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/d7dee05411b51dc697f338c9aa81edd0_38390587.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/a18fbf1935ac527518f3ab475a462ae2_37439239.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/ccc43b37be23758c4a1c214a20285194_63631875.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/c95775fa4ccd80baa48a0fd435282a20_14810677.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/e9e2a5551705bcdfb684785185729fd0_8426809.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/990190dbd5272d54ca0c62c59923663c_31999850.png change filename to text .imagette224813931745886751/ imagette224813931745886751/1745886431_3851658_1354090028_a6d0448a30382cfc8e4dd1df8c8baf94_rle_crop_3772024702_0.png.png imagette224813931745886751/1745886303_3850288_1354090270_1925000f15e0ed4731865fb188c9240f_rle_crop_3772014994_0.png.png imagette224813931745886751/1745886671_3854010_1354090724_ba7f4164220e8f83fb80aef25829c3e3_rle_crop_3772027539_0.png.png imagette224813931745886751/1745886348_3619125_1354090025_060ca1c38d8df12bc0963cc43b1d93d4_rle_crop_3772015262_0.png.png imagette224813931745886751/1745886348_3619125_1354090014_aedbd69d43e21fbae5079fa48118dee4_rle_crop_3772015316_0.png.png imagette224813931745886751/1745886431_3851658_1354089976_60e2241462fc715128a8b06c938cf081_rle_crop_3772024927_0.png.png imagette224813931745886751/1745886431_3851658_1354089972_e687fc30e211f06a41cf90553de15d84_rle_crop_3772025155_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/6e41c6b5035edd078c803e9be84bb775_9350972.png imagette224813931745886751 22481394 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22481394 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1354090644: '1745886303_3850288_1354090272_ce6849ef6451e57905c546ae80f1ad98_rle_crop_3772014970_0.png', 1354090645: '1745886303_3850288_1354090270_1925000f15e0ed4731865fb188c9240f_rle_crop_3772015006_0.png', 1354090646: '1745886303_3850288_1354090267_adca20dfc151c5106094913c4c3a5124_rle_crop_3772015021_0.png', 1354090806: '1745886373_3851124_1354089903_528dc55964d013d336c76339d8139f43_rle_crop_3772015523_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/e51402411494dab50acdca66f53f07c8_66555108.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/e864fdc4546570fc782dac556f8a8cef_76830773.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/c7b106774541ea5ae016df602329d40a_97542896.png change filename to text .imagette224813941745886751/ imagette224813941745886751/1745886303_3850288_1354090270_1925000f15e0ed4731865fb188c9240f_rle_crop_3772015006_0.png.png imagette224813941745886751/1745886303_3850288_1354090272_ce6849ef6451e57905c546ae80f1ad98_rle_crop_3772014970_0.png.png imagette224813941745886751/1745886373_3851124_1354089903_528dc55964d013d336c76339d8139f43_rle_crop_3772015523_0.png.png imagette224813941745886751/1745886303_3850288_1354090267_adca20dfc151c5106094913c4c3a5124_rle_crop_3772015021_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/d9287d82bb163c44b67cd07981ca8561_63624541.png imagette224813941745886751 22481385 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22481385 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1354090614: '1745886312_3850473_1354090087_42c39d16eae0e8ad174f05e760198e67_rle_crop_3772014985_0.png', 1354090792: '1745886373_3851124_1354089980_17f8b67bcd1bd9c306fb9bd6afe01972_rle_crop_3772015419_0.png', 1354090793: '1745886373_3851124_1354089908_8cc9107606148bb0425998bcd596f2b7_rle_crop_3772015436_0.png', 1354091006: '1745886431_3851658_1354090028_a6d0448a30382cfc8e4dd1df8c8baf94_rle_crop_3772024697_0.png', 1354091007: '1745886431_3851658_1354089976_60e2241462fc715128a8b06c938cf081_rle_crop_3772024924_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/0a2c89a86127a064772c6b544c908d1c_86860941.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/aa43100f167cbbe91bfe736e21d5d23f_41522628.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/b37fa084a9d66b2edef26b1a1895dcd4_65339694.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/1635292cc82681473f2d8f44aebc76ad_12971543.png change filename to text .imagette224813851745886751/ imagette224813851745886751/1745886373_3851124_1354089980_17f8b67bcd1bd9c306fb9bd6afe01972_rle_crop_3772015419_0.png.png imagette224813851745886751/1745886431_3851658_1354089976_60e2241462fc715128a8b06c938cf081_rle_crop_3772024924_0.png.png imagette224813851745886751/1745886373_3851124_1354089908_8cc9107606148bb0425998bcd596f2b7_rle_crop_3772015436_0.png.png imagette224813851745886751/1745886431_3851658_1354090028_a6d0448a30382cfc8e4dd1df8c8baf94_rle_crop_3772024697_0.png.png imagette224813851745886751/1745886312_3850473_1354090087_42c39d16eae0e8ad174f05e760198e67_rle_crop_3772014985_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/a843cc733e891c8bde54b648ce2e0c57_18028970.png imagette224813851745886751 22481390 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22481390 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1354090758: '1745886348_3619125_1354090023_b1151bd0ac9c6cadd9074927e252ecb6_rle_crop_3772015275_0.png', 1354093086: '1745886671_3854010_1354090724_ba7f4164220e8f83fb80aef25829c3e3_rle_crop_3772027541_0.png', 1354092824: '1745886613_3853406_1354090918_96404f63aa71ce4cb649728a28348407_rle_crop_3772027166_0.png', 1354091003: '1745886431_3851658_1354089953_b0203f4f8aba9f65f9f19c5cb8bbab52_rle_crop_3772025402_0.png', 1354091002: '1745886431_3851658_1354090028_a6d0448a30382cfc8e4dd1df8c8baf94_rle_crop_3772024701_0.png', 1354090789: '1745886373_3851124_1354089903_528dc55964d013d336c76339d8139f43_rle_crop_3772015519_0.png', 1354090788: '1745886373_3851124_1354089903_528dc55964d013d336c76339d8139f43_rle_crop_3772015528_0.png', 1354090787: '1745886373_3851124_1354089908_8cc9107606148bb0425998bcd596f2b7_rle_crop_3772015439_0.png', 1354090762: '1745886348_3619125_1354090014_aedbd69d43e21fbae5079fa48118dee4_rle_crop_3772015309_0.png', 1354090761: '1745886348_3619125_1354090014_aedbd69d43e21fbae5079fa48118dee4_rle_crop_3772015319_0.png', 1354090760: '1745886348_3619125_1354090019_61704babc1db6f7b68ba37b29e718583_rle_crop_3772015301_0.png', 1354090497: '1745886254_3849765_1354090275_dc34c51b70d7940bf8b97d4d55a70781_rle_crop_3772014049_0.png', 1354090757: '1745886348_3619125_1354090023_b1151bd0ac9c6cadd9074927e252ecb6_rle_crop_3772015276_0.png', 1354090756: '1745886348_3619125_1354090025_060ca1c38d8df12bc0963cc43b1d93d4_rle_crop_3772015264_0.png', 1354090755: '1745886348_3619125_1354090100_2395ad043760756590b7b2699c07b01a_rle_crop_3772015258_0.png', 1354090754: '1745886348_3619125_1354090100_2395ad043760756590b7b2699c07b01a_rle_crop_3772015253_0.png', 1354090753: '1745886348_3619125_1354090100_2395ad043760756590b7b2699c07b01a_rle_crop_3772015252_0.png', 1354090752: '1745886348_3619125_1354090100_2395ad043760756590b7b2699c07b01a_rle_crop_3772015257_0.png', 1354090620: '1745886303_3850288_1354090270_1925000f15e0ed4731865fb188c9240f_rle_crop_3772014999_0.png', 1354090619: '1745886303_3850288_1354090270_1925000f15e0ed4731865fb188c9240f_rle_crop_3772014998_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/d6c42edca8b7d4f71b8f347376985146_74679812.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/ece47ecfb2224f279f10da7216df868f_62046420.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/0e7bc623c6eef36250af7f8123afa63d_94322636.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/03d7510ba289cba8311c83a7a52c31eb_73524412.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/6262391aa9e04bdb85804ad4ebcc8302_90874307.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/0a8ac013744e25772efa9b37c883db91_87628553.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/9a79f6d396d091eadf5c5a6453aea0a9_63584046.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/1ef497eb3113b0e2bd82fc09998ef627_33254277.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/f0b8f2edda15dc9d069284225bf90b20_54225334.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/5259c87b1c5bbc320f25659042403ba4_677398.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/72bd09b27f76114f434bd6e4316dc703_68858603.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/109d5253dd6a222ff89770c137bb521a_31087552.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/23d05f9dc1d24227b3f15b97dceb31ba_46625436.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/4a82d223f36ce5cab8e448a801ed1616_52060319.png change filename to text .wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/8c12fbbbeee4bca002cc892963467309_78073933.png change filename to text .wget -O 16.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/361e4a7be724807c9a74b27a81873ff0_90978348.png change filename to text .wget -O 17.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/4dafc31d25b9dbad2f77aa8ab9f24dd0_90584744.png change filename to text .wget -O 18.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/b4ab934466867cb3aba506b0910de9d5_21688026.png change filename to text .wget -O 19.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/4b051241e27e2392a4bd23bf488fabc2_13669007.png change filename to text .imagette224813901745886752/ imagette224813901745886752/1745886373_3851124_1354089903_528dc55964d013d336c76339d8139f43_rle_crop_3772015519_0.png.png imagette224813901745886752/1745886348_3619125_1354090023_b1151bd0ac9c6cadd9074927e252ecb6_rle_crop_3772015275_0.png.png imagette224813901745886752/1745886348_3619125_1354090100_2395ad043760756590b7b2699c07b01a_rle_crop_3772015258_0.png.png imagette224813901745886752/1745886348_3619125_1354090023_b1151bd0ac9c6cadd9074927e252ecb6_rle_crop_3772015276_0.png.png imagette224813901745886752/1745886348_3619125_1354090100_2395ad043760756590b7b2699c07b01a_rle_crop_3772015257_0.png.png imagette224813901745886752/1745886373_3851124_1354089903_528dc55964d013d336c76339d8139f43_rle_crop_3772015528_0.png.png imagette224813901745886752/1745886303_3850288_1354090270_1925000f15e0ed4731865fb188c9240f_rle_crop_3772014999_0.png.png imagette224813901745886752/1745886348_3619125_1354090014_aedbd69d43e21fbae5079fa48118dee4_rle_crop_3772015319_0.png.png imagette224813901745886752/1745886671_3854010_1354090724_ba7f4164220e8f83fb80aef25829c3e3_rle_crop_3772027541_0.png.png imagette224813901745886752/1745886431_3851658_1354090028_a6d0448a30382cfc8e4dd1df8c8baf94_rle_crop_3772024701_0.png.png imagette224813901745886752/1745886348_3619125_1354090025_060ca1c38d8df12bc0963cc43b1d93d4_rle_crop_3772015264_0.png.png imagette224813901745886752/1745886373_3851124_1354089908_8cc9107606148bb0425998bcd596f2b7_rle_crop_3772015439_0.png.png imagette224813901745886752/1745886431_3851658_1354089953_b0203f4f8aba9f65f9f19c5cb8bbab52_rle_crop_3772025402_0.png.png imagette224813901745886752/1745886613_3853406_1354090918_96404f63aa71ce4cb649728a28348407_rle_crop_3772027166_0.png.png imagette224813901745886752/1745886254_3849765_1354090275_dc34c51b70d7940bf8b97d4d55a70781_rle_crop_3772014049_0.png.png imagette224813901745886752/1745886303_3850288_1354090270_1925000f15e0ed4731865fb188c9240f_rle_crop_3772014998_0.png.png imagette224813901745886752/1745886348_3619125_1354090014_aedbd69d43e21fbae5079fa48118dee4_rle_crop_3772015309_0.png.png imagette224813901745886752/1745886348_3619125_1354090019_61704babc1db6f7b68ba37b29e718583_rle_crop_3772015301_0.png.png imagette224813901745886752/1745886348_3619125_1354090100_2395ad043760756590b7b2699c07b01a_rle_crop_3772015253_0.png.png imagette224813901745886752/1745886348_3619125_1354090100_2395ad043760756590b7b2699c07b01a_rle_crop_3772015252_0.png.png wget -O 20.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/c85e653e8e698f2bfe1d72977a6be021_84411816.png imagette224813901745886752 22481395 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22481395 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1354090498: '1745886254_3849765_1354090150_14148987f1b4832b562880f599b5c2e0_rle_crop_3772014059_0.png', 1354090630: '1745886303_3850288_1354090274_7ccb10bd10726edb2f90438c4953ca11_rle_crop_3772014928_0.png', 1354090631: '1745886303_3850288_1354090273_437fcb09264606ac04062a9b108a6ef9_rle_crop_3772014955_0.png', 1354090633: '1745886303_3850288_1354090273_437fcb09264606ac04062a9b108a6ef9_rle_crop_3772014950_0.png', 1354090634: '1745886303_3850288_1354090272_ce6849ef6451e57905c546ae80f1ad98_rle_crop_3772014977_0.png', 1354090774: '1745886348_3619125_1354090023_b1151bd0ac9c6cadd9074927e252ecb6_rle_crop_3772015278_0.png', 1354090796: '1745886373_3851124_1354089980_17f8b67bcd1bd9c306fb9bd6afe01972_rle_crop_3772015417_0.png', 1354090797: '1745886373_3851124_1354089908_8cc9107606148bb0425998bcd596f2b7_rle_crop_3772015437_0.png', 1354090798: '1745886373_3851124_1354089908_8cc9107606148bb0425998bcd596f2b7_rle_crop_3772015434_0.png', 1354090799: '1745886373_3851124_1354089903_528dc55964d013d336c76339d8139f43_rle_crop_3772015524_0.png', 1354090800: '1745886373_3851124_1354089903_528dc55964d013d336c76339d8139f43_rle_crop_3772015527_0.png', 1354091013: '1745886431_3851658_1354089972_e687fc30e211f06a41cf90553de15d84_rle_crop_3772025156_0.png', 1354091014: '1745886431_3851658_1354089972_e687fc30e211f06a41cf90553de15d84_rle_crop_3772025160_0.png', 1354091015: '1745886431_3851658_1354089965_12b25ac9031d678ebdfd73429ff39bb2_rle_crop_3772025394_0.png', 1354091016: '1745886431_3851658_1354089953_b0203f4f8aba9f65f9f19c5cb8bbab52_rle_crop_3772025407_0.png', 1354092829: '1745886613_3853406_1354090918_96404f63aa71ce4cb649728a28348407_rle_crop_3772027164_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/3d54832274b447202b6d40c29c9c2864_13608113.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/6d6d4ac8c4bba67b6c84a9b368888128_37676799.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/356d3d5cdab4656c4d13096e78781c22_8691818.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/064f34d9e00f8d8f44233b5c727c352b_25349930.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/43e7e28e4f028ce6e18fc4211647cd7c_26183083.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/dfca324a0b6cfac7dca9cf71aff3f481_79570155.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/8bafba73ea5331547eab4eef09025d3a_59133184.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/e480de9cc38f4ca27bae667e0a14cdb0_65618668.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/62beb10749903499443abfe538070be4_63093185.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/3974098dda58f5c0b47cd3e8b4968725_28378190.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/00a6219ec5c497b8008a15edf1a5d1de_17890811.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/ed63b762e04980785aec28eee54b8ac9_32410587.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/737b9c44ebdaa2cb9a95041d8add8084_86890572.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/7422c7defd357afee63c61d65b919b73_7596571.png change filename to text .wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/276b2cd3f5c600b5abc4143e1c1db798_18605716.png change filename to text .imagette224813951745886753/ imagette224813951745886753/1745886373_3851124_1354089908_8cc9107606148bb0425998bcd596f2b7_rle_crop_3772015434_0.png.png imagette224813951745886753/1745886303_3850288_1354090274_7ccb10bd10726edb2f90438c4953ca11_rle_crop_3772014928_0.png.png imagette224813951745886753/1745886373_3851124_1354089903_528dc55964d013d336c76339d8139f43_rle_crop_3772015524_0.png.png imagette224813951745886753/1745886373_3851124_1354089903_528dc55964d013d336c76339d8139f43_rle_crop_3772015527_0.png.png imagette224813951745886753/1745886303_3850288_1354090273_437fcb09264606ac04062a9b108a6ef9_rle_crop_3772014955_0.png.png imagette224813951745886753/1745886431_3851658_1354089965_12b25ac9031d678ebdfd73429ff39bb2_rle_crop_3772025394_0.png.png imagette224813951745886753/1745886373_3851124_1354089908_8cc9107606148bb0425998bcd596f2b7_rle_crop_3772015437_0.png.png imagette224813951745886753/1745886373_3851124_1354089980_17f8b67bcd1bd9c306fb9bd6afe01972_rle_crop_3772015417_0.png.png imagette224813951745886753/1745886254_3849765_1354090150_14148987f1b4832b562880f599b5c2e0_rle_crop_3772014059_0.png.png imagette224813951745886753/1745886303_3850288_1354090272_ce6849ef6451e57905c546ae80f1ad98_rle_crop_3772014977_0.png.png imagette224813951745886753/1745886303_3850288_1354090273_437fcb09264606ac04062a9b108a6ef9_rle_crop_3772014950_0.png.png imagette224813951745886753/1745886613_3853406_1354090918_96404f63aa71ce4cb649728a28348407_rle_crop_3772027164_0.png.png imagette224813951745886753/1745886348_3619125_1354090023_b1151bd0ac9c6cadd9074927e252ecb6_rle_crop_3772015278_0.png.png imagette224813951745886753/1745886431_3851658_1354089972_e687fc30e211f06a41cf90553de15d84_rle_crop_3772025156_0.png.png imagette224813951745886753/1745886431_3851658_1354089972_e687fc30e211f06a41cf90553de15d84_rle_crop_3772025160_0.png.png imagette224813951745886753/1745886431_3851658_1354089953_b0203f4f8aba9f65f9f19c5cb8bbab52_rle_crop_3772025407_0.png.png wget -O 16.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/6a32ec704b1e4865e56b01c42bb29b86_99031633.png imagette224813951745886753 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22481383 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22481396,22481397,22481398,22481399,22481400,22481401,22481402,22481403,22481404,22481405,22481406,22481407?tags=mal_croppe,Carton_gris,environnement,autre_refus,kraft,metal,Teint_Dans_La_Masse,papier,flou,cartonnette,plastique,Carton_brun your option no_mail is active, we will not send the real mail to your client args[1354092482] : ('0.05665771005721219',) no score found for photo 1354092482 We are sending mail with results at report@fotonower.com args[1354091920] : ('0.05665771005721219',) no score found for photo 1354091920 We are sending mail with results at report@fotonower.com args[1354091836] : ('0.05665771005721219',) no score found for photo 1354091836 We are sending mail with results at report@fotonower.com args[1354091761] : ('0.05665771005721219',) no score found for photo 1354091761 We are sending mail with results at report@fotonower.com args[1354091688] : ('0.05665771005721219',) no score found for photo 1354091688 We are sending mail with results at report@fotonower.com args[1354091609] : ('0.05665771005721219',) no score found for photo 1354091609 We are sending mail with results at report@fotonower.com args[1354091558] : ('0.05665771005721219',) no score found for photo 1354091558 We are sending mail with results at report@fotonower.com args[1354091218] : ('0.05665771005721219',) no score found for photo 1354091218 We are sending mail with results at report@fotonower.com args[1354091193] : ('0.05665771005721219',) no score found for photo 1354091193 We are sending mail with results at report@fotonower.com args[1354091165] : ('0.05665771005721219',) no score found for photo 1354091165 We are sending mail with results at report@fotonower.com args[1354091139] : ('0.05665771005721219',) no score found for photo 1354091139 We are sending mail with results at report@fotonower.com args[1354091108] : ('0.05665771005721219',) no score found for photo 1354091108 We are sending mail with results at report@fotonower.com args[1354091081] : ('0.05665771005721219',) no score found for photo 1354091081 We are sending mail with results at report@fotonower.com refus_total : 0.05665771005721219 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22481383 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_P22481383_29-04-2025_02_32_31.pdf results_Auto_P22481383_29-04-2025_02_32_31.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22481383_29-04-2025_02_32_31.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','22481383','results_Auto_P22481383_29-04-2025_02_32_31.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22481383_29-04-2025_02_32_31.pdf','pdf','','0.26','0.05665771005721219') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22481383]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1354092482, 1354091920, 1354091836, 1354091761, 1354091688, 1354091609, 1354091558, 1354091218, 1354091193, 1354091165, 1354091139, 1354091108, 1354091081] map_info['map_portfolio_photo'] : {22481383: [1354092482, 1354091920, 1354091836, 1354091761, 1354091688, 1354091609, 1354091558, 1354091218, 1354091193, 1354091165, 1354091139, 1354091108, 1354091081, 1354090926, 1354090918, 1354090913, 1354090729, 1354090724, 1354090699, 1354090601, 1354090572, 1354090547, 1354090521, 1354090507, 1354090504, 1354090461, 1354090451, 1354090447, 1354090443, 1354090440, 1354090437, 1354090411, 1354090410, 1354090401, 1354090394, 1354090331, 1354090328, 1354090322, 1354090311, 1354090300, 1354090275, 1354090274, 1354090273, 1354090272, 1354090270, 1354090267, 1354090152, 1354090150, 1354090146, 1354090144, 1354090100, 1354090094, 1354090092, 1354090087, 1354090028, 1354090025, 1354090023, 1354090019, 1354090014, 1354089980, 1354089976, 1354089972, 1354089965, 1354089953, 1354089911, 1354089908, 1354089903]} final : False mtd_id 4302 list_pids : [1354092482, 1354091920, 1354091836, 1354091761, 1354091688, 1354091609, 1354091558, 1354091218, 1354091193, 1354091165, 1354091139, 1354091108, 1354091081] 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, '2766999') ('4302', '22481383', '1354092482', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091920', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091836', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091761', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091688', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091609', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091558', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091218', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091193', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091165', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091139', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091108', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091081', None, None, None, None, None, '2766999') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 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', '22481383', '1354092482', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091920', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091836', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091761', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091688', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091609', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091558', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091218', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091193', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091165', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091139', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091108', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091081', None, None, None, None, None, '2766999')] time used for this insertion : 0.014613151550292969 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.789949655532837 time spend to save output : 0.01489877700805664 total time spend for step 4 : 4.8048484325408936 step5:split_time_score Tue Apr 29 02:32:35 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 : ['22481383'] 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 : [('22481383',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22481383) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1354092482: {'path': 'temp/1745886750_404646_1354092482_edf71a7f3bc1cae2acac6b49f75fc284.jpg', 'extension': 'jpg'}, 1354091558: {'path': 'temp/1745886750_404646_1354091558_9836e7bea604c3270f551e90887505ec.jpg', 'extension': 'jpg'}, 1354091609: {'path': 'temp/1745886750_404646_1354091609_520886ba0c2840faf83b89e0fb663622.jpg', 'extension': 'jpg'}, 1354091688: {'path': 'temp/1745886750_404646_1354091688_29efbb5824bf17e139828f9544818f26.jpg', 'extension': 'jpg'}, 1354091761: {'path': 'temp/1745886750_404646_1354091761_cd0a008f23920662b9ae2b648a0ee8c8.jpg', 'extension': 'jpg'}, 1354091836: {'path': 'temp/1745886750_404646_1354091836_cff25e7f5a99e9710d1e354150c00c63.jpg', 'extension': 'jpg'}, 1354091920: {'path': 'temp/1745886750_404646_1354091920_dba554964abae6a2b0e08ea4c5027a3b.jpg', 'extension': 'jpg'}, 1354091165: {'path': 'temp/1745886750_404646_1354091165_43d75b418b74289b04ec32f1ab690d40.jpg', 'extension': 'jpg'}, 1354091193: {'path': 'temp/1745886750_404646_1354091193_80fe87519fe0e2822bd4125de2edc5f2.jpg', 'extension': 'jpg'}, 1354091218: {'path': 'temp/1745886750_404646_1354091218_89a76ea20ced909af231bf3dfa91d066.jpg', 'extension': 'jpg'}, 1354091081: {'path': 'temp/1745886750_404646_1354091081_c9f37edb9a70061da684c97aae792712.jpg', 'extension': 'jpg'}, 1354091108: {'path': 'temp/1745886750_404646_1354091108_93993d6681047d853b7e192ead350217.jpg', 'extension': 'jpg'}, 1354091139: {'path': 'temp/1745886750_404646_1354091139_b729dc21ce752c7f5a62683fb7ccf348.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 = 22481383; (('arc_en_ciel_jrm',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 22481383 group by h (('02', 67),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22481383 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 (22481383) 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 (22481383) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 29042025 22481383 Nombre de photos uploadées : 67 / 23040 (0%) 29042025 22481383 Nombre de photos taguées (types de déchets): 0 / 67 (0%) 29042025 22481383 Nombre de photos taguées (volume) : 0 / 67 (0%) [{'photo_id': 1354089911, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/2a807295bfcffc63203d728ea22a8e95.jpg', 'username': None, 'uploaded_at': 1745885768, 'text': 'image_29042025_02_15_03_009138m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1354089908, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/8cc9107606148bb0425998bcd596f2b7.jpg', 'username': None, 'uploaded_at': 1745885768, 'text': 'image_29042025_02_15_34_010133m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1354089903, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/528dc55964d013d336c76339d8139f43.jpg', 'username': None, 'uploaded_at': 1745885768, 'text': 'image_29042025_02_15_44_010132m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1354089980, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/29/17f8b67bcd1bd9c306fb9bd6afe01972.jpg', 'username': None, 'uploaded_at': 1745885828, 'text': 'image_29042025_02_15_54_010139m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 4.0531158447265625e-06 elapsed_time : order_list_meta_photo_and_scores 1.7881393432617188e-05 ??????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.002538442611694336 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22481383, '2025-04-29' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1752875,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.026447534561157227 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= 1752875 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1752875, 'dashboard_run_id': 1760645, 'mtr_portfolio_id': 22480527, 'dashboard_result_id': 10130395, '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_P22480527_29-04-2025_02_06_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22480528, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22480529, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22480530, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22480531, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22480532, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22480533, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22480534, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22480535, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22480536, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22480537, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22480538, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22480539, 'pht': 3726}}"}, {'dashboat_entry_day': 1752875, 'dashboard_run_id': 1760645, 'mtr_portfolio_id': 22481033, 'dashboard_result_id': 10130396, '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_P22481033_29-04-2025_02_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22481072, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22481073, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22481074, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22481075, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22481076, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22481078, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22481079, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22481080, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22481081, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22481082, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22481083, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22481084, 'pht': 3726}}"}, {'dashboat_entry_day': 1752875, 'dashboard_run_id': 1760645, 'mtr_portfolio_id': 22481383, 'dashboard_result_id': 10130397, '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_P22481383_29-04-2025_02_29_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22481384, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22481385, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22481386, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22481387, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22481388, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22481389, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22481390, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22481391, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22481392, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22481393, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22481394, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22481395, '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 = 22480527 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': 2766923, 'mtr_portfolio_id': 22480527, 'created_at': datetime.datetime(2025, 4, 29, 2, 6, 58), 'result': '0.06127366426777154', 'result_long': None, 'result_double': None}] Qualite : 0.06127366426777154 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22480527 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22480527_29-04-2025_02_06_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22480527 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_P22480527_29-04-2025_02_06_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22480528, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22480529, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22480530, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22480531, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22480532, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22480533, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22480534, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22480535, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22480536, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22480537, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22480538, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22480539, 'pht': 3726}}" where mtr_portfolio_id = 22480527 and dashboard_run_id = 1760645 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`=22480527 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10130395, 0.06127366426777154, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22480527_29-04-2025_02_06_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22480528, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22480529, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22480530, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22480531, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22480532, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22480533, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22480534, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22480535, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22480536, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22480537, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22480538, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22480539, '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 = 22481033 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': 2766970, 'mtr_portfolio_id': 22481033, 'created_at': datetime.datetime(2025, 4, 29, 2, 16, 59), 'result': '0.09461476065377317', 'result_long': None, 'result_double': None}] Qualite : 0.09461476065377317 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22481033 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22481033_29-04-2025_02_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22481033 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_P22481033_29-04-2025_02_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22481072, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22481073, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22481074, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22481075, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22481076, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22481078, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22481079, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22481080, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22481081, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22481082, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22481083, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22481084, 'pht': 3726}}" where mtr_portfolio_id = 22481033 and dashboard_run_id = 1760645 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`=22481033 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10130396, 0.09461476065377317, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22481033_29-04-2025_02_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22481072, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22481073, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22481074, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22481075, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22481076, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22481078, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22481079, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22481080, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22481081, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22481082, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22481083, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22481084, '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 = 22481383 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': 2766999, 'mtr_portfolio_id': 22481383, 'created_at': datetime.datetime(2025, 4, 29, 2, 32, 30), 'result': '0.05665771005721219', 'result_long': None, 'result_double': None}] Qualite : 0.05665771005721219 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22481383 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22481383_29-04-2025_02_32_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22481383 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_P22481383_29-04-2025_02_32_31.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22481384, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22481385, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22481386, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22481387, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22481388, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22481389, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22481390, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22481391, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22481392, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22481393, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22481394, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22481395, 'pht': 3726}}" where mtr_portfolio_id = 22481383 and dashboard_run_id = 1760645 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`=22481383 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10130397, 0.05665771005721219, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22481383_29-04-2025_02_32_31.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22481384, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22481385, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22481386, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22481387, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22481388, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22481389, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22481390, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22481391, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22481392, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22481393, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22481394, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22481395, '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 (22480527,22481033,22481383) result : ((1354085074,), (1354085083,), (1354085107,), (1354085109,), (1354085111,), (1354085133,), (1354085138,), (1354085141,), (1354085144,), (1354085245,), (1354085293,), (1354085296,), (1354085300,), (1354085318,), (1354085321,), (1354085324,), (1354085327,), (1354085355,), (1354085359,), (1354085362,), (1354085400,), (1354085405,), (1354085408,), (1354085432,), (1354085434,), (1354085437,), (1354085439,), (1354085442,), (1354085455,), (1354085463,), (1354085471,), (1354087337,), (1354087538,), (1354087657,), (1354087659,), (1354087724,), (1354087730,), (1354087738,), (1354087741,), (1354087744,), (1354087759,), (1354087761,), (1354087763,), (1354087765,), (1354087768,), (1354088287,), (1354088317,), (1354088498,), (1354088501,), (1354088504,), (1354088507,), (1354088514,), (1354088767,), (1354088774,), (1354088799,), (1354088829,), (1354088859,), (1354088890,), (1354088942,), (1354088947,), (1354088974,), (1354089045,), (1354089106,), (1354089136,), (1354089151,), (1354089186,), (1354089277,), (1354089290,), (1354089291,), (1354089292,), (1354089320,), (1354089322,), (1354089325,), (1354089327,), (1354089360,), (1354089362,), (1354089389,), (1354089391,), (1354089418,), (1354089423,), (1354089427,), (1354089432,), (1354089435,), (1354089473,), (1354089477,), (1354089482,), (1354089486,), (1354089554,), (1354089594,), (1354089610,), (1354089616,), (1354089673,), (1354089678,), (1354089683,), (1354089688,), (1354089723,), (1354089726,), (1354089729,), (1354089756,), (1354089759,), (1354089768,), (1354089805,), (1354089827,), (1354089860,), (1354089864,), (1354089868,), (1354089871,), (1354089875,), (1354089877,), (1354089913,), (1354089903,), (1354089908,), (1354089911,), (1354089953,), (1354089965,), (1354089972,), (1354089976,), (1354089980,), (1354090014,), (1354090019,), (1354090023,), (1354090025,), (1354090028,), (1354090087,), (1354090092,), (1354090094,), (1354090100,), (1354090144,), (1354090146,), (1354090150,), (1354090152,), (1354090267,), (1354090270,), (1354090272,), (1354090273,), (1354090274,), (1354090275,), (1354090300,), (1354090311,), (1354090322,), (1354090328,), (1354090331,), (1354090394,), (1354090401,), (1354090410,), (1354090411,), (1354090437,), (1354090440,), (1354090443,), (1354090447,), (1354090451,), (1354090461,), (1354090504,), (1354090507,), (1354090521,), (1354090547,), (1354090572,), (1354090601,), (1354090699,), (1354090724,), (1354090729,), (1354090913,), (1354090918,), (1354090926,), (1354091081,), (1354091108,), (1354091139,), (1354091165,), (1354091193,), (1354091218,), (1354091558,), (1354091609,), (1354091688,), (1354091761,), (1354091836,), (1354091920,), (1354092482,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'29042025': {'nb_upload': 67, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22481383]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1354092482, 1354091920, 1354091836, 1354091761, 1354091688, 1354091609, 1354091558, 1354091218, 1354091193, 1354091165, 1354091139, 1354091108, 1354091081] map_info['map_portfolio_photo'] : {22481383: [1354092482, 1354091920, 1354091836, 1354091761, 1354091688, 1354091609, 1354091558, 1354091218, 1354091193, 1354091165, 1354091139, 1354091108, 1354091081, 1354090926, 1354090918, 1354090913, 1354090729, 1354090724, 1354090699, 1354090601, 1354090572, 1354090547, 1354090521, 1354090507, 1354090504, 1354090461, 1354090451, 1354090447, 1354090443, 1354090440, 1354090437, 1354090411, 1354090410, 1354090401, 1354090394, 1354090331, 1354090328, 1354090322, 1354090311, 1354090300, 1354090275, 1354090274, 1354090273, 1354090272, 1354090270, 1354090267, 1354090152, 1354090150, 1354090146, 1354090144, 1354090100, 1354090094, 1354090092, 1354090087, 1354090028, 1354090025, 1354090023, 1354090019, 1354090014, 1354089980, 1354089976, 1354089972, 1354089965, 1354089953, 1354089911, 1354089908, 1354089903]} final : True mtd_id 4302 list_pids : [1354092482, 1354091920, 1354091836, 1354091761, 1354091688, 1354091609, 1354091558, 1354091218, 1354091193, 1354091165, 1354091139, 1354091108, 1354091081] Looping around the photos to save general results len do output : 1 /22481383Didn'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, '2766999') ('4302', '22481383', '1354092482', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091920', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091836', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091761', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091688', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091609', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091558', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091218', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091193', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091165', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091139', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091108', None, None, None, None, None, '2766999') ('4302', None, None, None, None, None, None, None, '2766999') ('4302', '22481383', '1354091081', None, None, None, None, None, '2766999') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 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, '22481383', 'None', None, None, None, None, '2766999'), ('4302', '22481383', '1354092482', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091920', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091836', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091761', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091688', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091609', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091558', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091218', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091193', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091165', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091139', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091108', None, None, None, None, None, '2766999'), ('4302', '22481383', '1354091081', None, None, None, None, None, '2766999')] time used for this insertion : 0.017071008682250977 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.30765652656555176 time spend to save output : 0.017409324645996094 total time spend for step 5 : 0.32506585121154785 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 (2766999) 2.49user 1.56system 0:09.83elapsed 41%CPU (0avgtext+0avgdata 160804maxresident)k 480inputs+14432outputs (3major+77514minor)pagefaults 0swaps