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 : 741480 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 (4007698) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4007698) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28244797 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4007698'] with mtr_portfolio_ids : ['28244797'] and first list_photo_ids : [] new path : /proc/741480/ Name: python3 Umask: 0002 State: R (running) Tgid: 741480 Ngid: 0 Pid: 741480 PPid: 741479 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 741480 NSpid: 741480 NSpgid: 740027 NSsid: 740027 VmPeak: 1106908 kB VmSize: 1106884 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97712 kB VmRSS: 97712 kB RssAnon: 59904 kB RssFile: 37808 kB RssShmem: 0 kB VmData: 865636 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 580 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 42 nonvoluntary_ctxt_switches: 83 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '741480', 'Ngid': '0', 'Pid': '741480', 'PPid': '741479', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '741480', 'NSpid': '741480', 'NSpgid': '740027', 'NSsid': '740027', 'VmPeak': '1106908 kB', 'VmSize': '1106884 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97712 kB', 'VmRSS': '97712 kB', 'RssAnon': '59904 kB', 'RssFile': '37808 kB', 'RssShmem': '0 kB', 'VmData': '865636 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '580 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '42', 'nonvoluntary_ctxt_switches': '83'} ('datou_batch_current', '741480', '1106908', '0', '1106884', '865636', '97712', b'', 'marlene', '4007698') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (28244797) 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 (4007698 ) ) 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 (28244797) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1392907506, 'portfolio_id': 28244797}, {'photo_id': 1392907502, 'portfolio_id': 28244797}, {'photo_id': 1392907499, 'portfolio_id': 28244797}, {'photo_id': 1392907497, 'portfolio_id': 28244797}, {'photo_id': 1392907420, 'portfolio_id': 28244797}, {'photo_id': 1392907415, 'portfolio_id': 28244797}, {'photo_id': 1392907410, 'portfolio_id': 28244797}, {'photo_id': 1392907407, 'portfolio_id': 28244797}, {'photo_id': 1392907405, 'portfolio_id': 28244797}, {'photo_id': 1392907403, 'portfolio_id': 28244797}, {'photo_id': 1392907359, 'portfolio_id': 28244797}, {'photo_id': 1392907356, 'portfolio_id': 28244797}, {'photo_id': 1392907347, 'portfolio_id': 28244797}, {'photo_id': 1392907344, 'portfolio_id': 28244797}, {'photo_id': 1392907316, 'portfolio_id': 28244797}, {'photo_id': 1392907310, 'portfolio_id': 28244797}, {'photo_id': 1392907299, 'portfolio_id': 28244797}, {'photo_id': 1392907298, 'portfolio_id': 28244797}, {'photo_id': 1392907271, 'portfolio_id': 28244797}, {'photo_id': 1392907269, 'portfolio_id': 28244797}, {'photo_id': 1392907266, 'portfolio_id': 28244797}, {'photo_id': 1392907264, 'portfolio_id': 28244797}, {'photo_id': 1392907263, 'portfolio_id': 28244797}, {'photo_id': 1392907261, 'portfolio_id': 28244797}, {'photo_id': 1392907173, 'portfolio_id': 28244797}, {'photo_id': 1392907160, 'portfolio_id': 28244797}, {'photo_id': 1392907156, 'portfolio_id': 28244797}, {'photo_id': 1392907154, 'portfolio_id': 28244797}, {'photo_id': 1392907151, 'portfolio_id': 28244797}, {'photo_id': 1392907149, 'portfolio_id': 28244797}, {'photo_id': 1392907050, 'portfolio_id': 28244797}, {'photo_id': 1392907026, 'portfolio_id': 28244797}, {'photo_id': 1392906981, 'portfolio_id': 28244797}, {'photo_id': 1392906946, 'portfolio_id': 28244797}, {'photo_id': 1392906770, 'portfolio_id': 28244797}, {'photo_id': 1392905084, 'portfolio_id': 28244797}] map_portfolio_id_photo_id: {28244797: [1392907506, 1392907502, 1392907499, 1392907497, 1392907420, 1392907415, 1392907410, 1392907407, 1392907405, 1392907403, 1392907359, 1392907356, 1392907347, 1392907344, 1392907316, 1392907310, 1392907299, 1392907298, 1392907271, 1392907269, 1392907266, 1392907264, 1392907263, 1392907261, 1392907173, 1392907160, 1392907156, 1392907154, 1392907151, 1392907149, 1392907050, 1392907026, 1392906981, 1392906946, 1392906770, 1392905084]} ##### 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.016066551208496094 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Thu Nov 6 05:14:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28244797) 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 : 28244797 get user id for portfolio 28244797 get sub ptf for main ptf 28244797, type 3726 and hashtags ['autre_refus', 'environnement', 'kraft', 'plastique', 'mal_croppe', 'cartonnette', 'Carton_brun', 'metal', 'papier', 'Carton_gris', 'flou', 'Teint_Dans_La_Masse'] 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`=28244797 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','environnement','kraft','plastique','mal_croppe','cartonnette','Carton_brun','metal','papier','Carton_gris','flou','Teint_Dans_La_Masse')) 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`=28244797 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','environnement','kraft','plastique','mal_croppe','cartonnette','Carton_brun','metal','papier','Carton_gris','flou','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 28244797, 'sub_port_id': 28244798, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110865, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 6, 59)}, 'cartonnette': {'main_port_id': 28244797, 'sub_port_id': 28244799, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110866, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 6, 59)}, 'plastique': {'main_port_id': 28244797, 'sub_port_id': 28244800, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110867, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 6, 59)}, 'Carton_brun': {'main_port_id': 28244797, 'sub_port_id': 28244801, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110868, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 6, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 28244797, 'sub_port_id': 28244802, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110869, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 6, 59)}, 'environnement': {'main_port_id': 28244797, 'sub_port_id': 28244803, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110870, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 6, 59)}, 'papier': {'main_port_id': 28244797, 'sub_port_id': 28244804, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110871, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 6, 59)}, 'kraft': {'main_port_id': 28244797, 'sub_port_id': 28244805, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110872, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 6, 59)}, 'flou': {'main_port_id': 28244797, 'sub_port_id': 28244806, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110873, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 6, 59)}, 'autre_refus': {'main_port_id': 28244797, 'sub_port_id': 28244807, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110874, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 6, 59)}, 'mal_croppe': {'main_port_id': 28244797, 'sub_port_id': 28244808, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110875, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 6, 59)}, 'Carton_gris': {'main_port_id': 28244797, 'sub_port_id': 28244809, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110876, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 6, 59)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28244798 , 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=28244797 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 (28244798) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28244797) result : ((1392905084,), (1392906770,), (1392906946,), (1392906981,), (1392907026,), (1392907050,), (1392907149,), (1392907151,), (1392907154,), (1392907156,), (1392907160,), (1392907173,), (1392907261,), (1392907263,), (1392907264,), (1392907266,), (1392907269,), (1392907271,), (1392907298,), (1392907299,), (1392907310,), (1392907316,), (1392907344,), (1392907347,), (1392907356,), (1392907359,), (1392907403,), (1392907405,), (1392907407,), (1392907410,), (1392907415,), (1392907420,), (1392907497,), (1392907499,), (1392907502,), (1392907506,)) 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 28244799 , 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=28244797 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 (28244799) result : ((1392907397,), (1392907531,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28244797) result : ((1392905084,), (1392906770,), (1392906946,), (1392906981,), (1392907026,), (1392907050,), (1392907149,), (1392907151,), (1392907154,), (1392907156,), (1392907160,), (1392907173,), (1392907261,), (1392907263,), (1392907264,), (1392907266,), (1392907269,), (1392907271,), (1392907298,), (1392907299,), (1392907310,), (1392907316,), (1392907344,), (1392907347,), (1392907356,), (1392907359,), (1392907403,), (1392907405,), (1392907407,), (1392907410,), (1392907415,), (1392907420,), (1392907497,), (1392907499,), (1392907502,), (1392907506,)) 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 28244800 , 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=28244797 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 (28244800) result : ((1392907287,), (1392907288,), (1392907289,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28244797) result : ((1392905084,), (1392906770,), (1392906946,), (1392906981,), (1392907026,), (1392907050,), (1392907149,), (1392907151,), (1392907154,), (1392907156,), (1392907160,), (1392907173,), (1392907261,), (1392907263,), (1392907264,), (1392907266,), (1392907269,), (1392907271,), (1392907298,), (1392907299,), (1392907310,), (1392907316,), (1392907344,), (1392907347,), (1392907356,), (1392907359,), (1392907403,), (1392907405,), (1392907407,), (1392907410,), (1392907415,), (1392907420,), (1392907497,), (1392907499,), (1392907502,), (1392907506,)) 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 28244801 , 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=28244797 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 (28244801) result : ((1392907391,), (1392907398,), (1392907399,), (1392907400,), (1392907512,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28244797) result : ((1392905084,), (1392906770,), (1392906946,), (1392906981,), (1392907026,), (1392907050,), (1392907149,), (1392907151,), (1392907154,), (1392907156,), (1392907160,), (1392907173,), (1392907261,), (1392907263,), (1392907264,), (1392907266,), (1392907269,), (1392907271,), (1392907298,), (1392907299,), (1392907310,), (1392907316,), (1392907344,), (1392907347,), (1392907356,), (1392907359,), (1392907403,), (1392907405,), (1392907407,), (1392907410,), (1392907415,), (1392907420,), (1392907497,), (1392907499,), (1392907502,), (1392907506,)) 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 28244802 , 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=28244797 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 (28244802) result : ((1392907384,), (1392907385,), (1392907386,), (1392907387,), (1392907526,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28244797) result : ((1392905084,), (1392906770,), (1392906946,), (1392906981,), (1392907026,), (1392907050,), (1392907149,), (1392907151,), (1392907154,), (1392907156,), (1392907160,), (1392907173,), (1392907261,), (1392907263,), (1392907264,), (1392907266,), (1392907269,), (1392907271,), (1392907298,), (1392907299,), (1392907310,), (1392907316,), (1392907344,), (1392907347,), (1392907356,), (1392907359,), (1392907403,), (1392907405,), (1392907407,), (1392907410,), (1392907415,), (1392907420,), (1392907497,), (1392907499,), (1392907502,), (1392907506,)) 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 28244803 , 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=28244797 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 (28244803) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28244797) result : ((1392905084,), (1392906770,), (1392906946,), (1392906981,), (1392907026,), (1392907050,), (1392907149,), (1392907151,), (1392907154,), (1392907156,), (1392907160,), (1392907173,), (1392907261,), (1392907263,), (1392907264,), (1392907266,), (1392907269,), (1392907271,), (1392907298,), (1392907299,), (1392907310,), (1392907316,), (1392907344,), (1392907347,), (1392907356,), (1392907359,), (1392907403,), (1392907405,), (1392907407,), (1392907410,), (1392907415,), (1392907420,), (1392907497,), (1392907499,), (1392907502,), (1392907506,)) 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 28244804 , 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=28244797 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 (28244804) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28244797) result : ((1392905084,), (1392906770,), (1392906946,), (1392906981,), (1392907026,), (1392907050,), (1392907149,), (1392907151,), (1392907154,), (1392907156,), (1392907160,), (1392907173,), (1392907261,), (1392907263,), (1392907264,), (1392907266,), (1392907269,), (1392907271,), (1392907298,), (1392907299,), (1392907310,), (1392907316,), (1392907344,), (1392907347,), (1392907356,), (1392907359,), (1392907403,), (1392907405,), (1392907407,), (1392907410,), (1392907415,), (1392907420,), (1392907497,), (1392907499,), (1392907502,), (1392907506,)) 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 28244805 , 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=28244797 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 (28244805) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28244797) result : ((1392905084,), (1392906770,), (1392906946,), (1392906981,), (1392907026,), (1392907050,), (1392907149,), (1392907151,), (1392907154,), (1392907156,), (1392907160,), (1392907173,), (1392907261,), (1392907263,), (1392907264,), (1392907266,), (1392907269,), (1392907271,), (1392907298,), (1392907299,), (1392907310,), (1392907316,), (1392907344,), (1392907347,), (1392907356,), (1392907359,), (1392907403,), (1392907405,), (1392907407,), (1392907410,), (1392907415,), (1392907420,), (1392907497,), (1392907499,), (1392907502,), (1392907506,)) 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 28244806 , 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=28244797 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 (28244806) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28244797) result : ((1392905084,), (1392906770,), (1392906946,), (1392906981,), (1392907026,), (1392907050,), (1392907149,), (1392907151,), (1392907154,), (1392907156,), (1392907160,), (1392907173,), (1392907261,), (1392907263,), (1392907264,), (1392907266,), (1392907269,), (1392907271,), (1392907298,), (1392907299,), (1392907310,), (1392907316,), (1392907344,), (1392907347,), (1392907356,), (1392907359,), (1392907403,), (1392907405,), (1392907407,), (1392907410,), (1392907415,), (1392907420,), (1392907497,), (1392907499,), (1392907502,), (1392907506,)) 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 28244807 , 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=28244797 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 (28244807) result : ((1392907527,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28244797) result : ((1392905084,), (1392906770,), (1392906946,), (1392906981,), (1392907026,), (1392907050,), (1392907149,), (1392907151,), (1392907154,), (1392907156,), (1392907160,), (1392907173,), (1392907261,), (1392907263,), (1392907264,), (1392907266,), (1392907269,), (1392907271,), (1392907298,), (1392907299,), (1392907310,), (1392907316,), (1392907344,), (1392907347,), (1392907356,), (1392907359,), (1392907403,), (1392907405,), (1392907407,), (1392907410,), (1392907415,), (1392907420,), (1392907497,), (1392907499,), (1392907502,), (1392907506,)) 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 28244808 , 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=28244797 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 (28244808) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28244797) result : ((1392905084,), (1392906770,), (1392906946,), (1392906981,), (1392907026,), (1392907050,), (1392907149,), (1392907151,), (1392907154,), (1392907156,), (1392907160,), (1392907173,), (1392907261,), (1392907263,), (1392907264,), (1392907266,), (1392907269,), (1392907271,), (1392907298,), (1392907299,), (1392907310,), (1392907316,), (1392907344,), (1392907347,), (1392907356,), (1392907359,), (1392907403,), (1392907405,), (1392907407,), (1392907410,), (1392907415,), (1392907420,), (1392907497,), (1392907499,), (1392907502,), (1392907506,)) 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 28244809 , 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=28244797 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 (28244809) result : ((1392907529,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28244797) result : ((1392905084,), (1392906770,), (1392906946,), (1392906981,), (1392907026,), (1392907050,), (1392907149,), (1392907151,), (1392907154,), (1392907156,), (1392907160,), (1392907173,), (1392907261,), (1392907263,), (1392907264,), (1392907266,), (1392907269,), (1392907271,), (1392907298,), (1392907299,), (1392907310,), (1392907316,), (1392907344,), (1392907347,), (1392907356,), (1392907359,), (1392907403,), (1392907405,), (1392907407,), (1392907410,), (1392907415,), (1392907420,), (1392907497,), (1392907499,), (1392907502,), (1392907506,)) 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`=28244797 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','environnement','kraft','plastique','mal_croppe','cartonnette','Carton_brun','metal','papier','Carton_gris','flou','Teint_Dans_La_Masse')) 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`=28244797 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','environnement','kraft','plastique','mal_croppe','cartonnette','Carton_brun','metal','papier','Carton_gris','flou','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 28244797, 'sub_port_id': 28244810, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110877, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 7, 1)}, 'cartonnette': {'main_port_id': 28244797, 'sub_port_id': 28244811, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110878, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 7, 1)}, 'plastique': {'main_port_id': 28244797, 'sub_port_id': 28244812, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110879, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 7, 1)}, 'Carton_brun': {'main_port_id': 28244797, 'sub_port_id': 28244813, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110880, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 7, 1)}, 'Teint_Dans_La_Masse': {'main_port_id': 28244797, 'sub_port_id': 28244814, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110881, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 7, 1)}, 'environnement': {'main_port_id': 28244797, 'sub_port_id': 28244815, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110882, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 7, 1)}, 'papier': {'main_port_id': 28244797, 'sub_port_id': 28244816, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110883, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 7, 1)}, 'kraft': {'main_port_id': 28244797, 'sub_port_id': 28244817, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110884, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 7, 1)}, 'flou': {'main_port_id': 28244797, 'sub_port_id': 28244818, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110885, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 7, 1)}, 'autre_refus': {'main_port_id': 28244797, 'sub_port_id': 28244819, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110886, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 7, 1)}, 'mal_croppe': {'main_port_id': 28244797, 'sub_port_id': 28244820, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110887, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 7, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 7, 1)}, 'Carton_gris': {'main_port_id': 28244797, 'sub_port_id': 28244821, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19110888, 'last_updated_at': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 5, 13), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 5, 7, 1)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28244810,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28244798 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28244811,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28244799 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28244812,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28244800 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28244813,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28244801 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28244814,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28244802 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28244815,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28244803 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28244816,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28244804 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28244817,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28244805 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28244818,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28244806 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28244819,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28244807 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28244820,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28244808 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28244821,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28244809 lien utilise dans velours : https://marlene.fotonower.com/velours/28244810,28244811,28244812,28244813,28244814,28244815,28244816,28244817,28244818,28244819,28244820,28244821?tags=metal,cartonnette,plastique,Carton_brun,Teint_Dans_La_Masse,environnement,papier,kraft,flou,autre_refus,mal_croppe,Carton_gris After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28244797]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1392907506, 1392907502, 1392907499, 1392907497, 1392907420, 1392907415, 1392907410, 1392907407, 1392907405, 1392907403] map_info['map_portfolio_photo'] : {28244797: [1392907506, 1392907502, 1392907499, 1392907497, 1392907420, 1392907415, 1392907410, 1392907407, 1392907405, 1392907403, 1392907359, 1392907356, 1392907347, 1392907344, 1392907316, 1392907310, 1392907299, 1392907298, 1392907271, 1392907269, 1392907266, 1392907264, 1392907263, 1392907261, 1392907173, 1392907160, 1392907156, 1392907154, 1392907151, 1392907149, 1392907050, 1392907026, 1392906981, 1392906946, 1392906770, 1392905084]} final : False mtd_id 4302 list_pids : [1392907506, 1392907502, 1392907499, 1392907497, 1392907420, 1392907415, 1392907410, 1392907407, 1392907405, 1392907403] Looping around the photos to save general results len do output : 1 /28244797. 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, '4007698') ('4302', '28244797', '1392907506', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907502', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907499', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907497', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907420', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907415', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907410', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907407', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907405', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907403', None, None, None, None, None, '4007698') 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, '28244797', "{'metal': 28244798, 'cartonnette': 28244799, 'plastique': 28244800, 'Carton_brun': 28244801, 'Teint_Dans_La_Masse': 28244802, 'environnement': 28244803, 'papier': 28244804, 'kraft': 28244805, 'flou': 28244806, 'autre_refus': 28244807, 'mal_croppe': 28244808, 'Carton_gris': 28244809}", None, None, None, None, '4007698'), ('4302', '28244797', '1392907506', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907502', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907499', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907497', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907420', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907415', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907410', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907407', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907405', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907403', None, None, None, None, None, '4007698')] time used for this insertion : 0.013623952865600586 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5950140953063965 time spend to save output : 0.013923406600952148 total time spend for step 1 : 1.6089375019073486 step2:final Thu Nov 6 05:15:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28244797) 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 28244797 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1392905084,1392907050,1392906770,1392907026,1392906981,1392906946,1392907173,1392907160,1392907156,1392907154,1392907151,1392907149,1392907271,1392907269,1392907266,1392907264,1392907263,1392907261,1392907316,1392907310,1392907299,1392907298,1392907359,1392907356,1392907347,1392907344,1392907420,1392907415,1392907410,1392907407,1392907405,1392907403,1392907506,1392907502,1392907499,1392907497); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28244797]) Inside saveOutput : final : False verbose : True original output for save of step final : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ('0.0669057974611743',), 1392907415: ('0.0669057974611743',), 1392907410: ('0.0669057974611743',), 1392907407: ('0.0669057974611743',), 1392907405: ('0.0669057974611743',), 1392907403: ('0.0669057974611743',)} new output for save of step final : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ('0.0669057974611743',), 1392907415: ('0.0669057974611743',), 1392907410: ('0.0669057974611743',), 1392907407: ('0.0669057974611743',), 1392907405: ('0.0669057974611743',), 1392907403: ('0.0669057974611743',)} [1392907506, 1392907502, 1392907499, 1392907497, 1392907420, 1392907415, 1392907410, 1392907407, 1392907405, 1392907403] map_info['map_portfolio_photo'] : {28244797: [1392907506, 1392907502, 1392907499, 1392907497, 1392907420, 1392907415, 1392907410, 1392907407, 1392907405, 1392907403, 1392907359, 1392907356, 1392907347, 1392907344, 1392907316, 1392907310, 1392907299, 1392907298, 1392907271, 1392907269, 1392907266, 1392907264, 1392907263, 1392907261, 1392907173, 1392907160, 1392907156, 1392907154, 1392907151, 1392907149, 1392907050, 1392907026, 1392906981, 1392906946, 1392906770, 1392905084]} final : False mtd_id 4302 list_pids : [1392907506, 1392907502, 1392907499, 1392907497, 1392907420, 1392907415, 1392907410, 1392907407, 1392907405, 1392907403] Looping around the photos to save general results len do output : 10 /1392907506.Didn't retrieve data . /1392907502.Didn't retrieve data . /1392907499.Didn't retrieve data . /1392907497.Didn't retrieve data . /1392907420.Didn't retrieve data . /1392907415.Didn't retrieve data . /1392907410.Didn't retrieve data . /1392907407.Didn't retrieve data . /1392907405.Didn't retrieve data . /1392907403.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, '4007698') ('4302', '28244797', '1392907506', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907502', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907499', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907497', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907420', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907415', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907410', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907407', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907405', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907403', None, None, None, None, None, '4007698') 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', '28244797', '1392907506', '0.0669057974611743', None, None, None, None, '4007698'), ('4302', '28244797', '1392907502', '0.0669057974611743', None, None, None, None, '4007698'), ('4302', '28244797', '1392907499', '0.0669057974611743', None, None, None, None, '4007698'), ('4302', '28244797', '1392907497', '0.0669057974611743', None, None, None, None, '4007698'), ('4302', '28244797', '1392907420', '0.0669057974611743', None, None, None, None, '4007698'), ('4302', '28244797', '1392907415', '0.0669057974611743', None, None, None, None, '4007698'), ('4302', '28244797', '1392907410', '0.0669057974611743', None, None, None, None, '4007698'), ('4302', '28244797', '1392907407', '0.0669057974611743', None, None, None, None, '4007698'), ('4302', '28244797', '1392907405', '0.0669057974611743', None, None, None, None, '4007698'), ('4302', '28244797', '1392907403', '0.0669057974611743', None, None, None, None, '4007698')] time used for this insertion : 0.016664743423461914 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.0703268051147461 time spend to save output : 0.017150163650512695 total time spend for step 2 : 0.08747696876525879 step3:velours_tree Thu Nov 6 05:15:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {28244797: [{'metal': 28244798, 'cartonnette': 28244799, 'plastique': 28244800, 'Carton_brun': 28244801, 'Teint_Dans_La_Masse': 28244802, 'environnement': 28244803, 'papier': 28244804, 'kraft': 28244805, 'flou': 28244806, 'autre_refus': 28244807, 'mal_croppe': 28244808, 'Carton_gris': 28244809}]} input_args_next_step : {28244797: ()} output_args : {28244797: [{'metal': 28244798, 'cartonnette': 28244799, 'plastique': 28244800, 'Carton_brun': 28244801, 'Teint_Dans_La_Masse': 28244802, 'environnement': 28244803, 'papier': 28244804, 'kraft': 28244805, 'flou': 28244806, 'autre_refus': 28244807, 'mal_croppe': 28244808, 'Carton_gris': 28244809}]} args : 28244797 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 : ({'metal': 28244798, 'cartonnette': 28244799, 'plastique': 28244800, 'Carton_brun': 28244801, 'Teint_Dans_La_Masse': 28244802, 'environnement': 28244803, 'papier': 28244804, 'kraft': 28244805, 'flou': 28244806, 'autre_refus': 28244807, 'mal_croppe': 28244808, 'Carton_gris': 28244809},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28244797) 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([28244797]) 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.2714262008666992 time spend to save output : 4.7206878662109375e-05 total time spend for step 3 : 0.27147340774536133 step4:send_mail_cod Thu Nov 6 05:15:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ('0.0669057974611743',), 1392907415: ('0.0669057974611743',), 1392907410: ('0.0669057974611743',), 1392907407: ('0.0669057974611743',), 1392907405: ('0.0669057974611743',), 1392907403: ('0.0669057974611743',)} input_args_next_step : {1392907506: ()} output_args : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ('0.0669057974611743',), 1392907415: ('0.0669057974611743',), 1392907410: ('0.0669057974611743',), 1392907407: ('0.0669057974611743',), 1392907405: ('0.0669057974611743',), 1392907403: ('0.0669057974611743',)} args : 1392907506 depend.output_id : 0 input_args_next_step : {1392907506: ('0.0669057974611743',), 1392907502: ()} output_args : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ('0.0669057974611743',), 1392907415: ('0.0669057974611743',), 1392907410: ('0.0669057974611743',), 1392907407: ('0.0669057974611743',), 1392907405: ('0.0669057974611743',), 1392907403: ('0.0669057974611743',)} args : 1392907502 depend.output_id : 0 input_args_next_step : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ()} output_args : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ('0.0669057974611743',), 1392907415: ('0.0669057974611743',), 1392907410: ('0.0669057974611743',), 1392907407: ('0.0669057974611743',), 1392907405: ('0.0669057974611743',), 1392907403: ('0.0669057974611743',)} args : 1392907499 depend.output_id : 0 input_args_next_step : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ()} output_args : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ('0.0669057974611743',), 1392907415: ('0.0669057974611743',), 1392907410: ('0.0669057974611743',), 1392907407: ('0.0669057974611743',), 1392907405: ('0.0669057974611743',), 1392907403: ('0.0669057974611743',)} args : 1392907497 depend.output_id : 0 input_args_next_step : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ()} output_args : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ('0.0669057974611743',), 1392907415: ('0.0669057974611743',), 1392907410: ('0.0669057974611743',), 1392907407: ('0.0669057974611743',), 1392907405: ('0.0669057974611743',), 1392907403: ('0.0669057974611743',)} args : 1392907420 depend.output_id : 0 input_args_next_step : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ('0.0669057974611743',), 1392907415: ()} output_args : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ('0.0669057974611743',), 1392907415: ('0.0669057974611743',), 1392907410: ('0.0669057974611743',), 1392907407: ('0.0669057974611743',), 1392907405: ('0.0669057974611743',), 1392907403: ('0.0669057974611743',)} args : 1392907415 depend.output_id : 0 input_args_next_step : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ('0.0669057974611743',), 1392907415: ('0.0669057974611743',), 1392907410: ()} output_args : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ('0.0669057974611743',), 1392907415: ('0.0669057974611743',), 1392907410: ('0.0669057974611743',), 1392907407: ('0.0669057974611743',), 1392907405: ('0.0669057974611743',), 1392907403: ('0.0669057974611743',)} args : 1392907410 depend.output_id : 0 input_args_next_step : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ('0.0669057974611743',), 1392907415: ('0.0669057974611743',), 1392907410: ('0.0669057974611743',), 1392907407: ()} output_args : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ('0.0669057974611743',), 1392907415: ('0.0669057974611743',), 1392907410: ('0.0669057974611743',), 1392907407: ('0.0669057974611743',), 1392907405: ('0.0669057974611743',), 1392907403: ('0.0669057974611743',)} args : 1392907407 depend.output_id : 0 input_args_next_step : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ('0.0669057974611743',), 1392907415: ('0.0669057974611743',), 1392907410: ('0.0669057974611743',), 1392907407: ('0.0669057974611743',), 1392907405: ()} output_args : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ('0.0669057974611743',), 1392907415: ('0.0669057974611743',), 1392907410: ('0.0669057974611743',), 1392907407: ('0.0669057974611743',), 1392907405: ('0.0669057974611743',), 1392907403: ('0.0669057974611743',)} args : 1392907405 depend.output_id : 0 input_args_next_step : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ('0.0669057974611743',), 1392907415: ('0.0669057974611743',), 1392907410: ('0.0669057974611743',), 1392907407: ('0.0669057974611743',), 1392907405: ('0.0669057974611743',), 1392907403: ()} output_args : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ('0.0669057974611743',), 1392907415: ('0.0669057974611743',), 1392907410: ('0.0669057974611743',), 1392907407: ('0.0669057974611743',), 1392907405: ('0.0669057974611743',), 1392907403: ('0.0669057974611743',)} args : 1392907403 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 : {28244797: [{'metal': 28244798, 'cartonnette': 28244799, 'plastique': 28244800, 'Carton_brun': 28244801, 'Teint_Dans_La_Masse': 28244802, 'environnement': 28244803, 'papier': 28244804, 'kraft': 28244805, 'flou': 28244806, 'autre_refus': 28244807, 'mal_croppe': 28244808, 'Carton_gris': 28244809}]} input_args_next_step : {1392907506: ('0.0669057974611743',), 1392907502: ('0.0669057974611743',), 1392907499: ('0.0669057974611743',), 1392907497: ('0.0669057974611743',), 1392907420: ('0.0669057974611743',), 1392907415: ('0.0669057974611743',), 1392907410: ('0.0669057974611743',), 1392907407: ('0.0669057974611743',), 1392907405: ('0.0669057974611743',), 1392907403: ('0.0669057974611743',), 28244797: ()} output_args : {28244797: [{'metal': 28244798, 'cartonnette': 28244799, 'plastique': 28244800, 'Carton_brun': 28244801, 'Teint_Dans_La_Masse': 28244802, 'environnement': 28244803, 'papier': 28244804, 'kraft': 28244805, 'flou': 28244806, 'autre_refus': 28244807, 'mal_croppe': 28244808, 'Carton_gris': 28244809}]} args : 28244797 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.0669057974611743',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28244797) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos_view ph WHERE photo_id IN (1392907506,1392907502,1392907499,1392907497,1392907420,1392907415,1392907410,1392907407,1392907405,1392907403) Found this number of photos: 10 ##### Call download_photos : nb_thread : 5 begin to download photo : 1392907403 begin to download photo : 1392907410 begin to download photo : 1392907497 begin to download photo : 1392907506 download finish for photo 1392907410 begin to download photo : 1392907415 download finish for photo 1392907506 download finish for photo 1392907497 begin to download photo : 1392907499 download finish for photo 1392907403 begin to download photo : 1392907405 download finish for photo 1392907499 begin to download photo : 1392907502 download finish for photo 1392907415 begin to download photo : 1392907420 download finish for photo 1392907405 begin to download photo : 1392907407 download finish for photo 1392907420 download finish for photo 1392907407 download finish for photo 1392907502 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette282447981762402501/ length of list_filenames : 10 ; length of list_pids : 10 ; length of list_args : 10 results_Auto_P28244797_06-11-2025_05_15_01.pdf 28244798 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28244798 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette282447981762402501 28244799 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28244799 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1392907397: '1762402286_1437502_1392907298_a04d397d54480bb14159ff21aa4d4c3d_rle_crop_4023321976_0.png', 1392907531: '1762402405_1443289_1392907347_d68a9cfab5343be44165d9fc33d111df_rle_crop_4023322648_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/e7decda08647cf74b626c6f61b47346c_16951068.png change filename to text .imagette282447991762402501/ imagette282447991762402501/1762402286_1437502_1392907298_a04d397d54480bb14159ff21aa4d4c3d_rle_crop_4023321976_0.png.png imagette282447991762402501/1762402405_1443289_1392907347_d68a9cfab5343be44165d9fc33d111df_rle_crop_4023322648_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/ba777469be4eaf17555fe1c26d77f85d_25850893.png imagette282447991762402501 28244800 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28244800 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1392907287: '1762402164_1430196_1392907026_87000928f963aea19013b8dfe4db94cb_rle_crop_4023320610_0.png', 1392907288: '1762402164_1430196_1392906981_b966af62837d32e57c9fe935de60b7b5_rle_crop_4023320616_0.png', 1392907289: '1762402164_1430196_1392906946_960ac3176fad809860e14d688db899ef_rle_crop_4023320626_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/bca89ca571f0a22746a42bd352af8b3f_40310356.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/0b4e67c519b7741fb57b5bb958a067e9_52382816.png change filename to text .imagette282448001762402501/ imagette282448001762402501/1762402164_1430196_1392906946_960ac3176fad809860e14d688db899ef_rle_crop_4023320626_0.png.png imagette282448001762402501/1762402164_1430196_1392906981_b966af62837d32e57c9fe935de60b7b5_rle_crop_4023320616_0.png.png imagette282448001762402501/1762402164_1430196_1392907026_87000928f963aea19013b8dfe4db94cb_rle_crop_4023320610_0.png.png imagette282448051762402501/ imagette282448061762402501/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/ea5bf93a758a98d1165fc8209debb803_2657709.png imagette282448001762402501 28244805 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28244805 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette282448051762402501 28244806 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28244806 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette282448061762402501 28244807 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28244807 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1392907527: '1762402405_1443289_1392907344_c225c30eff8eefc23065466440bdf8f9_rle_crop_4023322660_0.png'} change filename to text .imagette282448071762402501/ imagette282448071762402501/1762402405_1443289_1392907344_c225c30eff8eefc23065466440bdf8f9_rle_crop_4023322660_0.png.png imagette282448081762402501/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/e894f7cee11b8c707b34f0b872d54e0d_49915151.png imagette282448071762402501 28244808 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28244808 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette282448081762402501 28244801 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28244801 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1392907391: '1762402265_1436805_1392907269_61e0fa5319686daac3cd5e1f97814fe3_rle_crop_4023321300_0.png', 1392907398: '1762402286_1437502_1392907299_b9a44f7f8a9964996380d0c03597c165_rle_crop_4023321960_0.png', 1392907399: '1762402286_1437502_1392907299_b9a44f7f8a9964996380d0c03597c165_rle_crop_4023321958_0.png', 1392907400: '1762402286_1437502_1392907298_a04d397d54480bb14159ff21aa4d4c3d_rle_crop_4023321973_0.png', 1392907512: '1762402386_1442857_1392907359_91fc70b3ca7b9993a33c418004513285_rle_crop_4023322523_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/eff2706c89a7a9f6bde5dc2232a9f316_27685573.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/4f63c7f8b2b1d33d25d0a077c2b66724_54662828.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/b29144b2031607803e3c0747da9d5cff_65731664.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/be2818b4da7f6d56ad3be8c46fe0a2f1_88712731.png change filename to text .imagette282448011762402501/ imagette282448011762402501/1762402286_1437502_1392907299_b9a44f7f8a9964996380d0c03597c165_rle_crop_4023321958_0.png.png imagette282448011762402501/1762402265_1436805_1392907269_61e0fa5319686daac3cd5e1f97814fe3_rle_crop_4023321300_0.png.png imagette282448011762402501/1762402386_1442857_1392907359_91fc70b3ca7b9993a33c418004513285_rle_crop_4023322523_0.png.png imagette282448011762402501/1762402286_1437502_1392907298_a04d397d54480bb14159ff21aa4d4c3d_rle_crop_4023321973_0.png.png imagette282448011762402501/1762402286_1437502_1392907299_b9a44f7f8a9964996380d0c03597c165_rle_crop_4023321960_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/861280079bdf14139c11ccac1d5391bf_20875068.png imagette282448011762402501 28244802 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28244802 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1392907384: '1762402265_1436805_1392907266_226850e0f68c89b9dc31368a4616a66e_rle_crop_4023321314_0.png', 1392907385: '1762402265_1436805_1392907264_abc7ba46aa812fd863cb071481ab83af_rle_crop_4023321331_0.png', 1392907386: '1762402265_1436805_1392907264_abc7ba46aa812fd863cb071481ab83af_rle_crop_4023321330_0.png', 1392907387: '1762402265_1436805_1392907263_c94b8524f8263f03bb23d389b9042dc6_rle_crop_4023321860_0.png', 1392907526: '1762402405_1443289_1392907347_d68a9cfab5343be44165d9fc33d111df_rle_crop_4023322651_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/234dba619eef7b70f116284a57f8de97_76603474.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/0c525490e50bc9a548a3be5ccfb45e67_4585545.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/17f97a132241e1e3733649b19f98fecf_31567956.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/76c0e06a7794e180c59a6a3fdfa9a1aa_88013521.png change filename to text .imagette282448021762402502/ imagette282448021762402502/1762402265_1436805_1392907264_abc7ba46aa812fd863cb071481ab83af_rle_crop_4023321331_0.png.png imagette282448021762402502/1762402265_1436805_1392907266_226850e0f68c89b9dc31368a4616a66e_rle_crop_4023321314_0.png.png imagette282448021762402502/1762402405_1443289_1392907347_d68a9cfab5343be44165d9fc33d111df_rle_crop_4023322651_0.png.png imagette282448021762402502/1762402265_1436805_1392907263_c94b8524f8263f03bb23d389b9042dc6_rle_crop_4023321860_0.png.png imagette282448021762402502/1762402265_1436805_1392907264_abc7ba46aa812fd863cb071481ab83af_rle_crop_4023321330_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/dc950d2fc69f031c88eff1382934158e_35556393.png imagette282448021762402502 28244809 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28244809 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1392907529: '1762402405_1443289_1392907347_d68a9cfab5343be44165d9fc33d111df_rle_crop_4023322645_0.png'} change filename to text .imagette282448091762402502/ imagette282448091762402502/1762402405_1443289_1392907347_d68a9cfab5343be44165d9fc33d111df_rle_crop_4023322645_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/83febe3b1a98690bc4d42f666b18c262_59494157.png imagette282448091762402502 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=28244797 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/28244810,28244811,28244812,28244813,28244814,28244815,28244816,28244817,28244818,28244819,28244820,28244821?tags=metal,cartonnette,plastique,Carton_brun,Teint_Dans_La_Masse,environnement,papier,kraft,flou,autre_refus,mal_croppe,Carton_gris your option no_mail is active, we will not send the real mail to your client args[1392907506] : ('0.0669057974611743',) no score found for photo 1392907506 We are sending mail with results at report@fotonower.com args[1392907502] : ('0.0669057974611743',) no score found for photo 1392907502 We are sending mail with results at report@fotonower.com args[1392907499] : ('0.0669057974611743',) no score found for photo 1392907499 We are sending mail with results at report@fotonower.com args[1392907497] : ('0.0669057974611743',) no score found for photo 1392907497 We are sending mail with results at report@fotonower.com args[1392907420] : ('0.0669057974611743',) no score found for photo 1392907420 We are sending mail with results at report@fotonower.com args[1392907415] : ('0.0669057974611743',) no score found for photo 1392907415 We are sending mail with results at report@fotonower.com args[1392907410] : ('0.0669057974611743',) no score found for photo 1392907410 We are sending mail with results at report@fotonower.com args[1392907407] : ('0.0669057974611743',) no score found for photo 1392907407 We are sending mail with results at report@fotonower.com args[1392907405] : ('0.0669057974611743',) no score found for photo 1392907405 We are sending mail with results at report@fotonower.com args[1392907403] : ('0.0669057974611743',) no score found for photo 1392907403 We are sending mail with results at report@fotonower.com refus_total : 0.0669057974611743 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28244797 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_P28244797_06-11-2025_05_15_01.pdf results_Auto_P28244797_06-11-2025_05_15_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28244797_06-11-2025_05_15_01.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','28244797','results_Auto_P28244797_06-11-2025_05_15_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28244797_06-11-2025_05_15_01.pdf','pdf','','0.16','0.0669057974611743') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28244797]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1392907506, 1392907502, 1392907499, 1392907497, 1392907420, 1392907415, 1392907410, 1392907407, 1392907405, 1392907403] map_info['map_portfolio_photo'] : {28244797: [1392907506, 1392907502, 1392907499, 1392907497, 1392907420, 1392907415, 1392907410, 1392907407, 1392907405, 1392907403, 1392907359, 1392907356, 1392907347, 1392907344, 1392907316, 1392907310, 1392907299, 1392907298, 1392907271, 1392907269, 1392907266, 1392907264, 1392907263, 1392907261, 1392907173, 1392907160, 1392907156, 1392907154, 1392907151, 1392907149, 1392907050, 1392907026, 1392906981, 1392906946, 1392906770, 1392905084]} final : False mtd_id 4302 list_pids : [1392907506, 1392907502, 1392907499, 1392907497, 1392907420, 1392907415, 1392907410, 1392907407, 1392907405, 1392907403] 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, '4007698') ('4302', '28244797', '1392907506', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907502', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907499', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907497', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907420', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907415', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907410', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907407', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907405', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907403', None, None, None, None, None, '4007698') 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', '28244797', '1392907506', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907502', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907499', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907497', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907420', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907415', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907410', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907407', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907405', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907403', None, None, None, None, None, '4007698')] time used for this insertion : 0.016815900802612305 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.9063870906829834 time spend to save output : 0.017033815383911133 total time spend for step 4 : 2.9234209060668945 step5:split_time_score Thu Nov 6 05:15:03 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['28244797'] 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 : [('28244797',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28244797) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1392907506: {'path': 'temp/1762402500_741480_1392907506_4cebe9f51df24a78f6a208926e2c601f.jpg', 'extension': 'jpg'}, 1392907410: {'path': 'temp/1762402500_741480_1392907410_e2f97d9c6f4310cae20ac8a9c903a05d.jpg', 'extension': 'jpg'}, 1392907415: {'path': 'temp/1762402500_741480_1392907415_3b40f5a11e4ae31f73e10d3ae96ad8e4.jpg', 'extension': 'jpg'}, 1392907420: {'path': 'temp/1762402500_741480_1392907420_9dfe3b2ad33bc17618664de649b15ddc.jpg', 'extension': 'jpg'}, 1392907403: {'path': 'temp/1762402500_741480_1392907403_e3f8011c4d3bb8baf8fc408718d945d0.jpg', 'extension': 'jpg'}, 1392907405: {'path': 'temp/1762402500_741480_1392907405_ddd75fc8fee6298bda842571b26654fe.jpg', 'extension': 'jpg'}, 1392907407: {'path': 'temp/1762402500_741480_1392907407_68ebe6d7818eb231ee49cbff6159fb4e.jpg', 'extension': 'jpg'}, 1392907497: {'path': 'temp/1762402500_741480_1392907497_46a278cd39cc43756cfb95672514741f.jpg', 'extension': 'jpg'}, 1392907499: {'path': 'temp/1762402500_741480_1392907499_d028235411b535f5cc81b1f9bb3b570a.jpg', 'extension': 'jpg'}, 1392907502: {'path': 'temp/1762402500_741480_1392907502_c3b88ce24050e3ad0e85748f32669c78.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 = 28244797; (('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_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 28244797 group by h (('05', 36),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28244797 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 (28244797) 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 (28244797) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 06112025 28244797 Nombre de photos uploadées : 36 / 23040 (0%) 06112025 28244797 Nombre de photos taguées (types de déchets): 0 / 36 (0%) 06112025 28244797 Nombre de photos taguées (volume) : 0 / 36 (0%) [{'photo_id': 1392905084, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/789f3e34c353c4efbf058a370cf1d2c0.jpg', 'username': None, 'uploaded_at': 1762401727, 'text': 'image_06112025_05_01_14_009125m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1392907050, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/5ab18c888c94569f1d1d19e2c1e91a52.jpg', 'username': None, 'uploaded_at': 1762402028, 'text': 'image_06112025_05_01_24_010137m0.jpg 2e-05 for time 1, id_amount 0 this amount prod time diff : 1e-05'}, {'photo_id': 1392906770, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/1a83ca85f6306dcce45470dc0ff44d17.jpg', 'username': None, 'uploaded_at': 1762401967, 'text': 'image_06112025_05_05_25_10135.jpg'}, {'photo_id': 1392907026, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/87000928f963aea19013b8dfe4db94cb.jpg', 'username': None, 'uploaded_at': 1762402028, 'text': 'image_06112025_05_06_24_010139m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 4.76837158203125e-06 ???????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0038843154907226562 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 28244797, '2025-11-06' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2521549,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.22139525413513184 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= 2521549 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2521549, 'dashboard_run_id': 2530273, 'mtr_portfolio_id': 28235530, 'dashboard_result_id': 16891860, '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_P28235530_06-11-2025_00_16_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28235538, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28235539, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28235540, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28235541, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28235542, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28235543, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28235544, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28235545, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28235546, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28235547, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28235548, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28235549, 'pht': 3726}}"}, {'dashboat_entry_day': 2521549, 'dashboard_run_id': 2530273, 'mtr_portfolio_id': 28236103, 'dashboard_result_id': 16891861, '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_P28236103_06-11-2025_00_33_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28236111, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28236112, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28236113, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28236114, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28236115, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28236116, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28236117, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28236118, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28236119, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28236120, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28236121, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28236122, 'pht': 3726}}"}, {'dashboat_entry_day': 2521549, 'dashboard_run_id': 2530273, 'mtr_portfolio_id': 28236743, 'dashboard_result_id': 16891862, '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_P28236743_06-11-2025_00_52_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28236782, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28236783, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28236784, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28236785, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28236786, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28236787, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28236788, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28236789, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28236790, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28236791, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28236792, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28236793, 'pht': 3726}}"}, {'dashboat_entry_day': 2521549, 'dashboard_run_id': 2530273, 'mtr_portfolio_id': 28237598, 'dashboard_result_id': 16891863, '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_P28237598_06-11-2025_01_02_30.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28237602, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28237603, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28237604, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28237605, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28237606, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28237607, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28237608, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28237609, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28237610, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28237611, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28237612, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28237613, 'pht': 3726}}"}, {'dashboat_entry_day': 2521549, 'dashboard_run_id': 2530273, 'mtr_portfolio_id': 28238626, 'dashboard_result_id': 16891864, '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_P28238626_06-11-2025_01_47_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28238628, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28238629, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28238630, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28238631, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28238632, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28238633, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28238634, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28238635, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28238636, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28238637, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28238638, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28238639, 'pht': 3726}}"}, {'dashboat_entry_day': 2521549, 'dashboard_run_id': 2530273, 'mtr_portfolio_id': 28238993, 'dashboard_result_id': 16891865, '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_P28238993_06-11-2025_02_02_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28239000, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28239001, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28239002, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28239003, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28239004, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28239005, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28239006, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28239007, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28239008, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28239009, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28239010, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28239011, 'pht': 3726}}"}, {'dashboat_entry_day': 2521549, 'dashboard_run_id': 2530273, 'mtr_portfolio_id': 28239478, 'dashboard_result_id': 16891866, '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_P28239478_06-11-2025_02_18_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28239506, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28239507, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28239508, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28239509, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28239510, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28239511, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28239512, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28239513, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28239514, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28239516, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28239517, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28239518, 'pht': 3726}}"}, {'dashboat_entry_day': 2521549, 'dashboard_run_id': 2530273, 'mtr_portfolio_id': 28240182, 'dashboard_result_id': 16891867, '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_P28240182_06-11-2025_02_32_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28240226, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28240227, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28240228, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28240229, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28240230, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28240231, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28240233, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28240234, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28240235, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28240236, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28240237, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28240238, 'pht': 3726}}"}, {'dashboat_entry_day': 2521549, 'dashboard_run_id': 2530273, 'mtr_portfolio_id': 28240665, 'dashboard_result_id': 16891868, '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_P28240665_06-11-2025_02_47_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28240709, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28240710, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28240711, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28240712, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28240713, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28240714, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28240715, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28240716, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28240717, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28240718, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28240719, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28240720, 'pht': 3726}}"}, {'dashboat_entry_day': 2521549, 'dashboard_run_id': 2530273, 'mtr_portfolio_id': 28241219, 'dashboard_result_id': 16891869, '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_P28241219_06-11-2025_03_02_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28241229, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28241230, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28241231, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28241232, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28241233, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28241234, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28241235, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28241236, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28241237, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28241238, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28241239, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28241240, 'pht': 3726}}"}, {'dashboat_entry_day': 2521549, 'dashboard_run_id': 2530273, 'mtr_portfolio_id': 28241637, 'dashboard_result_id': 16891870, '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_P28241637_06-11-2025_03_17_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28241705, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28241706, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28241707, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28241708, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28241709, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28241710, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28241712, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28241713, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28241714, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28241715, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28241716, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28241717, 'pht': 3726}}"}, {'dashboat_entry_day': 2521549, 'dashboard_run_id': 2530273, 'mtr_portfolio_id': 28242271, 'dashboard_result_id': 16891871, '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_P28242271_06-11-2025_03_33_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28242296, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28242297, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28242298, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28242299, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28242300, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28242301, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28242302, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28242303, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28242304, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28242305, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28242306, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28242307, 'pht': 3726}}"}, {'dashboat_entry_day': 2521549, 'dashboard_run_id': 2530273, 'mtr_portfolio_id': 28242801, 'dashboard_result_id': 16891872, '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_P28242801_06-11-2025_03_49_30.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28242838, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28242839, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28242840, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28242841, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28242842, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28242843, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28242844, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28242845, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28242846, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28242847, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28242848, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28242849, 'pht': 3726}}"}, {'dashboat_entry_day': 2521549, 'dashboard_run_id': 2530273, 'mtr_portfolio_id': 28243336, 'dashboard_result_id': 16891873, '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_P28243336_06-11-2025_04_02_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28243341, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28243342, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28243343, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28243344, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28243345, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28243346, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28243347, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28243348, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28243349, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28243350, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28243351, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28243352, 'pht': 3726}}"}, {'dashboat_entry_day': 2521549, 'dashboard_run_id': 2530273, 'mtr_portfolio_id': 28243673, 'dashboard_result_id': 16891874, '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_P28243673_06-11-2025_04_13_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 28243728, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28243729, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28243730, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28243731, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28243732, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28243733, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28243734, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28243735, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28243736, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28243737, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28243738, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28243739, 'pht': 3726}}"}, {'dashboat_entry_day': 2521549, 'dashboard_run_id': 2530273, 'mtr_portfolio_id': 28244516, 'dashboard_result_id': 16891875, '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_P28244516_06-11-2025_04_31_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28244517, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28244518, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28244519, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28244520, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28244521, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28244522, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28244523, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28244524, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28244525, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28244526, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28244527, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28244528, 'pht': 3726}}"}, {'dashboat_entry_day': 2521549, 'dashboard_run_id': 2530273, 'mtr_portfolio_id': 28244668, 'dashboard_result_id': 16891876, '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_P28244668_06-11-2025_04_57_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28244669, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28244670, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28244671, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28244672, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28244673, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28244674, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28244675, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28244676, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28244677, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28244678, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28244679, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28244680, 'pht': 3726}}"}, {'dashboat_entry_day': 2521549, 'dashboard_run_id': 2530273, 'mtr_portfolio_id': 28244797, 'dashboard_result_id': 16891877, '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_P28244797_06-11-2025_05_10_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28244798, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28244799, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28244800, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28244801, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28244802, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28244803, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28244804, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28244805, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28244806, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28244807, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28244808, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28244809, '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 = 28235530 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': 4006566, 'mtr_portfolio_id': 28235530, 'created_at': datetime.datetime(2025, 11, 6, 0, 16, 58), 'result': '0.05041362995342737', 'result_long': None, 'result_double': None}] Qualite : 0.05041362995342737 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28235530 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28235530_06-11-2025_00_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28235530 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_P28235530_06-11-2025_00_16_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28235538, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28235539, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28235540, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28235541, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28235542, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28235543, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28235544, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28235545, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28235546, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28235547, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28235548, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28235549, 'pht': 3726}}" where mtr_portfolio_id = 28235530 and dashboard_run_id = 2530273 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`=28235530 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16891860, 0.05041362995342737, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28235530_06-11-2025_00_16_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28235538, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28235539, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28235540, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28235541, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28235542, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28235543, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28235544, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28235545, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28235546, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28235547, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28235548, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28235549, '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 = 28236103 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': 4006617, 'mtr_portfolio_id': 28236103, 'created_at': datetime.datetime(2025, 11, 6, 0, 32, 59), 'result': '0.058940898031335336', 'result_long': None, 'result_double': None}] Qualite : 0.058940898031335336 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28236103 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28236103_06-11-2025_00_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28236103 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_P28236103_06-11-2025_00_33_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28236111, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28236112, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28236113, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28236114, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28236115, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28236116, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28236117, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28236118, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28236119, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28236120, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28236121, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28236122, 'pht': 3726}}" where mtr_portfolio_id = 28236103 and dashboard_run_id = 2530273 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`=28236103 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16891861, 0.058940898031335336, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28236103_06-11-2025_00_33_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28236111, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28236112, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28236113, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28236114, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28236115, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28236116, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28236117, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28236118, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28236119, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28236120, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28236121, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28236122, '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 = 28236743 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': 4006666, 'mtr_portfolio_id': 28236743, 'created_at': datetime.datetime(2025, 11, 6, 0, 52, 58), 'result': '0.05226646504219898', 'result_long': None, 'result_double': None}] Qualite : 0.05226646504219898 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28236743 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28236743_06-11-2025_00_52_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28236743 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_P28236743_06-11-2025_00_52_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28236782, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28236783, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28236784, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28236785, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28236786, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28236787, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28236788, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28236789, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28236790, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28236791, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28236792, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28236793, 'pht': 3726}}" where mtr_portfolio_id = 28236743 and dashboard_run_id = 2530273 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`=28236743 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16891862, 0.05226646504219898, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28236743_06-11-2025_00_52_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28236782, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28236783, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28236784, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28236785, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28236786, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28236787, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28236788, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28236789, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28236790, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28236791, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28236792, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28236793, '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 = 28237598 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': 4006734, 'mtr_portfolio_id': 28237598, 'created_at': datetime.datetime(2025, 11, 6, 1, 2, 30), 'result': '0.055778351036408165', 'result_long': None, 'result_double': None}] Qualite : 0.055778351036408165 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28237598 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28237598_06-11-2025_01_02_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28237598 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_P28237598_06-11-2025_01_02_30.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28237602, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28237603, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28237604, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28237605, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28237606, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28237607, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28237608, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28237609, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28237610, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28237611, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28237612, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28237613, 'pht': 3726}}" where mtr_portfolio_id = 28237598 and dashboard_run_id = 2530273 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`=28237598 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16891863, 0.055778351036408165, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28237598_06-11-2025_01_02_30.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28237602, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28237603, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28237604, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28237605, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28237606, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28237607, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28237608, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28237609, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28237610, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28237611, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28237612, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28237613, '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 = 28238626 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': 4006845, 'mtr_portfolio_id': 28238626, 'created_at': datetime.datetime(2025, 11, 6, 1, 46, 59), 'result': '0.03845004863864676', 'result_long': None, 'result_double': None}] Qualite : 0.03845004863864676 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28238626 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28238626_06-11-2025_01_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28238626 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_P28238626_06-11-2025_01_47_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28238628, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28238629, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28238630, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28238631, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28238632, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28238633, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28238634, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28238635, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28238636, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28238637, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28238638, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28238639, 'pht': 3726}}" where mtr_portfolio_id = 28238626 and dashboard_run_id = 2530273 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`=28238626 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16891864, 0.03845004863864676, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28238626_06-11-2025_01_47_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28238628, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28238629, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28238630, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28238631, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28238632, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28238633, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28238634, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28238635, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28238636, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28238637, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28238638, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28238639, '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 = 28238993 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': 4006888, 'mtr_portfolio_id': 28238993, 'created_at': datetime.datetime(2025, 11, 6, 2, 2, 57), 'result': '0.03884963270230124', 'result_long': None, 'result_double': None}] Qualite : 0.03884963270230124 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28238993 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28238993_06-11-2025_02_02_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28238993 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_P28238993_06-11-2025_02_02_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28239000, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28239001, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28239002, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28239003, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28239004, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28239005, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28239006, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28239007, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28239008, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28239009, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28239010, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28239011, 'pht': 3726}}" where mtr_portfolio_id = 28238993 and dashboard_run_id = 2530273 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`=28238993 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16891865, 0.03884963270230124, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28238993_06-11-2025_02_02_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28239000, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28239001, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28239002, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28239003, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28239004, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28239005, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28239006, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28239007, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28239008, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28239009, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28239010, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28239011, '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 = 28239478 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': 4006989, 'mtr_portfolio_id': 28239478, 'created_at': datetime.datetime(2025, 11, 6, 2, 18, 59), 'result': '0.04801819422944025', 'result_long': None, 'result_double': None}] Qualite : 0.04801819422944025 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28239478 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28239478_06-11-2025_02_18_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28239478 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_P28239478_06-11-2025_02_18_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28239506, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28239507, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28239508, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28239509, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28239510, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28239511, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28239512, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28239513, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28239514, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28239516, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28239517, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28239518, 'pht': 3726}}" where mtr_portfolio_id = 28239478 and dashboard_run_id = 2530273 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`=28239478 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16891866, 0.04801819422944025, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28239478_06-11-2025_02_18_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28239506, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28239507, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28239508, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28239509, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28239510, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28239511, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28239512, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28239513, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28239514, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28239516, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28239517, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28239518, '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 = 28240182 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': 4007060, 'mtr_portfolio_id': 28240182, 'created_at': datetime.datetime(2025, 11, 6, 2, 32, 57), 'result': '0.05549165969957548', 'result_long': None, 'result_double': None}] Qualite : 0.05549165969957548 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28240182 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28240182_06-11-2025_02_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28240182 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_P28240182_06-11-2025_02_32_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28240226, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28240227, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28240228, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28240229, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28240230, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28240231, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28240233, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28240234, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28240235, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28240236, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28240237, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28240238, 'pht': 3726}}" where mtr_portfolio_id = 28240182 and dashboard_run_id = 2530273 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`=28240182 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16891867, 0.05549165969957548, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28240182_06-11-2025_02_32_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28240226, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28240227, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28240228, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28240229, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28240230, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28240231, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28240233, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28240234, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28240235, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28240236, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28240237, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28240238, '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 = 28240665 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': 4007121, 'mtr_portfolio_id': 28240665, 'created_at': datetime.datetime(2025, 11, 6, 2, 47), 'result': '0.04522659559916669', 'result_long': None, 'result_double': None}] Qualite : 0.04522659559916669 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28240665 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28240665_06-11-2025_02_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28240665 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_P28240665_06-11-2025_02_47_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28240709, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28240710, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28240711, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28240712, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28240713, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28240714, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28240715, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28240716, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28240717, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28240718, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28240719, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28240720, 'pht': 3726}}" where mtr_portfolio_id = 28240665 and dashboard_run_id = 2530273 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`=28240665 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16891868, 0.04522659559916669, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28240665_06-11-2025_02_47_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28240709, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28240710, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28240711, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28240712, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28240713, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28240714, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28240715, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28240716, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28240717, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28240718, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28240719, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28240720, '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 = 28241219 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': 4007183, 'mtr_portfolio_id': 28241219, 'created_at': datetime.datetime(2025, 11, 6, 3, 2, 59), 'result': '0.054280456676246716', 'result_long': None, 'result_double': None}] Qualite : 0.054280456676246716 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28241219 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28241219_06-11-2025_03_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28241219 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_P28241219_06-11-2025_03_02_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28241229, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28241230, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28241231, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28241232, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28241233, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28241234, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28241235, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28241236, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28241237, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28241238, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28241239, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28241240, 'pht': 3726}}" where mtr_portfolio_id = 28241219 and dashboard_run_id = 2530273 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`=28241219 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16891869, 0.054280456676246716, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28241219_06-11-2025_03_02_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28241229, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28241230, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28241231, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28241232, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28241233, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28241234, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28241235, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28241236, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28241237, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28241238, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28241239, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28241240, '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 = 28241637 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': 4007260, 'mtr_portfolio_id': 28241637, 'created_at': datetime.datetime(2025, 11, 6, 3, 17), 'result': '0.02742250469383885', 'result_long': None, 'result_double': None}] Qualite : 0.02742250469383885 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28241637 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28241637_06-11-2025_03_17_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28241637 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_P28241637_06-11-2025_03_17_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28241705, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28241706, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28241707, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28241708, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28241709, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28241710, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28241712, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28241713, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28241714, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28241715, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28241716, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28241717, 'pht': 3726}}" where mtr_portfolio_id = 28241637 and dashboard_run_id = 2530273 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`=28241637 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16891870, 0.02742250469383885, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28241637_06-11-2025_03_17_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28241705, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28241706, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28241707, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28241708, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28241709, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28241710, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28241712, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28241713, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28241714, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28241715, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28241716, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28241717, '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 = 28242271 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': 4007331, 'mtr_portfolio_id': 28242271, 'created_at': datetime.datetime(2025, 11, 6, 3, 32, 59), 'result': '0.03780235963227878', 'result_long': None, 'result_double': None}] Qualite : 0.03780235963227878 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28242271 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28242271_06-11-2025_03_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28242271 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_P28242271_06-11-2025_03_33_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28242296, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28242297, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28242298, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28242299, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28242300, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28242301, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28242302, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28242303, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28242304, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28242305, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28242306, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28242307, 'pht': 3726}}" where mtr_portfolio_id = 28242271 and dashboard_run_id = 2530273 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`=28242271 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16891871, 0.03780235963227878, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28242271_06-11-2025_03_33_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28242296, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28242297, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28242298, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28242299, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28242300, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28242301, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28242302, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28242303, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28242304, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28242305, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28242306, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28242307, '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 = 28242801 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': 4007406, 'mtr_portfolio_id': 28242801, 'created_at': datetime.datetime(2025, 11, 6, 3, 49, 29), 'result': '0.04000936337504578', 'result_long': None, 'result_double': None}] Qualite : 0.04000936337504578 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28242801 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28242801_06-11-2025_03_49_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28242801 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_P28242801_06-11-2025_03_49_30.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28242838, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28242839, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28242840, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28242841, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28242842, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28242843, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28242844, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28242845, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28242846, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28242847, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28242848, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28242849, 'pht': 3726}}" where mtr_portfolio_id = 28242801 and dashboard_run_id = 2530273 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`=28242801 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16891872, 0.04000936337504578, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28242801_06-11-2025_03_49_30.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28242838, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28242839, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28242840, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28242841, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28242842, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28242843, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28242844, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28242845, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28242846, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28242847, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28242848, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28242849, '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 = 28243336 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': 4007462, 'mtr_portfolio_id': 28243336, 'created_at': datetime.datetime(2025, 11, 6, 4, 2, 58), 'result': '0.033639356930590475', 'result_long': None, 'result_double': None}] Qualite : 0.033639356930590475 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28243336 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28243336_06-11-2025_04_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28243336 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_P28243336_06-11-2025_04_02_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28243341, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28243342, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28243343, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28243344, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28243345, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28243346, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28243347, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28243348, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28243349, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28243350, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28243351, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28243352, 'pht': 3726}}" where mtr_portfolio_id = 28243336 and dashboard_run_id = 2530273 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`=28243336 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16891873, 0.033639356930590475, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28243336_06-11-2025_04_02_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28243341, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28243342, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28243343, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28243344, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28243345, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28243346, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28243347, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28243348, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28243349, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28243350, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28243351, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28243352, '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 = 28243673 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': 4007544, 'mtr_portfolio_id': 28243673, 'created_at': datetime.datetime(2025, 11, 6, 4, 12, 59), 'result': '0.056694838153995786', 'result_long': None, 'result_double': None}] Qualite : 0.056694838153995786 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28243673 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28243673_06-11-2025_04_13_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28243673 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_P28243673_06-11-2025_04_13_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 28243728, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28243729, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28243730, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28243731, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28243732, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28243733, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28243734, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28243735, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28243736, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28243737, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28243738, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28243739, 'pht': 3726}}" where mtr_portfolio_id = 28243673 and dashboard_run_id = 2530273 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`=28243673 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16891874, 0.056694838153995786, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28243673_06-11-2025_04_13_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 28243728, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28243729, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28243730, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28243731, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28243732, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28243733, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28243734, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28243735, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28243736, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28243737, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28243738, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28243739, '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 = 28244516 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 = 28244516 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 = 28244516 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 28244516 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 = 28244516 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 = 28244516 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28244516_06-11-2025_04_31_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28244516 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_P28244516_06-11-2025_04_31_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28244517, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28244518, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28244519, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28244520, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28244521, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28244522, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28244523, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28244524, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28244525, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28244526, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28244527, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28244528, 'pht': 3726}}" where mtr_portfolio_id = 28244516 and dashboard_run_id = 2530275 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 = 28244668 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 = 28244668 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 = 28244668 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 28244668 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 = 28244668 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 = 28244668 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28244668_06-11-2025_04_57_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28244668 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_P28244668_06-11-2025_04_57_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28244669, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28244670, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28244671, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28244672, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28244673, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28244674, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28244675, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28244676, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28244677, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28244678, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28244679, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28244680, 'pht': 3726}}" where mtr_portfolio_id = 28244668 and dashboard_run_id = 2530275 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 = 28244797 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': 4007698, 'mtr_portfolio_id': 28244797, 'created_at': datetime.datetime(2025, 11, 6, 5, 15), 'result': '0.0669057974611743', 'result_long': None, 'result_double': None}] Qualite : 0.0669057974611743 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28244797 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28244797_06-11-2025_05_15_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28244797 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_P28244797_06-11-2025_05_15_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28244798, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28244799, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28244800, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28244801, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28244802, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28244803, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28244804, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28244805, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28244806, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28244807, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28244808, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28244809, 'pht': 3726}}" where mtr_portfolio_id = 28244797 and dashboard_run_id = 2530275 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`=28244797 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16891877, 0.0669057974611743, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28244797_06-11-2025_05_15_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28244798, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28244799, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28244800, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28244801, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28244802, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28244803, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28244804, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28244805, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28244806, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28244807, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28244808, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28244809, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28235530,28236103,28236743,28237598,28238626,28238993,28239478,28240182,28240665,28241219,28241637,28242271,28242801,28243336,28243673,28244516,28244668,28244797) result : ((1392868064,), (1392868096,), (1392868546,), (1392868547,), (1392868548,), (1392868550,), (1392868552,), (1392868570,), (1392868800,), (1392868803,), (1392868806,), (1392868808,), (1392868847,), (1392868848,), (1392868849,), (1392868852,), (1392868874,), (1392868878,), (1392868882,), (1392868887,), (1392868920,), (1392868922,), (1392868924,), (1392868928,), (1392868948,), (1392868951,), (1392868954,), (1392868959,), (1392869045,), (1392869047,), (1392869049,), (1392869337,), (1392869370,), (1392869377,), (1392869378,), (1392869380,), (1392869740,), (1392869772,), (1392869809,), (1392869847,), (1392869885,), (1392870264,), (1392870336,), (1392870397,), (1392870470,), (1392870537,), (1392870608,), (1392870940,), (1392870974,), (1392871039,), (1392871079,), (1392871119,), (1392871220,), (1392871575,), (1392871585,), (1392871601,), (1392871606,), (1392871614,), (1392871627,), (1392871645,), (1392871648,), (1392871665,), (1392871671,), (1392871681,), (1392871683,), (1392871685,), (1392871695,), (1392872166,), (1392872065,), (1392872100,), (1392872134,), (1392872254,), (1392872286,), (1392872320,), (1392872352,), (1392872384,), (1392872388,), (1392872495,), (1392872499,), (1392872508,), (1392872510,), (1392872514,), (1392872727,), (1392872760,), (1392872795,), (1392872825,), (1392873078,), (1392873368,), (1392874542,), (1392874554,), (1392874557,), (1392874719,), (1392874751,), (1392874786,), (1392874818,), (1392874846,), (1392874927,), (1392874928,), (1392874929,), (1392874930,), (1392874956,), (1392874957,), (1392874958,), (1392874960,), (1392874963,), (1392875495,), (1392875496,), (1392875498,), (1392875499,), (1392875500,), (1392875525,), (1392875360,), (1392875395,), (1392875427,), (1392875458,), (1392875492,), (1392875685,), (1392875686,), (1392875726,), (1392875728,), (1392875741,), (1392875742,), (1392875755,), (1392875761,), (1392875784,), (1392875786,), (1392875826,), (1392875827,), (1392875830,), (1392875861,), (1392875862,), (1392875863,), (1392875864,), (1392875886,), (1392875888,), (1392875889,), (1392875890,), (1392875910,), (1392875917,), (1392875925,), (1392875929,), (1392875974,), (1392875975,), (1392875976,), (1392876398,), (1392876430,), (1392876461,), (1392876494,), (1392876527,), (1392876889,), (1392876890,), (1392876891,), (1392877153,), (1392877162,), (1392877163,), (1392877165,), (1392877296,), (1392877298,), (1392877300,), (1392877328,), (1392877330,), (1392877331,), (1392877332,), (1392877334,), (1392877505,), (1392877539,), (1392877576,), (1392877611,), (1392877660,), (1392877966,), (1392878056,), (1392878059,), (1392878211,), (1392878238,), (1392880532,), (1392879416,), (1392880467,), (1392880499,), (1392880527,), (1392880663,), (1392880666,), (1392880669,), (1392880671,), (1392880674,), (1392880718,), (1392880720,), (1392880722,), (1392880723,), (1392880725,), (1392880791,), (1392880825,), (1392880857,), (1392880888,), (1392881139,), (1392881140,), (1392881156,), (1392881190,), (1392881228,), (1392881263,), (1392881342,), (1392881362,), (1392881368,), (1392881376,), (1392881377,), (1392881380,), (1392881383,), (1392881386,), (1392881389,), (1392881416,), (1392881453,), (1392881496,), (1392881848,), (1392881855,), (1392881858,), (1392881865,), (1392882074,), (1392882078,), (1392882193,), (1392882231,), (1392882267,), (1392882300,), (1392882335,), (1392882513,), (1392884294,), (1392884296,), (1392884315,), (1392884317,), (1392884319,), (1392884321,), (1392884355,), (1392884357,), (1392884358,), (1392884382,), (1392884384,), (1392884386,), (1392884388,), (1392884390,), (1392884413,), (1392884414,), (1392884415,), (1392884416,), (1392884419,), (1392884481,), (1392884483,), (1392884485,), (1392884508,), (1392884509,), (1392884510,), (1392884511,), (1392884538,), (1392884541,), (1392884543,), (1392884546,), (1392884549,), (1392884561,), (1392884562,), (1392884563,), (1392884564,), (1392884567,), (1392884602,), (1392884604,), (1392884643,), (1392884889,), (1392884890,), (1392884891,), (1392884893,), (1392884919,), (1392884921,), (1392884922,), (1392884925,), (1392884928,), (1392884931,), (1392884944,), (1392884945,), (1392884946,), (1392884947,), (1392884986,), (1392884977,), (1392884979,), (1392884981,), (1392884983,), (1392885005,), (1392885006,), (1392885007,), (1392885009,), (1392885012,), (1392885090,), (1392885092,), (1392885094,), (1392885113,), (1392885116,), (1392885119,), (1392885123,), (1392885127,), (1392885152,), (1392885154,), (1392885155,), (1392885157,), (1392885159,), (1392885162,), (1392885172,), (1392885174,), (1392885176,), (1392885178,), (1392885218,), (1392885220,), (1392885221,), (1392885223,), (1392885279,), (1392885282,), (1392885284,), (1392885286,), (1392885289,), (1392885312,), (1392885314,), (1392885318,), (1392885321,), (1392885326,), (1392885354,), (1392885356,), (1392885358,), (1392885360,), (1392885384,), (1392885387,), (1392885390,), (1392885393,), (1392885406,), (1392885408,), (1392885410,), (1392885412,), (1392885494,), (1392885497,), (1392885899,), (1392885918,), (1392885925,), (1392885929,), (1392885933,), (1392885943,), (1392885973,), (1392885967,), (1392885972,), (1392886144,), (1392886731,), (1392886847,), (1392886848,), (1392886851,), (1392887532,), (1392887568,), (1392887631,), (1392887668,), (1392887918,), (1392887952,), (1392888006,), (1392888064,), (1392888408,), (1392888437,), (1392888457,), (1392888469,), (1392888559,), (1392888561,), (1392888562,), (1392888768,), (1392888777,), (1392888780,), (1392888784,), (1392888790,), (1392888980,), (1392888983,), (1392888986,), (1392888989,), (1392889014,), (1392889016,), (1392889017,), (1392889018,), (1392889022,), (1392889053,), (1392889055,), (1392889066,), (1392889069,), (1392889133,), (1392889170,), (1392889201,), (1392889232,), (1392889271,), (1392889303,), (1392889561,), (1392889563,), (1392889565,), (1392889566,), (1392889675,), (1392889708,), (1392889740,), (1392889772,), (1392889806,), (1392890002,), (1392889977,), (1392889991,), (1392889994,), (1392889998,), (1392890023,), (1392890025,), (1392890027,), (1392890030,), (1392890102,), (1392890105,), (1392890134,), (1392890135,), (1392890136,), (1392890138,), (1392890165,), (1392890167,), (1392890169,), (1392890172,), (1392890176,), (1392890200,), (1392890202,), (1392890203,), (1392890204,), (1392890207,), (1392890235,), (1392890237,), (1392890239,), (1392890401,), (1392890402,), (1392890403,), (1392890405,), (1392890407,), (1392890443,), (1392890444,), (1392890446,), (1392890450,), (1392890454,), (1392890471,), (1392890473,), (1392890475,), (1392890479,), (1392890484,), (1392890536,), (1392890538,), (1392890540,), (1392890542,), (1392890546,), (1392890549,), (1392890566,), (1392890570,), (1392890572,), (1392890574,), (1392890600,), (1392890601,), (1392890602,), (1392890605,), (1392890610,), (1392890615,), (1392890650,), (1392890652,), (1392890669,), (1392890672,), (1392890677,), (1392890679,), (1392890683,), (1392890638,), (1392890641,), (1392890644,), (1392890647,), (1392890708,), (1392890716,), (1392890719,), (1392890728,), (1392890738,), (1392890745,), (1392890768,), (1392890770,), (1392890771,), (1392891025,), (1392891057,), (1392891088,), (1392891121,), (1392891157,), (1392891358,), (1392891360,), (1392891362,), (1392891379,), (1392891410,), (1392891447,), (1392891640,), (1392891644,), (1392891645,), (1392891647,), (1392891675,), (1392891679,), (1392891682,), (1392891686,), (1392891763,), (1392891765,), (1392891767,), (1392891776,), (1392891815,), (1392891817,), (1392891819,), (1392891821,), (1392891825,), (1392891850,), (1392891851,), (1392891852,), (1392891855,), (1392891879,), (1392891882,), (1392891883,), (1392891886,), (1392891890,), (1392891894,), (1392891917,), (1392891922,), (1392891932,), (1392891942,), (1392891949,), (1392892001,), (1392892002,), (1392892003,), (1392892006,), (1392892041,), (1392892044,), (1392892047,), (1392892051,), (1392892054,), (1392892058,), (1392892083,), (1392892084,), (1392892086,), (1392892087,), (1392892089,), (1392892090,), (1392892127,), (1392892123,), (1392892124,), (1392892125,), (1392892149,), (1392892151,), (1392892153,), (1392892156,), (1392892160,), (1392892231,), (1392892233,), (1392892235,), (1392892238,), (1392892271,), (1392892273,), (1392892275,), (1392892278,), (1392892283,), (1392892286,), (1392892310,), (1392892312,), (1392892314,), (1392892319,), (1392892324,), (1392892341,), (1392892344,), (1392892346,), (1392892349,), (1392892353,), (1392892356,), (1392892400,), (1392892406,), (1392892414,), (1392892416,), (1392892419,), (1392892483,), (1392892484,), (1392892485,), (1392892487,), (1392892490,), (1392892493,), (1392892527,), (1392892529,), (1392892531,), (1392892534,), (1392892561,), (1392892563,), (1392892564,), (1392892565,), (1392892567,), (1392892568,), (1392892587,), (1392892589,), (1392892591,), (1392892595,), (1392892600,), (1392892615,), (1392892621,), (1392892624,), (1392892628,), (1392892631,), (1392892641,), (1392892721,), (1392892728,), (1392892729,), (1392892731,), (1392892846,), (1392892882,), (1392892916,), (1392892956,), (1392892992,), (1392893407,), (1392893301,), (1392893338,), (1392893371,), (1392893831,), (1392893867,), (1392893899,), (1392893931,), (1392893967,), (1392893970,), (1392894090,), (1392894124,), (1392894156,), (1392894189,), (1392894222,), (1392894425,), (1392894457,), (1392894474,), (1392894486,), (1392894893,), (1392894924,), (1392894956,), (1392894987,), (1392895022,), (1392895058,), (1392895160,), (1392895163,), (1392895166,), (1392895183,), (1392895354,), (1392895357,), (1392895359,), (1392895362,), (1392895365,), (1392895376,), (1392895426,), (1392895427,), (1392895428,), (1392895430,), (1392895461,), (1392895468,), (1392895472,), (1392895474,), (1392895477,), (1392895479,), (1392895502,), (1392895504,), (1392895505,), (1392895507,), (1392895522,), (1392895523,), (1392895524,), (1392895526,), (1392895660,), (1392895663,), (1392895668,), (1392895671,), (1392895701,), (1392895708,), (1392895710,), (1392895713,), (1392895717,), (1392895738,), (1392895742,), (1392895745,), (1392895748,), (1392895753,), (1392895757,), (1392895799,), (1392895794,), (1392895796,), (1392895797,), (1392895818,), (1392895819,), (1392895820,), (1392895823,), (1392895826,), (1392895828,), (1392895880,), (1392895883,), (1392895884,), (1392895886,), (1392895889,), (1392895912,), (1392895915,), (1392895917,), (1392895920,), (1392895953,), (1392895962,), (1392895963,), (1392895965,), (1392895996,), (1392896005,), (1392896007,), (1392896010,), (1392896015,), (1392896043,), (1392896045,), (1392896048,), (1392896057,), (1392896067,), (1392896097,), (1392896098,), (1392896099,), (1392896101,), (1392896105,), (1392896136,), (1392896138,), (1392896139,), (1392896142,), (1392896147,), (1392896150,), (1392896178,), (1392896180,), (1392896183,), (1392896187,), (1392896219,), (1392896221,), (1392896223,), (1392896226,), (1392896230,), (1392896248,), (1392896249,), (1392896250,), (1392896252,), (1392896256,), (1392896357,), (1392896359,), (1392896362,), (1392896366,), (1392896371,), (1392896398,), (1392896400,), (1392896401,), (1392896402,), (1392896403,), (1392896406,), (1392896440,), (1392896447,), (1392896449,), (1392896451,), (1392896491,), (1392896495,), (1392896500,), (1392896503,), (1392896506,), (1392896480,), (1392896482,), (1392896484,), (1392896487,), (1392896519,), (1392896520,), (1392896522,), (1392896526,), (1392896538,), (1392896599,), (1392896600,), (1392896601,), (1392896603,), (1392896606,), (1392896630,), (1392896639,), (1392896662,), (1392896692,), (1392896693,), (1392896694,), (1392896696,), (1392896700,), (1392896733,), (1392896737,), (1392896740,), (1392896742,), (1392896746,), (1392896764,), (1392896856,), (1392896858,), (1392896860,), (1392896863,), (1392896866,), (1392896868,), (1392896876,), (1392896880,), (1392896883,), (1392896891,), (1392896893,), (1392896894,), (1392896898,), (1392896900,), (1392896904,), (1392896925,), (1392896927,), (1392896930,), (1392896934,), (1392896938,), (1392896967,), (1392896971,), (1392896973,), (1392896976,), (1392896981,), (1392897005,), (1392897008,), (1392897009,), (1392897012,), (1392897016,), (1392897086,), (1392897098,), (1392897101,), (1392897106,), (1392897109,), (1392897123,), (1392897126,), (1392897129,), (1392897132,), (1392897137,), (1392897156,), (1392897158,), (1392897161,), (1392897166,), (1392897208,), (1392897192,), (1392897194,), (1392897196,), (1392897200,), (1392897205,), (1392897258,), (1392897262,), (1392897264,), (1392897266,), (1392897269,), (1392897325,), (1392897327,), (1392897329,), (1392897332,), (1392897334,), (1392897337,), (1392897356,), (1392897358,), (1392897360,), (1392897364,), (1392897369,), (1392897373,), (1392897393,), (1392897395,), (1392897397,), (1392897401,), (1392897406,), (1392897426,), (1392897428,), (1392897429,), (1392897432,), (1392897466,), (1392897467,), (1392897468,), (1392897471,), (1392897482,), (1392897492,), (1392897552,), (1392897554,), (1392897556,), (1392897559,), (1392897563,), (1392897586,), (1392897588,), (1392897589,), (1392897591,), (1392897593,), (1392897596,), (1392897616,), (1392897620,), (1392897624,), (1392897656,), (1392897659,), (1392897663,), (1392897668,), (1392897686,), (1392897687,), (1392897688,), (1392897689,), (1392897772,), (1392897774,), (1392897776,), (1392897780,), (1392897807,), (1392897810,), (1392897815,), (1392897820,), (1392897824,), (1392897828,), (1392898505,), (1392898308,), (1392898380,), (1392898444,), (1392899464,), (1392899538,), (1392899600,), (1392899655,), (1392899691,), (1392899729,), (1392900243,), (1392900298,), (1392900341,), (1392900345,), (1392900536,), (1392900540,), (1392901280,), (1392901475,), (1392901477,), (1392901478,), (1392901480,), (1392901483,), (1392901582,), (1392901584,), (1392901586,), (1392901589,), (1392901614,), (1392901616,), (1392901618,), (1392901620,), (1392901624,), (1392901660,), (1392901663,), (1392901666,), (1392901698,), (1392901699,), (1392901700,), (1392901703,), (1392901707,), (1392901736,), (1392901739,), (1392901749,), (1392902146,), (1392902548,), (1392903292,), (1392903664,), (1392905084,), (1392906770,), (1392906946,), (1392906981,), (1392907026,), (1392907050,), (1392907149,), (1392907151,), (1392907154,), (1392907156,), (1392907160,), (1392907173,), (1392907261,), (1392907263,), (1392907264,), (1392907266,), (1392907269,), (1392907271,), (1392907298,), (1392907299,), (1392907310,), (1392907316,), (1392907344,), (1392907347,), (1392907356,), (1392907359,), (1392907403,), (1392907405,), (1392907407,), (1392907410,), (1392907415,), (1392907420,), (1392907497,), (1392907499,), (1392907502,), (1392907506,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'06112025': {'nb_upload': 36, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28244797]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1392907506, 1392907502, 1392907499, 1392907497, 1392907420, 1392907415, 1392907410, 1392907407, 1392907405, 1392907403] map_info['map_portfolio_photo'] : {28244797: [1392907506, 1392907502, 1392907499, 1392907497, 1392907420, 1392907415, 1392907410, 1392907407, 1392907405, 1392907403, 1392907359, 1392907356, 1392907347, 1392907344, 1392907316, 1392907310, 1392907299, 1392907298, 1392907271, 1392907269, 1392907266, 1392907264, 1392907263, 1392907261, 1392907173, 1392907160, 1392907156, 1392907154, 1392907151, 1392907149, 1392907050, 1392907026, 1392906981, 1392906946, 1392906770, 1392905084]} final : True mtd_id 4302 list_pids : [1392907506, 1392907502, 1392907499, 1392907497, 1392907420, 1392907415, 1392907410, 1392907407, 1392907405, 1392907403] Looping around the photos to save general results len do output : 1 /28244797Didn'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, '4007698') ('4302', '28244797', '1392907506', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907502', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907499', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907497', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907420', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907415', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907410', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907407', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907405', None, None, None, None, None, '4007698') ('4302', None, None, None, None, None, None, None, '4007698') ('4302', '28244797', '1392907403', None, None, None, None, None, '4007698') 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, '28244797', 'None', None, None, None, None, '4007698'), ('4302', '28244797', '1392907506', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907502', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907499', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907497', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907420', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907415', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907410', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907407', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907405', None, None, None, None, None, '4007698'), ('4302', '28244797', '1392907403', None, None, None, None, None, '4007698')] time used for this insertion : 0.013233661651611328 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.3467028141021729 time spend to save output : 0.01343393325805664 total time spend for step 5 : 1.3601367473602295 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 (4007698) 2.05user 2.18system 0:10.41elapsed 40%CPU (0avgtext+0avgdata 158080maxresident)k 80inputs+9136outputs (11major+64202minor)pagefaults 0swaps