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 : 1237369 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 (2987940) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2987940) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23454337 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2987940'] with mtr_portfolio_ids : ['23454337'] and first list_photo_ids : [] new path : /proc/1237369/ Name: python3 Umask: 0002 State: R (running) Tgid: 1237369 Ngid: 0 Pid: 1237369 PPid: 1237366 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1237369 NSpid: 1237369 NSpgid: 1235816 NSsid: 1235816 VmPeak: 1107196 kB VmSize: 1107196 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99508 kB VmRSS: 99508 kB RssAnon: 60172 kB RssFile: 39336 kB RssShmem: 0 kB VmData: 865944 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 544 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63035 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: 36 nonvoluntary_ctxt_switches: 260 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1237369', 'Ngid': '0', 'Pid': '1237369', 'PPid': '1237366', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1237369', 'NSpid': '1237369', 'NSpgid': '1235816', 'NSsid': '1235816', 'VmPeak': '1107196 kB', 'VmSize': '1107196 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99508 kB', 'VmRSS': '99508 kB', 'RssAnon': '60172 kB', 'RssFile': '39336 kB', 'RssShmem': '0 kB', 'VmData': '865944 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '544 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63035', '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': '36', 'nonvoluntary_ctxt_switches': '260'} ('datou_batch_current', '1237369', '1107196', '0', '1107196', '865944', '99508', b'', 'marlene', '2987940') 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 (23454337) 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 (2987940 ) ) 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 (23454337) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1361781266, 'portfolio_id': 23454337}, {'photo_id': 1361781263, 'portfolio_id': 23454337}, {'photo_id': 1361781259, 'portfolio_id': 23454337}, {'photo_id': 1361781256, 'portfolio_id': 23454337}, {'photo_id': 1361781214, 'portfolio_id': 23454337}, {'photo_id': 1361781211, 'portfolio_id': 23454337}, {'photo_id': 1361781207, 'portfolio_id': 23454337}, {'photo_id': 1361781202, 'portfolio_id': 23454337}, {'photo_id': 1361781193, 'portfolio_id': 23454337}, {'photo_id': 1361781183, 'portfolio_id': 23454337}, {'photo_id': 1361781141, 'portfolio_id': 23454337}, {'photo_id': 1361781132, 'portfolio_id': 23454337}, {'photo_id': 1361781123, 'portfolio_id': 23454337}, {'photo_id': 1361781120, 'portfolio_id': 23454337}, {'photo_id': 1361780881, 'portfolio_id': 23454337}, {'photo_id': 1361780878, 'portfolio_id': 23454337}, {'photo_id': 1361780869, 'portfolio_id': 23454337}, {'photo_id': 1361780856, 'portfolio_id': 23454337}, {'photo_id': 1361780853, 'portfolio_id': 23454337}, {'photo_id': 1361780847, 'portfolio_id': 23454337}, {'photo_id': 1361780654, 'portfolio_id': 23454337}, {'photo_id': 1361780649, 'portfolio_id': 23454337}] map_portfolio_id_photo_id: {23454337: [1361781266, 1361781263, 1361781259, 1361781256, 1361781214, 1361781211, 1361781207, 1361781202, 1361781193, 1361781183, 1361781141, 1361781132, 1361781123, 1361781120, 1361780881, 1361780878, 1361780869, 1361780856, 1361780853, 1361780847, 1361780654, 1361780649]} ##### 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.01668715476989746 #### 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 Fri May 30 16:30:29 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23454337) 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 : 23454337 get user id for portfolio 23454337 get sub ptf for main ptf 23454337, type 3726 and hashtags ['Teint_Dans_La_Masse', 'flou', 'cartonnette', 'autre_refus', 'metal', 'kraft', 'Carton_gris', 'environnement', 'papier', 'Carton_brun', 'plastique', 'mal_croppe'] 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`=23454337 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','flou','cartonnette','autre_refus','metal','kraft','Carton_gris','environnement','papier','Carton_brun','plastique','mal_croppe')) 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`=23454337 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','flou','cartonnette','autre_refus','metal','kraft','Carton_gris','environnement','papier','Carton_brun','plastique','mal_croppe')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 23454337, 'sub_port_id': 23454355, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651847, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 28)}, 'kraft': {'main_port_id': 23454337, 'sub_port_id': 23454356, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651848, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 28)}, 'flou': {'main_port_id': 23454337, 'sub_port_id': 23454357, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651849, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 28)}, 'metal': {'main_port_id': 23454337, 'sub_port_id': 23454358, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651850, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 28)}, 'autre_refus': {'main_port_id': 23454337, 'sub_port_id': 23454359, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651851, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 28)}, 'Carton_brun': {'main_port_id': 23454337, 'sub_port_id': 23454360, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651852, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 28)}, 'Carton_gris': {'main_port_id': 23454337, 'sub_port_id': 23454361, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651853, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 28)}, 'plastique': {'main_port_id': 23454337, 'sub_port_id': 23454362, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651854, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 28)}, 'environnement': {'main_port_id': 23454337, 'sub_port_id': 23454363, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651855, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 28)}, 'cartonnette': {'main_port_id': 23454337, 'sub_port_id': 23454364, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651856, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 28)}, 'mal_croppe': {'main_port_id': 23454337, 'sub_port_id': 23454365, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651857, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 28)}, 'papier': {'main_port_id': 23454337, 'sub_port_id': 23454366, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651858, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23454355 , 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=23454337 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 (23454355) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23454337) result : ((1361780649,), (1361780654,), (1361780847,), (1361780853,), (1361780856,), (1361780869,), (1361780878,), (1361780881,), (1361781120,), (1361781123,), (1361781132,), (1361781141,), (1361781183,), (1361781193,), (1361781202,), (1361781207,), (1361781211,), (1361781214,), (1361781256,), (1361781259,), (1361781263,), (1361781266,)) 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 23454356 , 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=23454337 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 (23454356) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23454337) result : ((1361780649,), (1361780654,), (1361780847,), (1361780853,), (1361780856,), (1361780869,), (1361780878,), (1361780881,), (1361781120,), (1361781123,), (1361781132,), (1361781141,), (1361781183,), (1361781193,), (1361781202,), (1361781207,), (1361781211,), (1361781214,), (1361781256,), (1361781259,), (1361781263,), (1361781266,)) 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 23454357 , 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=23454337 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 (23454357) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23454337) result : ((1361780649,), (1361780654,), (1361780847,), (1361780853,), (1361780856,), (1361780869,), (1361780878,), (1361780881,), (1361781120,), (1361781123,), (1361781132,), (1361781141,), (1361781183,), (1361781193,), (1361781202,), (1361781207,), (1361781211,), (1361781214,), (1361781256,), (1361781259,), (1361781263,), (1361781266,)) 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 23454358 , 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=23454337 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 (23454358) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23454337) result : ((1361780649,), (1361780654,), (1361780847,), (1361780853,), (1361780856,), (1361780869,), (1361780878,), (1361780881,), (1361781120,), (1361781123,), (1361781132,), (1361781141,), (1361781183,), (1361781193,), (1361781202,), (1361781207,), (1361781211,), (1361781214,), (1361781256,), (1361781259,), (1361781263,), (1361781266,)) 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 23454359 , 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=23454337 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 (23454359) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23454337) result : ((1361780649,), (1361780654,), (1361780847,), (1361780853,), (1361780856,), (1361780869,), (1361780878,), (1361780881,), (1361781120,), (1361781123,), (1361781132,), (1361781141,), (1361781183,), (1361781193,), (1361781202,), (1361781207,), (1361781211,), (1361781214,), (1361781256,), (1361781259,), (1361781263,), (1361781266,)) 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 23454360 , 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=23454337 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 (23454360) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23454337) result : ((1361780649,), (1361780654,), (1361780847,), (1361780853,), (1361780856,), (1361780869,), (1361780878,), (1361780881,), (1361781120,), (1361781123,), (1361781132,), (1361781141,), (1361781183,), (1361781193,), (1361781202,), (1361781207,), (1361781211,), (1361781214,), (1361781256,), (1361781259,), (1361781263,), (1361781266,)) 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 23454361 , 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=23454337 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 (23454361) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23454337) result : ((1361780649,), (1361780654,), (1361780847,), (1361780853,), (1361780856,), (1361780869,), (1361780878,), (1361780881,), (1361781120,), (1361781123,), (1361781132,), (1361781141,), (1361781183,), (1361781193,), (1361781202,), (1361781207,), (1361781211,), (1361781214,), (1361781256,), (1361781259,), (1361781263,), (1361781266,)) 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 23454362 , 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=23454337 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 (23454362) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23454337) result : ((1361780649,), (1361780654,), (1361780847,), (1361780853,), (1361780856,), (1361780869,), (1361780878,), (1361780881,), (1361781120,), (1361781123,), (1361781132,), (1361781141,), (1361781183,), (1361781193,), (1361781202,), (1361781207,), (1361781211,), (1361781214,), (1361781256,), (1361781259,), (1361781263,), (1361781266,)) 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 23454363 , 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=23454337 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 (23454363) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23454337) result : ((1361780649,), (1361780654,), (1361780847,), (1361780853,), (1361780856,), (1361780869,), (1361780878,), (1361780881,), (1361781120,), (1361781123,), (1361781132,), (1361781141,), (1361781183,), (1361781193,), (1361781202,), (1361781207,), (1361781211,), (1361781214,), (1361781256,), (1361781259,), (1361781263,), (1361781266,)) 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 23454364 , 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=23454337 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 (23454364) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23454337) result : ((1361780649,), (1361780654,), (1361780847,), (1361780853,), (1361780856,), (1361780869,), (1361780878,), (1361780881,), (1361781120,), (1361781123,), (1361781132,), (1361781141,), (1361781183,), (1361781193,), (1361781202,), (1361781207,), (1361781211,), (1361781214,), (1361781256,), (1361781259,), (1361781263,), (1361781266,)) 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 23454365 , 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=23454337 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 (23454365) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23454337) result : ((1361780649,), (1361780654,), (1361780847,), (1361780853,), (1361780856,), (1361780869,), (1361780878,), (1361780881,), (1361781120,), (1361781123,), (1361781132,), (1361781141,), (1361781183,), (1361781193,), (1361781202,), (1361781207,), (1361781211,), (1361781214,), (1361781256,), (1361781259,), (1361781263,), (1361781266,)) 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 23454366 , 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=23454337 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 (23454366) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23454337) result : ((1361780649,), (1361780654,), (1361780847,), (1361780853,), (1361780856,), (1361780869,), (1361780878,), (1361780881,), (1361781120,), (1361781123,), (1361781132,), (1361781141,), (1361781183,), (1361781193,), (1361781202,), (1361781207,), (1361781211,), (1361781214,), (1361781256,), (1361781259,), (1361781263,), (1361781266,)) 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`=23454337 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','flou','cartonnette','autre_refus','metal','kraft','Carton_gris','environnement','papier','Carton_brun','plastique','mal_croppe')) 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`=23454337 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','flou','cartonnette','autre_refus','metal','kraft','Carton_gris','environnement','papier','Carton_brun','plastique','mal_croppe')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 23454337, 'sub_port_id': 23454367, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651859, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 30)}, 'kraft': {'main_port_id': 23454337, 'sub_port_id': 23454368, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651860, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 30)}, 'flou': {'main_port_id': 23454337, 'sub_port_id': 23454369, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651861, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 30)}, 'metal': {'main_port_id': 23454337, 'sub_port_id': 23454370, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651862, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 30)}, 'autre_refus': {'main_port_id': 23454337, 'sub_port_id': 23454371, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651863, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 30)}, 'Carton_brun': {'main_port_id': 23454337, 'sub_port_id': 23454372, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651864, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 30)}, 'Carton_gris': {'main_port_id': 23454337, 'sub_port_id': 23454373, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651865, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 30)}, 'plastique': {'main_port_id': 23454337, 'sub_port_id': 23454374, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651866, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 30)}, 'environnement': {'main_port_id': 23454337, 'sub_port_id': 23454375, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651867, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 30)}, 'cartonnette': {'main_port_id': 23454337, 'sub_port_id': 23454376, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651868, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 30)}, 'mal_croppe': {'main_port_id': 23454337, 'sub_port_id': 23454377, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651869, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 27, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 30)}, 'papier': {'main_port_id': 23454337, 'sub_port_id': 23454378, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15651870, 'last_updated_at': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 30, 16, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 30, 16, 27, 30)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23454367,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23454355 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23454368,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23454356 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23454369,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23454357 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23454370,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23454358 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23454371,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23454359 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23454372,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23454360 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23454373,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23454361 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23454374,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23454362 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23454375,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23454363 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23454376,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23454364 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23454377,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23454365 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23454378,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23454366 lien utilise dans velours : https://www.fotonower.com/velours/23454367,23454368,23454369,23454370,23454371,23454372,23454373,23454374,23454375,23454376,23454377,23454378?tags=Teint_Dans_La_Masse,kraft,flou,metal,autre_refus,Carton_brun,Carton_gris,plastique,environnement,cartonnette,mal_croppe,papier After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23454337]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1361781266, 1361781263, 1361781259, 1361781256, 1361781214, 1361781211, 1361781207, 1361781202, 1361781193, 1361781183] map_info['map_portfolio_photo'] : {23454337: [1361781266, 1361781263, 1361781259, 1361781256, 1361781214, 1361781211, 1361781207, 1361781202, 1361781193, 1361781183, 1361781141, 1361781132, 1361781123, 1361781120, 1361780881, 1361780878, 1361780869, 1361780856, 1361780853, 1361780847, 1361780654, 1361780649]} final : False mtd_id 4302 list_pids : [1361781266, 1361781263, 1361781259, 1361781256, 1361781214, 1361781211, 1361781207, 1361781202, 1361781193, 1361781183] Looping around the photos to save general results len do output : 1 /23454337. 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, '2987940') ('4302', '23454337', '1361781266', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781263', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781259', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781256', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781214', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781211', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781207', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781202', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781193', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781183', None, None, None, None, None, '2987940') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 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, '23454337', "{'Teint_Dans_La_Masse': 23454355, 'kraft': 23454356, 'flou': 23454357, 'metal': 23454358, 'autre_refus': 23454359, 'Carton_brun': 23454360, 'Carton_gris': 23454361, 'plastique': 23454362, 'environnement': 23454363, 'cartonnette': 23454364, 'mal_croppe': 23454365, 'papier': 23454366}", None, None, None, None, '2987940'), ('4302', '23454337', '1361781266', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781263', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781259', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781256', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781214', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781211', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781207', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781202', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781193', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781183', None, None, None, None, None, '2987940')] time used for this insertion : 0.013283014297485352 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.360771656036377 time spend to save output : 0.01360464096069336 total time spend for step 1 : 1.3743762969970703 step2:final Fri May 30 16:30:31 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 (23454337) 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 23454337 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1361780654,1361780649,1361780881,1361780878,1361780869,1361780856,1361780853,1361780847,1361781141,1361781132,1361781123,1361781120,1361781214,1361781211,1361781207,1361781202,1361781193,1361781183,1361781266,1361781263,1361781259,1361781256); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23454337]) Inside saveOutput : final : False verbose : True original output for save of step final : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ('0.0',), 1361781211: ('0.0',), 1361781207: ('0.0',), 1361781202: ('0.0',), 1361781193: ('0.0',), 1361781183: ('0.0',)} new output for save of step final : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ('0.0',), 1361781211: ('0.0',), 1361781207: ('0.0',), 1361781202: ('0.0',), 1361781193: ('0.0',), 1361781183: ('0.0',)} [1361781266, 1361781263, 1361781259, 1361781256, 1361781214, 1361781211, 1361781207, 1361781202, 1361781193, 1361781183] map_info['map_portfolio_photo'] : {23454337: [1361781266, 1361781263, 1361781259, 1361781256, 1361781214, 1361781211, 1361781207, 1361781202, 1361781193, 1361781183, 1361781141, 1361781132, 1361781123, 1361781120, 1361780881, 1361780878, 1361780869, 1361780856, 1361780853, 1361780847, 1361780654, 1361780649]} final : False mtd_id 4302 list_pids : [1361781266, 1361781263, 1361781259, 1361781256, 1361781214, 1361781211, 1361781207, 1361781202, 1361781193, 1361781183] Looping around the photos to save general results len do output : 10 /1361781266.Didn't retrieve data . /1361781263.Didn't retrieve data . /1361781259.Didn't retrieve data . /1361781256.Didn't retrieve data . /1361781214.Didn't retrieve data . /1361781211.Didn't retrieve data . /1361781207.Didn't retrieve data . /1361781202.Didn't retrieve data . /1361781193.Didn't retrieve data . /1361781183.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, '2987940') ('4302', '23454337', '1361781266', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781263', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781259', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781256', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781214', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781211', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781207', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781202', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781193', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781183', None, None, None, None, None, '2987940') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 30 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', '23454337', '1361781266', '0.0', None, None, None, None, '2987940'), ('4302', '23454337', '1361781263', '0.0', None, None, None, None, '2987940'), ('4302', '23454337', '1361781259', '0.0', None, None, None, None, '2987940'), ('4302', '23454337', '1361781256', '0.0', None, None, None, None, '2987940'), ('4302', '23454337', '1361781214', '0.0', None, None, None, None, '2987940'), ('4302', '23454337', '1361781211', '0.0', None, None, None, None, '2987940'), ('4302', '23454337', '1361781207', '0.0', None, None, None, None, '2987940'), ('4302', '23454337', '1361781202', '0.0', None, None, None, None, '2987940'), ('4302', '23454337', '1361781193', '0.0', None, None, None, None, '2987940'), ('4302', '23454337', '1361781183', '0.0', None, None, None, None, '2987940')] time used for this insertion : 0.012675285339355469 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.05273914337158203 time spend to save output : 0.013248920440673828 total time spend for step 2 : 0.06598806381225586 step3:velours_tree Fri May 30 16:30:31 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 : {23454337: [{'Teint_Dans_La_Masse': 23454355, 'kraft': 23454356, 'flou': 23454357, 'metal': 23454358, 'autre_refus': 23454359, 'Carton_brun': 23454360, 'Carton_gris': 23454361, 'plastique': 23454362, 'environnement': 23454363, 'cartonnette': 23454364, 'mal_croppe': 23454365, 'papier': 23454366}]} input_args_next_step : {23454337: ()} output_args : {23454337: [{'Teint_Dans_La_Masse': 23454355, 'kraft': 23454356, 'flou': 23454357, 'metal': 23454358, 'autre_refus': 23454359, 'Carton_brun': 23454360, 'Carton_gris': 23454361, 'plastique': 23454362, 'environnement': 23454363, 'cartonnette': 23454364, 'mal_croppe': 23454365, 'papier': 23454366}]} args : 23454337 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 : ({'Teint_Dans_La_Masse': 23454355, 'kraft': 23454356, 'flou': 23454357, 'metal': 23454358, 'autre_refus': 23454359, 'Carton_brun': 23454360, 'Carton_gris': 23454361, 'plastique': 23454362, 'environnement': 23454363, 'cartonnette': 23454364, 'mal_croppe': 23454365, 'papier': 23454366},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23454337) 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([23454337]) 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.3442203998565674 time spend to save output : 6.270408630371094e-05 total time spend for step 3 : 0.3442831039428711 step4:send_mail_cod Fri May 30 16:30:31 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 : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ('0.0',), 1361781211: ('0.0',), 1361781207: ('0.0',), 1361781202: ('0.0',), 1361781193: ('0.0',), 1361781183: ('0.0',)} input_args_next_step : {1361781266: ()} output_args : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ('0.0',), 1361781211: ('0.0',), 1361781207: ('0.0',), 1361781202: ('0.0',), 1361781193: ('0.0',), 1361781183: ('0.0',)} args : 1361781266 depend.output_id : 0 input_args_next_step : {1361781266: ('0.0',), 1361781263: ()} output_args : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ('0.0',), 1361781211: ('0.0',), 1361781207: ('0.0',), 1361781202: ('0.0',), 1361781193: ('0.0',), 1361781183: ('0.0',)} args : 1361781263 depend.output_id : 0 input_args_next_step : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ()} output_args : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ('0.0',), 1361781211: ('0.0',), 1361781207: ('0.0',), 1361781202: ('0.0',), 1361781193: ('0.0',), 1361781183: ('0.0',)} args : 1361781259 depend.output_id : 0 input_args_next_step : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ()} output_args : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ('0.0',), 1361781211: ('0.0',), 1361781207: ('0.0',), 1361781202: ('0.0',), 1361781193: ('0.0',), 1361781183: ('0.0',)} args : 1361781256 depend.output_id : 0 input_args_next_step : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ()} output_args : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ('0.0',), 1361781211: ('0.0',), 1361781207: ('0.0',), 1361781202: ('0.0',), 1361781193: ('0.0',), 1361781183: ('0.0',)} args : 1361781214 depend.output_id : 0 input_args_next_step : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ('0.0',), 1361781211: ()} output_args : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ('0.0',), 1361781211: ('0.0',), 1361781207: ('0.0',), 1361781202: ('0.0',), 1361781193: ('0.0',), 1361781183: ('0.0',)} args : 1361781211 depend.output_id : 0 input_args_next_step : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ('0.0',), 1361781211: ('0.0',), 1361781207: ()} output_args : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ('0.0',), 1361781211: ('0.0',), 1361781207: ('0.0',), 1361781202: ('0.0',), 1361781193: ('0.0',), 1361781183: ('0.0',)} args : 1361781207 depend.output_id : 0 input_args_next_step : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ('0.0',), 1361781211: ('0.0',), 1361781207: ('0.0',), 1361781202: ()} output_args : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ('0.0',), 1361781211: ('0.0',), 1361781207: ('0.0',), 1361781202: ('0.0',), 1361781193: ('0.0',), 1361781183: ('0.0',)} args : 1361781202 depend.output_id : 0 input_args_next_step : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ('0.0',), 1361781211: ('0.0',), 1361781207: ('0.0',), 1361781202: ('0.0',), 1361781193: ()} output_args : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ('0.0',), 1361781211: ('0.0',), 1361781207: ('0.0',), 1361781202: ('0.0',), 1361781193: ('0.0',), 1361781183: ('0.0',)} args : 1361781193 depend.output_id : 0 input_args_next_step : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ('0.0',), 1361781211: ('0.0',), 1361781207: ('0.0',), 1361781202: ('0.0',), 1361781193: ('0.0',), 1361781183: ()} output_args : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ('0.0',), 1361781211: ('0.0',), 1361781207: ('0.0',), 1361781202: ('0.0',), 1361781193: ('0.0',), 1361781183: ('0.0',)} args : 1361781183 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 : {23454337: [{'Teint_Dans_La_Masse': 23454355, 'kraft': 23454356, 'flou': 23454357, 'metal': 23454358, 'autre_refus': 23454359, 'Carton_brun': 23454360, 'Carton_gris': 23454361, 'plastique': 23454362, 'environnement': 23454363, 'cartonnette': 23454364, 'mal_croppe': 23454365, 'papier': 23454366}]} input_args_next_step : {1361781266: ('0.0',), 1361781263: ('0.0',), 1361781259: ('0.0',), 1361781256: ('0.0',), 1361781214: ('0.0',), 1361781211: ('0.0',), 1361781207: ('0.0',), 1361781202: ('0.0',), 1361781193: ('0.0',), 1361781183: ('0.0',), 23454337: ()} output_args : {23454337: [{'Teint_Dans_La_Masse': 23454355, 'kraft': 23454356, 'flou': 23454357, 'metal': 23454358, 'autre_refus': 23454359, 'Carton_brun': 23454360, 'Carton_gris': 23454361, 'plastique': 23454362, 'environnement': 23454363, 'cartonnette': 23454364, 'mal_croppe': 23454365, 'papier': 23454366}]} args : 23454337 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 :11, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23454337) 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 (1361781266,1361781263,1361781259,1361781256,1361781214,1361781211,1361781207,1361781202,1361781193,1361781183) Found this number of photos: 10 ##### Call download_photos : nb_thread : 5 begin to download photo : 1361781183 begin to download photo : 1361781207 begin to download photo : 1361781256 begin to download photo : 1361781266 download finish for photo 1361781256 begin to download photo : 1361781259 download finish for photo 1361781266 download finish for photo 1361781183 begin to download photo : 1361781193 download finish for photo 1361781207 begin to download photo : 1361781211 download finish for photo 1361781259 begin to download photo : 1361781263 download finish for photo 1361781211 begin to download photo : 1361781214 download finish for photo 1361781193 begin to download photo : 1361781202 download finish for photo 1361781214 download finish for photo 1361781263 download finish for photo 1361781202 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette234543561748615431/ imagette234543571748615431/ imagette234543581748615431/ imagette234543591748615431/ imagette234543621748615431/ imagette234543641748615431/ imagette234543651748615431/ imagette234543551748615431/ imagette234543601748615431/ imagette234543611748615431/ length of list_filenames : 10 ; length of list_pids : 10 ; length of list_args : 10 results_Auto_P23454337_30-05-2025_16_30_31.pdf 23454356 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=23454356 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette234543561748615431 23454357 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=23454357 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette234543571748615431 23454358 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=23454358 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette234543581748615431 23454359 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=23454359 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette234543591748615431 23454362 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=23454362 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette234543621748615431 23454364 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=23454364 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette234543641748615431 23454365 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=23454365 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette234543651748615431 23454355 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=23454355 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette234543551748615431 23454360 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=23454360 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette234543601748615431 23454361 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=23454361 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette234543611748615431 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=23454337 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/23454367,23454368,23454369,23454370,23454371,23454372,23454373,23454374,23454375,23454376,23454377,23454378?tags=Teint_Dans_La_Masse,kraft,flou,metal,autre_refus,Carton_brun,Carton_gris,plastique,environnement,cartonnette,mal_croppe,papier your option no_mail is active, we will not send the real mail to your client args[1361781266] : ('0.0',) no score found for photo 1361781266 We are sending mail with results at report@fotonower.com args[1361781263] : ('0.0',) no score found for photo 1361781263 We are sending mail with results at report@fotonower.com args[1361781259] : ('0.0',) no score found for photo 1361781259 We are sending mail with results at report@fotonower.com args[1361781256] : ('0.0',) no score found for photo 1361781256 We are sending mail with results at report@fotonower.com args[1361781214] : ('0.0',) no score found for photo 1361781214 We are sending mail with results at report@fotonower.com args[1361781211] : ('0.0',) no score found for photo 1361781211 We are sending mail with results at report@fotonower.com args[1361781207] : ('0.0',) no score found for photo 1361781207 We are sending mail with results at report@fotonower.com args[1361781202] : ('0.0',) no score found for photo 1361781202 We are sending mail with results at report@fotonower.com args[1361781193] : ('0.0',) no score found for photo 1361781193 We are sending mail with results at report@fotonower.com args[1361781183] : ('0.0',) no score found for photo 1361781183 We are sending mail with results at report@fotonower.com refus_total : 0.0 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=23454337 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_P23454337_30-05-2025_16_30_31.pdf results_Auto_P23454337_30-05-2025_16_30_31.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23454337_30-05-2025_16_30_31.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','23454337','results_Auto_P23454337_30-05-2025_16_30_31.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23454337_30-05-2025_16_30_31.pdf','pdf','','0.1','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23454337]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1361781266, 1361781263, 1361781259, 1361781256, 1361781214, 1361781211, 1361781207, 1361781202, 1361781193, 1361781183] map_info['map_portfolio_photo'] : {23454337: [1361781266, 1361781263, 1361781259, 1361781256, 1361781214, 1361781211, 1361781207, 1361781202, 1361781193, 1361781183, 1361781141, 1361781132, 1361781123, 1361781120, 1361780881, 1361780878, 1361780869, 1361780856, 1361780853, 1361780847, 1361780654, 1361780649]} final : False mtd_id 4302 list_pids : [1361781266, 1361781263, 1361781259, 1361781256, 1361781214, 1361781211, 1361781207, 1361781202, 1361781193, 1361781183] 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, '2987940') ('4302', '23454337', '1361781266', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781263', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781259', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781256', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781214', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781211', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781207', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781202', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781193', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781183', None, None, None, None, None, '2987940') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '23454337', '1361781266', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781263', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781259', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781256', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781214', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781211', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781207', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781202', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781193', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781183', None, None, None, None, None, '2987940')] time used for this insertion : 0.013496875762939453 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5414001941680908 time spend to save output : 0.01377248764038086 total time spend for step 4 : 1.5551726818084717 step5:split_time_score Fri May 30 16:30:32 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : ['23454337'] 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 : [('23454337',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23454337) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1361781266: {'path': 'temp/1748615431_1237369_1361781266_fc7c987eff66f5d78359b25bb4b8faaa.jpg', 'extension': 'jpg'}, 1361781207: {'path': 'temp/1748615431_1237369_1361781207_e0d64365973a150e4a626abc597a7bda.jpg', 'extension': 'jpg'}, 1361781211: {'path': 'temp/1748615431_1237369_1361781211_5792e4c2fb4d3778fcb3507e5727ba9a.jpg', 'extension': 'jpg'}, 1361781214: {'path': 'temp/1748615431_1237369_1361781214_05a4ce641eceb19c2dfa7c8583631807.jpg', 'extension': 'jpg'}, 1361781256: {'path': 'temp/1748615431_1237369_1361781256_02443f75781886b58fdff4664a0473d6.jpg', 'extension': 'jpg'}, 1361781259: {'path': 'temp/1748615431_1237369_1361781259_04ac0c9f42aa415f9695d55cb47f89ac.jpg', 'extension': 'jpg'}, 1361781263: {'path': 'temp/1748615431_1237369_1361781263_2b55ffbf9600e6e4b3cfee1b706d467f.jpg', 'extension': 'jpg'}, 1361781183: {'path': 'temp/1748615431_1237369_1361781183_4a6fccd46f30cebe7198aaa9d71a4fd5.jpg', 'extension': 'jpg'}, 1361781193: {'path': 'temp/1748615431_1237369_1361781193_0bef126b7b973030058c3961dda34583.jpg', 'extension': 'jpg'}, 1361781202: {'path': 'temp/1748615431_1237369_1361781202_ab3a4e262b1d7433ba551001d3ce48c5.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 = 23454337; (('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 = 23454337 group by h (('16', 22),) 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=23454337 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 (23454337) 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 (23454337) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 30052025 23454337 Nombre de photos uploadées : 22 / 23040 (0%) 30052025 23454337 Nombre de photos taguées (types de déchets): 0 / 22 (0%) 30052025 23454337 Nombre de photos taguées (volume) : 0 / 22 (0%) [{'photo_id': 1361780654, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/30/fa0b6e1c559a5053f2ef9bec96bea007.jpg', 'username': None, 'uploaded_at': 1748615151, 'text': 'image_30052025_16_00_03_10146.jpg'}, {'photo_id': 1361780649, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/30/5958aa0fe32841d336c43bea8ed34b3b.jpg', 'username': None, 'uploaded_at': 1748615151, 'text': 'image_30052025_16_00_43_10136.jpg'}, {'photo_id': 1361780881, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/30/9f6b2a41de246243796baec80c0d3b21.jpg', 'username': None, 'uploaded_at': 1748615211, 'text': 'image_30052025_16_00_53_10136.jpg'}, {'photo_id': 1361780878, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/30/386abfe9e6581f82dc895df71bdbf02b.jpg', 'username': None, 'uploaded_at': 1748615211, 'text': 'image_30052025_16_01_03_10139.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 4.0531158447265625e-06 ?????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0008981227874755859 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 23454337, '2025-05-30' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1847907,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.023320436477661133 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= 1847907 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1847907, 'dashboard_run_id': 1857233, 'mtr_portfolio_id': 23445263, 'dashboard_result_id': 11045162, '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_P23445263_30-05-2025_05_26_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 23445276, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23445277, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23445278, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23445279, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23445280, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23445281, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23445282, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23445283, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23445284, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23445285, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23445286, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23445287, 'pht': 3726}}"}, {'dashboat_entry_day': 1847907, 'dashboard_run_id': 1857233, 'mtr_portfolio_id': 23445706, 'dashboard_result_id': 11045163, '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_P23445706_30-05-2025_07_26_02.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23445707, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23445708, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23445709, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23445710, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23445711, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23445712, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23445713, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23445714, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23445715, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23445716, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23445717, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23445718, 'pht': 3726}}"}, {'dashboat_entry_day': 1847907, 'dashboard_run_id': 1857233, 'mtr_portfolio_id': 23446036, 'dashboard_result_id': 11045164, '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_P23446036_30-05-2025_06_43_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23446051, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23446052, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23446053, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23446054, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23446055, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23446056, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23446057, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23446058, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23446059, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23446060, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23446061, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23446062, 'pht': 3726}}"}, {'dashboat_entry_day': 1847907, 'dashboard_run_id': 1857233, 'mtr_portfolio_id': 23446155, 'dashboard_result_id': 11045165, '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_P23446155_30-05-2025_07_02_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23446159, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23446160, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23446161, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23446162, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23446163, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23446164, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23446165, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23446166, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23446167, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23446168, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23446169, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23446170, 'pht': 3726}}"}, {'dashboat_entry_day': 1847907, 'dashboard_run_id': 1857233, 'mtr_portfolio_id': 23450391, 'dashboard_result_id': 11045166, '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_P23450391_30-05-2025_13_54_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23450392, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23450393, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23450394, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23450395, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23450396, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23450397, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23450398, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23450399, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23450400, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23450401, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23450402, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23450403, 'pht': 3726}}"}, {'dashboat_entry_day': 1847907, 'dashboard_run_id': 1857233, 'mtr_portfolio_id': 23450552, 'dashboard_result_id': 11045167, '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_P23450552_30-05-2025_14_11_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23450553, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23450554, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23450555, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23450556, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23450557, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23450558, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23450559, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23450560, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23450561, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23450562, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23450563, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23450564, 'pht': 3726}}"}, {'dashboat_entry_day': 1847907, 'dashboard_run_id': 1857233, 'mtr_portfolio_id': 23450832, 'dashboard_result_id': 11045168, '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_P23450832_30-05-2025_14_24_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 23450834, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23450835, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23450836, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23450837, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23450838, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23450839, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23450840, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23450841, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23450842, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23450843, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23450844, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23450845, 'pht': 3726}}"}, {'dashboat_entry_day': 1847907, 'dashboard_run_id': 1857233, 'mtr_portfolio_id': 23451020, 'dashboard_result_id': 11045169, '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_P23451020_30-05-2025_14_40_57.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 23451027, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23451028, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23451029, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23451030, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23451031, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23451032, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23451033, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23451034, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23451035, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23451036, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23451037, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23451038, 'pht': 3726}}"}, {'dashboat_entry_day': 1847907, 'dashboard_run_id': 1857233, 'mtr_portfolio_id': 23451411, 'dashboard_result_id': 11045170, '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_P23451411_30-05-2025_14_54_30.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 23451416, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23451417, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23451418, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23451419, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23451420, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23451421, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23451422, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23451423, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23451424, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23451425, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23451426, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23451427, 'pht': 3726}}"}, {'dashboat_entry_day': 1847907, 'dashboard_run_id': 1857233, 'mtr_portfolio_id': 23451749, 'dashboard_result_id': 11045171, '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_P23451749_30-05-2025_15_09_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23451750, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23451751, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23451752, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23451753, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23451754, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23451755, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23451756, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23451757, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23451758, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23451759, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23451760, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23451761, 'pht': 3726}}"}, {'dashboat_entry_day': 1847907, 'dashboard_run_id': 1857233, 'mtr_portfolio_id': 23452146, 'dashboard_result_id': 11045172, '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_P23452146_30-05-2025_15_26_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23452153, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23452154, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23452155, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23452156, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23452157, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23452158, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23452159, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23452160, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23452161, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23452162, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23452163, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23452164, 'pht': 3726}}"}, {'dashboat_entry_day': 1847907, 'dashboard_run_id': 1857233, 'mtr_portfolio_id': 23452638, 'dashboard_result_id': 11045173, '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_P23452638_30-05-2025_15_39_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23452639, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23452640, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23452641, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23452642, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23452643, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23452644, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23452645, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23452646, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23452647, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23452648, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23452649, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23452650, 'pht': 3726}}"}, {'dashboat_entry_day': 1847907, 'dashboard_run_id': 1857233, 'mtr_portfolio_id': 23452865, 'dashboard_result_id': 11045174, '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_P23452865_30-05-2025_15_56_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23452866, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23452867, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23452868, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23452869, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23452870, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23452871, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23452872, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23452873, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23452874, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23452875, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23452876, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23452877, 'pht': 3726}}"}, {'dashboat_entry_day': 1847907, 'dashboard_run_id': 1857233, 'mtr_portfolio_id': 23453145, 'dashboard_result_id': 11045175, '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_P23453145_30-05-2025_16_12_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23453188, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23453189, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23453190, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23453191, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23453192, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23453193, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23453194, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23453195, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23453196, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23453197, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23453198, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23453199, 'pht': 3726}}"}, {'dashboat_entry_day': 1847907, 'dashboard_run_id': 1857233, 'mtr_portfolio_id': 23453891, 'dashboard_result_id': 11045176, '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_P23453891_30-05-2025_16_26_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23453917, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23453918, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23453919, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23453920, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23453921, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23453922, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23453923, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23453924, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23453925, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23453926, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23453927, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23453928, 'pht': 3726}}"}, {'dashboat_entry_day': 1847907, 'dashboard_run_id': 1857233, 'mtr_portfolio_id': 23454337, 'dashboard_result_id': 11045177, '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_P23454337_30-05-2025_16_28_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23454355, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23454356, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23454357, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23454358, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23454359, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23454360, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23454361, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23454362, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23454363, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23454364, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23454365, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23454366, '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 = 23445263 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': 2985637, 'mtr_portfolio_id': 23445263, 'created_at': datetime.datetime(2025, 5, 30, 5, 26, 31), 'result': '0.05443944812640592', 'result_long': None, 'result_double': None}] Qualite : 0.05443944812640592 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23445263 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23445263_30-05-2025_05_26_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23445263 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_P23445263_30-05-2025_05_26_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 23445276, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23445277, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23445278, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23445279, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23445280, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23445281, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23445282, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23445283, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23445284, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23445285, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23445286, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23445287, 'pht': 3726}}" where mtr_portfolio_id = 23445263 and dashboard_run_id = 1857233 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`=23445263 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11045162, 0.05443944812640592, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23445263_30-05-2025_05_26_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 23445276, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23445277, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23445278, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23445279, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23445280, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23445281, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23445282, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23445283, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23445284, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23445285, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23445286, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23445287, '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 = 23445706 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': 2985730, 'mtr_portfolio_id': 23445706, 'created_at': datetime.datetime(2025, 5, 30, 7, 26, 1), 'result': '0.08866459193146103', 'result_long': None, 'result_double': None}] Qualite : 0.08866459193146103 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23445706 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23445706_30-05-2025_07_26_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23445706 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_P23445706_30-05-2025_07_26_02.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23445707, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23445708, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23445709, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23445710, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23445711, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23445712, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23445713, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23445714, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23445715, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23445716, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23445717, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23445718, 'pht': 3726}}" where mtr_portfolio_id = 23445706 and dashboard_run_id = 1857233 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`=23445706 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11045163, 0.08866459193146103, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23445706_30-05-2025_07_26_02.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23445707, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23445708, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23445709, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23445710, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23445711, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23445712, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23445713, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23445714, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23445715, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23445716, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23445717, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23445718, '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 = 23446036 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 23446036 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 23446036 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 23446036 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 23446036 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23446036 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23446036_30-05-2025_06_43_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23446036 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_P23446036_30-05-2025_06_43_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23446051, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23446052, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23446053, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23446054, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23446055, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23446056, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23446057, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23446058, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23446059, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23446060, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23446061, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23446062, 'pht': 3726}}" where mtr_portfolio_id = 23446036 and dashboard_run_id = 1857233 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 = 23446155 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': 2985811, 'mtr_portfolio_id': 23446155, 'created_at': datetime.datetime(2025, 5, 30, 7, 2, 59), 'result': '0.09002697768069923', 'result_long': None, 'result_double': None}] Qualite : 0.09002697768069923 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23446155 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23446155_30-05-2025_07_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23446155 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_P23446155_30-05-2025_07_02_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23446159, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23446160, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23446161, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23446162, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23446163, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23446164, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23446165, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23446166, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23446167, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23446168, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23446169, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23446170, 'pht': 3726}}" where mtr_portfolio_id = 23446155 and dashboard_run_id = 1857233 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`=23446155 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11045165, 0.09002697768069923, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23446155_30-05-2025_07_02_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23446159, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23446160, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23446161, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23446162, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23446163, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23446164, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23446165, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23446166, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23446167, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23446168, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23446169, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23446170, '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 = 23450391 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': 2986682, 'mtr_portfolio_id': 23450391, 'created_at': datetime.datetime(2025, 5, 30, 13, 54, 58), 'result': '0.06861036754506752', 'result_long': None, 'result_double': None}] Qualite : 0.06861036754506752 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23450391 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23450391_30-05-2025_13_54_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23450391 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_P23450391_30-05-2025_13_54_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23450392, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23450393, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23450394, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23450395, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23450396, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23450397, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23450398, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23450399, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23450400, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23450401, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23450402, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23450403, 'pht': 3726}}" where mtr_portfolio_id = 23450391 and dashboard_run_id = 1857233 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`=23450391 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11045166, 0.06861036754506752, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23450391_30-05-2025_13_54_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23450392, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23450393, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23450394, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23450395, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23450396, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23450397, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23450398, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23450399, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23450400, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23450401, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23450402, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23450403, '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 = 23450552 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': 2986756, 'mtr_portfolio_id': 23450552, 'created_at': datetime.datetime(2025, 5, 30, 14, 11, 31), 'result': '0.05435491869478011', 'result_long': None, 'result_double': None}] Qualite : 0.05435491869478011 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23450552 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23450552_30-05-2025_14_11_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23450552 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_P23450552_30-05-2025_14_11_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23450553, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23450554, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23450555, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23450556, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23450557, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23450558, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23450559, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23450560, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23450561, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23450562, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23450563, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23450564, 'pht': 3726}}" where mtr_portfolio_id = 23450552 and dashboard_run_id = 1857233 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`=23450552 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11045167, 0.05435491869478011, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23450552_30-05-2025_14_11_32.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23450553, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23450554, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23450555, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23450556, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23450557, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23450558, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23450559, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23450560, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23450561, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23450562, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23450563, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23450564, '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 = 23450832 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': 2986834, 'mtr_portfolio_id': 23450832, 'created_at': datetime.datetime(2025, 5, 30, 14, 24, 57), 'result': '0.07584842652474179', 'result_long': None, 'result_double': None}] Qualite : 0.07584842652474179 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23450832 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23450832_30-05-2025_14_24_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23450832 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_P23450832_30-05-2025_14_24_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 23450834, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23450835, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23450836, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23450837, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23450838, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23450839, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23450840, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23450841, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23450842, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23450843, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23450844, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23450845, 'pht': 3726}}" where mtr_portfolio_id = 23450832 and dashboard_run_id = 1857233 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`=23450832 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11045168, 0.07584842652474179, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23450832_30-05-2025_14_24_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 23450834, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23450835, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23450836, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23450837, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23450838, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23450839, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23450840, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23450841, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23450842, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23450843, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23450844, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23450845, '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 = 23451020 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': 2986900, 'mtr_portfolio_id': 23451020, 'created_at': datetime.datetime(2025, 5, 30, 14, 40, 57), 'result': '0.03213120169654901', 'result_long': None, 'result_double': None}] Qualite : 0.03213120169654901 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23451020 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23451020_30-05-2025_14_40_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23451020 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_P23451020_30-05-2025_14_40_57.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 23451027, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23451028, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23451029, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23451030, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23451031, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23451032, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23451033, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23451034, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23451035, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23451036, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23451037, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23451038, 'pht': 3726}}" where mtr_portfolio_id = 23451020 and dashboard_run_id = 1857233 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`=23451020 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11045169, 0.03213120169654901, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23451020_30-05-2025_14_40_57.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 23451027, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23451028, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23451029, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23451030, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23451031, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23451032, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23451033, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23451034, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23451035, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23451036, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23451037, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23451038, '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 = 23451411 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': 2987056, 'mtr_portfolio_id': 23451411, 'created_at': datetime.datetime(2025, 5, 30, 14, 54, 30), 'result': '0.05996728967833512', 'result_long': None, 'result_double': None}] Qualite : 0.05996728967833512 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23451411 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23451411_30-05-2025_14_54_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23451411 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_P23451411_30-05-2025_14_54_30.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 23451416, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23451417, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23451418, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23451419, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23451420, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23451421, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23451422, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23451423, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23451424, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23451425, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23451426, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23451427, 'pht': 3726}}" where mtr_portfolio_id = 23451411 and dashboard_run_id = 1857233 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`=23451411 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11045170, 0.05996728967833512, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23451411_30-05-2025_14_54_30.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 23451416, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23451417, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23451418, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23451419, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23451420, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23451421, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23451422, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23451423, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23451424, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23451425, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23451426, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23451427, '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 = 23451749 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': 2987208, 'mtr_portfolio_id': 23451749, 'created_at': datetime.datetime(2025, 5, 30, 15, 9, 30), 'result': '0.050864360618282284', 'result_long': None, 'result_double': None}] Qualite : 0.050864360618282284 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23451749 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23451749_30-05-2025_15_09_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23451749 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_P23451749_30-05-2025_15_09_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23451750, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23451751, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23451752, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23451753, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23451754, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23451755, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23451756, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23451757, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23451758, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23451759, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23451760, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23451761, 'pht': 3726}}" where mtr_portfolio_id = 23451749 and dashboard_run_id = 1857233 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`=23451749 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11045171, 0.050864360618282284, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23451749_30-05-2025_15_09_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23451750, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23451751, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23451752, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23451753, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23451754, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23451755, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23451756, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23451757, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23451758, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23451759, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23451760, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23451761, '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 = 23452146 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': 2987308, 'mtr_portfolio_id': 23452146, 'created_at': datetime.datetime(2025, 5, 30, 15, 26, 58), 'result': '0.040171989927842926', 'result_long': None, 'result_double': None}] Qualite : 0.040171989927842926 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23452146 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23452146_30-05-2025_15_26_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23452146 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_P23452146_30-05-2025_15_26_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23452153, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23452154, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23452155, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23452156, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23452157, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23452158, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23452159, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23452160, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23452161, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23452162, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23452163, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23452164, 'pht': 3726}}" where mtr_portfolio_id = 23452146 and dashboard_run_id = 1857233 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`=23452146 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11045172, 0.040171989927842926, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23452146_30-05-2025_15_26_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23452153, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23452154, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23452155, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23452156, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23452157, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23452158, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23452159, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23452160, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23452161, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23452162, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23452163, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23452164, '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 = 23452638 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': 2987467, 'mtr_portfolio_id': 23452638, 'created_at': datetime.datetime(2025, 5, 30, 15, 39, 58), 'result': '0.06099857793039236', 'result_long': None, 'result_double': None}] Qualite : 0.06099857793039236 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23452638 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23452638_30-05-2025_15_39_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23452638 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_P23452638_30-05-2025_15_39_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23452639, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23452640, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23452641, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23452642, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23452643, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23452644, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23452645, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23452646, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23452647, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23452648, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23452649, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23452650, 'pht': 3726}}" where mtr_portfolio_id = 23452638 and dashboard_run_id = 1857233 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`=23452638 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11045173, 0.06099857793039236, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23452638_30-05-2025_15_39_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23452639, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23452640, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23452641, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23452642, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23452643, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23452644, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23452645, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23452646, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23452647, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23452648, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23452649, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23452650, '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 = 23452865 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 23452865 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 23452865 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 23452865 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 23452865 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23452865 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23452865_30-05-2025_15_56_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23452865 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_P23452865_30-05-2025_15_56_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23452866, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23452867, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23452868, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23452869, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23452870, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23452871, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23452872, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23452873, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23452874, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23452875, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23452876, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23452877, 'pht': 3726}}" where mtr_portfolio_id = 23452865 and dashboard_run_id = 1857233 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 = 23453145 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': 2987643, 'mtr_portfolio_id': 23453145, 'created_at': datetime.datetime(2025, 5, 30, 16, 12, 58), 'result': '0.0708284110751183', 'result_long': None, 'result_double': None}] Qualite : 0.0708284110751183 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23453145 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23453145_30-05-2025_16_12_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23453145 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_P23453145_30-05-2025_16_12_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23453188, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23453189, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23453190, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23453191, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23453192, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23453193, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23453194, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23453195, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23453196, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23453197, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23453198, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23453199, 'pht': 3726}}" where mtr_portfolio_id = 23453145 and dashboard_run_id = 1857233 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`=23453145 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11045175, 0.0708284110751183, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23453145_30-05-2025_16_12_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23453188, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23453189, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23453190, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23453191, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23453192, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23453193, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23453194, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23453195, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23453196, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23453197, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23453198, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23453199, '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 = 23453891 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': 2987823, 'mtr_portfolio_id': 23453891, 'created_at': datetime.datetime(2025, 5, 30, 16, 26, 58), 'result': '0.018156925894714862', 'result_long': None, 'result_double': None}] Qualite : 0.018156925894714862 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23453891 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23453891_30-05-2025_16_26_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23453891 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_P23453891_30-05-2025_16_26_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23453917, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23453918, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23453919, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23453920, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23453921, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23453922, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23453923, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23453924, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23453925, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23453926, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23453927, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23453928, 'pht': 3726}}" where mtr_portfolio_id = 23453891 and dashboard_run_id = 1857234 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`=23453891 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (11045176, 0.018156925894714862, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23453891_30-05-2025_16_26_58.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23453917, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23453918, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23453919, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23453920, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23453921, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23453922, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23453923, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23453924, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23453925, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23453926, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23453927, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23453928, '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 = 23454337 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 23454337 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 23454337 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 23454337 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 23454337 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23454337 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23454337_30-05-2025_16_30_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23454337 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_P23454337_30-05-2025_16_30_31.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23454355, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23454356, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23454357, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23454358, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23454359, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23454360, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23454361, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23454362, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23454363, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23454364, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23454365, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23454366, 'pht': 3726}}" where mtr_portfolio_id = 23454337 and dashboard_run_id = 1857234 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23445263,23445706,23446036,23446155,23450391,23450552,23450832,23451020,23451411,23451749,23452146,23452638,23452865,23453145,23453891,23454337) result : ((1361697654,), (1361697684,), (1361697687,), (1361697943,), (1361697973,), (1361698052,), (1361698078,), (1361698330,), (1361698337,), (1361698358,), (1361704810,), (1361705381,), (1361705424,), (1361705987,), (1361705993,), (1361706336,), (1361706340,), (1361708829,), (1361708510,), (1361708866,), (1361709340,), (1361709346,), (1361709383,), (1361709388,), (1361709391,), (1361709394,), (1361709446,), (1361709431,), (1361709435,), (1361709437,), (1361709475,), (1361709477,), (1361709480,), (1361709519,), (1361709522,), (1361709552,), (1361709577,), (1361709580,), (1361709619,), (1361709622,), (1361712274,), (1361760094,), (1361760099,), (1361760110,), (1361760221,), (1361760225,), (1361760360,), (1361760375,), (1361760382,), (1361760412,), (1361760417,), (1361760422,), (1361760426,), (1361760460,), (1361760508,), (1361760513,), (1361760580,), (1361760584,), (1361760595,), (1361760672,), (1361760678,), (1361760681,), (1361760719,), (1361760722,), (1361760724,), (1361760729,), (1361760736,), (1361760768,), (1361760772,), (1361760775,), (1361760778,), (1361760786,), (1361760796,), (1361760829,), (1361760834,), (1361760839,), (1361760843,), (1361760911,), (1361760887,), (1361760891,), (1361760897,), (1361760902,), (1361760906,), (1361760938,), (1361760942,), (1361760946,), (1361760950,), (1361760986,), (1361760990,), (1361760993,), (1361760997,), (1361761026,), (1361761031,), (1361761039,), (1361761049,), (1361761054,), (1361761067,), (1361761070,), (1361761072,), (1361761075,), (1361761079,), (1361761087,), (1361761124,), (1361761126,), (1361761129,), (1361761172,), (1361761177,), (1361761181,), (1361761186,), (1361761190,), (1361761192,), (1361761224,), (1361761230,), (1361761242,), (1361761245,), (1361761271,), (1361761275,), (1361761279,), (1361761284,), (1361761620,), (1361761640,), (1361761644,), (1361761652,), (1361761656,), (1361761657,), (1361761694,), (1361761698,), (1361761706,), (1361761744,), (1361761749,), (1361761836,), (1361761842,), (1361761859,), (1361761872,), (1361761878,), (1361761892,), (1361761920,), (1361761925,), (1361762009,), (1361762012,), (1361762051,), (1361762058,), (1361762069,), (1361762073,), (1361762077,), (1361762080,), (1361762112,), (1361762116,), (1361762120,), (1361762129,), (1361762184,), (1361762167,), (1361762171,), (1361762175,), (1361762180,), (1361762224,), (1361762229,), (1361762234,), (1361762237,), (1361762242,), (1361762283,), (1361762286,), (1361762290,), (1361762295,), (1361762331,), (1361762349,), (1361762357,), (1361762362,), (1361762367,), (1361762370,), (1361762396,), (1361762409,), (1361762414,), (1361762454,), (1361762457,), (1361762460,), (1361762465,), (1361762470,), (1361762476,), (1361762505,), (1361762510,), (1361762515,), (1361762520,), (1361762524,), (1361762561,), (1361762566,), (1361762570,), (1361762617,), (1361762622,), (1361762627,), (1361762630,), (1361762671,), (1361762676,), (1361762682,), (1361762688,), (1361762743,), (1361762748,), (1361762752,), (1361762756,), (1361762763,), (1361762767,), (1361762824,), (1361762827,), (1361762830,), (1361762835,), (1361762865,), (1361762905,), (1361762936,), (1361762960,), (1361762964,), (1361762967,), (1361763047,), (1361763055,), (1361763062,), (1361763071,), (1361763077,), (1361763084,), (1361763300,), (1361763354,), (1361763368,), (1361763434,), (1361763412,), (1361763415,), (1361763417,), (1361763420,), (1361763427,), (1361763466,), (1361763471,), (1361763476,), (1361763518,), (1361763521,), (1361763523,), (1361763526,), (1361763529,), (1361763563,), (1361763567,), (1361763571,), (1361763577,), (1361763615,), (1361763619,), (1361763623,), (1361763627,), (1361763633,), (1361763638,), (1361763697,), (1361763705,), (1361763708,), (1361763732,), (1361763828,), (1361763831,), (1361763834,), (1361763838,), (1361763841,), (1361763869,), (1361763875,), (1361763880,), (1361763885,), (1361763930,), (1361763937,), (1361763939,), (1361763943,), (1361763946,), (1361763951,), (1361764223,), (1361764227,), (1361764231,), (1361764235,), (1361764279,), (1361764282,), (1361764286,), (1361764290,), (1361764295,), (1361764299,), (1361764329,), (1361764334,), (1361764338,), (1361764342,), (1361764346,), (1361764385,), (1361764389,), (1361764393,), (1361764397,), (1361764400,), (1361764403,), (1361764436,), (1361764444,), (1361764447,), (1361764453,), (1361764487,), (1361764493,), (1361764498,), (1361764505,), (1361764510,), (1361764513,), (1361764588,), (1361764571,), (1361764576,), (1361764580,), (1361764582,), (1361764785,), (1361764825,), (1361764830,), (1361764836,), (1361764841,), (1361764949,), (1361764955,), (1361764962,), (1361764969,), (1361764974,), (1361765008,), (1361765013,), (1361765015,), (1361765017,), (1361765055,), (1361765065,), (1361765074,), (1361765079,), (1361765084,), (1361765090,), (1361765129,), (1361765134,), (1361765137,), (1361765142,), (1361765180,), (1361765186,), (1361765188,), (1361765195,), (1361765199,), (1361765504,), (1361765509,), (1361765513,), (1361765878,), (1361765918,), (1361765922,), (1361765927,), (1361765969,), (1361765975,), (1361765979,), (1361765984,), (1361765988,), (1361765992,), (1361766051,), (1361766062,), (1361766065,), (1361766069,), (1361766072,), (1361766111,), (1361766114,), (1361766118,), (1361766172,), (1361766270,), (1361766299,), (1361766453,), (1361766457,), (1361766503,), (1361766506,), (1361766551,), (1361766555,), (1361766558,), (1361766563,), (1361766570,), (1361766575,), (1361766607,), (1361766616,), (1361766621,), (1361766626,), (1361766632,), (1361766637,), (1361766685,), (1361766676,), (1361766681,), (1361766737,), (1361766741,), (1361766763,), (1361766766,), (1361766770,), (1361766776,), (1361766805,), (1361766811,), (1361766817,), (1361766824,), (1361766830,), (1361766867,), (1361766871,), (1361766875,), (1361766880,), (1361767432,), (1361767435,), (1361767439,), (1361767445,), (1361767451,), (1361767457,), (1361767755,), (1361767759,), (1361767763,), (1361767788,), (1361768212,), (1361768215,), (1361768243,), (1361768250,), (1361768284,), (1361768288,), (1361768388,), (1361768393,), (1361768397,), (1361768403,), (1361768409,), (1361768447,), (1361768450,), (1361768453,), (1361768461,), (1361768472,), (1361768482,), (1361768519,), (1361768524,), (1361768529,), (1361768577,), (1361768581,), (1361768589,), (1361768595,), (1361768601,), (1361768607,), (1361768642,), (1361768647,), (1361768654,), (1361768660,), (1361768712,), (1361768716,), (1361768719,), (1361768723,), (1361768728,), (1361768773,), (1361768779,), (1361768789,), (1361768798,), (1361768803,), (1361768805,), (1361768838,), (1361768842,), (1361768845,), (1361768849,), (1361768944,), (1361768921,), (1361768925,), (1361768928,), (1361768933,), (1361768938,), (1361769167,), (1361769222,), (1361769252,), (1361769283,), (1361769332,), (1361769336,), (1361769340,), (1361769345,), (1361769351,), (1361769385,), (1361769390,), (1361769394,), (1361769399,), (1361769434,), (1361769437,), (1361769440,), (1361769443,), (1361769449,), (1361769455,), (1361769491,), (1361769497,), (1361769508,), (1361769511,), (1361769546,), (1361769555,), (1361769558,), (1361769564,), (1361769613,), (1361769639,), (1361769646,), (1361769653,), (1361769658,), (1361769661,), (1361770064,), (1361770140,), (1361770142,), (1361770354,), (1361770413,), (1361770431,), (1361770439,), (1361770446,), (1361770451,), (1361770608,), (1361770612,), (1361770616,), (1361770622,), (1361770816,), (1361770852,), (1361770855,), (1361770861,), (1361770865,), (1361770866,), (1361770898,), (1361770905,), (1361770907,), (1361770909,), (1361770918,), (1361770997,), (1361771000,), (1361771003,), (1361771005,), (1361771009,), (1361771081,), (1361771300,), (1361771355,), (1361771360,), (1361771366,), (1361771408,), (1361771412,), (1361771416,), (1361771426,), (1361771437,), (1361771476,), (1361771481,), (1361771487,), (1361771494,), (1361771502,), (1361771507,), (1361771549,), (1361771554,), (1361771558,), (1361771560,), (1361771604,), (1361771606,), (1361771608,), (1361771612,), (1361771617,), (1361771624,), (1361771655,), (1361771665,), (1361771671,), (1361771675,), (1361771719,), (1361771794,), (1361771883,), (1361771988,), (1361772101,), (1361772199,), (1361772327,), (1361772331,), (1361772335,), (1361772341,), (1361772710,), (1361772714,), (1361772718,), (1361772722,), (1361772729,), (1361772734,), (1361772735,), (1361772771,), (1361772858,), (1361772881,), (1361772921,), (1361773005,), (1361773094,), (1361773117,), (1361773121,), (1361773124,), (1361773175,), (1361773182,), (1361773189,), (1361773195,), (1361773200,), (1361773202,), (1361773242,), (1361773245,), (1361773250,), (1361773257,), (1361773296,), (1361773302,), (1361773307,), (1361773312,), (1361773316,), (1361773320,), (1361773363,), (1361773359,), (1361773361,), (1361773413,), (1361773419,), (1361773426,), (1361773498,), (1361773587,), (1361773637,), (1361773860,), (1361773902,), (1361773915,), (1361773966,), (1361773970,), (1361773973,), (1361773977,), (1361773980,), (1361774076,), (1361774271,), (1361774276,), (1361774280,), (1361774463,), (1361774466,), (1361774469,), (1361774536,), (1361774540,), (1361774544,), (1361774548,), (1361774551,), (1361774554,), (1361774591,), (1361774594,), (1361774597,), (1361774601,), (1361774606,), (1361774612,), (1361774692,), (1361774698,), (1361774702,), (1361774967,), (1361775003,), (1361775006,), (1361775012,), (1361775016,), (1361775020,), (1361775066,), (1361775070,), (1361775074,), (1361775078,), (1361775125,), (1361775131,), (1361775135,), (1361775139,), (1361775143,), (1361775146,), (1361775210,), (1361775215,), (1361775219,), (1361775223,), (1361775229,), (1361775365,), (1361775293,), (1361775299,), (1361775304,), (1361775308,), (1361775339,), (1361775767,), (1361775827,), (1361775857,), (1361775885,), (1361776354,), (1361776425,), (1361776485,), (1361776542,), (1361776626,), (1361776686,), (1361776839,), (1361776847,), (1361776874,), (1361776908,), (1361776912,), (1361776915,), (1361776928,), (1361776935,), (1361776944,), (1361777010,), (1361777016,), (1361777021,), (1361777028,), (1361777033,), (1361777176,), (1361777180,), (1361777185,), (1361777243,), (1361777259,), (1361777283,), (1361777459,), (1361777462,), (1361777511,), (1361777676,), (1361777682,), (1361777686,), (1361777700,), (1361777703,), (1361777706,), (1361777858,), (1361777862,), (1361777870,), (1361777879,), (1361777888,), (1361777892,), (1361778097,), (1361778127,), (1361778163,), (1361778232,), (1361778236,), (1361778240,), (1361778245,), (1361778267,), (1361778355,), (1361778627,), (1361778632,), (1361778640,), (1361778650,), (1361778693,), (1361778710,), (1361778751,), (1361778755,), (1361778759,), (1361778822,), (1361778826,), (1361778829,), (1361778854,), (1361778865,), (1361778958,), (1361778936,), (1361778941,), (1361778947,), (1361778953,), (1361779056,), (1361779143,), (1361779145,), (1361779157,), (1361779169,), (1361779375,), (1361779384,), (1361779394,), (1361779397,), (1361779430,), (1361779434,), (1361779436,), (1361779474,), (1361779478,), (1361779481,), (1361779526,), (1361779529,), (1361779577,), (1361779621,), (1361779712,), (1361779748,), (1361779952,), (1361779959,), (1361780119,), (1361780122,), (1361780125,), (1361780191,), (1361780194,), (1361780197,), (1361780198,), (1361780204,), (1361780397,), (1361780445,), (1361780451,), (1361780456,), (1361780459,), (1361780496,), (1361780500,), (1361780503,), (1361780583,), (1361780588,), (1361780592,), (1361780596,), (1361780601,), (1361780604,), (1361780616,), (1361780622,), (1361780628,), (1361780634,), (1361780637,), (1361780656,), (1361780649,), (1361780654,), (1361780847,), (1361780853,), (1361780856,), (1361780869,), (1361780878,), (1361780881,), (1361781120,), (1361781123,), (1361781132,), (1361781141,), (1361781183,), (1361781193,), (1361781202,), (1361781207,), (1361781211,), (1361781214,), (1361781256,), (1361781259,), (1361781263,), (1361781266,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'30052025': {'nb_upload': 22, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23454337]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1361781266, 1361781263, 1361781259, 1361781256, 1361781214, 1361781211, 1361781207, 1361781202, 1361781193, 1361781183] map_info['map_portfolio_photo'] : {23454337: [1361781266, 1361781263, 1361781259, 1361781256, 1361781214, 1361781211, 1361781207, 1361781202, 1361781193, 1361781183, 1361781141, 1361781132, 1361781123, 1361781120, 1361780881, 1361780878, 1361780869, 1361780856, 1361780853, 1361780847, 1361780654, 1361780649]} final : True mtd_id 4302 list_pids : [1361781266, 1361781263, 1361781259, 1361781256, 1361781214, 1361781211, 1361781207, 1361781202, 1361781193, 1361781183] Looping around the photos to save general results len do output : 1 /23454337Didn'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, '2987940') ('4302', '23454337', '1361781266', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781263', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781259', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781256', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781214', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781211', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781207', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781202', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781193', None, None, None, None, None, '2987940') ('4302', None, None, None, None, None, None, None, '2987940') ('4302', '23454337', '1361781183', None, None, None, None, None, '2987940') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 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, '23454337', 'None', None, None, None, None, '2987940'), ('4302', '23454337', '1361781266', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781263', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781259', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781256', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781214', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781211', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781207', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781202', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781193', None, None, None, None, None, '2987940'), ('4302', '23454337', '1361781183', None, None, None, None, None, '2987940')] time used for this insertion : 0.015069007873535156 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.0151524543762207 time spend to save output : 0.01528024673461914 total time spend for step 5 : 1.0304327011108398 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 (2987940) 2.59user 1.98system 0:09.43elapsed 48%CPU (0avgtext+0avgdata 161348maxresident)k 6496inputs+5664outputs (56major+51646minor)pagefaults 0swaps