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 : 1744117 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 (3404616) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3404616) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25524141 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3404616'] with mtr_portfolio_ids : ['25524141'] and first list_photo_ids : [] new path : /proc/1744117/ Name: python3 Umask: 0002 State: R (running) Tgid: 1744117 Ngid: 0 Pid: 1744117 PPid: 1744116 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1744117 NSpid: 1744117 NSpgid: 1742142 NSsid: 1742142 VmPeak: 1106860 kB VmSize: 1106860 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99908 kB VmRSS: 99908 kB RssAnon: 59816 kB RssFile: 40092 kB RssShmem: 0 kB VmData: 865612 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 596 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: 50 nonvoluntary_ctxt_switches: 89 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1744117', 'Ngid': '0', 'Pid': '1744117', 'PPid': '1744116', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1744117', 'NSpid': '1744117', 'NSpgid': '1742142', 'NSsid': '1742142', 'VmPeak': '1106860 kB', 'VmSize': '1106860 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99908 kB', 'VmRSS': '99908 kB', 'RssAnon': '59816 kB', 'RssFile': '40092 kB', 'RssShmem': '0 kB', 'VmData': '865612 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '596 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': '50', 'nonvoluntary_ctxt_switches': '89'} ('datou_batch_current', '1744117', '1106860', '0', '1106860', '865612', '99908', b'', 'marlene', '3404616') 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 (25524141) 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 (3404616 ) ) 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 (25524141) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1374540140, 'portfolio_id': 25524141}, {'photo_id': 1374540137, 'portfolio_id': 25524141}, {'photo_id': 1374540136, 'portfolio_id': 25524141}, {'photo_id': 1374540134, 'portfolio_id': 25524141}, {'photo_id': 1374540132, 'portfolio_id': 25524141}, {'photo_id': 1374540129, 'portfolio_id': 25524141}, {'photo_id': 1374540112, 'portfolio_id': 25524141}, {'photo_id': 1374540111, 'portfolio_id': 25524141}, {'photo_id': 1374540110, 'portfolio_id': 25524141}, {'photo_id': 1374540109, 'portfolio_id': 25524141}, {'photo_id': 1374540107, 'portfolio_id': 25524141}, {'photo_id': 1374540105, 'portfolio_id': 25524141}, {'photo_id': 1374540087, 'portfolio_id': 25524141}, {'photo_id': 1374540086, 'portfolio_id': 25524141}, {'photo_id': 1374540084, 'portfolio_id': 25524141}, {'photo_id': 1374540083, 'portfolio_id': 25524141}, {'photo_id': 1374540081, 'portfolio_id': 25524141}, {'photo_id': 1374540079, 'portfolio_id': 25524141}, {'photo_id': 1374540058, 'portfolio_id': 25524141}, {'photo_id': 1374540056, 'portfolio_id': 25524141}, {'photo_id': 1374540054, 'portfolio_id': 25524141}, {'photo_id': 1374540052, 'portfolio_id': 25524141}, {'photo_id': 1374540050, 'portfolio_id': 25524141}, {'photo_id': 1374540047, 'portfolio_id': 25524141}, {'photo_id': 1374540030, 'portfolio_id': 25524141}, {'photo_id': 1374540006, 'portfolio_id': 25524141}, {'photo_id': 1374540004, 'portfolio_id': 25524141}, {'photo_id': 1374539992, 'portfolio_id': 25524141}, {'photo_id': 1374539984, 'portfolio_id': 25524141}, {'photo_id': 1374539981, 'portfolio_id': 25524141}, {'photo_id': 1374539978, 'portfolio_id': 25524141}, {'photo_id': 1374539961, 'portfolio_id': 25524141}, {'photo_id': 1374539959, 'portfolio_id': 25524141}, {'photo_id': 1374539957, 'portfolio_id': 25524141}, {'photo_id': 1374539955, 'portfolio_id': 25524141}, {'photo_id': 1374539953, 'portfolio_id': 25524141}, {'photo_id': 1374539950, 'portfolio_id': 25524141}, {'photo_id': 1374539935, 'portfolio_id': 25524141}, {'photo_id': 1374539932, 'portfolio_id': 25524141}, {'photo_id': 1374539930, 'portfolio_id': 25524141}, {'photo_id': 1374539914, 'portfolio_id': 25524141}, {'photo_id': 1374539913, 'portfolio_id': 25524141}, {'photo_id': 1374539912, 'portfolio_id': 25524141}, {'photo_id': 1374539894, 'portfolio_id': 25524141}, {'photo_id': 1374539890, 'portfolio_id': 25524141}, {'photo_id': 1374539878, 'portfolio_id': 25524141}, {'photo_id': 1374539877, 'portfolio_id': 25524141}, {'photo_id': 1374539875, 'portfolio_id': 25524141}, {'photo_id': 1374539871, 'portfolio_id': 25524141}, {'photo_id': 1374539850, 'portfolio_id': 25524141}, {'photo_id': 1374539848, 'portfolio_id': 25524141}, {'photo_id': 1374539846, 'portfolio_id': 25524141}, {'photo_id': 1374539844, 'portfolio_id': 25524141}, {'photo_id': 1374539836, 'portfolio_id': 25524141}, {'photo_id': 1374539831, 'portfolio_id': 25524141}, {'photo_id': 1374539813, 'portfolio_id': 25524141}, {'photo_id': 1374539812, 'portfolio_id': 25524141}, {'photo_id': 1374539811, 'portfolio_id': 25524141}, {'photo_id': 1374539810, 'portfolio_id': 25524141}, {'photo_id': 1374539808, 'portfolio_id': 25524141}, {'photo_id': 1374539805, 'portfolio_id': 25524141}, {'photo_id': 1374539788, 'portfolio_id': 25524141}, {'photo_id': 1374539786, 'portfolio_id': 25524141}, {'photo_id': 1374539784, 'portfolio_id': 25524141}, {'photo_id': 1374539774, 'portfolio_id': 25524141}, {'photo_id': 1374539766, 'portfolio_id': 25524141}, {'photo_id': 1374539763, 'portfolio_id': 25524141}, {'photo_id': 1374539747, 'portfolio_id': 25524141}, {'photo_id': 1374539745, 'portfolio_id': 25524141}, {'photo_id': 1374539744, 'portfolio_id': 25524141}, {'photo_id': 1374539743, 'portfolio_id': 25524141}, {'photo_id': 1374539738, 'portfolio_id': 25524141}, {'photo_id': 1374539728, 'portfolio_id': 25524141}, {'photo_id': 1374539710, 'portfolio_id': 25524141}, {'photo_id': 1374539708, 'portfolio_id': 25524141}, {'photo_id': 1374539706, 'portfolio_id': 25524141}, {'photo_id': 1374539704, 'portfolio_id': 25524141}, {'photo_id': 1374539702, 'portfolio_id': 25524141}, {'photo_id': 1374539699, 'portfolio_id': 25524141}, {'photo_id': 1374539663, 'portfolio_id': 25524141}] map_portfolio_id_photo_id: {25524141: [1374540140, 1374540137, 1374540136, 1374540134, 1374540132, 1374540129, 1374540112, 1374540111, 1374540110, 1374540109, 1374540107, 1374540105, 1374540087, 1374540086, 1374540084, 1374540083, 1374540081, 1374540079, 1374540058, 1374540056, 1374540054, 1374540052, 1374540050, 1374540047, 1374540030, 1374540006, 1374540004, 1374539992, 1374539984, 1374539981, 1374539978, 1374539961, 1374539959, 1374539957, 1374539955, 1374539953, 1374539950, 1374539935, 1374539932, 1374539930, 1374539914, 1374539913, 1374539912, 1374539894, 1374539890, 1374539878, 1374539877, 1374539875, 1374539871, 1374539850, 1374539848, 1374539846, 1374539844, 1374539836, 1374539831, 1374539813, 1374539812, 1374539811, 1374539810, 1374539808, 1374539805, 1374539788, 1374539786, 1374539784, 1374539774, 1374539766, 1374539763, 1374539747, 1374539745, 1374539744, 1374539743, 1374539738, 1374539728, 1374539710, 1374539708, 1374539706, 1374539704, 1374539702, 1374539699, 1374539663]} ##### 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.016318082809448242 #### 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 31 04:46:59 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 (25524141) 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 : 25524141 get user id for portfolio 25524141 get sub ptf for main ptf 25524141, type 3726 and hashtags ['flou', 'kraft', 'autre_refus', 'environnement', 'papier', 'plastique', 'mal_croppe', 'Teint_Dans_La_Masse', 'cartonnette', 'metal', 'Carton_brun', 'Carton_gris'] 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`=25524141 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','kraft','autre_refus','environnement','papier','plastique','mal_croppe','Teint_Dans_La_Masse','cartonnette','metal','Carton_brun','Carton_gris')) 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`=25524141 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','kraft','autre_refus','environnement','papier','plastique','mal_croppe','Teint_Dans_La_Masse','cartonnette','metal','Carton_brun','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 25524141, 'sub_port_id': 25524143, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214470, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 32, 58)}, 'Carton_brun': {'main_port_id': 25524141, 'sub_port_id': 25524144, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214471, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 32, 58)}, 'cartonnette': {'main_port_id': 25524141, 'sub_port_id': 25524145, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214472, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 32, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 25524141, 'sub_port_id': 25524146, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214473, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 32, 58)}, 'plastique': {'main_port_id': 25524141, 'sub_port_id': 25524147, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214474, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 32, 58)}, 'Carton_gris': {'main_port_id': 25524141, 'sub_port_id': 25524148, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214475, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 32, 58)}, 'mal_croppe': {'main_port_id': 25524141, 'sub_port_id': 25524149, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214476, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 32, 58)}, 'flou': {'main_port_id': 25524141, 'sub_port_id': 25524150, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214477, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 32, 58)}, 'autre_refus': {'main_port_id': 25524141, 'sub_port_id': 25524151, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214478, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 32, 58)}, 'kraft': {'main_port_id': 25524141, 'sub_port_id': 25524152, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214479, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 32, 58)}, 'papier': {'main_port_id': 25524141, 'sub_port_id': 25524153, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214480, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 32, 58)}, 'metal': {'main_port_id': 25524141, 'sub_port_id': 25524154, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214481, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 32, 58)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25524143 , 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=25524141 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 (25524143) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25524141) result : ((1374539663,), (1374539699,), (1374539702,), (1374539704,), (1374539706,), (1374539708,), (1374539710,), (1374539728,), (1374539738,), (1374539743,), (1374539744,), (1374539745,), (1374539747,), (1374539763,), (1374539766,), (1374539774,), (1374539784,), (1374539786,), (1374539788,), (1374539805,), (1374539808,), (1374539810,), (1374539811,), (1374539812,), (1374539813,), (1374539831,), (1374539836,), (1374539844,), (1374539846,), (1374539848,), (1374539850,), (1374539871,), (1374539875,), (1374539877,), (1374539878,), (1374539890,), (1374539894,), (1374539912,), (1374539913,), (1374539914,), (1374539930,), (1374539932,), (1374539935,), (1374539950,), (1374539953,), (1374539955,), (1374539957,), (1374539959,), (1374539961,), (1374539978,), (1374539981,), (1374539984,), (1374539992,), (1374540004,), (1374540006,), (1374540030,), (1374540047,), (1374540050,), (1374540052,), (1374540054,), (1374540056,), (1374540058,), (1374540079,), (1374540081,), (1374540083,), (1374540084,), (1374540086,), (1374540087,), (1374540105,), (1374540107,), (1374540109,), (1374540110,), (1374540111,), (1374540112,), (1374540129,), (1374540132,), (1374540134,), (1374540136,), (1374540137,), (1374540140,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25524144 , 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=25524141 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 (25524144) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25524141) result : ((1374539663,), (1374539699,), (1374539702,), (1374539704,), (1374539706,), (1374539708,), (1374539710,), (1374539728,), (1374539738,), (1374539743,), (1374539744,), (1374539745,), (1374539747,), (1374539763,), (1374539766,), (1374539774,), (1374539784,), (1374539786,), (1374539788,), (1374539805,), (1374539808,), (1374539810,), (1374539811,), (1374539812,), (1374539813,), (1374539831,), (1374539836,), (1374539844,), (1374539846,), (1374539848,), (1374539850,), (1374539871,), (1374539875,), (1374539877,), (1374539878,), (1374539890,), (1374539894,), (1374539912,), (1374539913,), (1374539914,), (1374539930,), (1374539932,), (1374539935,), (1374539950,), (1374539953,), (1374539955,), (1374539957,), (1374539959,), (1374539961,), (1374539978,), (1374539981,), (1374539984,), (1374539992,), (1374540004,), (1374540006,), (1374540030,), (1374540047,), (1374540050,), (1374540052,), (1374540054,), (1374540056,), (1374540058,), (1374540079,), (1374540081,), (1374540083,), (1374540084,), (1374540086,), (1374540087,), (1374540105,), (1374540107,), (1374540109,), (1374540110,), (1374540111,), (1374540112,), (1374540129,), (1374540132,), (1374540134,), (1374540136,), (1374540137,), (1374540140,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25524145 , 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=25524141 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 (25524145) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25524141) result : ((1374539663,), (1374539699,), (1374539702,), (1374539704,), (1374539706,), (1374539708,), (1374539710,), (1374539728,), (1374539738,), (1374539743,), (1374539744,), (1374539745,), (1374539747,), (1374539763,), (1374539766,), (1374539774,), (1374539784,), (1374539786,), (1374539788,), (1374539805,), (1374539808,), (1374539810,), (1374539811,), (1374539812,), (1374539813,), (1374539831,), (1374539836,), (1374539844,), (1374539846,), (1374539848,), (1374539850,), (1374539871,), (1374539875,), (1374539877,), (1374539878,), (1374539890,), (1374539894,), (1374539912,), (1374539913,), (1374539914,), (1374539930,), (1374539932,), (1374539935,), (1374539950,), (1374539953,), (1374539955,), (1374539957,), (1374539959,), (1374539961,), (1374539978,), (1374539981,), (1374539984,), (1374539992,), (1374540004,), (1374540006,), (1374540030,), (1374540047,), (1374540050,), (1374540052,), (1374540054,), (1374540056,), (1374540058,), (1374540079,), (1374540081,), (1374540083,), (1374540084,), (1374540086,), (1374540087,), (1374540105,), (1374540107,), (1374540109,), (1374540110,), (1374540111,), (1374540112,), (1374540129,), (1374540132,), (1374540134,), (1374540136,), (1374540137,), (1374540140,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25524146 , 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=25524141 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 (25524146) result : ((1374539868,), (1374539869,), (1374539870,), (1374539872,), (1374539915,), (1374539916,), (1374539917,), (1374539918,), (1374539919,), (1374539920,), (1374539921,), (1374539922,), (1374539923,), (1374539924,), (1374539925,), (1374539926,), (1374539927,), (1374539928,), (1374540165,), (1374540166,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25524141) result : ((1374539663,), (1374539699,), (1374539702,), (1374539704,), (1374539706,), (1374539708,), (1374539710,), (1374539728,), (1374539738,), (1374539743,), (1374539744,), (1374539745,), (1374539747,), (1374539763,), (1374539766,), (1374539774,), (1374539784,), (1374539786,), (1374539788,), (1374539805,), (1374539808,), (1374539810,), (1374539811,), (1374539812,), (1374539813,), (1374539831,), (1374539836,), (1374539844,), (1374539846,), (1374539848,), (1374539850,), (1374539871,), (1374539875,), (1374539877,), (1374539878,), (1374539890,), (1374539894,), (1374539912,), (1374539913,), (1374539914,), (1374539930,), (1374539932,), (1374539935,), (1374539950,), (1374539953,), (1374539955,), (1374539957,), (1374539959,), (1374539961,), (1374539978,), (1374539981,), (1374539984,), (1374539992,), (1374540004,), (1374540006,), (1374540030,), (1374540047,), (1374540050,), (1374540052,), (1374540054,), (1374540056,), (1374540058,), (1374540079,), (1374540081,), (1374540083,), (1374540084,), (1374540086,), (1374540087,), (1374540105,), (1374540107,), (1374540109,), (1374540110,), (1374540111,), (1374540112,), (1374540129,), (1374540132,), (1374540134,), (1374540136,), (1374540137,), (1374540140,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25524147 , 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=25524141 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 (25524147) result : ((1374539929,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25524141) result : ((1374539663,), (1374539699,), (1374539702,), (1374539704,), (1374539706,), (1374539708,), (1374539710,), (1374539728,), (1374539738,), (1374539743,), (1374539744,), (1374539745,), (1374539747,), (1374539763,), (1374539766,), (1374539774,), (1374539784,), (1374539786,), (1374539788,), (1374539805,), (1374539808,), (1374539810,), (1374539811,), (1374539812,), (1374539813,), (1374539831,), (1374539836,), (1374539844,), (1374539846,), (1374539848,), (1374539850,), (1374539871,), (1374539875,), (1374539877,), (1374539878,), (1374539890,), (1374539894,), (1374539912,), (1374539913,), (1374539914,), (1374539930,), (1374539932,), (1374539935,), (1374539950,), (1374539953,), (1374539955,), (1374539957,), (1374539959,), (1374539961,), (1374539978,), (1374539981,), (1374539984,), (1374539992,), (1374540004,), (1374540006,), (1374540030,), (1374540047,), (1374540050,), (1374540052,), (1374540054,), (1374540056,), (1374540058,), (1374540079,), (1374540081,), (1374540083,), (1374540084,), (1374540086,), (1374540087,), (1374540105,), (1374540107,), (1374540109,), (1374540110,), (1374540111,), (1374540112,), (1374540129,), (1374540132,), (1374540134,), (1374540136,), (1374540137,), (1374540140,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25524148 , 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=25524141 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 (25524148) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25524141) result : ((1374539663,), (1374539699,), (1374539702,), (1374539704,), (1374539706,), (1374539708,), (1374539710,), (1374539728,), (1374539738,), (1374539743,), (1374539744,), (1374539745,), (1374539747,), (1374539763,), (1374539766,), (1374539774,), (1374539784,), (1374539786,), (1374539788,), (1374539805,), (1374539808,), (1374539810,), (1374539811,), (1374539812,), (1374539813,), (1374539831,), (1374539836,), (1374539844,), (1374539846,), (1374539848,), (1374539850,), (1374539871,), (1374539875,), (1374539877,), (1374539878,), (1374539890,), (1374539894,), (1374539912,), (1374539913,), (1374539914,), (1374539930,), (1374539932,), (1374539935,), (1374539950,), (1374539953,), (1374539955,), (1374539957,), (1374539959,), (1374539961,), (1374539978,), (1374539981,), (1374539984,), (1374539992,), (1374540004,), (1374540006,), (1374540030,), (1374540047,), (1374540050,), (1374540052,), (1374540054,), (1374540056,), (1374540058,), (1374540079,), (1374540081,), (1374540083,), (1374540084,), (1374540086,), (1374540087,), (1374540105,), (1374540107,), (1374540109,), (1374540110,), (1374540111,), (1374540112,), (1374540129,), (1374540132,), (1374540134,), (1374540136,), (1374540137,), (1374540140,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25524149 , 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=25524141 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 (25524149) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25524141) result : ((1374539663,), (1374539699,), (1374539702,), (1374539704,), (1374539706,), (1374539708,), (1374539710,), (1374539728,), (1374539738,), (1374539743,), (1374539744,), (1374539745,), (1374539747,), (1374539763,), (1374539766,), (1374539774,), (1374539784,), (1374539786,), (1374539788,), (1374539805,), (1374539808,), (1374539810,), (1374539811,), (1374539812,), (1374539813,), (1374539831,), (1374539836,), (1374539844,), (1374539846,), (1374539848,), (1374539850,), (1374539871,), (1374539875,), (1374539877,), (1374539878,), (1374539890,), (1374539894,), (1374539912,), (1374539913,), (1374539914,), (1374539930,), (1374539932,), (1374539935,), (1374539950,), (1374539953,), (1374539955,), (1374539957,), (1374539959,), (1374539961,), (1374539978,), (1374539981,), (1374539984,), (1374539992,), (1374540004,), (1374540006,), (1374540030,), (1374540047,), (1374540050,), (1374540052,), (1374540054,), (1374540056,), (1374540058,), (1374540079,), (1374540081,), (1374540083,), (1374540084,), (1374540086,), (1374540087,), (1374540105,), (1374540107,), (1374540109,), (1374540110,), (1374540111,), (1374540112,), (1374540129,), (1374540132,), (1374540134,), (1374540136,), (1374540137,), (1374540140,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25524150 , 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=25524141 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 (25524150) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25524141) result : ((1374539663,), (1374539699,), (1374539702,), (1374539704,), (1374539706,), (1374539708,), (1374539710,), (1374539728,), (1374539738,), (1374539743,), (1374539744,), (1374539745,), (1374539747,), (1374539763,), (1374539766,), (1374539774,), (1374539784,), (1374539786,), (1374539788,), (1374539805,), (1374539808,), (1374539810,), (1374539811,), (1374539812,), (1374539813,), (1374539831,), (1374539836,), (1374539844,), (1374539846,), (1374539848,), (1374539850,), (1374539871,), (1374539875,), (1374539877,), (1374539878,), (1374539890,), (1374539894,), (1374539912,), (1374539913,), (1374539914,), (1374539930,), (1374539932,), (1374539935,), (1374539950,), (1374539953,), (1374539955,), (1374539957,), (1374539959,), (1374539961,), (1374539978,), (1374539981,), (1374539984,), (1374539992,), (1374540004,), (1374540006,), (1374540030,), (1374540047,), (1374540050,), (1374540052,), (1374540054,), (1374540056,), (1374540058,), (1374540079,), (1374540081,), (1374540083,), (1374540084,), (1374540086,), (1374540087,), (1374540105,), (1374540107,), (1374540109,), (1374540110,), (1374540111,), (1374540112,), (1374540129,), (1374540132,), (1374540134,), (1374540136,), (1374540137,), (1374540140,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25524151 , 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=25524141 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 (25524151) result : ((1374539873,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25524141) result : ((1374539663,), (1374539699,), (1374539702,), (1374539704,), (1374539706,), (1374539708,), (1374539710,), (1374539728,), (1374539738,), (1374539743,), (1374539744,), (1374539745,), (1374539747,), (1374539763,), (1374539766,), (1374539774,), (1374539784,), (1374539786,), (1374539788,), (1374539805,), (1374539808,), (1374539810,), (1374539811,), (1374539812,), (1374539813,), (1374539831,), (1374539836,), (1374539844,), (1374539846,), (1374539848,), (1374539850,), (1374539871,), (1374539875,), (1374539877,), (1374539878,), (1374539890,), (1374539894,), (1374539912,), (1374539913,), (1374539914,), (1374539930,), (1374539932,), (1374539935,), (1374539950,), (1374539953,), (1374539955,), (1374539957,), (1374539959,), (1374539961,), (1374539978,), (1374539981,), (1374539984,), (1374539992,), (1374540004,), (1374540006,), (1374540030,), (1374540047,), (1374540050,), (1374540052,), (1374540054,), (1374540056,), (1374540058,), (1374540079,), (1374540081,), (1374540083,), (1374540084,), (1374540086,), (1374540087,), (1374540105,), (1374540107,), (1374540109,), (1374540110,), (1374540111,), (1374540112,), (1374540129,), (1374540132,), (1374540134,), (1374540136,), (1374540137,), (1374540140,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25524152 , 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=25524141 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 (25524152) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25524141) result : ((1374539663,), (1374539699,), (1374539702,), (1374539704,), (1374539706,), (1374539708,), (1374539710,), (1374539728,), (1374539738,), (1374539743,), (1374539744,), (1374539745,), (1374539747,), (1374539763,), (1374539766,), (1374539774,), (1374539784,), (1374539786,), (1374539788,), (1374539805,), (1374539808,), (1374539810,), (1374539811,), (1374539812,), (1374539813,), (1374539831,), (1374539836,), (1374539844,), (1374539846,), (1374539848,), (1374539850,), (1374539871,), (1374539875,), (1374539877,), (1374539878,), (1374539890,), (1374539894,), (1374539912,), (1374539913,), (1374539914,), (1374539930,), (1374539932,), (1374539935,), (1374539950,), (1374539953,), (1374539955,), (1374539957,), (1374539959,), (1374539961,), (1374539978,), (1374539981,), (1374539984,), (1374539992,), (1374540004,), (1374540006,), (1374540030,), (1374540047,), (1374540050,), (1374540052,), (1374540054,), (1374540056,), (1374540058,), (1374540079,), (1374540081,), (1374540083,), (1374540084,), (1374540086,), (1374540087,), (1374540105,), (1374540107,), (1374540109,), (1374540110,), (1374540111,), (1374540112,), (1374540129,), (1374540132,), (1374540134,), (1374540136,), (1374540137,), (1374540140,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25524153 , 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=25524141 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 (25524153) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25524141) result : ((1374539663,), (1374539699,), (1374539702,), (1374539704,), (1374539706,), (1374539708,), (1374539710,), (1374539728,), (1374539738,), (1374539743,), (1374539744,), (1374539745,), (1374539747,), (1374539763,), (1374539766,), (1374539774,), (1374539784,), (1374539786,), (1374539788,), (1374539805,), (1374539808,), (1374539810,), (1374539811,), (1374539812,), (1374539813,), (1374539831,), (1374539836,), (1374539844,), (1374539846,), (1374539848,), (1374539850,), (1374539871,), (1374539875,), (1374539877,), (1374539878,), (1374539890,), (1374539894,), (1374539912,), (1374539913,), (1374539914,), (1374539930,), (1374539932,), (1374539935,), (1374539950,), (1374539953,), (1374539955,), (1374539957,), (1374539959,), (1374539961,), (1374539978,), (1374539981,), (1374539984,), (1374539992,), (1374540004,), (1374540006,), (1374540030,), (1374540047,), (1374540050,), (1374540052,), (1374540054,), (1374540056,), (1374540058,), (1374540079,), (1374540081,), (1374540083,), (1374540084,), (1374540086,), (1374540087,), (1374540105,), (1374540107,), (1374540109,), (1374540110,), (1374540111,), (1374540112,), (1374540129,), (1374540132,), (1374540134,), (1374540136,), (1374540137,), (1374540140,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25524154 , 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=25524141 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 (25524154) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25524141) result : ((1374539663,), (1374539699,), (1374539702,), (1374539704,), (1374539706,), (1374539708,), (1374539710,), (1374539728,), (1374539738,), (1374539743,), (1374539744,), (1374539745,), (1374539747,), (1374539763,), (1374539766,), (1374539774,), (1374539784,), (1374539786,), (1374539788,), (1374539805,), (1374539808,), (1374539810,), (1374539811,), (1374539812,), (1374539813,), (1374539831,), (1374539836,), (1374539844,), (1374539846,), (1374539848,), (1374539850,), (1374539871,), (1374539875,), (1374539877,), (1374539878,), (1374539890,), (1374539894,), (1374539912,), (1374539913,), (1374539914,), (1374539930,), (1374539932,), (1374539935,), (1374539950,), (1374539953,), (1374539955,), (1374539957,), (1374539959,), (1374539961,), (1374539978,), (1374539981,), (1374539984,), (1374539992,), (1374540004,), (1374540006,), (1374540030,), (1374540047,), (1374540050,), (1374540052,), (1374540054,), (1374540056,), (1374540058,), (1374540079,), (1374540081,), (1374540083,), (1374540084,), (1374540086,), (1374540087,), (1374540105,), (1374540107,), (1374540109,), (1374540110,), (1374540111,), (1374540112,), (1374540129,), (1374540132,), (1374540134,), (1374540136,), (1374540137,), (1374540140,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") 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`=25524141 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','kraft','autre_refus','environnement','papier','plastique','mal_croppe','Teint_Dans_La_Masse','cartonnette','metal','Carton_brun','Carton_gris')) 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`=25524141 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','kraft','autre_refus','environnement','papier','plastique','mal_croppe','Teint_Dans_La_Masse','cartonnette','metal','Carton_brun','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 25524141, 'sub_port_id': 25524155, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214482, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 33)}, 'Carton_brun': {'main_port_id': 25524141, 'sub_port_id': 25524156, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214483, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 33)}, 'cartonnette': {'main_port_id': 25524141, 'sub_port_id': 25524157, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214484, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 33)}, 'Teint_Dans_La_Masse': {'main_port_id': 25524141, 'sub_port_id': 25524158, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214485, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 33)}, 'plastique': {'main_port_id': 25524141, 'sub_port_id': 25524159, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214486, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 33)}, 'Carton_gris': {'main_port_id': 25524141, 'sub_port_id': 25524160, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214487, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 33)}, 'mal_croppe': {'main_port_id': 25524141, 'sub_port_id': 25524161, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214488, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 33)}, 'flou': {'main_port_id': 25524141, 'sub_port_id': 25524162, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214489, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 33)}, 'autre_refus': {'main_port_id': 25524141, 'sub_port_id': 25524163, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214490, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 33)}, 'kraft': {'main_port_id': 25524141, 'sub_port_id': 25524164, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214491, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 33)}, 'papier': {'main_port_id': 25524141, 'sub_port_id': 25524165, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214492, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 33)}, 'metal': {'main_port_id': 25524141, 'sub_port_id': 25524166, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17214493, 'last_updated_at': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_desc': datetime.datetime(2025, 7, 31, 4, 44, 30), 'last_updated_at_asc': datetime.datetime(2025, 7, 31, 4, 33)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25524155,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25524143 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25524156,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25524144 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25524157,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25524145 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25524158,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25524146 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25524159,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25524147 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25524160,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25524148 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25524161,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25524149 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25524162,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25524150 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25524163,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25524151 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25524164,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25524152 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25524165,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25524153 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25524166,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25524154 lien utilise dans velours : https://www.fotonower.com/velours/25524155,25524156,25524157,25524158,25524159,25524160,25524161,25524162,25524163,25524164,25524165,25524166?tags=environnement,Carton_brun,cartonnette,Teint_Dans_La_Masse,plastique,Carton_gris,mal_croppe,flou,autre_refus,kraft,papier,metal After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25524141]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1374540140, 1374540137, 1374540136, 1374540134, 1374540132, 1374540129] map_info['map_portfolio_photo'] : {25524141: [1374540140, 1374540137, 1374540136, 1374540134, 1374540132, 1374540129, 1374540112, 1374540111, 1374540110, 1374540109, 1374540107, 1374540105, 1374540087, 1374540086, 1374540084, 1374540083, 1374540081, 1374540079, 1374540058, 1374540056, 1374540054, 1374540052, 1374540050, 1374540047, 1374540030, 1374540006, 1374540004, 1374539992, 1374539984, 1374539981, 1374539978, 1374539961, 1374539959, 1374539957, 1374539955, 1374539953, 1374539950, 1374539935, 1374539932, 1374539930, 1374539914, 1374539913, 1374539912, 1374539894, 1374539890, 1374539878, 1374539877, 1374539875, 1374539871, 1374539850, 1374539848, 1374539846, 1374539844, 1374539836, 1374539831, 1374539813, 1374539812, 1374539811, 1374539810, 1374539808, 1374539805, 1374539788, 1374539786, 1374539784, 1374539774, 1374539766, 1374539763, 1374539747, 1374539745, 1374539744, 1374539743, 1374539738, 1374539728, 1374539710, 1374539708, 1374539706, 1374539704, 1374539702, 1374539699, 1374539663]} final : False mtd_id 4302 list_pids : [1374540140, 1374540137, 1374540136, 1374540134, 1374540132, 1374540129] Looping around the photos to save general results len do output : 1 /25524141. 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, '3404616') ('4302', '25524141', '1374540140', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540137', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540136', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540134', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540132', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540129', None, None, None, None, None, '3404616') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25524141', "{'environnement': 25524143, 'Carton_brun': 25524144, 'cartonnette': 25524145, 'Teint_Dans_La_Masse': 25524146, 'plastique': 25524147, 'Carton_gris': 25524148, 'mal_croppe': 25524149, 'flou': 25524150, 'autre_refus': 25524151, 'kraft': 25524152, 'papier': 25524153, 'metal': 25524154}", None, None, None, None, '3404616'), ('4302', '25524141', '1374540140', None, None, None, None, None, '3404616'), ('4302', '25524141', '1374540137', None, None, None, None, None, '3404616'), ('4302', '25524141', '1374540136', None, None, None, None, None, '3404616'), ('4302', '25524141', '1374540134', None, None, None, None, None, '3404616'), ('4302', '25524141', '1374540132', None, None, None, None, None, '3404616'), ('4302', '25524141', '1374540129', None, None, None, None, None, '3404616')] time used for this insertion : 0.054749250411987305 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5509040355682373 time spend to save output : 0.05501818656921387 total time spend for step 1 : 1.6059222221374512 step2:final Thu Jul 31 04:47:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25524141) 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 25524141 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1374539663,1374539710,1374539708,1374539706,1374539704,1374539702,1374539699,1374539747,1374539745,1374539744,1374539743,1374539738,1374539728,1374539788,1374539786,1374539784,1374539774,1374539766,1374539763,1374539813,1374539812,1374539811,1374539810,1374539808,1374539805,1374539850,1374539848,1374539846,1374539844,1374539836,1374539831,1374539894,1374539890,1374539878,1374539877,1374539875,1374539871,1374539935,1374539932,1374539930,1374539914,1374539913,1374539912,1374539961,1374539959,1374539957,1374539955,1374539953,1374539950,1374540006,1374540004,1374539992,1374540030,1374539984,1374539981,1374539978,1374540058,1374540056,1374540054,1374540052,1374540050,1374540047,1374540087,1374540086,1374540084,1374540083,1374540081,1374540079,1374540112,1374540111,1374540110,1374540109,1374540107,1374540105,1374540140,1374540137,1374540136,1374540134,1374540132,1374540129); 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([25524141]) Inside saveOutput : final : False verbose : True original output for save of step final : {1374540140: ('0.020426738508345487',), 1374540137: ('0.020426738508345487',), 1374540136: ('0.020426738508345487',), 1374540134: ('0.020426738508345487',), 1374540132: ('0.020426738508345487',), 1374540129: ('0.020426738508345487',)} new output for save of step final : {1374540140: ('0.020426738508345487',), 1374540137: ('0.020426738508345487',), 1374540136: ('0.020426738508345487',), 1374540134: ('0.020426738508345487',), 1374540132: ('0.020426738508345487',), 1374540129: ('0.020426738508345487',)} [1374540140, 1374540137, 1374540136, 1374540134, 1374540132, 1374540129] map_info['map_portfolio_photo'] : {25524141: [1374540140, 1374540137, 1374540136, 1374540134, 1374540132, 1374540129, 1374540112, 1374540111, 1374540110, 1374540109, 1374540107, 1374540105, 1374540087, 1374540086, 1374540084, 1374540083, 1374540081, 1374540079, 1374540058, 1374540056, 1374540054, 1374540052, 1374540050, 1374540047, 1374540030, 1374540006, 1374540004, 1374539992, 1374539984, 1374539981, 1374539978, 1374539961, 1374539959, 1374539957, 1374539955, 1374539953, 1374539950, 1374539935, 1374539932, 1374539930, 1374539914, 1374539913, 1374539912, 1374539894, 1374539890, 1374539878, 1374539877, 1374539875, 1374539871, 1374539850, 1374539848, 1374539846, 1374539844, 1374539836, 1374539831, 1374539813, 1374539812, 1374539811, 1374539810, 1374539808, 1374539805, 1374539788, 1374539786, 1374539784, 1374539774, 1374539766, 1374539763, 1374539747, 1374539745, 1374539744, 1374539743, 1374539738, 1374539728, 1374539710, 1374539708, 1374539706, 1374539704, 1374539702, 1374539699, 1374539663]} final : False mtd_id 4302 list_pids : [1374540140, 1374540137, 1374540136, 1374540134, 1374540132, 1374540129] Looping around the photos to save general results len do output : 6 /1374540140.Didn't retrieve data . /1374540137.Didn't retrieve data . /1374540136.Didn't retrieve data . /1374540134.Didn't retrieve data . /1374540132.Didn't retrieve data . /1374540129.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, '3404616') ('4302', '25524141', '1374540140', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540137', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540136', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540134', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540132', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540129', None, None, None, None, None, '3404616') 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', '25524141', '1374540140', '0.020426738508345487', None, None, None, None, '3404616'), ('4302', '25524141', '1374540137', '0.020426738508345487', None, None, None, None, '3404616'), ('4302', '25524141', '1374540136', '0.020426738508345487', None, None, None, None, '3404616'), ('4302', '25524141', '1374540134', '0.020426738508345487', None, None, None, None, '3404616'), ('4302', '25524141', '1374540132', '0.020426738508345487', None, None, None, None, '3404616'), ('4302', '25524141', '1374540129', '0.020426738508345487', None, None, None, None, '3404616')] time used for this insertion : 0.016829729080200195 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06816220283508301 time spend to save output : 0.017334461212158203 total time spend for step 2 : 0.08549666404724121 step3:velours_tree Thu Jul 31 04:47:01 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 : {25524141: [{'environnement': 25524143, 'Carton_brun': 25524144, 'cartonnette': 25524145, 'Teint_Dans_La_Masse': 25524146, 'plastique': 25524147, 'Carton_gris': 25524148, 'mal_croppe': 25524149, 'flou': 25524150, 'autre_refus': 25524151, 'kraft': 25524152, 'papier': 25524153, 'metal': 25524154}]} input_args_next_step : {25524141: ()} output_args : {25524141: [{'environnement': 25524143, 'Carton_brun': 25524144, 'cartonnette': 25524145, 'Teint_Dans_La_Masse': 25524146, 'plastique': 25524147, 'Carton_gris': 25524148, 'mal_croppe': 25524149, 'flou': 25524150, 'autre_refus': 25524151, 'kraft': 25524152, 'papier': 25524153, 'metal': 25524154}]} args : 25524141 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'environnement': 25524143, 'Carton_brun': 25524144, 'cartonnette': 25524145, 'Teint_Dans_La_Masse': 25524146, 'plastique': 25524147, 'Carton_gris': 25524148, 'mal_croppe': 25524149, 'flou': 25524150, 'autre_refus': 25524151, 'kraft': 25524152, 'papier': 25524153, 'metal': 25524154},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25524141) 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([25524141]) 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.29495739936828613 time spend to save output : 5.3882598876953125e-05 total time spend for step 3 : 0.2950112819671631 step4:send_mail_cod Thu Jul 31 04:47:01 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 : {1374540140: ('0.020426738508345487',), 1374540137: ('0.020426738508345487',), 1374540136: ('0.020426738508345487',), 1374540134: ('0.020426738508345487',), 1374540132: ('0.020426738508345487',), 1374540129: ('0.020426738508345487',)} input_args_next_step : {1374540140: ()} output_args : {1374540140: ('0.020426738508345487',), 1374540137: ('0.020426738508345487',), 1374540136: ('0.020426738508345487',), 1374540134: ('0.020426738508345487',), 1374540132: ('0.020426738508345487',), 1374540129: ('0.020426738508345487',)} args : 1374540140 depend.output_id : 0 input_args_next_step : {1374540140: ('0.020426738508345487',), 1374540137: ()} output_args : {1374540140: ('0.020426738508345487',), 1374540137: ('0.020426738508345487',), 1374540136: ('0.020426738508345487',), 1374540134: ('0.020426738508345487',), 1374540132: ('0.020426738508345487',), 1374540129: ('0.020426738508345487',)} args : 1374540137 depend.output_id : 0 input_args_next_step : {1374540140: ('0.020426738508345487',), 1374540137: ('0.020426738508345487',), 1374540136: ()} output_args : {1374540140: ('0.020426738508345487',), 1374540137: ('0.020426738508345487',), 1374540136: ('0.020426738508345487',), 1374540134: ('0.020426738508345487',), 1374540132: ('0.020426738508345487',), 1374540129: ('0.020426738508345487',)} args : 1374540136 depend.output_id : 0 input_args_next_step : {1374540140: ('0.020426738508345487',), 1374540137: ('0.020426738508345487',), 1374540136: ('0.020426738508345487',), 1374540134: ()} output_args : {1374540140: ('0.020426738508345487',), 1374540137: ('0.020426738508345487',), 1374540136: ('0.020426738508345487',), 1374540134: ('0.020426738508345487',), 1374540132: ('0.020426738508345487',), 1374540129: ('0.020426738508345487',)} args : 1374540134 depend.output_id : 0 input_args_next_step : {1374540140: ('0.020426738508345487',), 1374540137: ('0.020426738508345487',), 1374540136: ('0.020426738508345487',), 1374540134: ('0.020426738508345487',), 1374540132: ()} output_args : {1374540140: ('0.020426738508345487',), 1374540137: ('0.020426738508345487',), 1374540136: ('0.020426738508345487',), 1374540134: ('0.020426738508345487',), 1374540132: ('0.020426738508345487',), 1374540129: ('0.020426738508345487',)} args : 1374540132 depend.output_id : 0 input_args_next_step : {1374540140: ('0.020426738508345487',), 1374540137: ('0.020426738508345487',), 1374540136: ('0.020426738508345487',), 1374540134: ('0.020426738508345487',), 1374540132: ('0.020426738508345487',), 1374540129: ()} output_args : {1374540140: ('0.020426738508345487',), 1374540137: ('0.020426738508345487',), 1374540136: ('0.020426738508345487',), 1374540134: ('0.020426738508345487',), 1374540132: ('0.020426738508345487',), 1374540129: ('0.020426738508345487',)} args : 1374540129 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 : {25524141: [{'environnement': 25524143, 'Carton_brun': 25524144, 'cartonnette': 25524145, 'Teint_Dans_La_Masse': 25524146, 'plastique': 25524147, 'Carton_gris': 25524148, 'mal_croppe': 25524149, 'flou': 25524150, 'autre_refus': 25524151, 'kraft': 25524152, 'papier': 25524153, 'metal': 25524154}]} input_args_next_step : {1374540140: ('0.020426738508345487',), 1374540137: ('0.020426738508345487',), 1374540136: ('0.020426738508345487',), 1374540134: ('0.020426738508345487',), 1374540132: ('0.020426738508345487',), 1374540129: ('0.020426738508345487',), 25524141: ()} output_args : {25524141: [{'environnement': 25524143, 'Carton_brun': 25524144, 'cartonnette': 25524145, 'Teint_Dans_La_Masse': 25524146, 'plastique': 25524147, 'Carton_gris': 25524148, 'mal_croppe': 25524149, 'flou': 25524150, 'autre_refus': 25524151, 'kraft': 25524152, 'papier': 25524153, 'metal': 25524154}]} args : 25524141 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :7, first value : ('0.020426738508345487',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25524141) 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 (1374540140,1374540137,1374540136,1374540134,1374540132,1374540129) Found this number of photos: 6 ##### Call download_photos : nb_thread : 5 begin to download photo : 1374540129 begin to download photo : 1374540134 begin to download photo : 1374540137 download finish for photo 1374540137 begin to download photo : 1374540140 download finish for photo 1374540129 begin to download photo : 1374540132 download finish for photo 1374540134 begin to download photo : 1374540136 download finish for photo 1374540140 download finish for photo 1374540132 download finish for photo 1374540136 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette255241451753930021/ length of list_filenames : 6 ; length of list_pids : 6 ; length of list_args : 6 results_Auto_P25524141_31-07-2025_04_47_01.pdf 25524145 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=25524145 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255241451753930021 25524147 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=25524147 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374539929: '1753929445_294747_1374539704_254dfc84e14cf0ab9a0d066bcf5a94f6_rle_crop_3898909263_0.png'} change filename to text .imagette255241471753930021/ imagette255241471753930021/1753929445_294747_1374539704_254dfc84e14cf0ab9a0d066bcf5a94f6_rle_crop_3898909263_0.png.png imagette255241491753930021/ imagette255241501753930021/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/d354a0deb87303eeef32389bcc3b380d_6715274.png imagette255241471753930021 25524149 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=25524149 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255241491753930021 25524150 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=25524150 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255241501753930021 25524151 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=25524151 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374539873: '1753929387_291182_1374539747_da81af0ee2e1c994e330dbb274ec0366_rle_crop_3898908854_0.png'} change filename to text .imagette255241511753930021/ imagette255241511753930021/1753929387_291182_1374539747_da81af0ee2e1c994e330dbb274ec0366_rle_crop_3898908854_0.png.png imagette255241521753930021/ imagette255241541753930021/ imagette255241441753930021/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/b690531413aab1e0f48af5c1b05d0edb_94645552.png imagette255241511753930021 25524152 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=25524152 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255241521753930021 25524154 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=25524154 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255241541753930021 25524144 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=25524144 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255241441753930021 25524146 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=25524146 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374539921: '1753929445_294747_1374539704_254dfc84e14cf0ab9a0d066bcf5a94f6_rle_crop_3898909260_0.png', 1374540166: '1753929925_312190_1374539992_9ed252bf40d055941742b5af75b341e1_rle_crop_3898910524_0.png', 1374540165: '1753929925_312190_1374540030_83717bf6fc7044c3022ce41d9315a22a_rle_crop_3898910413_0.png', 1374539928: '1753929445_294747_1374539699_994542158b4e73fe79393a3870a0dc78_rle_crop_3898909294_0.png', 1374539927: '1753929445_294747_1374539699_994542158b4e73fe79393a3870a0dc78_rle_crop_3898909291_0.png', 1374539926: '1753929445_294747_1374539702_bdd80fe2a44b2ea0ec9ad0041017fa5a_rle_crop_3898909281_0.png', 1374539925: '1753929445_294747_1374539702_bdd80fe2a44b2ea0ec9ad0041017fa5a_rle_crop_3898909277_0.png', 1374539924: '1753929445_294747_1374539702_bdd80fe2a44b2ea0ec9ad0041017fa5a_rle_crop_3898909278_0.png', 1374539923: '1753929445_294747_1374539704_254dfc84e14cf0ab9a0d066bcf5a94f6_rle_crop_3898909261_0.png', 1374539922: '1753929445_294747_1374539704_254dfc84e14cf0ab9a0d066bcf5a94f6_rle_crop_3898909265_0.png', 1374539868: '1753929387_291182_1374539747_da81af0ee2e1c994e330dbb274ec0366_rle_crop_3898908859_0.png', 1374539920: '1753929445_294747_1374539706_ee81ed1da016ef2f7ca66ceb9f95fbf6_rle_crop_3898909251_0.png', 1374539919: '1753929445_294747_1374539706_ee81ed1da016ef2f7ca66ceb9f95fbf6_rle_crop_3898909247_0.png', 1374539918: '1753929445_294747_1374539708_7d51bee002e206381ef83c54d864b96e_rle_crop_3898909240_0.png', 1374539917: '1753929445_294747_1374539708_7d51bee002e206381ef83c54d864b96e_rle_crop_3898909237_0.png', 1374539916: '1753929445_294747_1374539708_7d51bee002e206381ef83c54d864b96e_rle_crop_3898909234_0.png', 1374539915: '1753929445_294747_1374539710_4bc00bad54a032cdfe70ca1f2394cae3_rle_crop_3898909224_0.png', 1374539872: '1753929387_291182_1374539745_748fd67af070455cf3e72c8e218211f6_rle_crop_3898908885_0.png', 1374539870: '1753929387_291182_1374539747_da81af0ee2e1c994e330dbb274ec0366_rle_crop_3898908866_0.png', 1374539869: '1753929387_291182_1374539747_da81af0ee2e1c994e330dbb274ec0366_rle_crop_3898908861_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/e62e8263bd0f1cf42dab751d783c08c7_64029659.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/375b6c79efd50d9823ada799e67ff470_68993621.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/375b6c79efd50d9823ada799e67ff470_89698029.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/57297871ed3ea3274a3ceeb6b747bf60_72482289.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/edd9cd3f8a895add7a0d6c5caa6d2584_48058624.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/b0e5ee64fe3c35ab56f56254209c99ca_16647536.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/9269dec70d4ed692e04979e2602c4ec5_74059092.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/08d50890fc302c62ec8f90c3b7508055_82692951.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/efb5bcf8d833be2d40e16177690c12b6_23038307.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/80aef71d6f7390536bd58d8a88563bf7_10011117.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/36db35b5f49890e137a6254922bc88ae_58258594.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/1f897ba94ce504e7c7b7c1c6e872a3c6_16751063.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/7c4ffa884649ed0307d9d704c687b9c9_980131.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/b258945fa89ded8308b0b450db614460_16599443.png change filename to text .wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/4490cdf816baadb66e843c65bc2bd5c1_5808408.png change filename to text .wget -O 16.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/eeb975a61636f7a3e42c894b15469d29_23618079.png change filename to text .wget -O 17.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/347d7955d894b6c642214a2cac2f9df7_61786528.png change filename to text .wget -O 18.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/2c536dbdda4e177c34638d35d68d39a4_11221642.png change filename to text .wget -O 19.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/830a971ff2c5af70c4f3282ca04682bc_72667726.png change filename to text .imagette255241461753930021/ imagette255241461753930021/1753929387_291182_1374539747_da81af0ee2e1c994e330dbb274ec0366_rle_crop_3898908859_0.png.png imagette255241461753930021/1753929387_291182_1374539745_748fd67af070455cf3e72c8e218211f6_rle_crop_3898908885_0.png.png imagette255241461753930021/1753929445_294747_1374539704_254dfc84e14cf0ab9a0d066bcf5a94f6_rle_crop_3898909265_0.png.png imagette255241461753930021/1753929445_294747_1374539704_254dfc84e14cf0ab9a0d066bcf5a94f6_rle_crop_3898909260_0.png.png imagette255241461753930021/1753929445_294747_1374539704_254dfc84e14cf0ab9a0d066bcf5a94f6_rle_crop_3898909261_0.png.png imagette255241461753930021/1753929445_294747_1374539708_7d51bee002e206381ef83c54d864b96e_rle_crop_3898909240_0.png.png imagette255241461753930021/1753929387_291182_1374539747_da81af0ee2e1c994e330dbb274ec0366_rle_crop_3898908866_0.png.png imagette255241461753930021/1753929445_294747_1374539702_bdd80fe2a44b2ea0ec9ad0041017fa5a_rle_crop_3898909277_0.png.png imagette255241461753930021/1753929445_294747_1374539708_7d51bee002e206381ef83c54d864b96e_rle_crop_3898909234_0.png.png imagette255241461753930021/1753929925_312190_1374540030_83717bf6fc7044c3022ce41d9315a22a_rle_crop_3898910413_0.png.png imagette255241461753930021/1753929445_294747_1374539702_bdd80fe2a44b2ea0ec9ad0041017fa5a_rle_crop_3898909281_0.png.png imagette255241461753930021/1753929445_294747_1374539708_7d51bee002e206381ef83c54d864b96e_rle_crop_3898909237_0.png.png imagette255241461753930021/1753929445_294747_1374539706_ee81ed1da016ef2f7ca66ceb9f95fbf6_rle_crop_3898909247_0.png.png imagette255241461753930021/1753929445_294747_1374539706_ee81ed1da016ef2f7ca66ceb9f95fbf6_rle_crop_3898909251_0.png.png imagette255241461753930021/1753929445_294747_1374539699_994542158b4e73fe79393a3870a0dc78_rle_crop_3898909291_0.png.png imagette255241461753930021/1753929445_294747_1374539702_bdd80fe2a44b2ea0ec9ad0041017fa5a_rle_crop_3898909278_0.png.png imagette255241461753930021/1753929925_312190_1374539992_9ed252bf40d055941742b5af75b341e1_rle_crop_3898910524_0.png.png imagette255241461753930021/1753929445_294747_1374539699_994542158b4e73fe79393a3870a0dc78_rle_crop_3898909294_0.png.png imagette255241461753930021/1753929387_291182_1374539747_da81af0ee2e1c994e330dbb274ec0366_rle_crop_3898908861_0.png.png imagette255241461753930021/1753929445_294747_1374539710_4bc00bad54a032cdfe70ca1f2394cae3_rle_crop_3898909224_0.png.png imagette255241481753930022/ wget -O 20.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/0a0d36d45d56672161fe1149b924f3cd_51282353.png imagette255241461753930021 25524148 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=25524148 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255241481753930022 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=25524141 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/25524155,25524156,25524157,25524158,25524159,25524160,25524161,25524162,25524163,25524164,25524165,25524166?tags=environnement,Carton_brun,cartonnette,Teint_Dans_La_Masse,plastique,Carton_gris,mal_croppe,flou,autre_refus,kraft,papier,metal your option no_mail is active, we will not send the real mail to your client args[1374540140] : ('0.020426738508345487',) no score found for photo 1374540140 We are sending mail with results at report@fotonower.com args[1374540137] : ('0.020426738508345487',) no score found for photo 1374540137 We are sending mail with results at report@fotonower.com args[1374540136] : ('0.020426738508345487',) no score found for photo 1374540136 We are sending mail with results at report@fotonower.com args[1374540134] : ('0.020426738508345487',) no score found for photo 1374540134 We are sending mail with results at report@fotonower.com args[1374540132] : ('0.020426738508345487',) no score found for photo 1374540132 We are sending mail with results at report@fotonower.com args[1374540129] : ('0.020426738508345487',) no score found for photo 1374540129 We are sending mail with results at report@fotonower.com refus_total : 0.020426738508345487 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=25524141 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_P25524141_31-07-2025_04_47_01.pdf results_Auto_P25524141_31-07-2025_04_47_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25524141_31-07-2025_04_47_01.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','25524141','results_Auto_P25524141_31-07-2025_04_47_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25524141_31-07-2025_04_47_01.pdf','pdf','','0.12','0.020426738508345487') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25524141]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1374540140, 1374540137, 1374540136, 1374540134, 1374540132, 1374540129] map_info['map_portfolio_photo'] : {25524141: [1374540140, 1374540137, 1374540136, 1374540134, 1374540132, 1374540129, 1374540112, 1374540111, 1374540110, 1374540109, 1374540107, 1374540105, 1374540087, 1374540086, 1374540084, 1374540083, 1374540081, 1374540079, 1374540058, 1374540056, 1374540054, 1374540052, 1374540050, 1374540047, 1374540030, 1374540006, 1374540004, 1374539992, 1374539984, 1374539981, 1374539978, 1374539961, 1374539959, 1374539957, 1374539955, 1374539953, 1374539950, 1374539935, 1374539932, 1374539930, 1374539914, 1374539913, 1374539912, 1374539894, 1374539890, 1374539878, 1374539877, 1374539875, 1374539871, 1374539850, 1374539848, 1374539846, 1374539844, 1374539836, 1374539831, 1374539813, 1374539812, 1374539811, 1374539810, 1374539808, 1374539805, 1374539788, 1374539786, 1374539784, 1374539774, 1374539766, 1374539763, 1374539747, 1374539745, 1374539744, 1374539743, 1374539738, 1374539728, 1374539710, 1374539708, 1374539706, 1374539704, 1374539702, 1374539699, 1374539663]} final : False mtd_id 4302 list_pids : [1374540140, 1374540137, 1374540136, 1374540134, 1374540132, 1374540129] 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, '3404616') ('4302', '25524141', '1374540140', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540137', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540136', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540134', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540132', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540129', None, None, None, None, None, '3404616') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '25524141', '1374540140', None, None, None, None, None, '3404616'), ('4302', '25524141', '1374540137', None, None, None, None, None, '3404616'), ('4302', '25524141', '1374540136', None, None, None, None, None, '3404616'), ('4302', '25524141', '1374540134', None, None, None, None, None, '3404616'), ('4302', '25524141', '1374540132', None, None, None, None, None, '3404616'), ('4302', '25524141', '1374540129', None, None, None, None, None, '3404616')] time used for this insertion : 0.01588129997253418 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.4216372966766357 time spend to save output : 0.016092538833618164 total time spend for step 4 : 2.437729835510254 step5:split_time_score Thu Jul 31 04:47:03 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 : ['25524141'] 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 : [('25524141',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25524141) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1374540137: {'path': 'temp/1753930021_1744117_1374540137_4af05768d9557d67978fb0f5e1311b1d.jpg', 'extension': 'jpg'}, 1374540140: {'path': 'temp/1753930021_1744117_1374540140_f88a1bddd2cd0a148bcb194c7a60b5d3.jpg', 'extension': 'jpg'}, 1374540129: {'path': 'temp/1753930021_1744117_1374540129_da208f1e9e6bd06ef59d40e3ba4aaa89.jpg', 'extension': 'jpg'}, 1374540132: {'path': 'temp/1753930021_1744117_1374540132_ea5bef2fe84d7b078e5f76004536f80a.jpg', 'extension': 'jpg'}, 1374540134: {'path': 'temp/1753930021_1744117_1374540134_2f30a71462a53fafc723be407675c629.jpg', 'extension': 'jpg'}, 1374540136: {'path': 'temp/1753930021_1744117_1374540136_0e8c1c53ba9b35e948b580c21a330cb9.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 = 25524141; (('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 = 25524141 group by h (('04', 80),) 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=25524141 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 (25524141) 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 (25524141) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 31072025 25524141 Nombre de photos uploadées : 80 / 23040 (0%) 31072025 25524141 Nombre de photos taguées (types de déchets): 0 / 80 (0%) 31072025 25524141 Nombre de photos taguées (volume) : 0 / 80 (0%) [{'photo_id': 1374539663, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/27e7df3490639d4de123b3b5cb10f8ba.jpg', 'username': None, 'uploaded_at': 1753929067, 'text': 'image_31072025_04_30_14_10142.jpg'}, {'photo_id': 1374539710, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/4bc00bad54a032cdfe70ca1f2394cae3.jpg', 'username': None, 'uploaded_at': 1753929123, 'text': 'image_31072025_04_31_03_010158m0.jpg 1e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1374539708, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/7d51bee002e206381ef83c54d864b96e.jpg', 'username': None, 'uploaded_at': 1753929123, 'text': 'image_31072025_04_31_13_010139m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1374539706, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/31/ee81ed1da016ef2f7ca66ceb9f95fbf6.jpg', 'username': None, 'uploaded_at': 1753929123, 'text': 'image_31072025_04_31_24_010135m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 3.5762786865234375e-06 elapsed_time : order_list_meta_photo_and_scores 1.0251998901367188e-05 ???????????????????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.005888223648071289 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 25524141, '2025-07-31' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-07-31' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2034079,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.22214961051940918 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= 2034079 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2034079, 'dashboard_run_id': 2042499, 'mtr_portfolio_id': 25516129, 'dashboard_result_id': 13390824, '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_P25516129_31-07-2025_00_16_34.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25516134, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25516135, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25516136, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25516137, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25516138, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25516139, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25516140, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25516141, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25516142, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25516143, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25516144, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25516145, 'pht': 3726}}"}, {'dashboat_entry_day': 2034079, 'dashboard_run_id': 2042499, 'mtr_portfolio_id': 25516552, 'dashboard_result_id': 13390825, '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_P25516552_31-07-2025_00_31_03.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25516556, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25516557, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25516558, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25516559, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25516560, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25516561, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25516562, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25516563, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25516564, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25516565, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25516566, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25516567, 'pht': 3726}}"}, {'dashboat_entry_day': 2034079, 'dashboard_run_id': 2042499, 'mtr_portfolio_id': 25516863, 'dashboard_result_id': 13390826, '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_P25516863_31-07-2025_00_47_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25516867, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25516868, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25516869, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25516870, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25516871, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25516872, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25516873, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25516874, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25516875, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25516876, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25516877, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25516879, 'pht': 3726}}"}, {'dashboat_entry_day': 2034079, 'dashboard_run_id': 2042499, 'mtr_portfolio_id': 25517204, 'dashboard_result_id': 13390827, '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_P25517204_31-07-2025_01_03_02.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25517205, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25517206, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25517207, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25517208, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25517209, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25517210, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25517211, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25517212, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25517213, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25517214, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25517215, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25517216, 'pht': 3726}}"}, {'dashboat_entry_day': 2034079, 'dashboard_run_id': 2042499, 'mtr_portfolio_id': 25517620, 'dashboard_result_id': 13390828, '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_P25517620_31-07-2025_01_17_05.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25517625, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25517626, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25517627, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25517628, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25517629, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25517630, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25517631, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25517632, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25517633, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25517635, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25517636, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25517637, 'pht': 3726}}"}, {'dashboat_entry_day': 2034079, 'dashboard_run_id': 2042499, 'mtr_portfolio_id': 25518153, 'dashboard_result_id': 13390829, '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_P25518153_31-07-2025_01_33_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25518157, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25518158, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25518159, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25518160, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25518161, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25518162, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25518163, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25518164, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25518165, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25518166, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25518167, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25518168, 'pht': 3726}}"}, {'dashboat_entry_day': 2034079, 'dashboard_run_id': 2042499, 'mtr_portfolio_id': 25518649, 'dashboard_result_id': 13390830, '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_P25518649_31-07-2025_01_46_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25518654, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25518656, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25518657, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25518659, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25518661, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25518662, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25518664, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25518665, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25518667, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25518668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25518670, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25518671, 'pht': 3726}}"}, {'dashboat_entry_day': 2034079, 'dashboard_run_id': 2042499, 'mtr_portfolio_id': 25519140, 'dashboard_result_id': 13390831, '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_P25519140_31-07-2025_02_03_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25519141, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25519142, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25519143, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25519144, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25519145, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25519146, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25519147, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25519148, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25519149, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25519150, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25519151, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25519152, 'pht': 3726}}"}, {'dashboat_entry_day': 2034079, 'dashboard_run_id': 2042499, 'mtr_portfolio_id': 25519626, 'dashboard_result_id': 13390832, '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_P25519626_31-07-2025_02_17_02.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25519629, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25519630, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25519631, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25519632, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25519633, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25519634, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25519635, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25519636, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25519637, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25519638, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25519639, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25519640, 'pht': 3726}}"}, {'dashboat_entry_day': 2034079, 'dashboard_run_id': 2042499, 'mtr_portfolio_id': 25520305, 'dashboard_result_id': 13390833, '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_P25520305_31-07-2025_02_33_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25520309, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25520310, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25520311, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25520312, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25520313, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25520314, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25520315, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25520316, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25520317, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25520318, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25520319, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25520320, 'pht': 3726}}"}, {'dashboat_entry_day': 2034079, 'dashboard_run_id': 2042499, 'mtr_portfolio_id': 25520841, 'dashboard_result_id': 13390834, '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_P25520841_31-07-2025_02_47_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25520845, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25520846, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25520847, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25520848, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25520849, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25520850, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25520851, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25520852, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25520853, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25520854, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25520855, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25520856, 'pht': 3726}}"}, {'dashboat_entry_day': 2034079, 'dashboard_run_id': 2042499, 'mtr_portfolio_id': 25521307, 'dashboard_result_id': 13390835, '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_P25521307_31-07-2025_03_03_30.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25521311, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25521312, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25521313, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25521314, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25521315, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25521316, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25521317, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25521318, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25521319, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25521320, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25521321, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25521322, 'pht': 3726}}"}, {'dashboat_entry_day': 2034079, 'dashboard_run_id': 2042499, 'mtr_portfolio_id': 25521737, 'dashboard_result_id': 13390836, '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_P25521737_31-07-2025_03_17_27.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25521744, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25521745, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25521746, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25521747, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25521748, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25521749, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25521750, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25521751, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25521752, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25521753, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25521754, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25521755, 'pht': 3726}}"}, {'dashboat_entry_day': 2034079, 'dashboard_run_id': 2042499, 'mtr_portfolio_id': 25522256, 'dashboard_result_id': 13390837, '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_P25522256_31-07-2025_03_32_29.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25522281, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25522282, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25522283, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25522284, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25522285, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25522286, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25522287, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25522288, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25522289, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25522290, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25522291, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25522292, 'pht': 3726}}"}, {'dashboat_entry_day': 2034079, 'dashboard_run_id': 2042499, 'mtr_portfolio_id': 25522735, 'dashboard_result_id': 13390838, '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_P25522735_31-07-2025_03_46_30.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25522739, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25522740, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25522741, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25522742, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25522743, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25522744, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25522745, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25522746, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25522747, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25522748, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25522749, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25522750, 'pht': 3726}}"}, {'dashboat_entry_day': 2034079, 'dashboard_run_id': 2042499, 'mtr_portfolio_id': 25523075, 'dashboard_result_id': 13390839, '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_P25523075_31-07-2025_04_03_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25523076, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25523077, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25523078, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25523079, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25523080, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25523081, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25523082, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25523083, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25523084, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25523085, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25523086, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25523087, 'pht': 3726}}"}, {'dashboat_entry_day': 2034079, 'dashboard_run_id': 2042499, 'mtr_portfolio_id': 25523385, 'dashboard_result_id': 13390840, '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_P25523385_31-07-2025_04_16_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25523388, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25523389, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25523390, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25523391, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25523392, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25523393, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25523394, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25523395, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25523396, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25523397, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25523398, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25523399, 'pht': 3726}}"}, {'dashboat_entry_day': 2034079, 'dashboard_run_id': 2042499, 'mtr_portfolio_id': 25523818, 'dashboard_result_id': 13390841, '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_P25523818_31-07-2025_04_30_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25523822, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25523823, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25523824, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25523825, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25523826, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25523827, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25523828, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25523829, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25523830, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25523831, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25523832, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25523833, 'pht': 3726}}"}, {'dashboat_entry_day': 2034079, 'dashboard_run_id': 2042499, 'mtr_portfolio_id': 25524141, 'dashboard_result_id': 13390842, '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_P25524141_31-07-2025_04_42_32.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25524143, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25524144, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25524145, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25524146, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25524147, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25524148, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25524149, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25524150, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25524151, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25524152, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25524153, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25524154, '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 = 25516129 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': 3403041, 'mtr_portfolio_id': 25516129, 'created_at': datetime.datetime(2025, 7, 31, 0, 16, 33), 'result': '0.09469179894006444', 'result_long': None, 'result_double': None}] Qualite : 0.09469179894006444 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25516129 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25516129_31-07-2025_00_16_34.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25516129 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_P25516129_31-07-2025_00_16_34.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25516134, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25516135, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25516136, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25516137, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25516138, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25516139, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25516140, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25516141, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25516142, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25516143, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25516144, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25516145, 'pht': 3726}}" where mtr_portfolio_id = 25516129 and dashboard_run_id = 2042499 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`=25516129 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13390824, 0.09469179894006444, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25516129_31-07-2025_00_16_34.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25516134, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25516135, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25516136, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25516137, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25516138, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25516139, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25516140, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25516141, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25516142, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25516143, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25516144, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25516145, '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 = 25516552 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': 3403094, 'mtr_portfolio_id': 25516552, 'created_at': datetime.datetime(2025, 7, 31, 0, 31, 2), 'result': '0.048341225671871955', 'result_long': None, 'result_double': None}] Qualite : 0.048341225671871955 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25516552 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25516552_31-07-2025_00_31_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25516552 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_P25516552_31-07-2025_00_31_03.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25516556, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25516557, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25516558, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25516559, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25516560, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25516561, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25516562, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25516563, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25516564, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25516565, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25516566, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25516567, 'pht': 3726}}" where mtr_portfolio_id = 25516552 and dashboard_run_id = 2042499 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`=25516552 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13390825, 0.048341225671871955, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25516552_31-07-2025_00_31_03.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25516556, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25516557, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25516558, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25516559, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25516560, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25516561, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25516562, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25516563, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25516564, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25516565, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25516566, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25516567, '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 = 25516863 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': 3403189, 'mtr_portfolio_id': 25516863, 'created_at': datetime.datetime(2025, 7, 31, 0, 46, 59), 'result': '0.037718249975572674', 'result_long': None, 'result_double': None}] Qualite : 0.037718249975572674 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25516863 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25516863_31-07-2025_00_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25516863 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_P25516863_31-07-2025_00_47_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25516867, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25516868, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25516869, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25516870, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25516871, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25516872, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25516873, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25516874, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25516875, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25516876, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25516877, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25516879, 'pht': 3726}}" where mtr_portfolio_id = 25516863 and dashboard_run_id = 2042499 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`=25516863 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13390826, 0.037718249975572674, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25516863_31-07-2025_00_47_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25516867, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25516868, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25516869, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25516870, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25516871, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25516872, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25516873, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25516874, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25516875, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25516876, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25516877, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25516879, '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 = 25517204 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': 3403253, 'mtr_portfolio_id': 25517204, 'created_at': datetime.datetime(2025, 7, 31, 1, 3, 1), 'result': '0.07196157834222848', 'result_long': None, 'result_double': None}] Qualite : 0.07196157834222848 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25517204 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25517204_31-07-2025_01_03_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25517204 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_P25517204_31-07-2025_01_03_02.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25517205, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25517206, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25517207, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25517208, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25517209, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25517210, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25517211, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25517212, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25517213, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25517214, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25517215, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25517216, 'pht': 3726}}" where mtr_portfolio_id = 25517204 and dashboard_run_id = 2042499 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`=25517204 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13390827, 0.07196157834222848, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25517204_31-07-2025_01_03_02.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25517205, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25517206, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25517207, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25517208, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25517209, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25517210, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25517211, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25517212, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25517213, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25517214, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25517215, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25517216, '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 = 25517620 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': 3403363, 'mtr_portfolio_id': 25517620, 'created_at': datetime.datetime(2025, 7, 31, 1, 17, 4), 'result': '0.1161150139609971', 'result_long': None, 'result_double': None}] Qualite : 0.1161150139609971 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25517620 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25517620_31-07-2025_01_17_05.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25517620 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_P25517620_31-07-2025_01_17_05.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25517625, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25517626, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25517627, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25517628, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25517629, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25517630, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25517631, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25517632, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25517633, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25517635, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25517636, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25517637, 'pht': 3726}}" where mtr_portfolio_id = 25517620 and dashboard_run_id = 2042499 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`=25517620 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13390828, 0.1161150139609971, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25517620_31-07-2025_01_17_05.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25517625, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25517626, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25517627, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25517628, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25517629, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25517630, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25517631, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25517632, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25517633, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25517635, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25517636, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25517637, '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 = 25518153 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': 3403451, 'mtr_portfolio_id': 25518153, 'created_at': datetime.datetime(2025, 7, 31, 1, 32, 59), 'result': '0.10458579685610223', 'result_long': None, 'result_double': None}] Qualite : 0.10458579685610223 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25518153 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25518153_31-07-2025_01_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25518153 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_P25518153_31-07-2025_01_33_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25518157, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25518158, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25518159, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25518160, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25518161, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25518162, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25518163, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25518164, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25518165, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25518166, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25518167, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25518168, 'pht': 3726}}" where mtr_portfolio_id = 25518153 and dashboard_run_id = 2042499 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`=25518153 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13390829, 0.10458579685610223, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25518153_31-07-2025_01_33_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25518157, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25518158, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25518159, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25518160, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25518161, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25518162, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25518163, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25518164, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25518165, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25518166, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25518167, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25518168, '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 = 25518649 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': 3403557, 'mtr_portfolio_id': 25518649, 'created_at': datetime.datetime(2025, 7, 31, 1, 46, 59), 'result': '0.03269960328168013', 'result_long': None, 'result_double': None}] Qualite : 0.03269960328168013 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25518649 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25518649_31-07-2025_01_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25518649 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_P25518649_31-07-2025_01_46_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25518654, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25518656, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25518657, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25518659, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25518661, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25518662, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25518664, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25518665, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25518667, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25518668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25518670, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25518671, 'pht': 3726}}" where mtr_portfolio_id = 25518649 and dashboard_run_id = 2042499 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`=25518649 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13390830, 0.03269960328168013, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25518649_31-07-2025_01_46_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25518654, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25518656, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25518657, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25518659, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25518661, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25518662, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25518664, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25518665, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25518667, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25518668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25518670, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25518671, '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 = 25519140 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': 3403652, 'mtr_portfolio_id': 25519140, 'created_at': datetime.datetime(2025, 7, 31, 2, 3, 1), 'result': '0.02212659073019048', 'result_long': None, 'result_double': None}] Qualite : 0.02212659073019048 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25519140 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25519140_31-07-2025_02_03_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25519140 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_P25519140_31-07-2025_02_03_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25519141, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25519142, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25519143, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25519144, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25519145, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25519146, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25519147, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25519148, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25519149, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25519150, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25519151, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25519152, 'pht': 3726}}" where mtr_portfolio_id = 25519140 and dashboard_run_id = 2042499 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`=25519140 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13390831, 0.02212659073019048, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25519140_31-07-2025_02_03_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25519141, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25519142, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25519143, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25519144, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25519145, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25519146, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25519147, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25519148, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25519149, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25519150, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25519151, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25519152, '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 = 25519626 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': 3403743, 'mtr_portfolio_id': 25519626, 'created_at': datetime.datetime(2025, 7, 31, 2, 17, 1), 'result': '0.12430981116447797', 'result_long': None, 'result_double': None}] Qualite : 0.12430981116447797 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25519626 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25519626_31-07-2025_02_17_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25519626 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_P25519626_31-07-2025_02_17_02.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25519629, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25519630, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25519631, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25519632, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25519633, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25519634, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25519635, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25519636, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25519637, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25519638, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25519639, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25519640, 'pht': 3726}}" where mtr_portfolio_id = 25519626 and dashboard_run_id = 2042499 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`=25519626 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13390832, 0.12430981116447797, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25519626_31-07-2025_02_17_02.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25519629, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25519630, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25519631, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25519632, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25519633, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25519634, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25519635, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25519636, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25519637, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25519638, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25519639, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25519640, '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 = 25520305 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': 3403828, 'mtr_portfolio_id': 25520305, 'created_at': datetime.datetime(2025, 7, 31, 2, 32, 59), 'result': '0.06080393196828024', 'result_long': None, 'result_double': None}] Qualite : 0.06080393196828024 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25520305 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25520305_31-07-2025_02_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25520305 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_P25520305_31-07-2025_02_33_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25520309, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25520310, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25520311, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25520312, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25520313, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25520314, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25520315, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25520316, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25520317, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25520318, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25520319, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25520320, 'pht': 3726}}" where mtr_portfolio_id = 25520305 and dashboard_run_id = 2042499 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`=25520305 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13390833, 0.06080393196828024, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25520305_31-07-2025_02_33_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25520309, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25520310, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25520311, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25520312, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25520313, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25520314, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25520315, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25520316, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25520317, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25520318, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25520319, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25520320, '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 = 25520841 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': 3403935, 'mtr_portfolio_id': 25520841, 'created_at': datetime.datetime(2025, 7, 31, 2, 46, 59), 'result': '0.04955870547007754', 'result_long': None, 'result_double': None}] Qualite : 0.04955870547007754 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25520841 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25520841_31-07-2025_02_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25520841 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_P25520841_31-07-2025_02_47_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25520845, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25520846, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25520847, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25520848, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25520849, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25520850, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25520851, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25520852, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25520853, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25520854, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25520855, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25520856, 'pht': 3726}}" where mtr_portfolio_id = 25520841 and dashboard_run_id = 2042499 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`=25520841 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13390834, 0.04955870547007754, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25520841_31-07-2025_02_47_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25520845, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25520846, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25520847, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25520848, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25520849, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25520850, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25520851, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25520852, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25520853, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25520854, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25520855, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25520856, '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 = 25521307 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': 3404028, 'mtr_portfolio_id': 25521307, 'created_at': datetime.datetime(2025, 7, 31, 3, 3, 30), 'result': '0.08781184551772742', 'result_long': None, 'result_double': None}] Qualite : 0.08781184551772742 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25521307 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25521307_31-07-2025_03_03_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25521307 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_P25521307_31-07-2025_03_03_30.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25521311, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25521312, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25521313, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25521314, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25521315, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25521316, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25521317, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25521318, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25521319, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25521320, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25521321, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25521322, 'pht': 3726}}" where mtr_portfolio_id = 25521307 and dashboard_run_id = 2042499 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`=25521307 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13390835, 0.08781184551772742, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25521307_31-07-2025_03_03_30.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25521311, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25521312, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25521313, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25521314, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25521315, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25521316, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25521317, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25521318, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25521319, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25521320, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25521321, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25521322, '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 = 25521737 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': 3404131, 'mtr_portfolio_id': 25521737, 'created_at': datetime.datetime(2025, 7, 31, 3, 17, 27), 'result': '0.016141411741747148', 'result_long': None, 'result_double': None}] Qualite : 0.016141411741747148 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25521737 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25521737_31-07-2025_03_17_27.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25521737 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_P25521737_31-07-2025_03_17_27.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25521744, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25521745, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25521746, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25521747, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25521748, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25521749, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25521750, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25521751, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25521752, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25521753, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25521754, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25521755, 'pht': 3726}}" where mtr_portfolio_id = 25521737 and dashboard_run_id = 2042499 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`=25521737 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13390836, 0.016141411741747148, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25521737_31-07-2025_03_17_27.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25521744, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25521745, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25521746, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25521747, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25521748, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25521749, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25521750, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25521751, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25521752, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25521753, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25521754, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25521755, '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 = 25522256 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': 3404225, 'mtr_portfolio_id': 25522256, 'created_at': datetime.datetime(2025, 7, 31, 3, 32, 29), 'result': '0.051786588850313335', 'result_long': None, 'result_double': None}] Qualite : 0.051786588850313335 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25522256 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25522256_31-07-2025_03_32_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25522256 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_P25522256_31-07-2025_03_32_29.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25522281, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25522282, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25522283, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25522284, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25522285, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25522286, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25522287, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25522288, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25522289, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25522290, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25522291, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25522292, 'pht': 3726}}" where mtr_portfolio_id = 25522256 and dashboard_run_id = 2042499 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`=25522256 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13390837, 0.051786588850313335, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25522256_31-07-2025_03_32_29.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25522281, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25522282, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25522283, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25522284, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25522285, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25522286, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25522287, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25522288, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25522289, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25522290, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25522291, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25522292, '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 = 25522735 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': 3404319, 'mtr_portfolio_id': 25522735, 'created_at': datetime.datetime(2025, 7, 31, 3, 46, 29), 'result': '0.023323670621412492', 'result_long': None, 'result_double': None}] Qualite : 0.023323670621412492 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25522735 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25522735_31-07-2025_03_46_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25522735 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_P25522735_31-07-2025_03_46_30.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25522739, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25522740, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25522741, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25522742, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25522743, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25522744, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25522745, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25522746, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25522747, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25522748, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25522749, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25522750, 'pht': 3726}}" where mtr_portfolio_id = 25522735 and dashboard_run_id = 2042499 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`=25522735 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13390838, 0.023323670621412492, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25522735_31-07-2025_03_46_30.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25522739, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25522740, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25522741, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25522742, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25522743, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25522744, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25522745, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25522746, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25522747, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25522748, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25522749, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25522750, '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 = 25523075 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': 3404390, 'mtr_portfolio_id': 25523075, 'created_at': datetime.datetime(2025, 7, 31, 4, 3), 'result': '0.02927142085077418', 'result_long': None, 'result_double': None}] Qualite : 0.02927142085077418 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25523075 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25523075_31-07-2025_04_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25523075 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_P25523075_31-07-2025_04_03_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25523076, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25523077, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25523078, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25523079, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25523080, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25523081, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25523082, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25523083, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25523084, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25523085, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25523086, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25523087, 'pht': 3726}}" where mtr_portfolio_id = 25523075 and dashboard_run_id = 2042499 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`=25523075 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13390839, 0.02927142085077418, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25523075_31-07-2025_04_03_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25523076, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25523077, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25523078, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25523079, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25523080, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25523081, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25523082, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25523083, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25523084, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25523085, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25523086, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25523087, '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 = 25523385 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': 3404485, 'mtr_portfolio_id': 25523385, 'created_at': datetime.datetime(2025, 7, 31, 4, 16, 59), 'result': '0.0989593924729538', 'result_long': None, 'result_double': None}] Qualite : 0.0989593924729538 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25523385 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25523385_31-07-2025_04_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25523385 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_P25523385_31-07-2025_04_16_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25523388, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25523389, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25523390, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25523391, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25523392, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25523393, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25523394, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25523395, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25523396, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25523397, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25523398, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25523399, 'pht': 3726}}" where mtr_portfolio_id = 25523385 and dashboard_run_id = 2042498 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`=25523385 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13390840, 0.0989593924729538, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25523385_31-07-2025_04_16_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25523388, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25523389, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25523390, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25523391, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25523392, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25523393, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25523394, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25523395, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25523396, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25523397, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25523398, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25523399, '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 = 25523818 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': 3404547, 'mtr_portfolio_id': 25523818, 'created_at': datetime.datetime(2025, 7, 31, 4, 30, 58), 'result': '0.08248764293386553', 'result_long': None, 'result_double': None}] Qualite : 0.08248764293386553 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25523818 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25523818_31-07-2025_04_30_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25523818 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_P25523818_31-07-2025_04_30_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25523822, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25523823, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25523824, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25523825, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25523826, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25523827, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25523828, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25523829, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25523830, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25523831, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25523832, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25523833, 'pht': 3726}}" where mtr_portfolio_id = 25523818 and dashboard_run_id = 2042498 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`=25523818 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13390841, 0.08248764293386553, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25523818_31-07-2025_04_30_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25523822, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25523823, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25523824, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25523825, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25523826, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25523827, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25523828, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25523829, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25523830, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25523831, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25523832, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25523833, '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 = 25524141 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': 3404616, 'mtr_portfolio_id': 25524141, 'created_at': datetime.datetime(2025, 7, 31, 4, 47, 1), 'result': '0.020426738508345487', 'result_long': None, 'result_double': None}] Qualite : 0.020426738508345487 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25524141 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25524141_31-07-2025_04_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25524141 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_P25524141_31-07-2025_04_47_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25524143, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25524144, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25524145, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25524146, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25524147, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25524148, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25524149, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25524150, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25524151, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25524152, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25524153, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25524154, 'pht': 3726}}" where mtr_portfolio_id = 25524141 and dashboard_run_id = 2042498 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`=25524141 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13390842, 0.020426738508345487, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25524141_31-07-2025_04_47_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25524143, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25524144, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25524145, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25524146, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25524147, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25524148, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25524149, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25524150, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25524151, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25524152, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25524153, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25524154, '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 (25516129,25516552,25516863,25517204,25517620,25518153,25518649,25519140,25519626,25520305,25520841,25521307,25521737,25522256,25522735,25523075,25523385,25523818,25524141) result : ((1374514567,), (1374514596,), (1374514618,), (1374514639,), (1374514661,), (1374514680,), (1374514915,), (1374514956,), (1374514988,), (1374515009,), (1374515045,), (1374515070,), (1374515272,), (1374515291,), (1374515310,), (1374515331,), (1374515334,), (1374515339,), (1374515640,), (1374515710,), (1374515787,), (1374515863,), (1374515931,), (1374515997,), (1374516495,), (1374516889,), (1374516905,), (1374516906,), (1374516918,), (1374516936,), (1374516943,), (1374517031,), (1374517055,), (1374517078,), (1374517098,), (1374517120,), (1374517139,), (1374517293,), (1374517311,), (1374517331,), (1374517349,), (1374517367,), (1374517385,), (1374517831,), (1374517884,), (1374517941,), (1374517990,), (1374518040,), (1374518091,), (1374518410,), (1374518738,), (1374518781,), (1374518785,), (1374518815,), (1374518834,), (1374518837,), (1374518849,), (1374518851,), (1374518853,), (1374518855,), (1374518857,), (1374518859,), (1374518874,), (1374518876,), (1374518879,), (1374518890,), (1374518906,), (1374518908,), (1374518919,), (1374518920,), (1374518922,), (1374518923,), (1374518925,), (1374518941,), (1374519076,), (1374519079,), (1374519082,), (1374519089,), (1374519095,), (1374519098,), (1374519103,), (1374519105,), (1374519108,), (1374519111,), (1374519113,), (1374519115,), (1374519125,), (1374519137,), (1374519138,), (1374519145,), (1374519147,), (1374519166,), (1374519205,), (1374519207,), (1374519209,), (1374519211,), (1374519221,), (1374519241,), (1374519357,), (1374519471,), (1374519555,), (1374519557,), (1374519558,), (1374519578,), (1374519586,), (1374519596,), (1374519603,), (1374519606,), (1374519609,), (1374519612,), (1374519615,), (1374519617,), (1374519632,), (1374519633,), (1374519636,), (1374519643,), (1374519646,), (1374519648,), (1374519657,), (1374519673,), (1374519679,), (1374519684,), (1374519686,), (1374519688,), (1374519715,), (1374519739,), (1374519759,), (1374519781,), (1374519801,), (1374519823,), (1374519843,), (1374519845,), (1374519848,), (1374519851,), (1374519853,), (1374519856,), (1374519867,), (1374519871,), (1374519873,), (1374519877,), (1374519887,), (1374519896,), (1374519906,), (1374519930,), (1374519934,), (1374519936,), (1374519938,), (1374519942,), (1374519945,), (1374519958,), (1374519980,), (1374519982,), (1374519988,), (1374519990,), (1374519992,), (1374519995,), (1374520003,), (1374520005,), (1374520008,), (1374520011,), (1374520013,), (1374520015,), (1374520029,), (1374520035,), (1374520036,), (1374520037,), (1374520038,), (1374520040,), (1374520049,), (1374520051,), (1374520053,), (1374520055,), (1374520057,), (1374520060,), (1374520067,), (1374520074,), (1374520078,), (1374520080,), (1374520083,), (1374520086,), (1374520113,), (1374520115,), (1374520116,), (1374520118,), (1374520121,), (1374520123,), (1374520131,), (1374520133,), (1374520136,), (1374520139,), (1374520142,), (1374520144,), (1374520156,), (1374520159,), (1374520162,), (1374520165,), (1374520167,), (1374520168,), (1374520178,), (1374520183,), (1374520184,), (1374520186,), (1374520188,), (1374520191,), (1374520200,), (1374520217,), (1374520219,), (1374520221,), (1374520223,), (1374520225,), (1374520227,), (1374520252,), (1374520255,), (1374520258,), (1374520260,), (1374520263,), (1374520266,), (1374520272,), (1374520275,), (1374520279,), (1374520282,), (1374520284,), (1374520287,), (1374520296,), (1374520300,), (1374520311,), (1374520313,), (1374520314,), (1374520317,), (1374520325,), (1374520327,), (1374520335,), (1374520339,), (1374520342,), (1374520344,), (1374520354,), (1374520357,), (1374520359,), (1374520360,), (1374520361,), (1374520363,), (1374520375,), (1374520377,), (1374520388,), (1374520391,), (1374520394,), (1374520396,), (1374520413,), (1374520414,), (1374520419,), (1374520420,), (1374520422,), (1374520425,), (1374520438,), (1374520441,), (1374520446,), (1374520449,), (1374520451,), (1374520454,), (1374520479,), (1374520589,), (1374520612,), (1374520626,), (1374520629,), (1374520633,), (1374520634,), (1374520648,), (1374520653,), (1374520655,), (1374520656,), (1374520657,), (1374520658,), (1374520671,), (1374520672,), (1374520694,), (1374520711,), (1374520716,), (1374520722,), (1374520741,), (1374520767,), (1374520806,), (1374520813,), (1374520815,), (1374520818,), (1374520829,), (1374520831,), (1374520833,), (1374520835,), (1374520837,), (1374520840,), (1374520853,), (1374520855,), (1374520857,), (1374520864,), (1374520870,), (1374520882,), (1374520890,), (1374520892,), (1374520898,), (1374520905,), (1374520914,), (1374520919,), (1374520933,), (1374520938,), (1374520940,), (1374520943,), (1374520964,), (1374520987,), (1374521182,), (1374521368,), (1374521370,), (1374521382,), (1374521401,), (1374521420,), (1374521439,), (1374521548,), (1374521720,), (1374521739,), (1374521769,), (1374521795,), (1374521816,), (1374521838,), (1374521984,), (1374522003,), (1374522025,), (1374522030,), (1374522032,), (1374522039,), (1374522140,), (1374522146,), (1374522155,), (1374522163,), (1374522182,), (1374522203,), (1374522356,), (1374522377,), (1374522395,), (1374522413,), (1374522435,), (1374522453,), (1374522570,), (1374522583,), (1374522610,), (1374522636,), (1374522653,), (1374522672,), (1374522705,), (1374522707,), (1374522709,), (1374522711,), (1374522714,), (1374522718,), (1374522728,), (1374522731,), (1374522734,), (1374522740,), (1374522749,), (1374522755,), (1374522767,), (1374522814,), (1374522833,), (1374522850,), (1374522872,), (1374522881,), (1374522888,), (1374522941,), (1374522943,), (1374522949,), (1374522958,), (1374522960,), (1374522961,), (1374522976,), (1374522978,), (1374522985,), (1374522992,), (1374522993,), (1374522995,), (1374523006,), (1374523007,), (1374523010,), (1374523012,), (1374523014,), (1374523017,), (1374523028,), (1374523030,), (1374523034,), (1374523040,), (1374523048,), (1374523050,), (1374523075,), (1374523076,), (1374523078,), (1374523090,), (1374523098,), (1374523100,), (1374523109,), (1374523112,), (1374523119,), (1374523127,), (1374523128,), (1374523129,), (1374523167,), (1374523175,), (1374523177,), (1374523179,), (1374523181,), (1374523184,), (1374523223,), (1374523239,), (1374523256,), (1374523277,), (1374523294,), (1374523314,), (1374523411,), (1374523497,), (1374523516,), (1374523536,), (1374523555,), (1374523579,), (1374523605,), (1374523618,), (1374523619,), (1374523621,), (1374523629,), (1374523637,), (1374523650,), (1374523816,), (1374523981,), (1374523985,), (1374523989,), (1374524011,), (1374524034,), (1374524056,), (1374524119,), (1374524212,), (1374524232,), (1374524254,), (1374524273,), (1374524280,), (1374524284,), (1374524316,), (1374524317,), (1374524318,), (1374524323,), (1374524342,), (1374524345,), (1374524388,), (1374524390,), (1374524393,), (1374524396,), (1374524405,), (1374524414,), (1374524539,), (1374524559,), (1374524579,), (1374524585,), (1374524594,), (1374524604,), (1374524678,), (1374524681,), (1374524683,), (1374524685,), (1374524695,), (1374524700,), (1374524811,), (1374524827,), (1374524831,), (1374524835,), (1374524838,), (1374524840,), (1374524842,), (1374524849,), (1374524868,), (1374524870,), (1374524872,), (1374524882,), (1374524886,), (1374524888,), (1374524903,), (1374524906,), (1374524908,), (1374524910,), (1374524913,), (1374524916,), (1374524923,), (1374524925,), (1374524927,), (1374524929,), (1374524938,), (1374524948,), (1374524975,), (1374524978,), (1374524984,), (1374524992,), (1374524993,), (1374524995,), (1374525004,), (1374525006,), (1374525008,), (1374525017,), (1374525025,), (1374525028,), (1374525033,), (1374525036,), (1374525039,), (1374525041,), (1374525043,), (1374525045,), (1374525069,), (1374525073,), (1374525076,), (1374525078,), (1374525081,), (1374525084,), (1374525098,), (1374525137,), (1374525145,), (1374525147,), (1374525149,), (1374525151,), (1374525154,), (1374525163,), (1374525165,), (1374525167,), (1374525169,), (1374525171,), (1374525176,), (1374525197,), (1374525200,), (1374525202,), (1374525204,), (1374525206,), (1374525210,), (1374525225,), (1374525247,), (1374525271,), (1374525273,), (1374525275,), (1374525277,), (1374525280,), (1374525284,), (1374525292,), (1374525295,), (1374525298,), (1374525300,), (1374525303,), (1374525306,), (1374525314,), (1374525317,), (1374525320,), (1374525322,), (1374525323,), (1374525325,), (1374525334,), (1374525336,), (1374525338,), (1374525340,), (1374525342,), (1374525345,), (1374525359,), (1374525376,), (1374525379,), (1374525382,), (1374525383,), (1374525384,), (1374525385,), (1374525395,), (1374525396,), (1374525397,), (1374525406,), (1374525414,), (1374525417,), (1374525422,), (1374525425,), (1374525428,), (1374525431,), (1374525433,), (1374525436,), (1374525444,), (1374525447,), (1374525450,), (1374525452,), (1374525453,), (1374525455,), (1374525466,), (1374525468,), (1374525469,), (1374525470,), (1374525472,), (1374525474,), (1374525486,), (1374525505,), (1374525508,), (1374525510,), (1374525512,), (1374525513,), (1374525515,), (1374525894,), (1374525920,), (1374525939,), (1374525959,), (1374525985,), (1374526012,), (1374526513,), (1374526837,), (1374526857,), (1374526887,), (1374526907,), (1374526942,), (1374526965,), (1374527134,), (1374527153,), (1374527169,), (1374527189,), (1374527213,), (1374527218,), (1374527298,), (1374527468,), (1374527474,), (1374527480,), (1374527487,), (1374527499,), (1374527502,), (1374527564,), (1374527566,), (1374527572,), (1374527580,), (1374527586,), (1374527592,), (1374527729,), (1374527916,), (1374527936,), (1374527975,), (1374528009,), (1374528044,), (1374528084,), (1374528312,), (1374528328,), (1374528345,), (1374528356,), (1374528368,), (1374528386,), (1374528483,), (1374528491,), (1374528509,), (1374528538,), (1374528562,), (1374528591,), (1374528685,), (1374528936,), (1374528959,), (1374528980,), (1374529001,), (1374529010,), (1374529022,), (1374529036,), (1374529039,), (1374529047,), (1374529054,), (1374529056,), (1374529059,), (1374529067,), (1374529068,), (1374529072,), (1374529081,), (1374529093,), (1374529102,), (1374529110,), (1374529113,), (1374529115,), (1374529121,), (1374529128,), (1374529142,), (1374529188,), (1374529191,), (1374529194,), (1374529206,), (1374529210,), (1374529212,), (1374529218,), (1374529220,), (1374529222,), (1374529225,), (1374529252,), (1374529256,), (1374529270,), (1374529273,), (1374529276,), (1374529281,), (1374529294,), (1374529297,), (1374529339,), (1374529363,), (1374529382,), (1374529401,), (1374529419,), (1374529437,), (1374529592,), (1374529610,), (1374529629,), (1374529648,), (1374529667,), (1374529686,), (1374529884,), (1374530015,), (1374530057,), (1374530094,), (1374530117,), (1374530140,), (1374530143,), (1374530199,), (1374530201,), (1374530204,), (1374530209,), (1374530219,), (1374530222,), (1374530229,), (1374530234,), (1374530242,), (1374530246,), (1374530249,), (1374530253,), (1374530262,), (1374530291,), (1374530294,), (1374530297,), (1374530300,), (1374530303,), (1374530305,), (1374530310,), (1374530312,), (1374530314,), (1374530316,), (1374530317,), (1374530318,), (1374530323,), (1374530325,), (1374530327,), (1374530329,), (1374530330,), (1374530332,), (1374530336,), (1374530338,), (1374530341,), (1374530344,), (1374530354,), (1374530362,), (1374530370,), (1374530373,), (1374530384,), (1374530388,), (1374530391,), (1374530394,), (1374530408,), (1374530426,), (1374530429,), (1374530432,), (1374530434,), (1374530436,), (1374530438,), (1374530447,), (1374530448,), (1374530450,), (1374530451,), (1374530458,), (1374530468,), (1374530487,), (1374530490,), (1374530492,), (1374530495,), (1374530496,), (1374530499,), (1374530505,), (1374530507,), (1374530509,), (1374530511,), (1374530513,), (1374530516,), (1374530522,), (1374530525,), (1374530528,), (1374530531,), (1374530532,), (1374530534,), (1374530544,), (1374530545,), (1374530546,), (1374530547,), (1374530548,), (1374530552,), (1374530559,), (1374530562,), (1374530565,), (1374530568,), (1374530570,), (1374530574,), (1374530587,), (1374530590,), (1374530593,), (1374530595,), (1374530596,), (1374530598,), (1374530606,), (1374530609,), (1374530611,), (1374530613,), (1374530615,), (1374530618,), (1374530626,), (1374530644,), (1374530647,), (1374530649,), (1374530650,), (1374530651,), (1374530652,), (1374530660,), (1374530662,), (1374530663,), (1374530664,), (1374530665,), (1374530667,), (1374530681,), (1374530686,), (1374530688,), (1374530689,), (1374530691,), (1374530693,), (1374530700,), (1374530702,), (1374530708,), (1374530711,), (1374530713,), (1374530717,), (1374530727,), (1374530730,), (1374530740,), (1374530742,), (1374530745,), (1374530748,), (1374530759,), (1374530761,), (1374530763,), (1374530766,), (1374530767,), (1374530769,), (1374530776,), (1374530778,), (1374530781,), (1374530784,), (1374530796,), (1374530799,), (1374530807,), (1374530811,), (1374530814,), (1374530817,), (1374530818,), (1374530820,), (1374530828,), (1374530829,), (1374530841,), (1374530848,), (1374530853,), (1374530855,), (1374530876,), (1374530892,), (1374530895,), (1374530898,), (1374530911,), (1374530921,), (1374530928,), (1374530942,), (1374530944,), (1374530946,), (1374530960,), (1374530968,), (1374530977,), (1374530992,), (1374530993,), (1374530997,), (1374531001,), (1374531002,), (1374531005,), (1374531019,), (1374531021,), (1374531023,), (1374531025,), (1374531028,), (1374531032,), (1374531047,), (1374531050,), (1374531053,), (1374531055,), (1374531056,), (1374531057,), (1374531067,), (1374531070,), (1374531078,), (1374531080,), (1374531082,), (1374531086,), (1374531100,), (1374531104,), (1374531111,), (1374531120,), (1374531122,), (1374531124,), (1374531533,), (1374531555,), (1374531574,), (1374531595,), (1374531620,), (1374531646,), (1374531827,), (1374531835,), (1374531842,), (1374531845,), (1374531859,), (1374531881,), (1374532045,), (1374532080,), (1374532106,), (1374532128,), (1374532148,), (1374532168,), (1374532328,), (1374532356,), (1374532383,), (1374532409,), (1374532434,), (1374532460,), (1374532716,), (1374533034,), (1374533035,), (1374533272,), (1374533300,), (1374533326,), (1374533352,), (1374533376,), (1374533404,), (1374533702,), (1374533832,), (1374533858,), (1374533883,), (1374533906,), (1374533932,), (1374533963,), (1374534125,), (1374534131,), (1374534143,), (1374534145,), (1374534147,), (1374534149,), (1374534167,), (1374534169,), (1374534170,), (1374534171,), (1374534172,), (1374534173,), (1374534228,), (1374534256,), (1374534258,), (1374534260,), (1374534263,), (1374534265,), (1374534286,), (1374534458,), (1374534460,), (1374534461,), (1374534462,), (1374534463,), (1374534465,), (1374534478,), (1374534480,), (1374534482,), (1374534483,), (1374534485,), (1374534488,), (1374534498,), (1374534522,), (1374534525,), (1374534526,), (1374534527,), (1374534528,), (1374534530,), (1374534554,), (1374534558,), (1374534569,), (1374534576,), (1374534579,), (1374534582,), (1374534607,), (1374534609,), (1374534611,), (1374534625,), (1374534649,), (1374534674,), (1374534716,), (1374534718,), (1374534720,), (1374534721,), (1374534722,), (1374534724,), (1374534731,), (1374534734,), (1374534737,), (1374534740,), (1374534742,), (1374534745,), (1374534962,), (1374535097,), (1374535099,), (1374535101,), (1374535102,), (1374535104,), (1374535106,), (1374535136,), (1374535175,), (1374535178,), (1374535181,), (1374535184,), (1374535186,), (1374535189,), (1374535197,), (1374535200,), (1374535202,), (1374535204,), (1374535206,), (1374535209,), (1374535222,), (1374535225,), (1374535228,), (1374535230,), (1374535232,), (1374535233,), (1374535244,), (1374535246,), (1374535247,), (1374535248,), (1374535250,), (1374535253,), (1374535263,), (1374535266,), (1374535269,), (1374535271,), (1374535272,), (1374535274,), (1374535282,), (1374535287,), (1374535292,), (1374535294,), (1374535297,), (1374535300,), (1374535309,), (1374535311,), (1374535314,), (1374535316,), (1374535318,), (1374535320,), (1374535343,), (1374535362,), (1374535363,), (1374535364,), (1374535365,), (1374535367,), (1374535369,), (1374535377,), (1374535382,), (1374535384,), (1374535386,), (1374535388,), (1374535391,), (1374535394,), (1374535405,), (1374535408,), (1374535411,), (1374535413,), (1374535416,), (1374535419,), (1374535479,), (1374535481,), (1374535483,), (1374535485,), (1374535492,), (1374535551,), (1374535560,), (1374535563,), (1374535566,), (1374535568,), (1374535569,), (1374535571,), (1374535578,), (1374535581,), (1374535584,), (1374535588,), (1374535590,), (1374535592,), (1374535602,), (1374535605,), (1374535607,), (1374535608,), (1374535610,), (1374535612,), (1374535621,), (1374535623,), (1374535625,), (1374535627,), (1374535630,), (1374535634,), (1374535643,), (1374535646,), (1374535649,), (1374535651,), (1374535653,), (1374535655,), (1374535666,), (1374535685,), (1374535689,), (1374535690,), (1374535691,), (1374535693,), (1374535696,), (1374535706,), (1374535709,), (1374535712,), (1374535714,), (1374535715,), (1374535717,), (1374535730,), (1374535733,), (1374535735,), (1374535737,), (1374535739,), (1374535742,), (1374535754,), (1374535771,), (1374535773,), (1374535775,), (1374535777,), (1374535779,), (1374535781,), (1374535816,), (1374535819,), (1374535821,), (1374535822,), (1374535823,), (1374535824,), (1374535836,), (1374535838,), (1374535840,), (1374535841,), (1374535844,), (1374535847,), (1374535860,), (1374535863,), (1374535866,), (1374535868,), (1374535871,), (1374535874,), (1374535884,), (1374535887,), (1374535890,), (1374535891,), (1374535893,), (1374535895,), (1374535914,), (1374535941,), (1374535944,), (1374535947,), (1374535950,), (1374535952,), (1374535955,), (1374535968,), (1374535984,), (1374535986,), (1374535988,), (1374535990,), (1374535992,), (1374535995,), (1374536008,), (1374536011,), (1374536014,), (1374536017,), (1374536019,), (1374536022,), (1374536033,), (1374536035,), (1374536036,), (1374536037,), (1374536039,), (1374536042,), (1374536055,), (1374536058,), (1374536061,), (1374536062,), (1374536063,), (1374536064,), (1374536088,), (1374536115,), (1374536139,), (1374536165,), (1374536189,), (1374536224,), (1374536679,), (1374536685,), (1374536727,), (1374536754,), (1374536776,), (1374536804,), (1374537303,), (1374537793,), (1374537820,), (1374537848,), (1374537892,), (1374537934,), (1374537983,), (1374538248,), (1374538252,), (1374538255,), (1374538257,), (1374538259,), (1374538261,), (1374538445,), (1374538464,), (1374538469,), (1374538472,), (1374538483,), (1374538511,), (1374538571,), (1374538574,), (1374538582,), (1374538589,), (1374538600,), (1374538605,), (1374538674,), (1374538677,), (1374538679,), (1374538681,), (1374538690,), (1374538701,), (1374538807,), (1374538837,), (1374538840,), (1374538843,), (1374538855,), (1374538856,), (1374538858,), (1374538870,), (1374538874,), (1374538876,), (1374538878,), (1374538882,), (1374538898,), (1374538919,), (1374538922,), (1374538931,), (1374538939,), (1374538940,), (1374538942,), (1374538964,), (1374538981,), (1374538983,), (1374538989,), (1374538997,), (1374538999,), (1374539002,), (1374539019,), (1374539026,), (1374539030,), (1374539032,), (1374539034,), (1374539037,), (1374539049,), (1374539054,), (1374539058,), (1374539073,), (1374539082,), (1374539086,), (1374539109,), (1374539137,), (1374539175,), (1374539177,), (1374539179,), (1374539181,), (1374539184,), (1374539188,), (1374539204,), (1374539207,), (1374539210,), (1374539212,), (1374539213,), (1374539215,), (1374539234,), (1374539235,), (1374539236,), (1374539237,), (1374539238,), (1374539240,), (1374539260,), (1374539263,), (1374539265,), (1374539266,), (1374539267,), (1374539268,), (1374539298,), (1374539318,), (1374539321,), (1374539329,), (1374539332,), (1374539333,), (1374539335,), (1374539351,), (1374539353,), (1374539355,), (1374539357,), (1374539359,), (1374539361,), (1374539379,), (1374539383,), (1374539385,), (1374539387,), (1374539389,), (1374539392,), (1374539419,), (1374539464,), (1374539466,), (1374539486,), (1374539492,), (1374539493,), (1374539496,), (1374539519,), (1374539520,), (1374539521,), (1374539522,), (1374539524,), (1374539525,), (1374539542,), (1374539545,), (1374539554,), (1374539560,), (1374539566,), (1374539569,), (1374539588,), (1374539590,), (1374539600,), (1374539601,), (1374539603,), (1374539606,), (1374539624,), (1374539627,), (1374539632,), (1374539634,), (1374539636,), (1374539638,), (1374539663,), (1374539699,), (1374539702,), (1374539704,), (1374539706,), (1374539708,), (1374539710,), (1374539728,), (1374539738,), (1374539743,), (1374539744,), (1374539745,), (1374539747,), (1374539763,), (1374539766,), (1374539774,), (1374539784,), (1374539786,), (1374539788,), (1374539805,), (1374539808,), (1374539810,), (1374539811,), (1374539812,), (1374539813,), (1374539831,), (1374539836,), (1374539844,), (1374539846,), (1374539848,), (1374539850,), (1374539871,), (1374539875,), (1374539877,), (1374539878,), (1374539890,), (1374539894,), (1374539912,), (1374539913,), (1374539914,), (1374539930,), (1374539932,), (1374539935,), (1374539950,), (1374539953,), (1374539955,), (1374539957,), (1374539959,), (1374539961,), (1374539978,), (1374539981,), (1374539984,), (1374539992,), (1374540004,), (1374540006,), (1374540030,), (1374540047,), (1374540050,), (1374540052,), (1374540054,), (1374540056,), (1374540058,), (1374540079,), (1374540081,), (1374540083,), (1374540084,), (1374540086,), (1374540087,), (1374540105,), (1374540107,), (1374540109,), (1374540110,), (1374540111,), (1374540112,), (1374540129,), (1374540132,), (1374540134,), (1374540136,), (1374540137,), (1374540140,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'31072025': {'nb_upload': 80, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25524141]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1374540140, 1374540137, 1374540136, 1374540134, 1374540132, 1374540129] map_info['map_portfolio_photo'] : {25524141: [1374540140, 1374540137, 1374540136, 1374540134, 1374540132, 1374540129, 1374540112, 1374540111, 1374540110, 1374540109, 1374540107, 1374540105, 1374540087, 1374540086, 1374540084, 1374540083, 1374540081, 1374540079, 1374540058, 1374540056, 1374540054, 1374540052, 1374540050, 1374540047, 1374540030, 1374540006, 1374540004, 1374539992, 1374539984, 1374539981, 1374539978, 1374539961, 1374539959, 1374539957, 1374539955, 1374539953, 1374539950, 1374539935, 1374539932, 1374539930, 1374539914, 1374539913, 1374539912, 1374539894, 1374539890, 1374539878, 1374539877, 1374539875, 1374539871, 1374539850, 1374539848, 1374539846, 1374539844, 1374539836, 1374539831, 1374539813, 1374539812, 1374539811, 1374539810, 1374539808, 1374539805, 1374539788, 1374539786, 1374539784, 1374539774, 1374539766, 1374539763, 1374539747, 1374539745, 1374539744, 1374539743, 1374539738, 1374539728, 1374539710, 1374539708, 1374539706, 1374539704, 1374539702, 1374539699, 1374539663]} final : True mtd_id 4302 list_pids : [1374540140, 1374540137, 1374540136, 1374540134, 1374540132, 1374540129] Looping around the photos to save general results len do output : 1 /25524141Didn'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, '3404616') ('4302', '25524141', '1374540140', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540137', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540136', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540134', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540132', None, None, None, None, None, '3404616') ('4302', None, None, None, None, None, None, None, '3404616') ('4302', '25524141', '1374540129', None, None, None, None, None, '3404616') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25524141', 'None', None, None, None, None, '3404616'), ('4302', '25524141', '1374540140', None, None, None, None, None, '3404616'), ('4302', '25524141', '1374540137', None, None, None, None, None, '3404616'), ('4302', '25524141', '1374540136', None, None, None, None, None, '3404616'), ('4302', '25524141', '1374540134', None, None, None, None, None, '3404616'), ('4302', '25524141', '1374540132', None, None, None, None, None, '3404616'), ('4302', '25524141', '1374540129', None, None, None, None, None, '3404616')] time used for this insertion : 0.01738715171813965 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.9091558456420898 time spend to save output : 0.01759171485900879 total time spend for step 5 : 1.9267475605010986 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 (3404616) 1.95user 2.38system 0:09.60elapsed 45%CPU (0avgtext+0avgdata 159604maxresident)k 320inputs+6224outputs (5major+64042minor)pagefaults 0swaps