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 : 175851 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 (3332876) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3332876) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25249748 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3332876'] with mtr_portfolio_ids : ['25249748'] and first list_photo_ids : [] new path : /proc/175851/ Name: python3 Umask: 0002 State: R (running) Tgid: 175851 Ngid: 0 Pid: 175851 PPid: 175850 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 175851 NSpid: 175851 NSpgid: 174645 NSsid: 174645 VmPeak: 1106896 kB VmSize: 1106896 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99052 kB VmRSS: 99052 kB RssAnon: 59812 kB RssFile: 39240 kB RssShmem: 0 kB VmData: 865648 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 608 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 51 nonvoluntary_ctxt_switches: 121 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '175851', 'Ngid': '0', 'Pid': '175851', 'PPid': '175850', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '175851', 'NSpid': '175851', 'NSpgid': '174645', 'NSsid': '174645', 'VmPeak': '1106896 kB', 'VmSize': '1106896 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99052 kB', 'VmRSS': '99052 kB', 'RssAnon': '59812 kB', 'RssFile': '39240 kB', 'RssShmem': '0 kB', 'VmData': '865648 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '608 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '51', 'nonvoluntary_ctxt_switches': '121'} ('datou_batch_current', '175851', '1106896', '0', '1106896', '865648', '99052', b'', 'marlene', '3332876') 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 (25249748) 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 (3332876 ) ) 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 (25249748) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1373446653, 'portfolio_id': 25249748}, {'photo_id': 1373446651, 'portfolio_id': 25249748}, {'photo_id': 1373446648, 'portfolio_id': 25249748}, {'photo_id': 1373446646, 'portfolio_id': 25249748}, {'photo_id': 1373446644, 'portfolio_id': 25249748}, {'photo_id': 1373446641, 'portfolio_id': 25249748}, {'photo_id': 1373446633, 'portfolio_id': 25249748}, {'photo_id': 1373446630, 'portfolio_id': 25249748}, {'photo_id': 1373446627, 'portfolio_id': 25249748}, {'photo_id': 1373446624, 'portfolio_id': 25249748}, {'photo_id': 1373446621, 'portfolio_id': 25249748}, {'photo_id': 1373446618, 'portfolio_id': 25249748}, {'photo_id': 1373446610, 'portfolio_id': 25249748}, {'photo_id': 1373446607, 'portfolio_id': 25249748}, {'photo_id': 1373446604, 'portfolio_id': 25249748}, {'photo_id': 1373446602, 'portfolio_id': 25249748}, {'photo_id': 1373446600, 'portfolio_id': 25249748}, {'photo_id': 1373446597, 'portfolio_id': 25249748}, {'photo_id': 1373446590, 'portfolio_id': 25249748}, {'photo_id': 1373446587, 'portfolio_id': 25249748}, {'photo_id': 1373446585, 'portfolio_id': 25249748}, {'photo_id': 1373446582, 'portfolio_id': 25249748}, {'photo_id': 1373446580, 'portfolio_id': 25249748}, {'photo_id': 1373446577, 'portfolio_id': 25249748}, {'photo_id': 1373446566, 'portfolio_id': 25249748}, {'photo_id': 1373446563, 'portfolio_id': 25249748}, {'photo_id': 1373446562, 'portfolio_id': 25249748}, {'photo_id': 1373446560, 'portfolio_id': 25249748}, {'photo_id': 1373446557, 'portfolio_id': 25249748}, {'photo_id': 1373446555, 'portfolio_id': 25249748}, {'photo_id': 1373446535, 'portfolio_id': 25249748}, {'photo_id': 1373446527, 'portfolio_id': 25249748}, {'photo_id': 1373446523, 'portfolio_id': 25249748}, {'photo_id': 1373446521, 'portfolio_id': 25249748}, {'photo_id': 1373446519, 'portfolio_id': 25249748}, {'photo_id': 1373446517, 'portfolio_id': 25249748}, {'photo_id': 1373446516, 'portfolio_id': 25249748}, {'photo_id': 1373446502, 'portfolio_id': 25249748}, {'photo_id': 1373446494, 'portfolio_id': 25249748}, {'photo_id': 1373446491, 'portfolio_id': 25249748}, {'photo_id': 1373446488, 'portfolio_id': 25249748}, {'photo_id': 1373446487, 'portfolio_id': 25249748}, {'photo_id': 1373446485, 'portfolio_id': 25249748}, {'photo_id': 1373446483, 'portfolio_id': 25249748}, {'photo_id': 1373446476, 'portfolio_id': 25249748}, {'photo_id': 1373446473, 'portfolio_id': 25249748}, {'photo_id': 1373446470, 'portfolio_id': 25249748}, {'photo_id': 1373446468, 'portfolio_id': 25249748}, {'photo_id': 1373446466, 'portfolio_id': 25249748}, {'photo_id': 1373446464, 'portfolio_id': 25249748}, {'photo_id': 1373446455, 'portfolio_id': 25249748}, {'photo_id': 1373446453, 'portfolio_id': 25249748}, {'photo_id': 1373446451, 'portfolio_id': 25249748}, {'photo_id': 1373446449, 'portfolio_id': 25249748}, {'photo_id': 1373446448, 'portfolio_id': 25249748}, {'photo_id': 1373446445, 'portfolio_id': 25249748}, {'photo_id': 1373446425, 'portfolio_id': 25249748}, {'photo_id': 1373446422, 'portfolio_id': 25249748}, {'photo_id': 1373446420, 'portfolio_id': 25249748}, {'photo_id': 1373446418, 'portfolio_id': 25249748}, {'photo_id': 1373446416, 'portfolio_id': 25249748}, {'photo_id': 1373446415, 'portfolio_id': 25249748}, {'photo_id': 1373446401, 'portfolio_id': 25249748}, {'photo_id': 1373446399, 'portfolio_id': 25249748}, {'photo_id': 1373446397, 'portfolio_id': 25249748}, {'photo_id': 1373446391, 'portfolio_id': 25249748}, {'photo_id': 1373446384, 'portfolio_id': 25249748}, {'photo_id': 1373446378, 'portfolio_id': 25249748}] map_portfolio_id_photo_id: {25249748: [1373446653, 1373446651, 1373446648, 1373446646, 1373446644, 1373446641, 1373446633, 1373446630, 1373446627, 1373446624, 1373446621, 1373446618, 1373446610, 1373446607, 1373446604, 1373446602, 1373446600, 1373446597, 1373446590, 1373446587, 1373446585, 1373446582, 1373446580, 1373446577, 1373446566, 1373446563, 1373446562, 1373446560, 1373446557, 1373446555, 1373446535, 1373446527, 1373446523, 1373446521, 1373446519, 1373446517, 1373446516, 1373446502, 1373446494, 1373446491, 1373446488, 1373446487, 1373446485, 1373446483, 1373446476, 1373446473, 1373446470, 1373446468, 1373446466, 1373446464, 1373446455, 1373446453, 1373446451, 1373446449, 1373446448, 1373446445, 1373446425, 1373446422, 1373446420, 1373446418, 1373446416, 1373446415, 1373446401, 1373446399, 1373446397, 1373446391, 1373446384, 1373446378]} ##### 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.014503002166748047 #### 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 Thu Jul 24 02:28:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25249748) 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 : 25249748 get user id for portfolio 25249748 get sub ptf for main ptf 25249748, type 3726 and hashtags ['environnement', 'mal_croppe', 'papier', 'kraft', 'flou', 'Teint_Dans_La_Masse', 'cartonnette', 'metal', 'plastique', 'Carton_brun', 'Carton_gris', 'autre_refus'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25249748 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','mal_croppe','papier','kraft','flou','Teint_Dans_La_Masse','cartonnette','metal','plastique','Carton_brun','Carton_gris','autre_refus')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25249748 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','mal_croppe','papier','kraft','flou','Teint_Dans_La_Masse','cartonnette','metal','plastique','Carton_brun','Carton_gris','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'plastique': {'main_port_id': 25249748, 'sub_port_id': 25249761, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032132, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 18, 58)}, 'environnement': {'main_port_id': 25249748, 'sub_port_id': 25249762, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032133, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 18, 58)}, 'metal': {'main_port_id': 25249748, 'sub_port_id': 25249763, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032134, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 18, 58)}, 'mal_croppe': {'main_port_id': 25249748, 'sub_port_id': 25249764, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032135, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 18, 58)}, 'Carton_gris': {'main_port_id': 25249748, 'sub_port_id': 25249765, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032136, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 18, 58)}, 'papier': {'main_port_id': 25249748, 'sub_port_id': 25249766, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032137, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 18, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 25249748, 'sub_port_id': 25249767, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032138, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 18, 58)}, 'Carton_brun': {'main_port_id': 25249748, 'sub_port_id': 25249768, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032139, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 18, 58)}, 'autre_refus': {'main_port_id': 25249748, 'sub_port_id': 25249769, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032140, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 18, 58)}, 'flou': {'main_port_id': 25249748, 'sub_port_id': 25249770, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032141, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 18, 58)}, 'kraft': {'main_port_id': 25249748, 'sub_port_id': 25249771, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032142, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 18, 58)}, 'cartonnette': {'main_port_id': 25249748, 'sub_port_id': 25249772, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032143, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 18, 58)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25249761 , 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=25249748 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 (25249761) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25249748) result : ((1373446378,), (1373446384,), (1373446391,), (1373446397,), (1373446399,), (1373446401,), (1373446415,), (1373446416,), (1373446418,), (1373446420,), (1373446422,), (1373446425,), (1373446445,), (1373446448,), (1373446449,), (1373446451,), (1373446453,), (1373446455,), (1373446464,), (1373446466,), (1373446468,), (1373446470,), (1373446473,), (1373446476,), (1373446483,), (1373446485,), (1373446487,), (1373446488,), (1373446491,), (1373446494,), (1373446502,), (1373446516,), (1373446517,), (1373446519,), (1373446521,), (1373446523,), (1373446527,), (1373446535,), (1373446555,), (1373446557,), (1373446560,), (1373446562,), (1373446563,), (1373446566,), (1373446577,), (1373446580,), (1373446582,), (1373446585,), (1373446587,), (1373446590,), (1373446597,), (1373446600,), (1373446602,), (1373446604,), (1373446607,), (1373446610,), (1373446618,), (1373446621,), (1373446624,), (1373446627,), (1373446630,), (1373446633,), (1373446641,), (1373446644,), (1373446646,), (1373446648,), (1373446651,), (1373446653,)) 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 (1373446600) 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 25249762 , 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=25249748 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 (25249762) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25249748) result : ((1373446378,), (1373446384,), (1373446391,), (1373446397,), (1373446399,), (1373446401,), (1373446415,), (1373446416,), (1373446418,), (1373446420,), (1373446422,), (1373446425,), (1373446445,), (1373446448,), (1373446449,), (1373446451,), (1373446453,), (1373446455,), (1373446464,), (1373446466,), (1373446468,), (1373446470,), (1373446473,), (1373446476,), (1373446483,), (1373446485,), (1373446487,), (1373446488,), (1373446491,), (1373446494,), (1373446502,), (1373446516,), (1373446517,), (1373446519,), (1373446521,), (1373446523,), (1373446527,), (1373446535,), (1373446555,), (1373446557,), (1373446560,), (1373446562,), (1373446563,), (1373446566,), (1373446577,), (1373446580,), (1373446582,), (1373446585,), (1373446587,), (1373446590,), (1373446597,), (1373446600,), (1373446602,), (1373446604,), (1373446607,), (1373446610,), (1373446618,), (1373446621,), (1373446624,), (1373446627,), (1373446630,), (1373446633,), (1373446641,), (1373446644,), (1373446646,), (1373446648,), (1373446651,), (1373446653,)) 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 (1373446600) 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 25249763 , 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=25249748 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 (25249763) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25249748) result : ((1373446378,), (1373446384,), (1373446391,), (1373446397,), (1373446399,), (1373446401,), (1373446415,), (1373446416,), (1373446418,), (1373446420,), (1373446422,), (1373446425,), (1373446445,), (1373446448,), (1373446449,), (1373446451,), (1373446453,), (1373446455,), (1373446464,), (1373446466,), (1373446468,), (1373446470,), (1373446473,), (1373446476,), (1373446483,), (1373446485,), (1373446487,), (1373446488,), (1373446491,), (1373446494,), (1373446502,), (1373446516,), (1373446517,), (1373446519,), (1373446521,), (1373446523,), (1373446527,), (1373446535,), (1373446555,), (1373446557,), (1373446560,), (1373446562,), (1373446563,), (1373446566,), (1373446577,), (1373446580,), (1373446582,), (1373446585,), (1373446587,), (1373446590,), (1373446597,), (1373446600,), (1373446602,), (1373446604,), (1373446607,), (1373446610,), (1373446618,), (1373446621,), (1373446624,), (1373446627,), (1373446630,), (1373446633,), (1373446641,), (1373446644,), (1373446646,), (1373446648,), (1373446651,), (1373446653,)) 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 (1373446600) 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 25249764 , 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=25249748 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 (25249764) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25249748) result : ((1373446378,), (1373446384,), (1373446391,), (1373446397,), (1373446399,), (1373446401,), (1373446415,), (1373446416,), (1373446418,), (1373446420,), (1373446422,), (1373446425,), (1373446445,), (1373446448,), (1373446449,), (1373446451,), (1373446453,), (1373446455,), (1373446464,), (1373446466,), (1373446468,), (1373446470,), (1373446473,), (1373446476,), (1373446483,), (1373446485,), (1373446487,), (1373446488,), (1373446491,), (1373446494,), (1373446502,), (1373446516,), (1373446517,), (1373446519,), (1373446521,), (1373446523,), (1373446527,), (1373446535,), (1373446555,), (1373446557,), (1373446560,), (1373446562,), (1373446563,), (1373446566,), (1373446577,), (1373446580,), (1373446582,), (1373446585,), (1373446587,), (1373446590,), (1373446597,), (1373446600,), (1373446602,), (1373446604,), (1373446607,), (1373446610,), (1373446618,), (1373446621,), (1373446624,), (1373446627,), (1373446630,), (1373446633,), (1373446641,), (1373446644,), (1373446646,), (1373446648,), (1373446651,), (1373446653,)) 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 (1373446600) 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 25249765 , 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=25249748 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 (25249765) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25249748) result : ((1373446378,), (1373446384,), (1373446391,), (1373446397,), (1373446399,), (1373446401,), (1373446415,), (1373446416,), (1373446418,), (1373446420,), (1373446422,), (1373446425,), (1373446445,), (1373446448,), (1373446449,), (1373446451,), (1373446453,), (1373446455,), (1373446464,), (1373446466,), (1373446468,), (1373446470,), (1373446473,), (1373446476,), (1373446483,), (1373446485,), (1373446487,), (1373446488,), (1373446491,), (1373446494,), (1373446502,), (1373446516,), (1373446517,), (1373446519,), (1373446521,), (1373446523,), (1373446527,), (1373446535,), (1373446555,), (1373446557,), (1373446560,), (1373446562,), (1373446563,), (1373446566,), (1373446577,), (1373446580,), (1373446582,), (1373446585,), (1373446587,), (1373446590,), (1373446597,), (1373446600,), (1373446602,), (1373446604,), (1373446607,), (1373446610,), (1373446618,), (1373446621,), (1373446624,), (1373446627,), (1373446630,), (1373446633,), (1373446641,), (1373446644,), (1373446646,), (1373446648,), (1373446651,), (1373446653,)) 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 (1373446600) 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 25249766 , 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=25249748 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 (25249766) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25249748) result : ((1373446378,), (1373446384,), (1373446391,), (1373446397,), (1373446399,), (1373446401,), (1373446415,), (1373446416,), (1373446418,), (1373446420,), (1373446422,), (1373446425,), (1373446445,), (1373446448,), (1373446449,), (1373446451,), (1373446453,), (1373446455,), (1373446464,), (1373446466,), (1373446468,), (1373446470,), (1373446473,), (1373446476,), (1373446483,), (1373446485,), (1373446487,), (1373446488,), (1373446491,), (1373446494,), (1373446502,), (1373446516,), (1373446517,), (1373446519,), (1373446521,), (1373446523,), (1373446527,), (1373446535,), (1373446555,), (1373446557,), (1373446560,), (1373446562,), (1373446563,), (1373446566,), (1373446577,), (1373446580,), (1373446582,), (1373446585,), (1373446587,), (1373446590,), (1373446597,), (1373446600,), (1373446602,), (1373446604,), (1373446607,), (1373446610,), (1373446618,), (1373446621,), (1373446624,), (1373446627,), (1373446630,), (1373446633,), (1373446641,), (1373446644,), (1373446646,), (1373446648,), (1373446651,), (1373446653,)) 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 (1373446600) 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 25249767 , 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=25249748 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 (25249767) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25249748) result : ((1373446378,), (1373446384,), (1373446391,), (1373446397,), (1373446399,), (1373446401,), (1373446415,), (1373446416,), (1373446418,), (1373446420,), (1373446422,), (1373446425,), (1373446445,), (1373446448,), (1373446449,), (1373446451,), (1373446453,), (1373446455,), (1373446464,), (1373446466,), (1373446468,), (1373446470,), (1373446473,), (1373446476,), (1373446483,), (1373446485,), (1373446487,), (1373446488,), (1373446491,), (1373446494,), (1373446502,), (1373446516,), (1373446517,), (1373446519,), (1373446521,), (1373446523,), (1373446527,), (1373446535,), (1373446555,), (1373446557,), (1373446560,), (1373446562,), (1373446563,), (1373446566,), (1373446577,), (1373446580,), (1373446582,), (1373446585,), (1373446587,), (1373446590,), (1373446597,), (1373446600,), (1373446602,), (1373446604,), (1373446607,), (1373446610,), (1373446618,), (1373446621,), (1373446624,), (1373446627,), (1373446630,), (1373446633,), (1373446641,), (1373446644,), (1373446646,), (1373446648,), (1373446651,), (1373446653,)) 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 (1373446600) 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 25249768 , 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=25249748 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 (25249768) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25249748) result : ((1373446378,), (1373446384,), (1373446391,), (1373446397,), (1373446399,), (1373446401,), (1373446415,), (1373446416,), (1373446418,), (1373446420,), (1373446422,), (1373446425,), (1373446445,), (1373446448,), (1373446449,), (1373446451,), (1373446453,), (1373446455,), (1373446464,), (1373446466,), (1373446468,), (1373446470,), (1373446473,), (1373446476,), (1373446483,), (1373446485,), (1373446487,), (1373446488,), (1373446491,), (1373446494,), (1373446502,), (1373446516,), (1373446517,), (1373446519,), (1373446521,), (1373446523,), (1373446527,), (1373446535,), (1373446555,), (1373446557,), (1373446560,), (1373446562,), (1373446563,), (1373446566,), (1373446577,), (1373446580,), (1373446582,), (1373446585,), (1373446587,), (1373446590,), (1373446597,), (1373446600,), (1373446602,), (1373446604,), (1373446607,), (1373446610,), (1373446618,), (1373446621,), (1373446624,), (1373446627,), (1373446630,), (1373446633,), (1373446641,), (1373446644,), (1373446646,), (1373446648,), (1373446651,), (1373446653,)) 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 (1373446600) 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 25249769 , 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=25249748 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 (25249769) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25249748) result : ((1373446378,), (1373446384,), (1373446391,), (1373446397,), (1373446399,), (1373446401,), (1373446415,), (1373446416,), (1373446418,), (1373446420,), (1373446422,), (1373446425,), (1373446445,), (1373446448,), (1373446449,), (1373446451,), (1373446453,), (1373446455,), (1373446464,), (1373446466,), (1373446468,), (1373446470,), (1373446473,), (1373446476,), (1373446483,), (1373446485,), (1373446487,), (1373446488,), (1373446491,), (1373446494,), (1373446502,), (1373446516,), (1373446517,), (1373446519,), (1373446521,), (1373446523,), (1373446527,), (1373446535,), (1373446555,), (1373446557,), (1373446560,), (1373446562,), (1373446563,), (1373446566,), (1373446577,), (1373446580,), (1373446582,), (1373446585,), (1373446587,), (1373446590,), (1373446597,), (1373446600,), (1373446602,), (1373446604,), (1373446607,), (1373446610,), (1373446618,), (1373446621,), (1373446624,), (1373446627,), (1373446630,), (1373446633,), (1373446641,), (1373446644,), (1373446646,), (1373446648,), (1373446651,), (1373446653,)) 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 (1373446600) 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 25249770 , 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=25249748 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 (25249770) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25249748) result : ((1373446378,), (1373446384,), (1373446391,), (1373446397,), (1373446399,), (1373446401,), (1373446415,), (1373446416,), (1373446418,), (1373446420,), (1373446422,), (1373446425,), (1373446445,), (1373446448,), (1373446449,), (1373446451,), (1373446453,), (1373446455,), (1373446464,), (1373446466,), (1373446468,), (1373446470,), (1373446473,), (1373446476,), (1373446483,), (1373446485,), (1373446487,), (1373446488,), (1373446491,), (1373446494,), (1373446502,), (1373446516,), (1373446517,), (1373446519,), (1373446521,), (1373446523,), (1373446527,), (1373446535,), (1373446555,), (1373446557,), (1373446560,), (1373446562,), (1373446563,), (1373446566,), (1373446577,), (1373446580,), (1373446582,), (1373446585,), (1373446587,), (1373446590,), (1373446597,), (1373446600,), (1373446602,), (1373446604,), (1373446607,), (1373446610,), (1373446618,), (1373446621,), (1373446624,), (1373446627,), (1373446630,), (1373446633,), (1373446641,), (1373446644,), (1373446646,), (1373446648,), (1373446651,), (1373446653,)) 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 (1373446600) 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 25249771 , 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=25249748 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 (25249771) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25249748) result : ((1373446378,), (1373446384,), (1373446391,), (1373446397,), (1373446399,), (1373446401,), (1373446415,), (1373446416,), (1373446418,), (1373446420,), (1373446422,), (1373446425,), (1373446445,), (1373446448,), (1373446449,), (1373446451,), (1373446453,), (1373446455,), (1373446464,), (1373446466,), (1373446468,), (1373446470,), (1373446473,), (1373446476,), (1373446483,), (1373446485,), (1373446487,), (1373446488,), (1373446491,), (1373446494,), (1373446502,), (1373446516,), (1373446517,), (1373446519,), (1373446521,), (1373446523,), (1373446527,), (1373446535,), (1373446555,), (1373446557,), (1373446560,), (1373446562,), (1373446563,), (1373446566,), (1373446577,), (1373446580,), (1373446582,), (1373446585,), (1373446587,), (1373446590,), (1373446597,), (1373446600,), (1373446602,), (1373446604,), (1373446607,), (1373446610,), (1373446618,), (1373446621,), (1373446624,), (1373446627,), (1373446630,), (1373446633,), (1373446641,), (1373446644,), (1373446646,), (1373446648,), (1373446651,), (1373446653,)) 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 (1373446600) 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 25249772 , 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=25249748 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 (25249772) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25249748) result : ((1373446378,), (1373446384,), (1373446391,), (1373446397,), (1373446399,), (1373446401,), (1373446415,), (1373446416,), (1373446418,), (1373446420,), (1373446422,), (1373446425,), (1373446445,), (1373446448,), (1373446449,), (1373446451,), (1373446453,), (1373446455,), (1373446464,), (1373446466,), (1373446468,), (1373446470,), (1373446473,), (1373446476,), (1373446483,), (1373446485,), (1373446487,), (1373446488,), (1373446491,), (1373446494,), (1373446502,), (1373446516,), (1373446517,), (1373446519,), (1373446521,), (1373446523,), (1373446527,), (1373446535,), (1373446555,), (1373446557,), (1373446560,), (1373446562,), (1373446563,), (1373446566,), (1373446577,), (1373446580,), (1373446582,), (1373446585,), (1373446587,), (1373446590,), (1373446597,), (1373446600,), (1373446602,), (1373446604,), (1373446607,), (1373446610,), (1373446618,), (1373446621,), (1373446624,), (1373446627,), (1373446630,), (1373446633,), (1373446641,), (1373446644,), (1373446646,), (1373446648,), (1373446651,), (1373446653,)) 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 (1373446600) 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`=25249748 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','mal_croppe','papier','kraft','flou','Teint_Dans_La_Masse','cartonnette','metal','plastique','Carton_brun','Carton_gris','autre_refus')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25249748 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','mal_croppe','papier','kraft','flou','Teint_Dans_La_Masse','cartonnette','metal','plastique','Carton_brun','Carton_gris','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'plastique': {'main_port_id': 25249748, 'sub_port_id': 25249773, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032144, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 19)}, 'environnement': {'main_port_id': 25249748, 'sub_port_id': 25249774, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032145, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 19)}, 'metal': {'main_port_id': 25249748, 'sub_port_id': 25249775, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032146, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 19)}, 'mal_croppe': {'main_port_id': 25249748, 'sub_port_id': 25249776, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032147, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 19)}, 'Carton_gris': {'main_port_id': 25249748, 'sub_port_id': 25249777, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032148, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 19)}, 'papier': {'main_port_id': 25249748, 'sub_port_id': 25249778, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032149, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 19)}, 'Teint_Dans_La_Masse': {'main_port_id': 25249748, 'sub_port_id': 25249779, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032150, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 19)}, 'Carton_brun': {'main_port_id': 25249748, 'sub_port_id': 25249780, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032151, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 19)}, 'autre_refus': {'main_port_id': 25249748, 'sub_port_id': 25249781, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032152, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 19)}, 'flou': {'main_port_id': 25249748, 'sub_port_id': 25249782, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032153, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 19)}, 'kraft': {'main_port_id': 25249748, 'sub_port_id': 25249783, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032154, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 19)}, 'cartonnette': {'main_port_id': 25249748, 'sub_port_id': 25249784, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17032155, 'last_updated_at': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 24, 2, 26, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 24, 2, 19)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25249773,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25249761 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25249774,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25249762 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25249775,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25249763 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25249776,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25249764 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25249777,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25249765 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25249778,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25249766 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25249779,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25249767 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25249780,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25249768 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25249781,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25249769 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25249782,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25249770 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25249783,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25249771 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25249784,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25249772 lien utilise dans velours : https://www.fotonower.com/velours/25249773,25249774,25249775,25249776,25249777,25249778,25249779,25249780,25249781,25249782,25249783,25249784?tags=plastique,environnement,metal,mal_croppe,Carton_gris,papier,Teint_Dans_La_Masse,Carton_brun,autre_refus,flou,kraft,cartonnette After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25249748]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1373446653, 1373446651, 1373446648, 1373446646, 1373446644, 1373446641, 1373446633, 1373446630, 1373446627, 1373446624, 1373446621, 1373446618, 1373446610, 1373446607, 1373446604, 1373446602, 1373446600, 1373446597] map_info['map_portfolio_photo'] : {25249748: [1373446653, 1373446651, 1373446648, 1373446646, 1373446644, 1373446641, 1373446633, 1373446630, 1373446627, 1373446624, 1373446621, 1373446618, 1373446610, 1373446607, 1373446604, 1373446602, 1373446600, 1373446597, 1373446590, 1373446587, 1373446585, 1373446582, 1373446580, 1373446577, 1373446566, 1373446563, 1373446562, 1373446560, 1373446557, 1373446555, 1373446535, 1373446527, 1373446523, 1373446521, 1373446519, 1373446517, 1373446516, 1373446502, 1373446494, 1373446491, 1373446488, 1373446487, 1373446485, 1373446483, 1373446476, 1373446473, 1373446470, 1373446468, 1373446466, 1373446464, 1373446455, 1373446453, 1373446451, 1373446449, 1373446448, 1373446445, 1373446425, 1373446422, 1373446420, 1373446418, 1373446416, 1373446415, 1373446401, 1373446399, 1373446397, 1373446391, 1373446384, 1373446378]} final : False mtd_id 4302 list_pids : [1373446653, 1373446651, 1373446648, 1373446646, 1373446644, 1373446641, 1373446633, 1373446630, 1373446627, 1373446624, 1373446621, 1373446618, 1373446610, 1373446607, 1373446604, 1373446602, 1373446600, 1373446597] Looping around the photos to save general results len do output : 1 /25249748. 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, '3332876') ('4302', '25249748', '1373446653', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446651', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446648', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446646', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446644', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446641', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446633', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446630', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446627', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446624', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446621', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446618', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446610', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446607', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446604', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446602', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446600', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446597', None, None, None, None, None, '3332876') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 19 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, '25249748', "{'plastique': 25249761, 'environnement': 25249762, 'metal': 25249763, 'mal_croppe': 25249764, 'Carton_gris': 25249765, 'papier': 25249766, 'Teint_Dans_La_Masse': 25249767, 'Carton_brun': 25249768, 'autre_refus': 25249769, 'flou': 25249770, 'kraft': 25249771, 'cartonnette': 25249772}", None, None, None, None, '3332876'), ('4302', '25249748', '1373446653', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446651', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446648', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446646', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446644', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446641', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446633', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446630', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446627', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446624', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446621', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446618', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446610', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446607', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446604', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446602', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446600', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446597', None, None, None, None, None, '3332876')] time used for this insertion : 0.018944978713989258 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.4444117546081543 time spend to save output : 0.019221067428588867 total time spend for step 1 : 0.46363282203674316 step2:final Thu Jul 24 02:28:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25249748) 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 25249748 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1373446401,1373446399,1373446397,1373446391,1373446384,1373446378,1373446425,1373446422,1373446420,1373446418,1373446416,1373446415,1373446455,1373446453,1373446451,1373446449,1373446448,1373446445,1373446476,1373446473,1373446470,1373446468,1373446466,1373446464,1373446494,1373446502,1373446491,1373446488,1373446487,1373446485,1373446483,1373446527,1373446523,1373446521,1373446519,1373446517,1373446516,1373446535,1373446566,1373446563,1373446562,1373446560,1373446557,1373446555,1373446590,1373446587,1373446585,1373446582,1373446580,1373446577,1373446610,1373446607,1373446604,1373446602,1373446600,1373446597,1373446633,1373446630,1373446627,1373446624,1373446621,1373446618,1373446653,1373446651,1373446648,1373446646,1373446644,1373446641); 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([25249748]) Inside saveOutput : final : False verbose : True original output for save of step final : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} new output for save of step final : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} [1373446653, 1373446651, 1373446648, 1373446646, 1373446644, 1373446641, 1373446633, 1373446630, 1373446627, 1373446624, 1373446621, 1373446618, 1373446610, 1373446607, 1373446604, 1373446602, 1373446600, 1373446597] map_info['map_portfolio_photo'] : {25249748: [1373446653, 1373446651, 1373446648, 1373446646, 1373446644, 1373446641, 1373446633, 1373446630, 1373446627, 1373446624, 1373446621, 1373446618, 1373446610, 1373446607, 1373446604, 1373446602, 1373446600, 1373446597, 1373446590, 1373446587, 1373446585, 1373446582, 1373446580, 1373446577, 1373446566, 1373446563, 1373446562, 1373446560, 1373446557, 1373446555, 1373446535, 1373446527, 1373446523, 1373446521, 1373446519, 1373446517, 1373446516, 1373446502, 1373446494, 1373446491, 1373446488, 1373446487, 1373446485, 1373446483, 1373446476, 1373446473, 1373446470, 1373446468, 1373446466, 1373446464, 1373446455, 1373446453, 1373446451, 1373446449, 1373446448, 1373446445, 1373446425, 1373446422, 1373446420, 1373446418, 1373446416, 1373446415, 1373446401, 1373446399, 1373446397, 1373446391, 1373446384, 1373446378]} final : False mtd_id 4302 list_pids : [1373446653, 1373446651, 1373446648, 1373446646, 1373446644, 1373446641, 1373446633, 1373446630, 1373446627, 1373446624, 1373446621, 1373446618, 1373446610, 1373446607, 1373446604, 1373446602, 1373446600, 1373446597] Looping around the photos to save general results len do output : 18 /1373446653.Didn't retrieve data . /1373446651.Didn't retrieve data . /1373446648.Didn't retrieve data . /1373446646.Didn't retrieve data . /1373446644.Didn't retrieve data . /1373446641.Didn't retrieve data . /1373446633.Didn't retrieve data . /1373446630.Didn't retrieve data . /1373446627.Didn't retrieve data . /1373446624.Didn't retrieve data . /1373446621.Didn't retrieve data . /1373446618.Didn't retrieve data . /1373446610.Didn't retrieve data . /1373446607.Didn't retrieve data . /1373446604.Didn't retrieve data . /1373446602.Didn't retrieve data . /1373446600.Didn't retrieve data . /1373446597.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, '3332876') ('4302', '25249748', '1373446653', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446651', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446648', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446646', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446644', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446641', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446633', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446630', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446627', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446624', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446621', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446618', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446610', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446607', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446604', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446602', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446600', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446597', None, None, None, None, None, '3332876') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 54 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', '25249748', '1373446653', '0.0', None, None, None, None, '3332876'), ('4302', '25249748', '1373446651', '0.0', None, None, None, None, '3332876'), ('4302', '25249748', '1373446648', '0.0', None, None, None, None, '3332876'), ('4302', '25249748', '1373446646', '0.0', None, None, None, None, '3332876'), ('4302', '25249748', '1373446644', '0.0', None, None, None, None, '3332876'), ('4302', '25249748', '1373446641', '0.0', None, None, None, None, '3332876'), ('4302', '25249748', '1373446633', '0.0', None, None, None, None, '3332876'), ('4302', '25249748', '1373446630', '0.0', None, None, None, None, '3332876'), ('4302', '25249748', '1373446627', '0.0', None, None, None, None, '3332876'), ('4302', '25249748', '1373446624', '0.0', None, None, None, None, '3332876'), ('4302', '25249748', '1373446621', '0.0', None, None, None, None, '3332876'), ('4302', '25249748', '1373446618', '0.0', None, None, None, None, '3332876'), ('4302', '25249748', '1373446610', '0.0', None, None, None, None, '3332876'), ('4302', '25249748', '1373446607', '0.0', None, None, None, None, '3332876'), ('4302', '25249748', '1373446604', '0.0', None, None, None, None, '3332876'), ('4302', '25249748', '1373446602', '0.0', None, None, None, None, '3332876'), ('4302', '25249748', '1373446600', '0.0', None, None, None, None, '3332876'), ('4302', '25249748', '1373446597', '0.0', None, None, None, None, '3332876')] time used for this insertion : 0.015212774276733398 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.08177471160888672 time spend to save output : 0.016072511672973633 total time spend for step 2 : 0.09784722328186035 step3:velours_tree Thu Jul 24 02:28:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {25249748: [{'plastique': 25249761, 'environnement': 25249762, 'metal': 25249763, 'mal_croppe': 25249764, 'Carton_gris': 25249765, 'papier': 25249766, 'Teint_Dans_La_Masse': 25249767, 'Carton_brun': 25249768, 'autre_refus': 25249769, 'flou': 25249770, 'kraft': 25249771, 'cartonnette': 25249772}]} input_args_next_step : {25249748: ()} output_args : {25249748: [{'plastique': 25249761, 'environnement': 25249762, 'metal': 25249763, 'mal_croppe': 25249764, 'Carton_gris': 25249765, 'papier': 25249766, 'Teint_Dans_La_Masse': 25249767, 'Carton_brun': 25249768, 'autre_refus': 25249769, 'flou': 25249770, 'kraft': 25249771, 'cartonnette': 25249772}]} args : 25249748 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 : ({'plastique': 25249761, 'environnement': 25249762, 'metal': 25249763, 'mal_croppe': 25249764, 'Carton_gris': 25249765, 'papier': 25249766, 'Teint_Dans_La_Masse': 25249767, 'Carton_brun': 25249768, 'autre_refus': 25249769, 'flou': 25249770, 'kraft': 25249771, 'cartonnette': 25249772},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25249748) 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([25249748]) 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.4040980339050293 time spend to save output : 6.842613220214844e-05 total time spend for step 3 : 0.40416646003723145 step4:send_mail_cod Thu Jul 24 02:28:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} input_args_next_step : {1373446653: ()} output_args : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} args : 1373446653 depend.output_id : 0 input_args_next_step : {1373446653: ('0.0',), 1373446651: ()} output_args : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} args : 1373446651 depend.output_id : 0 input_args_next_step : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ()} output_args : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} args : 1373446648 depend.output_id : 0 input_args_next_step : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ()} output_args : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} args : 1373446646 depend.output_id : 0 input_args_next_step : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ()} output_args : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} args : 1373446644 depend.output_id : 0 input_args_next_step : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ()} output_args : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} args : 1373446641 depend.output_id : 0 input_args_next_step : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ()} output_args : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} args : 1373446633 depend.output_id : 0 input_args_next_step : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ()} output_args : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} args : 1373446630 depend.output_id : 0 input_args_next_step : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ()} output_args : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} args : 1373446627 depend.output_id : 0 input_args_next_step : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ()} output_args : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} args : 1373446624 depend.output_id : 0 input_args_next_step : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ()} output_args : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} args : 1373446621 depend.output_id : 0 input_args_next_step : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ()} output_args : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} args : 1373446618 depend.output_id : 0 input_args_next_step : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ()} output_args : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} args : 1373446610 depend.output_id : 0 input_args_next_step : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ()} output_args : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} args : 1373446607 depend.output_id : 0 input_args_next_step : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ()} output_args : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} args : 1373446604 depend.output_id : 0 input_args_next_step : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ()} output_args : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} args : 1373446602 depend.output_id : 0 input_args_next_step : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ()} output_args : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} args : 1373446600 depend.output_id : 0 input_args_next_step : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ()} output_args : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',)} args : 1373446597 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 : {25249748: [{'plastique': 25249761, 'environnement': 25249762, 'metal': 25249763, 'mal_croppe': 25249764, 'Carton_gris': 25249765, 'papier': 25249766, 'Teint_Dans_La_Masse': 25249767, 'Carton_brun': 25249768, 'autre_refus': 25249769, 'flou': 25249770, 'kraft': 25249771, 'cartonnette': 25249772}]} input_args_next_step : {1373446653: ('0.0',), 1373446651: ('0.0',), 1373446648: ('0.0',), 1373446646: ('0.0',), 1373446644: ('0.0',), 1373446641: ('0.0',), 1373446633: ('0.0',), 1373446630: ('0.0',), 1373446627: ('0.0',), 1373446624: ('0.0',), 1373446621: ('0.0',), 1373446618: ('0.0',), 1373446610: ('0.0',), 1373446607: ('0.0',), 1373446604: ('0.0',), 1373446602: ('0.0',), 1373446600: ('0.0',), 1373446597: ('0.0',), 25249748: ()} output_args : {25249748: [{'plastique': 25249761, 'environnement': 25249762, 'metal': 25249763, 'mal_croppe': 25249764, 'Carton_gris': 25249765, 'papier': 25249766, 'Teint_Dans_La_Masse': 25249767, 'Carton_brun': 25249768, 'autre_refus': 25249769, 'flou': 25249770, 'kraft': 25249771, 'cartonnette': 25249772}]} args : 25249748 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 :19, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25249748) 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 (1373446653,1373446651,1373446648,1373446646,1373446644,1373446641,1373446633,1373446630,1373446627,1373446624,1373446621,1373446618,1373446610,1373446607,1373446604,1373446602,1373446600,1373446597) Found this number of photos: 18 ##### Call download_photos : nb_thread : 5 begin to download photo : 1373446597 begin to download photo : 1373446607 begin to download photo : 1373446624 begin to download photo : 1373446641 begin to download photo : 1373446651 download finish for photo 1373446597 begin to download photo : 1373446600 download finish for photo 1373446651 begin to download photo : 1373446653 download finish for photo 1373446624 begin to download photo : 1373446627 download finish for photo 1373446641 begin to download photo : 1373446644 download finish for photo 1373446607 begin to download photo : 1373446610 download finish for photo 1373446600 begin to download photo : 1373446602 download finish for photo 1373446653 download finish for photo 1373446627 begin to download photo : 1373446630 download finish for photo 1373446610 begin to download photo : 1373446618 download finish for photo 1373446644 begin to download photo : 1373446646 download finish for photo 1373446646 begin to download photo : 1373446648 download finish for photo 1373446602 begin to download photo : 1373446604 download finish for photo 1373446618 begin to download photo : 1373446621 download finish for photo 1373446630 begin to download photo : 1373446633 download finish for photo 1373446604 download finish for photo 1373446621 download finish for photo 1373446648 download finish for photo 1373446633 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette252497611753316939/ imagette252497631753316939/ imagette252497641753316939/ imagette252497691753316939/ imagette252497701753316939/ imagette252497711753316939/ imagette252497721753316939/ imagette252497651753316939/ imagette252497671753316939/ imagette252497681753316939/ length of list_filenames : 18 ; length of list_pids : 18 ; length of list_args : 18 results_Auto_P25249748_24-07-2025_02_28_59.pdf 25249761 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=25249761 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252497611753316939 25249763 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=25249763 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252497631753316939 25249764 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=25249764 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252497641753316939 25249769 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=25249769 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252497691753316939 25249770 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=25249770 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252497701753316939 25249771 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=25249771 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252497711753316939 25249772 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=25249772 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252497721753316939 25249765 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=25249765 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252497651753316939 25249767 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=25249767 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252497671753316939 25249768 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=25249768 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette252497681753316939 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=25249748 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/25249773,25249774,25249775,25249776,25249777,25249778,25249779,25249780,25249781,25249782,25249783,25249784?tags=plastique,environnement,metal,mal_croppe,Carton_gris,papier,Teint_Dans_La_Masse,Carton_brun,autre_refus,flou,kraft,cartonnette your option no_mail is active, we will not send the real mail to your client args[1373446653] : ('0.0',) no score found for photo 1373446653 We are sending mail with results at report@fotonower.com args[1373446651] : ('0.0',) no score found for photo 1373446651 We are sending mail with results at report@fotonower.com args[1373446648] : ('0.0',) no score found for photo 1373446648 We are sending mail with results at report@fotonower.com args[1373446646] : ('0.0',) no score found for photo 1373446646 We are sending mail with results at report@fotonower.com args[1373446644] : ('0.0',) no score found for photo 1373446644 We are sending mail with results at report@fotonower.com args[1373446641] : ('0.0',) no score found for photo 1373446641 We are sending mail with results at report@fotonower.com args[1373446633] : ('0.0',) no score found for photo 1373446633 We are sending mail with results at report@fotonower.com args[1373446630] : ('0.0',) no score found for photo 1373446630 We are sending mail with results at report@fotonower.com args[1373446627] : ('0.0',) no score found for photo 1373446627 We are sending mail with results at report@fotonower.com args[1373446624] : ('0.0',) no score found for photo 1373446624 We are sending mail with results at report@fotonower.com args[1373446621] : ('0.0',) no score found for photo 1373446621 We are sending mail with results at report@fotonower.com args[1373446618] : ('0.0',) no score found for photo 1373446618 We are sending mail with results at report@fotonower.com args[1373446610] : ('0.0',) no score found for photo 1373446610 We are sending mail with results at report@fotonower.com args[1373446607] : ('0.0',) no score found for photo 1373446607 We are sending mail with results at report@fotonower.com args[1373446604] : ('0.0',) no score found for photo 1373446604 We are sending mail with results at report@fotonower.com args[1373446602] : ('0.0',) no score found for photo 1373446602 We are sending mail with results at report@fotonower.com args[1373446600] : ('0.0',) no score found for photo 1373446600 We are sending mail with results at report@fotonower.com args[1373446597] : ('0.0',) no score found for photo 1373446597 We are sending mail with results at report@fotonower.com refus_total : 0.0 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=25249748 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_P25249748_24-07-2025_02_28_59.pdf results_Auto_P25249748_24-07-2025_02_28_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25249748_24-07-2025_02_28_59.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','25249748','results_Auto_P25249748_24-07-2025_02_28_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25249748_24-07-2025_02_28_59.pdf','pdf','','0.14','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25249748]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1373446653, 1373446651, 1373446648, 1373446646, 1373446644, 1373446641, 1373446633, 1373446630, 1373446627, 1373446624, 1373446621, 1373446618, 1373446610, 1373446607, 1373446604, 1373446602, 1373446600, 1373446597] map_info['map_portfolio_photo'] : {25249748: [1373446653, 1373446651, 1373446648, 1373446646, 1373446644, 1373446641, 1373446633, 1373446630, 1373446627, 1373446624, 1373446621, 1373446618, 1373446610, 1373446607, 1373446604, 1373446602, 1373446600, 1373446597, 1373446590, 1373446587, 1373446585, 1373446582, 1373446580, 1373446577, 1373446566, 1373446563, 1373446562, 1373446560, 1373446557, 1373446555, 1373446535, 1373446527, 1373446523, 1373446521, 1373446519, 1373446517, 1373446516, 1373446502, 1373446494, 1373446491, 1373446488, 1373446487, 1373446485, 1373446483, 1373446476, 1373446473, 1373446470, 1373446468, 1373446466, 1373446464, 1373446455, 1373446453, 1373446451, 1373446449, 1373446448, 1373446445, 1373446425, 1373446422, 1373446420, 1373446418, 1373446416, 1373446415, 1373446401, 1373446399, 1373446397, 1373446391, 1373446384, 1373446378]} final : False mtd_id 4302 list_pids : [1373446653, 1373446651, 1373446648, 1373446646, 1373446644, 1373446641, 1373446633, 1373446630, 1373446627, 1373446624, 1373446621, 1373446618, 1373446610, 1373446607, 1373446604, 1373446602, 1373446600, 1373446597] 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, '3332876') ('4302', '25249748', '1373446653', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446651', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446648', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446646', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446644', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446641', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446633', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446630', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446627', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446624', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446621', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446618', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446610', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446607', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446604', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446602', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446600', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446597', None, None, None, None, None, '3332876') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 18 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '25249748', '1373446653', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446651', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446648', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446646', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446644', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446641', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446633', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446630', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446627', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446624', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446621', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446618', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446610', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446607', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446604', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446602', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446600', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446597', None, None, None, None, None, '3332876')] time used for this insertion : 0.020596027374267578 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.736041784286499 time spend to save output : 0.02088451385498047 total time spend for step 4 : 1.7569262981414795 step5:split_time_score Thu Jul 24 02:29:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['25249748'] 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 : [('25249748',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25249748) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1373446651: {'path': 'temp/1753316938_175851_1373446651_3e36d32f4ac4e73f8ce262ff9c83b747.jpg', 'extension': 'jpg'}, 1373446653: {'path': 'temp/1753316938_175851_1373446653_55510047e67e5067a7e27efc1efb469b.jpg', 'extension': 'jpg'}, 1373446597: {'path': 'temp/1753316938_175851_1373446597_d12a3a3d362d63c0503360d397807b02.jpg', 'extension': 'jpg'}, 1373446600: {'path': 'temp/1753316938_175851_1373446600_34775e917e4deae37fe87ffc9210ce9d.jpg', 'extension': 'jpg'}, 1373446602: {'path': 'temp/1753316938_175851_1373446602_273789fd6c3025f4ae0a1cca2f5af5df.jpg', 'extension': 'jpg'}, 1373446604: {'path': 'temp/1753316938_175851_1373446604_7255a8b1f0f32101bb669955b087915e.jpg', 'extension': 'jpg'}, 1373446607: {'path': 'temp/1753316938_175851_1373446607_188e71f85291fdd640be9f8c6099f062.jpg', 'extension': 'jpg'}, 1373446610: {'path': 'temp/1753316938_175851_1373446610_032ab2db2cd8aaba2c6dc5896619ff60.jpg', 'extension': 'jpg'}, 1373446618: {'path': 'temp/1753316938_175851_1373446618_8a7acc67b7b47a9f62e8df521ac325fe.jpg', 'extension': 'jpg'}, 1373446621: {'path': 'temp/1753316938_175851_1373446621_ca03b6b5a712d531bf6adcb2303c19a6.jpg', 'extension': 'jpg'}, 1373446641: {'path': 'temp/1753316938_175851_1373446641_5c05f741089d3060e1dc83441411778a.jpg', 'extension': 'jpg'}, 1373446644: {'path': 'temp/1753316938_175851_1373446644_b6749d8a9d7bd9204ac7b12606eb0151.jpg', 'extension': 'jpg'}, 1373446646: {'path': 'temp/1753316938_175851_1373446646_5bda2d2946f01e5a18701c2786f804df.jpg', 'extension': 'jpg'}, 1373446648: {'path': 'temp/1753316938_175851_1373446648_b8e9d9dcac10e1d64cda49cdc5a25dc9.jpg', 'extension': 'jpg'}, 1373446624: {'path': 'temp/1753316938_175851_1373446624_be840f37492a07047570abc579f62497.jpg', 'extension': 'jpg'}, 1373446627: {'path': 'temp/1753316938_175851_1373446627_33ce8b0629a280b97f30b52ccfce260f.jpg', 'extension': 'jpg'}, 1373446630: {'path': 'temp/1753316938_175851_1373446630_b6f0eb4b1383eac0dba081ac9e8d81c3.jpg', 'extension': 'jpg'}, 1373446633: {'path': 'temp/1753316938_175851_1373446633_fb8b12cbcca87727b4cff1675b7fe789.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 = 25249748; (('arc_en_ciel_jrm_live',), ('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 = 25249748 group by h (('02', 68),) 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=25249748 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 (25249748) 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 (25249748) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 24072025 25249748 Nombre de photos uploadées : 68 / 23040 (0%) 24072025 25249748 Nombre de photos taguées (types de déchets): 0 / 68 (0%) 24072025 25249748 Nombre de photos taguées (volume) : 0 / 68 (0%) [{'photo_id': 1373446401, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/24/767d9b964df0d10f7c34efd27e14a539.jpg', 'username': None, 'uploaded_at': 1753316163, 'text': 'image_24072025_02_15_04_010145m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1373446399, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/24/7adc24dd37936085c3b34875488f2c92.jpg', 'username': None, 'uploaded_at': 1753316163, 'text': 'image_24072025_02_15_14_010137m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1373446397, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/24/d5b454c9f7ecd0e81d402f2dabf35229.jpg', 'username': None, 'uploaded_at': 1753316163, 'text': 'image_24072025_02_15_23_009125m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1373446391, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/24/cafd4be5b6b73408b56c456c85176313.jpg', 'username': None, 'uploaded_at': 1753316163, 'text': 'image_24072025_02_15_33_010135m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.9073486328125e-06 elapsed_time : order_list_meta_photo_and_scores 5.4836273193359375e-06 ???????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0038604736328125 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 25249748, '2025-07-24' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2002734,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.029247760772705078 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= 2002734 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2002734, 'dashboard_run_id': 2010357, 'mtr_portfolio_id': 25245820, 'dashboard_result_id': 12987861, '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_P25245820_24-07-2025_00_16_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25245843, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25245844, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25245845, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25245846, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25245847, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25245848, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25245849, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25245850, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25245851, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25245852, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25245853, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25245854, 'pht': 3726}}"}, {'dashboat_entry_day': 2002734, 'dashboard_run_id': 2010357, 'mtr_portfolio_id': 25246316, 'dashboard_result_id': 12987862, '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_P25246316_24-07-2025_00_30_31.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25246324, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25246325, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25246326, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25246327, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25246328, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25246329, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25246330, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25246331, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25246332, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25246333, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25246334, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25246335, 'pht': 3726}}"}, {'dashboat_entry_day': 2002734, 'dashboard_run_id': 2010357, 'mtr_portfolio_id': 25246632, 'dashboard_result_id': 12987863, '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_P25246632_24-07-2025_01_00_31.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25246638, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25246639, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25246640, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25246641, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25246642, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25246643, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25246644, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25246645, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25246646, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25246647, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25246648, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25246649, 'pht': 3726}}"}, {'dashboat_entry_day': 2002734, 'dashboard_run_id': 2010357, 'mtr_portfolio_id': 25246996, 'dashboard_result_id': 12987864, '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_P25246996_24-07-2025_01_00_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25246997, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25246998, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25246999, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25247000, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25247001, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25247002, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25247003, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25247004, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25247005, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25247006, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25247007, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25247008, 'pht': 3726}}"}, {'dashboat_entry_day': 2002734, 'dashboard_run_id': 2010357, 'mtr_portfolio_id': 25247263, 'dashboard_result_id': 12987865, '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_P25247263_24-07-2025_01_16_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25247268, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25247269, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25247270, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25247271, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25247272, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25247273, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25247274, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25247275, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25247276, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25247277, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25247278, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25247279, 'pht': 3726}}"}, {'dashboat_entry_day': 2002734, 'dashboard_run_id': 2010357, 'mtr_portfolio_id': 25247788, 'dashboard_result_id': 12987866, '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_P25247788_24-07-2025_01_31_03.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25247798, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25247799, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25247800, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25247801, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25247802, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25247803, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25247804, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25247805, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25247806, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25247807, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25247808, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25247809, 'pht': 3726}}"}, {'dashboat_entry_day': 2002734, 'dashboard_run_id': 2010357, 'mtr_portfolio_id': 25248336, 'dashboard_result_id': 12987867, '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_P25248336_24-07-2025_01_46_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25248343, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25248344, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25248345, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25248346, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25248347, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25248348, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25248349, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25248350, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25248351, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25248352, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25248353, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25248354, 'pht': 3726}}"}, {'dashboat_entry_day': 2002734, 'dashboard_run_id': 2010357, 'mtr_portfolio_id': 25248727, 'dashboard_result_id': 12987868, '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_P25248727_24-07-2025_02_00_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25248754, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25248755, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25248756, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25248757, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25248758, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25248759, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25248760, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25248761, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25248762, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25248763, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25248764, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25248765, 'pht': 3726}}"}, {'dashboat_entry_day': 2002734, 'dashboard_run_id': 2010357, 'mtr_portfolio_id': 25249105, 'dashboard_result_id': 12987869, '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_P25249105_24-07-2025_02_16_31.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25249132, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25249133, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25249134, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25249135, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25249136, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25249137, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25249138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25249139, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25249140, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25249141, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25249142, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25249143, 'pht': 3726}}"}, {'dashboat_entry_day': 2002734, 'dashboard_run_id': 2010357, 'mtr_portfolio_id': 25249748, 'dashboard_result_id': 12987870, '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_P25249748_24-07-2025_02_26_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25249761, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25249762, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25249763, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25249764, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25249765, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25249766, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25249767, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25249768, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25249769, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25249770, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25249771, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25249772, '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 = 25245820 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': 3331980, 'mtr_portfolio_id': 25245820, 'created_at': datetime.datetime(2025, 7, 24, 0, 16, 58), 'result': '0.0317542730720465', 'result_long': None, 'result_double': None}] Qualite : 0.0317542730720465 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25245820 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25245820_24-07-2025_00_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25245820 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_P25245820_24-07-2025_00_16_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25245843, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25245844, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25245845, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25245846, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25245847, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25245848, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25245849, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25245850, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25245851, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25245852, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25245853, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25245854, 'pht': 3726}}" where mtr_portfolio_id = 25245820 and dashboard_run_id = 2010357 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`=25245820 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12987861, 0.0317542730720465, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25245820_24-07-2025_00_16_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25245843, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25245844, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25245845, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25245846, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25245847, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25245848, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25245849, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25245850, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25245851, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25245852, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25245853, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25245854, '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 = 25246316 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': 3332031, 'mtr_portfolio_id': 25246316, 'created_at': datetime.datetime(2025, 7, 24, 0, 30, 30), 'result': '0.036490845299108926', 'result_long': None, 'result_double': None}] Qualite : 0.036490845299108926 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25246316 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25246316_24-07-2025_00_30_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25246316 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_P25246316_24-07-2025_00_30_31.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25246324, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25246325, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25246326, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25246327, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25246328, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25246329, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25246330, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25246331, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25246332, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25246333, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25246334, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25246335, 'pht': 3726}}" where mtr_portfolio_id = 25246316 and dashboard_run_id = 2010357 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`=25246316 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12987862, 0.036490845299108926, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25246316_24-07-2025_00_30_31.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25246324, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25246325, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25246326, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25246327, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25246328, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25246329, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25246330, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25246331, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25246332, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25246333, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25246334, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25246335, '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 = 25246632 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': 3332125, 'mtr_portfolio_id': 25246632, 'created_at': datetime.datetime(2025, 7, 24, 1, 0, 30), 'result': '0.03786872875237322', 'result_long': None, 'result_double': None}] Qualite : 0.03786872875237322 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25246632 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25246632_24-07-2025_01_00_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25246632 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_P25246632_24-07-2025_01_00_31.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25246638, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25246639, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25246640, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25246641, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25246642, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25246643, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25246644, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25246645, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25246646, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25246647, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25246648, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25246649, 'pht': 3726}}" where mtr_portfolio_id = 25246632 and dashboard_run_id = 2010357 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`=25246632 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12987863, 0.03786872875237322, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25246632_24-07-2025_01_00_31.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25246638, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25246639, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25246640, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25246641, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25246642, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25246643, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25246644, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25246645, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25246646, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25246647, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25246648, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25246649, '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 = 25246996 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': 3332250, 'mtr_portfolio_id': 25246996, 'created_at': datetime.datetime(2025, 7, 24, 1, 0, 58), 'result': '0.03156361535970644', 'result_long': None, 'result_double': None}] Qualite : 0.03156361535970644 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25246996 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25246996_24-07-2025_01_00_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25246996 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_P25246996_24-07-2025_01_00_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25246997, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25246998, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25246999, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25247000, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25247001, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25247002, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25247003, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25247004, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25247005, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25247006, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25247007, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25247008, 'pht': 3726}}" where mtr_portfolio_id = 25246996 and dashboard_run_id = 2010357 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`=25246996 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12987864, 0.03156361535970644, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25246996_24-07-2025_01_00_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25246997, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25246998, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25246999, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25247000, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25247001, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25247002, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25247003, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25247004, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25247005, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25247006, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25247007, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25247008, '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 = 25247263 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 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 = 25247263 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 25247263 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25247263 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25247263 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3332344, 'mtr_portfolio_id': 25247263, 'created_at': datetime.datetime(2025, 7, 24, 1, 16, 58), 'result': 0.0, 'result_long': None, 'result_double': None}] Qualite : 0.0 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25247263 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25247263_24-07-2025_01_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25247263 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_P25247263_24-07-2025_01_16_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25247268, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25247269, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25247270, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25247271, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25247272, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25247273, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25247274, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25247275, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25247276, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25247277, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25247278, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25247279, 'pht': 3726}}" where mtr_portfolio_id = 25247263 and dashboard_run_id = 2010357 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`=25247263 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12987865, 0.0, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25247263_24-07-2025_01_16_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25247268, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25247269, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25247270, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25247271, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25247272, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25247273, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25247274, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25247275, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25247276, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25247277, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25247278, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25247279, '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 = 25247788 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 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 = 25247788 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 25247788 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25247788 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25247788 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3332462, 'mtr_portfolio_id': 25247788, 'created_at': datetime.datetime(2025, 7, 24, 1, 31, 1), 'result': 0.0, 'result_long': None, 'result_double': None}] Qualite : 0.0 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25247788 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25247788_24-07-2025_01_31_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25247788 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_P25247788_24-07-2025_01_31_03.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25247798, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25247799, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25247800, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25247801, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25247802, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25247803, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25247804, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25247805, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25247806, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25247807, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25247808, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25247809, 'pht': 3726}}" where mtr_portfolio_id = 25247788 and dashboard_run_id = 2010357 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`=25247788 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12987866, 0.0, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25247788_24-07-2025_01_31_03.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25247798, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25247799, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25247800, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25247801, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25247802, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25247803, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25247804, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25247805, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25247806, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25247807, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25247808, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25247809, '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 = 25248336 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': 3332595, 'mtr_portfolio_id': 25248336, 'created_at': datetime.datetime(2025, 7, 24, 1, 46, 57), 'result': '0.0454593996672658', 'result_long': None, 'result_double': None}] Qualite : 0.0454593996672658 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25248336 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25248336_24-07-2025_01_46_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25248336 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_P25248336_24-07-2025_01_46_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25248343, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25248344, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25248345, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25248346, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25248347, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25248348, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25248349, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25248350, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25248351, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25248352, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25248353, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25248354, 'pht': 3726}}" where mtr_portfolio_id = 25248336 and dashboard_run_id = 2010358 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`=25248336 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12987867, 0.0454593996672658, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25248336_24-07-2025_01_46_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25248343, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25248344, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25248345, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25248346, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25248347, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25248348, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25248349, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25248350, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25248351, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25248352, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25248353, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25248354, '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 = 25248727 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': 3332680, 'mtr_portfolio_id': 25248727, 'created_at': datetime.datetime(2025, 7, 24, 2, 0, 31), 'result': '0.024204558295511498', 'result_long': None, 'result_double': None}] Qualite : 0.024204558295511498 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25248727 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25248727_24-07-2025_02_00_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25248727 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_P25248727_24-07-2025_02_00_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25248754, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25248755, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25248756, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25248757, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25248758, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25248759, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25248760, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25248761, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25248762, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25248763, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25248764, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25248765, 'pht': 3726}}" where mtr_portfolio_id = 25248727 and dashboard_run_id = 2010358 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`=25248727 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12987868, 0.024204558295511498, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25248727_24-07-2025_02_00_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25248754, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25248755, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25248756, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25248757, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25248758, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25248759, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25248760, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25248761, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25248762, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25248763, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25248764, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25248765, '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 = 25249105 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': 3332768, 'mtr_portfolio_id': 25249105, 'created_at': datetime.datetime(2025, 7, 24, 2, 16, 30), 'result': '0.030429929950127377', 'result_long': None, 'result_double': None}] Qualite : 0.030429929950127377 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25249105 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25249105_24-07-2025_02_16_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25249105 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_P25249105_24-07-2025_02_16_31.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25249132, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25249133, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25249134, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25249135, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25249136, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25249137, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25249138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25249139, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25249140, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25249141, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25249142, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25249143, 'pht': 3726}}" where mtr_portfolio_id = 25249105 and dashboard_run_id = 2010358 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`=25249105 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12987869, 0.030429929950127377, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25249105_24-07-2025_02_16_31.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25249132, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25249133, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25249134, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25249135, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25249136, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25249137, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25249138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25249139, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25249140, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25249141, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25249142, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25249143, '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 = 25249748 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 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 = 25249748 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 25249748 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25249748 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25249748 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3332876, 'mtr_portfolio_id': 25249748, 'created_at': datetime.datetime(2025, 7, 24, 2, 28, 58), 'result': 0.0, 'result_long': None, 'result_double': None}] Qualite : 0.0 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25249748 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25249748_24-07-2025_02_28_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25249748 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_P25249748_24-07-2025_02_28_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25249761, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25249762, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25249763, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25249764, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25249765, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25249766, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25249767, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25249768, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25249769, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25249770, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25249771, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25249772, 'pht': 3726}}" where mtr_portfolio_id = 25249748 and dashboard_run_id = 2010358 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`=25249748 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12987870, 0.0, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25249748_24-07-2025_02_28_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25249761, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25249762, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25249763, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25249764, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25249765, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25249766, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25249767, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25249768, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25249769, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25249770, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25249771, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25249772, '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 (25245820,25246316,25246632,25246996,25247263,25247788,25248336,25248727,25249105,25249748) result : ((1373433356,), (1373433609,), (1373433797,), (1373433798,), (1373433820,), (1373433832,), (1373433834,), (1373433840,), (1373434211,), (1373434234,), (1373434276,), (1373434320,), (1373434355,), (1373434386,), (1373434551,), (1373434562,), (1373434599,), (1373434624,), (1373434649,), (1373434685,), (1373434819,), (1373434822,), (1373434827,), (1373434828,), (1373434831,), (1373434835,), (1373435006,), (1373435350,), (1373435352,), (1373435354,), (1373435355,), (1373435357,), (1373435359,), (1373435531,), (1373435532,), (1373435553,), (1373435561,), (1373435563,), (1373435565,), (1373435583,), (1373435585,), (1373435590,), (1373435596,), (1373435607,), (1373435610,), (1373435637,), (1373435643,), (1373435649,), (1373435650,), (1373435652,), (1373435655,), (1373435658,), (1373435676,), (1373435677,), (1373435678,), (1373435679,), (1373435681,), (1373435683,), (1373435696,), (1373435701,), (1373435702,), (1373435703,), (1373435705,), (1373435708,), (1373435747,), (1373435751,), (1373435753,), (1373435754,), (1373435756,), (1373435760,), (1373435847,), (1373435875,), (1373435905,), (1373435926,), (1373435929,), (1373435931,), (1373436010,), (1373436011,), (1373436012,), (1373436014,), (1373436016,), (1373436019,), (1373436107,), (1373436113,), (1373436116,), (1373436117,), (1373436120,), (1373436123,), (1373436134,), (1373436137,), (1373436140,), (1373436142,), (1373436144,), (1373436146,), (1373436163,), (1373436168,), (1373436173,), (1373436174,), (1373436176,), (1373436179,), (1373436206,), (1373436222,), (1373436233,), (1373436234,), (1373436235,), (1373436237,), (1373436240,), (1373436243,), (1373436263,), (1373436265,), (1373436267,), (1373436268,), (1373436270,), (1373436272,), (1373436286,), (1373436289,), (1373436290,), (1373436293,), (1373436296,), (1373436297,), (1373436304,), (1373436305,), (1373436314,), (1373436317,), (1373436319,), (1373436321,), (1373436335,), (1373436350,), (1373436352,), (1373436359,), (1373436363,), (1373436366,), (1373436367,), (1373436377,), (1373436380,), (1373436382,), (1373436383,), (1373436385,), (1373436386,), (1373436404,), (1373436424,), (1373436425,), (1373436426,), (1373436427,), (1373436429,), (1373436431,), (1373436445,), (1373436627,), (1373436652,), (1373436674,), (1373436694,), (1373436695,), (1373436697,), (1373436774,), (1373436779,), (1373436780,), (1373436781,), (1373436783,), (1373436784,), (1373436797,), (1373436798,), (1373436799,), (1373436800,), (1373436802,), (1373436803,), (1373436823,), (1373436824,), (1373436825,), (1373436826,), (1373436827,), (1373436829,), (1373436843,), (1373436844,), (1373436845,), (1373436846,), (1373436848,), (1373436849,), (1373436856,), (1373436863,), (1373436869,), (1373436871,), (1373436874,), (1373436878,), (1373436886,), (1373436889,), (1373436892,), (1373436893,), (1373436895,), (1373436899,), (1373436909,), (1373436911,), (1373436915,), (1373436924,), (1373436933,), (1373436935,), (1373436945,), (1373436955,), (1373436958,), (1373436960,), (1373436962,), (1373436963,), (1373436964,), (1373436975,), (1373436977,), (1373436978,), (1373436979,), (1373436981,), (1373436983,), (1373437003,), (1373437006,), (1373437007,), (1373437008,), (1373437011,), (1373437013,), (1373437023,), (1373437602,), (1373437625,), (1373437059,), (1373437076,), (1373437078,), (1373437080,), (1373437082,), (1373437085,), (1373437089,), (1373437100,), (1373437103,), (1373437105,), (1373437107,), (1373437109,), (1373437112,), (1373437133,), (1373437139,), (1373437141,), (1373437143,), (1373437145,), (1373437147,), (1373437156,), (1373437161,), (1373437168,), (1373437170,), (1373437173,), (1373437176,), (1373437202,), (1373437204,), (1373437206,), (1373437208,), (1373437211,), (1373437213,), (1373437219,), (1373437233,), (1373437234,), (1373437235,), (1373437236,), (1373437237,), (1373437239,), (1373437257,), (1373437267,), (1373437270,), (1373437271,), (1373437273,), (1373437275,), (1373437283,), (1373437285,), (1373437297,), (1373437308,), (1373437311,), (1373437314,), (1373437323,), (1373437326,), (1373437329,), (1373437331,), (1373437334,), (1373437338,), (1373437342,), (1373437343,), (1373437345,), (1373437347,), (1373437348,), (1373437352,), (1373437369,), (1373437371,), (1373437373,), (1373437375,), (1373437377,), (1373437380,), (1373437551,), (1373437576,), (1373438191,), (1373439020,), (1373439077,), (1373439119,), (1373439140,), (1373439164,), (1373439197,), (1373439420,), (1373439440,), (1373439443,), (1373439444,), (1373439451,), (1373439477,), (1373439715,), (1373439726,), (1373439744,), (1373439747,), (1373439750,), (1373439762,), (1373439813,), (1373439816,), (1373439818,), (1373439820,), (1373439823,), (1373439824,), (1373439832,), (1373439834,), (1373439836,), (1373439837,), (1373439839,), (1373439840,), (1373439845,), (1373439847,), (1373439849,), (1373439850,), (1373439851,), (1373439853,), (1373439867,), (1373439869,), (1373439872,), (1373439874,), (1373439876,), (1373439878,), (1373439883,), (1373439886,), (1373439888,), (1373439890,), (1373439893,), (1373439895,), (1373439904,), (1373439920,), (1373439923,), (1373439926,), (1373439928,), (1373439930,), (1373439933,), (1373439941,), (1373439962,), (1373439967,), (1373439974,), (1373439977,), (1373439980,), (1373439983,), (1373439995,), (1373439997,), (1373440000,), (1373440002,), (1373440005,), (1373440008,), (1373440019,), (1373440026,), (1373440032,), (1373440034,), (1373440037,), (1373440040,), (1373440077,), (1373440078,), (1373440079,), (1373440080,), (1373440082,), (1373440085,), (1373440228,), (1373440247,), (1373440272,), (1373440277,), (1373440283,), (1373440286,), (1373440314,), (1373440326,), (1373440351,), (1373440373,), (1373440399,), (1373440416,), (1373440428,), (1373440431,), (1373440436,), (1373440437,), (1373440439,), (1373440440,), (1373440450,), (1373440452,), (1373440453,), (1373440455,), (1373440458,), (1373440461,), (1373440474,), (1373440476,), (1373440479,), (1373440482,), (1373440485,), (1373440488,), (1373440504,), (1373440518,), (1373440520,), (1373440522,), (1373440524,), (1373440526,), (1373440529,), (1373440540,), (1373440541,), (1373440544,), (1373440547,), (1373440550,), (1373440552,), (1373440568,), (1373440569,), (1373440570,), (1373440571,), (1373440573,), (1373440576,), (1373440587,), (1373440589,), (1373440592,), (1373440594,), (1373440597,), (1373440599,), (1373440618,), (1373440623,), (1373440624,), (1373440626,), (1373440627,), (1373440630,), (1373440639,), (1373440640,), (1373440642,), (1373440644,), (1373440645,), (1373440649,), (1373440660,), (1373440661,), (1373440662,), (1373440663,), (1373440664,), (1373440667,), (1373440677,), (1373440679,), (1373440681,), (1373440682,), (1373440684,), (1373440686,), (1373440708,), (1373440709,), (1373440711,), (1373440713,), (1373440716,), (1373440719,), (1373440747,), (1373440761,), (1373440763,), (1373440766,), (1373440771,), (1373440775,), (1373440777,), (1373440787,), (1373440789,), (1373440791,), (1373440794,), (1373440798,), (1373440802,), (1373440815,), (1373440817,), (1373440819,), (1373440820,), (1373440822,), (1373440823,), (1373440842,), (1373440845,), (1373440847,), (1373440849,), (1373440852,), (1373440854,), (1373440874,), (1373440876,), (1373440878,), (1373440881,), (1373440884,), (1373440887,), (1373440894,), (1373440896,), (1373440898,), (1373440900,), (1373440902,), (1373440906,), (1373440919,), (1373440943,), (1373440975,), (1373440977,), (1373440979,), (1373440981,), (1373440983,), (1373440986,), (1373441011,), (1373441029,), (1373441031,), (1373441035,), (1373441039,), (1373441042,), (1373441045,), (1373441051,), (1373441053,), (1373441055,), (1373441058,), (1373441061,), (1373441063,), (1373441069,), (1373441071,), (1373441072,), (1373441074,), (1373441076,), (1373441078,), (1373441086,), (1373441087,), (1373441088,), (1373441094,), (1373441104,), (1373441107,), (1373441122,), (1373441152,), (1373441154,), (1373441158,), (1373441165,), (1373441167,), (1373441170,), (1373441187,), (1373441190,), (1373441192,), (1373441193,), (1373441195,), (1373441198,), (1373441212,), (1373441218,), (1373441220,), (1373441224,), (1373441228,), (1373441230,), (1373441243,), (1373441256,), (1373441282,), (1373441285,), (1373441287,), (1373441288,), (1373441290,), (1373441293,), (1373441303,), (1373441305,), (1373441308,), (1373441310,), (1373441315,), (1373441320,), (1373441334,), (1373441336,), (1373441337,), (1373441338,), (1373441340,), (1373441341,), (1373441349,), (1373441352,), (1373441354,), (1373441356,), (1373441359,), (1373441363,), (1373441384,), (1373441386,), (1373441388,), (1373441390,), (1373441394,), (1373441398,), (1373441414,), (1373441416,), (1373441417,), (1373441418,), (1373441420,), (1373441423,), (1373441915,), (1373441971,), (1373442014,), (1373442045,), (1373442069,), (1373442093,), (1373442457,), (1373442489,), (1373442536,), (1373442563,), (1373442581,), (1373442582,), (1373442727,), (1373443239,), (1373443263,), (1373443288,), (1373443315,), (1373443339,), (1373443366,), (1373443539,), (1373443551,), (1373443582,), (1373443615,), (1373443643,), (1373443671,), (1373444092,), (1373444115,), (1373444159,), (1373444188,), (1373444213,), (1373444242,), (1373444491,), (1373444516,), (1373444528,), (1373444529,), (1373444536,), (1373444560,), (1373444614,), (1373444880,), (1373444908,), (1373444937,), (1373444962,), (1373444985,), (1373445010,), (1373445258,), (1373445283,), (1373445291,), (1373445293,), (1373445295,), (1373445299,), (1373445603,), (1373445654,), (1373445706,), (1373445730,), (1373445755,), (1373445783,), (1373446058,), (1373446060,), (1373446063,), (1373446069,), (1373446096,), (1373446121,), (1373446276,), (1373446302,), (1373446305,), (1373446307,), (1373446311,), (1373446315,), (1373446316,), (1373446325,), (1373446337,), (1373446340,), (1373446341,), (1373446343,), (1373446345,), (1373446356,), (1373446357,), (1373446359,), (1373446361,), (1373446364,), (1373446368,), (1373446378,), (1373446384,), (1373446391,), (1373446397,), (1373446399,), (1373446401,), (1373446415,), (1373446416,), (1373446418,), (1373446420,), (1373446422,), (1373446425,), (1373446445,), (1373446448,), (1373446449,), (1373446451,), (1373446453,), (1373446455,), (1373446464,), (1373446466,), (1373446468,), (1373446470,), (1373446473,), (1373446476,), (1373446483,), (1373446485,), (1373446487,), (1373446488,), (1373446491,), (1373446494,), (1373446502,), (1373446516,), (1373446517,), (1373446519,), (1373446521,), (1373446523,), (1373446527,), (1373446535,), (1373446555,), (1373446557,), (1373446560,), (1373446562,), (1373446563,), (1373446566,), (1373446577,), (1373446580,), (1373446582,), (1373446585,), (1373446587,), (1373446590,), (1373446597,), (1373446600,), (1373446602,), (1373446604,), (1373446607,), (1373446610,), (1373446618,), (1373446621,), (1373446624,), (1373446627,), (1373446630,), (1373446633,), (1373446641,), (1373446644,), (1373446646,), (1373446648,), (1373446651,), (1373446653,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'24072025': {'nb_upload': 68, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25249748]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1373446653, 1373446651, 1373446648, 1373446646, 1373446644, 1373446641, 1373446633, 1373446630, 1373446627, 1373446624, 1373446621, 1373446618, 1373446610, 1373446607, 1373446604, 1373446602, 1373446600, 1373446597] map_info['map_portfolio_photo'] : {25249748: [1373446653, 1373446651, 1373446648, 1373446646, 1373446644, 1373446641, 1373446633, 1373446630, 1373446627, 1373446624, 1373446621, 1373446618, 1373446610, 1373446607, 1373446604, 1373446602, 1373446600, 1373446597, 1373446590, 1373446587, 1373446585, 1373446582, 1373446580, 1373446577, 1373446566, 1373446563, 1373446562, 1373446560, 1373446557, 1373446555, 1373446535, 1373446527, 1373446523, 1373446521, 1373446519, 1373446517, 1373446516, 1373446502, 1373446494, 1373446491, 1373446488, 1373446487, 1373446485, 1373446483, 1373446476, 1373446473, 1373446470, 1373446468, 1373446466, 1373446464, 1373446455, 1373446453, 1373446451, 1373446449, 1373446448, 1373446445, 1373446425, 1373446422, 1373446420, 1373446418, 1373446416, 1373446415, 1373446401, 1373446399, 1373446397, 1373446391, 1373446384, 1373446378]} final : True mtd_id 4302 list_pids : [1373446653, 1373446651, 1373446648, 1373446646, 1373446644, 1373446641, 1373446633, 1373446630, 1373446627, 1373446624, 1373446621, 1373446618, 1373446610, 1373446607, 1373446604, 1373446602, 1373446600, 1373446597] Looping around the photos to save general results len do output : 1 /25249748Didn'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, '3332876') ('4302', '25249748', '1373446653', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446651', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446648', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446646', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446644', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446641', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446633', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446630', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446627', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446624', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446621', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446618', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446610', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446607', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446604', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446602', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446600', None, None, None, None, None, '3332876') ('4302', None, None, None, None, None, None, None, '3332876') ('4302', '25249748', '1373446597', None, None, None, None, None, '3332876') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 19 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, '25249748', 'None', None, None, None, None, '3332876'), ('4302', '25249748', '1373446653', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446651', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446648', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446646', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446644', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446641', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446633', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446630', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446627', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446624', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446621', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446618', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446610', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446607', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446604', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446602', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446600', None, None, None, None, None, '3332876'), ('4302', '25249748', '1373446597', None, None, None, None, None, '3332876')] time used for this insertion : 0.015897274017333984 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.746467113494873 time spend to save output : 0.01622748374938965 total time spend for step 5 : 0.7626945972442627 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 (3332876) 2.48user 2.58system 0:05.48elapsed 92%CPU (0avgtext+0avgdata 161176maxresident)k 37920inputs+9200outputs (163major+76501minor)pagefaults 0swaps