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 : 1443615 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 (4302470) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4302470) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29885399 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4302470'] with mtr_portfolio_ids : ['29885399'] and first list_photo_ids : [] new path : /proc/1443615/ Name: python3 Umask: 0002 State: R (running) Tgid: 1443615 Ngid: 0 Pid: 1443615 PPid: 1443614 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1443615 NSpid: 1443615 NSpgid: 1442406 NSsid: 1442406 VmPeak: 1113368 kB VmSize: 1113368 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 105116 kB VmRSS: 105116 kB RssAnon: 66300 kB RssFile: 38816 kB RssShmem: 0 kB VmData: 872096 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130476 kB VmPTE: 620 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: 54 nonvoluntary_ctxt_switches: 65 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1443615', 'Ngid': '0', 'Pid': '1443615', 'PPid': '1443614', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1443615', 'NSpid': '1443615', 'NSpgid': '1442406', 'NSsid': '1442406', 'VmPeak': '1113368 kB', 'VmSize': '1113368 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '105116 kB', 'VmRSS': '105116 kB', 'RssAnon': '66300 kB', 'RssFile': '38816 kB', 'RssShmem': '0 kB', 'VmData': '872096 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130476 kB', 'VmPTE': '620 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': '54', 'nonvoluntary_ctxt_switches': '65'} ('datou_batch_current', '1443615', '1113368', '0', '1113368', '872096', '105116', b'', 'marlene', '4302470') 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 (29885399) 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 (4302470 ) ) 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 (29885399) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1402137175, 'portfolio_id': 29885399}, {'photo_id': 1402137089, 'portfolio_id': 29885399}, {'photo_id': 1402137045, 'portfolio_id': 29885399}, {'photo_id': 1402137035, 'portfolio_id': 29885399}, {'photo_id': 1402136412, 'portfolio_id': 29885399}, {'photo_id': 1402136410, 'portfolio_id': 29885399}, {'photo_id': 1402136409, 'portfolio_id': 29885399}, {'photo_id': 1402136408, 'portfolio_id': 29885399}, {'photo_id': 1402136407, 'portfolio_id': 29885399}, {'photo_id': 1402136393, 'portfolio_id': 29885399}, {'photo_id': 1402136390, 'portfolio_id': 29885399}, {'photo_id': 1402136388, 'portfolio_id': 29885399}, {'photo_id': 1402136386, 'portfolio_id': 29885399}, {'photo_id': 1402136383, 'portfolio_id': 29885399}, {'photo_id': 1402136365, 'portfolio_id': 29885399}, {'photo_id': 1402136362, 'portfolio_id': 29885399}, {'photo_id': 1402136359, 'portfolio_id': 29885399}] map_portfolio_id_photo_id: {29885399: [1402137175, 1402137089, 1402137045, 1402137035, 1402136412, 1402136410, 1402136409, 1402136408, 1402136407, 1402136393, 1402136390, 1402136388, 1402136386, 1402136383, 1402136365, 1402136362, 1402136359]} ##### 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.018794536590576172 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Fri Jan 2 11:04:58 2026 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 (29885399) 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 : 29885399 get user id for portfolio 29885399 get sub ptf for main ptf 29885399, type 3726 and hashtags ['Carton_gris', 'papier', 'metal', 'environnement', 'cartonnette', 'Teint_Dans_La_Masse', 'mal_croppe', 'flou', 'plastique', 'Carton_brun', 'autre_refus', 'kraft'] 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`=29885399 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','papier','metal','environnement','cartonnette','Teint_Dans_La_Masse','mal_croppe','flou','plastique','Carton_brun','autre_refus','kraft')) 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`=29885399 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','papier','metal','environnement','cartonnette','Teint_Dans_La_Masse','mal_croppe','flou','plastique','Carton_brun','autre_refus','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 29885399, 'sub_port_id': 29885444, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444530, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 29)}, 'Carton_brun': {'main_port_id': 29885399, 'sub_port_id': 29885445, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444531, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 29)}, 'flou': {'main_port_id': 29885399, 'sub_port_id': 29885446, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444532, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 29)}, 'autre_refus': {'main_port_id': 29885399, 'sub_port_id': 29885447, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444533, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 29)}, 'kraft': {'main_port_id': 29885399, 'sub_port_id': 29885448, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444534, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 29)}, 'metal': {'main_port_id': 29885399, 'sub_port_id': 29885449, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444535, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 29)}, 'papier': {'main_port_id': 29885399, 'sub_port_id': 29885450, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444536, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 29)}, 'environnement': {'main_port_id': 29885399, 'sub_port_id': 29885451, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444537, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 29)}, 'Carton_gris': {'main_port_id': 29885399, 'sub_port_id': 29885452, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444538, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 29885399, 'sub_port_id': 29885453, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444539, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 29)}, 'plastique': {'main_port_id': 29885399, 'sub_port_id': 29885454, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444540, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 29)}, 'cartonnette': {'main_port_id': 29885399, 'sub_port_id': 29885455, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444541, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 29)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29885444 , 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=29885399 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 (29885444) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29885399) result : ((1402136359,), (1402136362,), (1402136365,), (1402136383,), (1402136386,), (1402136388,), (1402136390,), (1402136393,), (1402136407,), (1402136408,), (1402136409,), (1402136410,), (1402136412,), (1402137035,), (1402137045,), (1402137089,), (1402137175,)) 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 29885445 , 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=29885399 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 (29885445) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29885399) result : ((1402136359,), (1402136362,), (1402136365,), (1402136383,), (1402136386,), (1402136388,), (1402136390,), (1402136393,), (1402136407,), (1402136408,), (1402136409,), (1402136410,), (1402136412,), (1402137035,), (1402137045,), (1402137089,), (1402137175,)) 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 29885446 , 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=29885399 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 (29885446) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29885399) result : ((1402136359,), (1402136362,), (1402136365,), (1402136383,), (1402136386,), (1402136388,), (1402136390,), (1402136393,), (1402136407,), (1402136408,), (1402136409,), (1402136410,), (1402136412,), (1402137035,), (1402137045,), (1402137089,), (1402137175,)) 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 29885447 , 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=29885399 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 (29885447) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29885399) result : ((1402136359,), (1402136362,), (1402136365,), (1402136383,), (1402136386,), (1402136388,), (1402136390,), (1402136393,), (1402136407,), (1402136408,), (1402136409,), (1402136410,), (1402136412,), (1402137035,), (1402137045,), (1402137089,), (1402137175,)) 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 29885448 , 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=29885399 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 (29885448) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29885399) result : ((1402136359,), (1402136362,), (1402136365,), (1402136383,), (1402136386,), (1402136388,), (1402136390,), (1402136393,), (1402136407,), (1402136408,), (1402136409,), (1402136410,), (1402136412,), (1402137035,), (1402137045,), (1402137089,), (1402137175,)) 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 29885449 , 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=29885399 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 (29885449) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29885399) result : ((1402136359,), (1402136362,), (1402136365,), (1402136383,), (1402136386,), (1402136388,), (1402136390,), (1402136393,), (1402136407,), (1402136408,), (1402136409,), (1402136410,), (1402136412,), (1402137035,), (1402137045,), (1402137089,), (1402137175,)) 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 29885450 , 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=29885399 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 (29885450) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29885399) result : ((1402136359,), (1402136362,), (1402136365,), (1402136383,), (1402136386,), (1402136388,), (1402136390,), (1402136393,), (1402136407,), (1402136408,), (1402136409,), (1402136410,), (1402136412,), (1402137035,), (1402137045,), (1402137089,), (1402137175,)) 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 29885451 , 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=29885399 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 (29885451) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29885399) result : ((1402136359,), (1402136362,), (1402136365,), (1402136383,), (1402136386,), (1402136388,), (1402136390,), (1402136393,), (1402136407,), (1402136408,), (1402136409,), (1402136410,), (1402136412,), (1402137035,), (1402137045,), (1402137089,), (1402137175,)) 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 29885452 , 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=29885399 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 (29885452) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29885399) result : ((1402136359,), (1402136362,), (1402136365,), (1402136383,), (1402136386,), (1402136388,), (1402136390,), (1402136393,), (1402136407,), (1402136408,), (1402136409,), (1402136410,), (1402136412,), (1402137035,), (1402137045,), (1402137089,), (1402137175,)) 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 29885453 , 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=29885399 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 (29885453) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29885399) result : ((1402136359,), (1402136362,), (1402136365,), (1402136383,), (1402136386,), (1402136388,), (1402136390,), (1402136393,), (1402136407,), (1402136408,), (1402136409,), (1402136410,), (1402136412,), (1402137035,), (1402137045,), (1402137089,), (1402137175,)) 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 29885454 , 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=29885399 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 (29885454) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29885399) result : ((1402136359,), (1402136362,), (1402136365,), (1402136383,), (1402136386,), (1402136388,), (1402136390,), (1402136393,), (1402136407,), (1402136408,), (1402136409,), (1402136410,), (1402136412,), (1402137035,), (1402137045,), (1402137089,), (1402137175,)) 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 29885455 , 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=29885399 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 (29885455) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29885399) result : ((1402136359,), (1402136362,), (1402136365,), (1402136383,), (1402136386,), (1402136388,), (1402136390,), (1402136393,), (1402136407,), (1402136408,), (1402136409,), (1402136410,), (1402136412,), (1402137035,), (1402137045,), (1402137089,), (1402137175,)) 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`=29885399 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','papier','metal','environnement','cartonnette','Teint_Dans_La_Masse','mal_croppe','flou','plastique','Carton_brun','autre_refus','kraft')) 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`=29885399 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','papier','metal','environnement','cartonnette','Teint_Dans_La_Masse','mal_croppe','flou','plastique','Carton_brun','autre_refus','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 29885399, 'sub_port_id': 29885456, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444542, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 31)}, 'Carton_brun': {'main_port_id': 29885399, 'sub_port_id': 29885457, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444543, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 31)}, 'flou': {'main_port_id': 29885399, 'sub_port_id': 29885458, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444544, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 31)}, 'autre_refus': {'main_port_id': 29885399, 'sub_port_id': 29885459, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444545, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 31)}, 'kraft': {'main_port_id': 29885399, 'sub_port_id': 29885460, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444546, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 31)}, 'metal': {'main_port_id': 29885399, 'sub_port_id': 29885461, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444547, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 31)}, 'papier': {'main_port_id': 29885399, 'sub_port_id': 29885462, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444548, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 31)}, 'environnement': {'main_port_id': 29885399, 'sub_port_id': 29885463, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444549, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 31)}, 'Carton_gris': {'main_port_id': 29885399, 'sub_port_id': 29885464, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444550, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 31)}, 'Teint_Dans_La_Masse': {'main_port_id': 29885399, 'sub_port_id': 29885465, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444551, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 31)}, 'plastique': {'main_port_id': 29885399, 'sub_port_id': 29885466, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444552, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 31)}, 'cartonnette': {'main_port_id': 29885399, 'sub_port_id': 29885467, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20444553, 'last_updated_at': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_desc': datetime.datetime(2026, 1, 2, 11, 3, 31), 'last_updated_at_asc': datetime.datetime(2026, 1, 2, 11, 3, 31)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29885456,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29885444 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29885457,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29885445 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29885458,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29885446 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29885459,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29885447 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29885460,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29885448 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29885461,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29885449 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29885462,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29885450 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29885463,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29885451 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29885464,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29885452 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29885465,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29885453 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29885466,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29885454 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29885467,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29885455 lien utilise dans velours : https://marlene.fotonower.com/velours/29885456,29885457,29885458,29885459,29885460,29885461,29885462,29885463,29885464,29885465,29885466,29885467?tags=mal_croppe,Carton_brun,flou,autre_refus,kraft,metal,papier,environnement,Carton_gris,Teint_Dans_La_Masse,plastique,cartonnette After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29885399]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1402137175, 1402137089, 1402137045, 1402137035, 1402136412, 1402136410, 1402136409, 1402136408, 1402136407, 1402136393, 1402136390, 1402136388, 1402136386, 1402136383] map_info['map_portfolio_photo'] : {29885399: [1402137175, 1402137089, 1402137045, 1402137035, 1402136412, 1402136410, 1402136409, 1402136408, 1402136407, 1402136393, 1402136390, 1402136388, 1402136386, 1402136383, 1402136365, 1402136362, 1402136359]} final : False mtd_id 4302 list_pids : [1402137175, 1402137089, 1402137045, 1402137035, 1402136412, 1402136410, 1402136409, 1402136408, 1402136407, 1402136393, 1402136390, 1402136388, 1402136386, 1402136383] Looping around the photos to save general results len do output : 1 /29885399. 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, '4302470') ('4302', '29885399', '1402137175', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402137089', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402137045', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402137035', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136412', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136410', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136409', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136408', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136407', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136393', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136390', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136388', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136386', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136383', None, None, None, None, None, '4302470') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 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, '29885399', "{'mal_croppe': 29885444, 'Carton_brun': 29885445, 'flou': 29885446, 'autre_refus': 29885447, 'kraft': 29885448, 'metal': 29885449, 'papier': 29885450, 'environnement': 29885451, 'Carton_gris': 29885452, 'Teint_Dans_La_Masse': 29885453, 'plastique': 29885454, 'cartonnette': 29885455}", None, None, None, None, '4302470'), ('4302', '29885399', '1402137175', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402137089', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402137045', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402137035', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136412', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136410', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136409', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136408', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136407', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136393', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136390', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136388', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136386', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136383', None, None, None, None, None, '4302470')] time used for this insertion : 0.016596555709838867 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.810225248336792 time spend to save output : 0.016899585723876953 total time spend for step 1 : 1.827124834060669 step2:final Fri Jan 2 11:05:00 2026 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 (29885399) 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 29885399 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1402136365,1402136362,1402136359,1402136393,1402136390,1402136388,1402136386,1402136383,1402136412,1402136410,1402136409,1402136408,1402136407,1402137175,1402137089,1402137045,1402137035); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29885399]) Inside saveOutput : final : False verbose : True original output for save of step final : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ('0.0',), 1402136383: ('0.0',)} new output for save of step final : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ('0.0',), 1402136383: ('0.0',)} [1402137175, 1402137089, 1402137045, 1402137035, 1402136412, 1402136410, 1402136409, 1402136408, 1402136407, 1402136393, 1402136390, 1402136388, 1402136386, 1402136383] map_info['map_portfolio_photo'] : {29885399: [1402137175, 1402137089, 1402137045, 1402137035, 1402136412, 1402136410, 1402136409, 1402136408, 1402136407, 1402136393, 1402136390, 1402136388, 1402136386, 1402136383, 1402136365, 1402136362, 1402136359]} final : False mtd_id 4302 list_pids : [1402137175, 1402137089, 1402137045, 1402137035, 1402136412, 1402136410, 1402136409, 1402136408, 1402136407, 1402136393, 1402136390, 1402136388, 1402136386, 1402136383] Looping around the photos to save general results len do output : 14 /1402137175.Didn't retrieve data . /1402137089.Didn't retrieve data . /1402137045.Didn't retrieve data . /1402137035.Didn't retrieve data . /1402136412.Didn't retrieve data . /1402136410.Didn't retrieve data . /1402136409.Didn't retrieve data . /1402136408.Didn't retrieve data . /1402136407.Didn't retrieve data . /1402136393.Didn't retrieve data . /1402136390.Didn't retrieve data . /1402136388.Didn't retrieve data . /1402136386.Didn't retrieve data . /1402136383.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, '4302470') ('4302', '29885399', '1402137175', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402137089', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402137045', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402137035', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136412', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136410', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136409', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136408', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136407', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136393', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136390', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136388', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136386', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136383', None, None, None, None, None, '4302470') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 42 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', '29885399', '1402137175', '0.0', None, None, None, None, '4302470'), ('4302', '29885399', '1402137089', '0.0', None, None, None, None, '4302470'), ('4302', '29885399', '1402137045', '0.0', None, None, None, None, '4302470'), ('4302', '29885399', '1402137035', '0.0', None, None, None, None, '4302470'), ('4302', '29885399', '1402136412', '0.0', None, None, None, None, '4302470'), ('4302', '29885399', '1402136410', '0.0', None, None, None, None, '4302470'), ('4302', '29885399', '1402136409', '0.0', None, None, None, None, '4302470'), ('4302', '29885399', '1402136408', '0.0', None, None, None, None, '4302470'), ('4302', '29885399', '1402136407', '0.0', None, None, None, None, '4302470'), ('4302', '29885399', '1402136393', '0.0', None, None, None, None, '4302470'), ('4302', '29885399', '1402136390', '0.0', None, None, None, None, '4302470'), ('4302', '29885399', '1402136388', '0.0', None, None, None, None, '4302470'), ('4302', '29885399', '1402136386', '0.0', None, None, None, None, '4302470'), ('4302', '29885399', '1402136383', '0.0', None, None, None, None, '4302470')] time used for this insertion : 0.016178131103515625 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06229591369628906 time spend to save output : 0.016846179962158203 total time spend for step 2 : 0.07914209365844727 step3:velours_tree Fri Jan 2 11:05:00 2026 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 : {29885399: [{'mal_croppe': 29885444, 'Carton_brun': 29885445, 'flou': 29885446, 'autre_refus': 29885447, 'kraft': 29885448, 'metal': 29885449, 'papier': 29885450, 'environnement': 29885451, 'Carton_gris': 29885452, 'Teint_Dans_La_Masse': 29885453, 'plastique': 29885454, 'cartonnette': 29885455}]} input_args_next_step : {29885399: ()} output_args : {29885399: [{'mal_croppe': 29885444, 'Carton_brun': 29885445, 'flou': 29885446, 'autre_refus': 29885447, 'kraft': 29885448, 'metal': 29885449, 'papier': 29885450, 'environnement': 29885451, 'Carton_gris': 29885452, 'Teint_Dans_La_Masse': 29885453, 'plastique': 29885454, 'cartonnette': 29885455}]} args : 29885399 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'mal_croppe': 29885444, 'Carton_brun': 29885445, 'flou': 29885446, 'autre_refus': 29885447, 'kraft': 29885448, 'metal': 29885449, 'papier': 29885450, 'environnement': 29885451, 'Carton_gris': 29885452, 'Teint_Dans_La_Masse': 29885453, 'plastique': 29885454, 'cartonnette': 29885455},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29885399) 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([29885399]) 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.27957630157470703 time spend to save output : 6.0558319091796875e-05 total time spend for step 3 : 0.27963685989379883 step4:send_mail_cod Fri Jan 2 11:05:00 2026 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 : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ('0.0',), 1402136383: ('0.0',)} input_args_next_step : {1402137175: ()} output_args : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ('0.0',), 1402136383: ('0.0',)} args : 1402137175 depend.output_id : 0 input_args_next_step : {1402137175: ('0.0',), 1402137089: ()} output_args : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ('0.0',), 1402136383: ('0.0',)} args : 1402137089 depend.output_id : 0 input_args_next_step : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ()} output_args : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ('0.0',), 1402136383: ('0.0',)} args : 1402137045 depend.output_id : 0 input_args_next_step : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ()} output_args : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ('0.0',), 1402136383: ('0.0',)} args : 1402137035 depend.output_id : 0 input_args_next_step : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ()} output_args : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ('0.0',), 1402136383: ('0.0',)} args : 1402136412 depend.output_id : 0 input_args_next_step : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ()} output_args : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ('0.0',), 1402136383: ('0.0',)} args : 1402136410 depend.output_id : 0 input_args_next_step : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ()} output_args : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ('0.0',), 1402136383: ('0.0',)} args : 1402136409 depend.output_id : 0 input_args_next_step : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ()} output_args : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ('0.0',), 1402136383: ('0.0',)} args : 1402136408 depend.output_id : 0 input_args_next_step : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ()} output_args : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ('0.0',), 1402136383: ('0.0',)} args : 1402136407 depend.output_id : 0 input_args_next_step : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ()} output_args : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ('0.0',), 1402136383: ('0.0',)} args : 1402136393 depend.output_id : 0 input_args_next_step : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ()} output_args : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ('0.0',), 1402136383: ('0.0',)} args : 1402136390 depend.output_id : 0 input_args_next_step : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ()} output_args : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ('0.0',), 1402136383: ('0.0',)} args : 1402136388 depend.output_id : 0 input_args_next_step : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ()} output_args : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ('0.0',), 1402136383: ('0.0',)} args : 1402136386 depend.output_id : 0 input_args_next_step : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ('0.0',), 1402136383: ()} output_args : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ('0.0',), 1402136383: ('0.0',)} args : 1402136383 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 : {29885399: [{'mal_croppe': 29885444, 'Carton_brun': 29885445, 'flou': 29885446, 'autre_refus': 29885447, 'kraft': 29885448, 'metal': 29885449, 'papier': 29885450, 'environnement': 29885451, 'Carton_gris': 29885452, 'Teint_Dans_La_Masse': 29885453, 'plastique': 29885454, 'cartonnette': 29885455}]} input_args_next_step : {1402137175: ('0.0',), 1402137089: ('0.0',), 1402137045: ('0.0',), 1402137035: ('0.0',), 1402136412: ('0.0',), 1402136410: ('0.0',), 1402136409: ('0.0',), 1402136408: ('0.0',), 1402136407: ('0.0',), 1402136393: ('0.0',), 1402136390: ('0.0',), 1402136388: ('0.0',), 1402136386: ('0.0',), 1402136383: ('0.0',), 29885399: ()} output_args : {29885399: [{'mal_croppe': 29885444, 'Carton_brun': 29885445, 'flou': 29885446, 'autre_refus': 29885447, 'kraft': 29885448, 'metal': 29885449, 'papier': 29885450, 'environnement': 29885451, 'Carton_gris': 29885452, 'Teint_Dans_La_Masse': 29885453, 'plastique': 29885454, 'cartonnette': 29885455}]} args : 29885399 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 :15, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29885399) 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 (1402137175,1402137089,1402137045,1402137035,1402136412,1402136410,1402136409,1402136408,1402136407,1402136393,1402136390,1402136388,1402136386,1402136383) Found this number of photos: 14 ##### Call download_photos : nb_thread : 5 begin to download photo : 1402136383 begin to download photo : 1402136390 begin to download photo : 1402136408 begin to download photo : 1402136412 begin to download photo : 1402137089 download finish for photo 1402136408 begin to download photo : 1402136409 download finish for photo 1402136390 begin to download photo : 1402136393 download finish for photo 1402136383 begin to download photo : 1402136386 download finish for photo 1402136412 begin to download photo : 1402137035 download finish for photo 1402137089 begin to download photo : 1402137175 download finish for photo 1402136393 begin to download photo : 1402136407 download finish for photo 1402137035 begin to download photo : 1402137045 download finish for photo 1402137175 download finish for photo 1402136409 begin to download photo : 1402136410 download finish for photo 1402136386 begin to download photo : 1402136388 download finish for photo 1402136407 download finish for photo 1402137045 download finish for photo 1402136388 download finish for photo 1402136410 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette298854441767348301/ imagette298854461767348301/ imagette298854471767348301/ imagette298854481767348301/ imagette298854491767348301/ imagette298854541767348301/ imagette298854551767348301/ imagette298854451767348301/ imagette298854521767348301/ imagette298854531767348301/ length of list_filenames : 14 ; length of list_pids : 14 ; length of list_args : 14 results_Auto_P29885399_02-01-2026_11_05_01.pdf 29885444 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=29885444 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298854441767348301 29885446 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=29885446 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298854461767348301 29885447 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=29885447 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298854471767348301 29885448 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=29885448 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298854481767348301 29885449 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=29885449 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298854491767348301 29885454 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=29885454 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298854541767348301 29885455 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=29885455 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298854551767348301 29885445 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=29885445 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298854451767348301 29885452 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=29885452 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298854521767348301 29885453 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=29885453 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette298854531767348301 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=29885399 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/29885456,29885457,29885458,29885459,29885460,29885461,29885462,29885463,29885464,29885465,29885466,29885467?tags=mal_croppe,Carton_brun,flou,autre_refus,kraft,metal,papier,environnement,Carton_gris,Teint_Dans_La_Masse,plastique,cartonnette your option no_mail is active, we will not send the real mail to your client args[1402137175] : ('0.0',) no score found for photo 1402137175 We are sending mail with results at report@fotonower.com args[1402137089] : ('0.0',) no score found for photo 1402137089 We are sending mail with results at report@fotonower.com args[1402137045] : ('0.0',) no score found for photo 1402137045 We are sending mail with results at report@fotonower.com args[1402137035] : ('0.0',) no score found for photo 1402137035 We are sending mail with results at report@fotonower.com args[1402136412] : ('0.0',) no score found for photo 1402136412 We are sending mail with results at report@fotonower.com args[1402136410] : ('0.0',) no score found for photo 1402136410 We are sending mail with results at report@fotonower.com args[1402136409] : ('0.0',) no score found for photo 1402136409 We are sending mail with results at report@fotonower.com args[1402136408] : ('0.0',) no score found for photo 1402136408 We are sending mail with results at report@fotonower.com args[1402136407] : ('0.0',) no score found for photo 1402136407 We are sending mail with results at report@fotonower.com args[1402136393] : ('0.0',) no score found for photo 1402136393 We are sending mail with results at report@fotonower.com args[1402136390] : ('0.0',) no score found for photo 1402136390 We are sending mail with results at report@fotonower.com args[1402136388] : ('0.0',) no score found for photo 1402136388 We are sending mail with results at report@fotonower.com args[1402136386] : ('0.0',) no score found for photo 1402136386 We are sending mail with results at report@fotonower.com args[1402136383] : ('0.0',) no score found for photo 1402136383 We are sending mail with results at report@fotonower.com refus_total : 0.0 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29885399 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_P29885399_02-01-2026_11_05_01.pdf results_Auto_P29885399_02-01-2026_11_05_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29885399_02-01-2026_11_05_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','29885399','results_Auto_P29885399_02-01-2026_11_05_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29885399_02-01-2026_11_05_01.pdf','pdf','','0.12','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29885399]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1402137175, 1402137089, 1402137045, 1402137035, 1402136412, 1402136410, 1402136409, 1402136408, 1402136407, 1402136393, 1402136390, 1402136388, 1402136386, 1402136383] map_info['map_portfolio_photo'] : {29885399: [1402137175, 1402137089, 1402137045, 1402137035, 1402136412, 1402136410, 1402136409, 1402136408, 1402136407, 1402136393, 1402136390, 1402136388, 1402136386, 1402136383, 1402136365, 1402136362, 1402136359]} final : False mtd_id 4302 list_pids : [1402137175, 1402137089, 1402137045, 1402137035, 1402136412, 1402136410, 1402136409, 1402136408, 1402136407, 1402136393, 1402136390, 1402136388, 1402136386, 1402136383] 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, '4302470') ('4302', '29885399', '1402137175', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402137089', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402137045', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402137035', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136412', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136410', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136409', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136408', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136407', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136393', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136390', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136388', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136386', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136383', None, None, None, None, None, '4302470') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '29885399', '1402137175', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402137089', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402137045', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402137035', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136412', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136410', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136409', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136408', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136407', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136393', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136390', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136388', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136386', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136383', None, None, None, None, None, '4302470')] time used for this insertion : 0.018319129943847656 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.7998602390289307 time spend to save output : 0.0185854434967041 total time spend for step 4 : 1.8184456825256348 step5:split_time_score Fri Jan 2 11:05:02 2026 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 : ['29885399'] 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 : [('29885399',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29885399) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1402137089: {'path': 'temp/1767348300_1443615_1402137089_034ef2fc1174c0ee32f8c5c9055ec124.jpg', 'extension': 'jpg'}, 1402137175: {'path': 'temp/1767348300_1443615_1402137175_134c85b966ce4c100635518cc669ecc9.jpg', 'extension': 'jpg'}, 1402136390: {'path': 'temp/1767348300_1443615_1402136390_3b183da92ff1fc2ef5d5723ff63315c2.jpg', 'extension': 'jpg'}, 1402136393: {'path': 'temp/1767348300_1443615_1402136393_c001341dd478f2e0c2fd8281943936fe.jpg', 'extension': 'jpg'}, 1402136407: {'path': 'temp/1767348300_1443615_1402136407_b54ad02b58b145ab9b435092cfcfae3e.jpg', 'extension': 'jpg'}, 1402136412: {'path': 'temp/1767348300_1443615_1402136412_63e94db950eb7c19523a13274f6c94dc.jpg', 'extension': 'jpg'}, 1402137035: {'path': 'temp/1767348300_1443615_1402137035_cf0fafec319a4acdf3ca5fd38da0c9db.jpg', 'extension': 'jpg'}, 1402137045: {'path': 'temp/1767348300_1443615_1402137045_d2435d9276ea2ba0a84135824e86c9fe.jpg', 'extension': 'jpg'}, 1402136383: {'path': 'temp/1767348300_1443615_1402136383_1a0ba7a354ea65aeed1502292c85db2a.jpg', 'extension': 'jpg'}, 1402136386: {'path': 'temp/1767348300_1443615_1402136386_e00f09054e06e6762e07c7e1ed2d28c8.jpg', 'extension': 'jpg'}, 1402136388: {'path': 'temp/1767348300_1443615_1402136388_bf5778fa613dd002cfd0796d70e92fbc.jpg', 'extension': 'jpg'}, 1402136408: {'path': 'temp/1767348300_1443615_1402136408_45182509cc4637348880ea4b82d731e2.jpg', 'extension': 'jpg'}, 1402136409: {'path': 'temp/1767348300_1443615_1402136409_c8a1e2d9d0028584a56c9670118564ff.jpg', 'extension': 'jpg'}, 1402136410: {'path': 'temp/1767348300_1443615_1402136410_25877622281951802ffdfd66ff393985.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 = 29885399; (('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 = 29885399 group by h (('11', 17),) 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=29885399 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 (29885399) 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 (29885399) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 02012026 29885399 Nombre de photos uploadées : 17 / 23040 (0%) 02012026 29885399 Nombre de photos taguées (types de déchets): 0 / 17 (0%) 02012026 29885399 Nombre de photos taguées (volume) : 0 / 17 (0%) [{'photo_id': 1402136365, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/2/1f4ce908f4a78d9cc58a538c3c8fce34.jpg', 'username': None, 'uploaded_at': 1767348067, 'text': 'image_02012026_11_00_13_10205.jpg'}, {'photo_id': 1402136362, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/2/b6df88162c2f0494fcc78515bf257ed5.jpg', 'username': None, 'uploaded_at': 1767348067, 'text': 'image_02012026_11_00_24_10140.jpg'}, {'photo_id': 1402136359, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/2/1bb9a0b999ca5564029dd8a99cb11736.jpg', 'username': None, 'uploaded_at': 1767348067, 'text': 'image_02012026_11_00_34_10138.jpg'}, {'photo_id': 1402136393, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2026/1/2/c001341dd478f2e0c2fd8281943936fe.jpg', 'username': None, 'uploaded_at': 1767348127, 'text': 'image_02012026_11_00_54_10138.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.86102294921875e-06 elapsed_time : order_list_meta_photo_and_scores 9.298324584960938e-06 ????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0009002685546875 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 29885399, '2026-01-02' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2026-01-02' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2829505,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.2539808750152588 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= 2829505 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2829505, 'dashboard_run_id': 2838649, 'mtr_portfolio_id': 29875698, 'dashboard_result_id': 18936484, '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_P29875698_02-01-2026_06_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29875700, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29875701, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29875702, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29875703, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29875704, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29875705, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29875706, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29875707, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29875708, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29875709, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29875710, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29875711, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2838649, 'mtr_portfolio_id': 29875852, 'dashboard_result_id': 18936485, '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_P29875852_02-01-2026_06_33_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29875855, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29875856, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29875857, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29875858, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29875859, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29875860, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29875861, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29875862, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29875863, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29875864, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29875865, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29875866, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2838649, 'mtr_portfolio_id': 29876194, 'dashboard_result_id': 18936486, '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_P29876194_02-01-2026_06_52_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 29876199, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29876200, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29876201, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29876202, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29876203, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29876204, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29876205, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29876206, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29876207, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29876208, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29876209, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29876210, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2838649, 'mtr_portfolio_id': 29876652, 'dashboard_result_id': 18936487, '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_P29876652_02-01-2026_07_03_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29876653, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29876654, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29876655, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29876656, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29876657, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29876658, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29876659, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29876660, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29876661, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29876662, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29876663, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29876664, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2838649, 'mtr_portfolio_id': 29876801, 'dashboard_result_id': 18936488, '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_P29876801_02-01-2026_07_16_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29876851, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29876852, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29876853, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29876854, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29876855, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29876856, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29876857, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29876858, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29876859, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29876860, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29876861, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29876862, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2838649, 'mtr_portfolio_id': 29877372, 'dashboard_result_id': 18936489, '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_P29877372_02-01-2026_07_33_34.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29877428, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29877429, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29877430, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29877431, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29877432, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29877433, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29877434, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29877435, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29877436, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29877437, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29877438, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29877439, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2838649, 'mtr_portfolio_id': 29878166, 'dashboard_result_id': 18936490, '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_P29878166_02-01-2026_07_49_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29878167, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29878168, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29878169, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29878170, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29878171, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29878172, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29878173, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29878174, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29878175, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29878176, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29878177, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29878178, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2838649, 'mtr_portfolio_id': 29879046, 'dashboard_result_id': 18936491, '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_P29879046_02-01-2026_08_02_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29879072, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29879073, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29879074, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29879075, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29879076, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29879077, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29879078, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29879079, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29879080, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29879081, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29879082, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29879083, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2838649, 'mtr_portfolio_id': 29879603, 'dashboard_result_id': 18936492, '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_P29879603_02-01-2026_08_21_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29879618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29879619, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29879620, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29879621, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29879622, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29879623, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29879624, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29879625, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29879626, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29879627, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29879628, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29879629, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2838649, 'mtr_portfolio_id': 29880964, 'dashboard_result_id': 18936493, '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_P29880964_02-01-2026_09_32_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29880989, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29880990, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29880991, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29880992, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29880993, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29880994, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29880995, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29880996, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29880997, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29880998, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29880999, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29881000, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2838649, 'mtr_portfolio_id': 29882264, 'dashboard_result_id': 18936494, '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_P29882264_02-01-2026_09_46_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29882286, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29882287, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29882288, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29882289, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29882290, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29882291, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29882292, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29882293, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29882294, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29882295, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29882296, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29882297, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2838649, 'mtr_portfolio_id': 29882750, 'dashboard_result_id': 18936495, '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_P29882750_02-01-2026_10_03_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29882754, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29882755, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29882756, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29882757, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29882758, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29882759, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29882760, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29882761, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29882762, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29882763, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29882764, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29882765, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2838649, 'mtr_portfolio_id': 29883285, 'dashboard_result_id': 18936496, '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_P29883285_02-01-2026_10_17_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29883321, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29883322, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29883323, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29883324, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29883325, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29883326, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29883327, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29883328, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29883329, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29883330, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29883331, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29883332, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2838649, 'mtr_portfolio_id': 29883844, 'dashboard_result_id': 18936497, '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_P29883844_02-01-2026_10_32_57.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29883853, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29883854, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29883855, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29883856, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29883857, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29883858, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29883859, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29883860, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29883861, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29883862, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29883863, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29883864, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2838649, 'mtr_portfolio_id': 29884459, 'dashboard_result_id': 18936498, '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_P29884459_02-01-2026_10_51_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29884482, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29884484, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29884485, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29884486, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29884487, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29884488, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29884489, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29884490, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29884491, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29884492, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29884493, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29884494, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2838649, 'mtr_portfolio_id': 29885052, 'dashboard_result_id': 18936499, '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_P29885052_02-01-2026_11_03_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29885054, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29885055, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29885056, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29885057, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29885058, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29885059, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29885060, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29885061, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29885062, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29885063, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29885064, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29885065, 'pht': 3726}}"}, {'dashboat_entry_day': 2829505, 'dashboard_run_id': 2838649, 'mtr_portfolio_id': 29885399, 'dashboard_result_id': 18936500, '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_P29885399_02-01-2026_11_03_32.pdf'}"}] 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 = 29875698 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': 4301255, 'mtr_portfolio_id': 29875698, 'created_at': datetime.datetime(2026, 1, 2, 6, 16, 59), 'result': '0.07492098906161705', 'result_long': None, 'result_double': None}] Qualite : 0.07492098906161705 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29875698 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29875698_02-01-2026_06_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29875698 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_P29875698_02-01-2026_06_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29875700, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29875701, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29875702, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29875703, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29875704, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29875705, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29875706, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29875707, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29875708, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29875709, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29875710, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29875711, 'pht': 3726}}" where mtr_portfolio_id = 29875698 and dashboard_run_id = 2838649 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`=29875698 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18936484, 0.07492098906161705, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29875698_02-01-2026_06_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29875700, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29875701, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29875702, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29875703, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29875704, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29875705, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29875706, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29875707, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29875708, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29875709, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29875710, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29875711, '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 = 29875852 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': 4301270, 'mtr_portfolio_id': 29875852, 'created_at': datetime.datetime(2026, 1, 2, 6, 33), 'result': '0.04900243563743138', 'result_long': None, 'result_double': None}] Qualite : 0.04900243563743138 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29875852 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29875852_02-01-2026_06_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29875852 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_P29875852_02-01-2026_06_33_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29875855, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29875856, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29875857, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29875858, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29875859, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29875860, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29875861, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29875862, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29875863, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29875864, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29875865, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29875866, 'pht': 3726}}" where mtr_portfolio_id = 29875852 and dashboard_run_id = 2838649 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`=29875852 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18936485, 0.04900243563743138, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29875852_02-01-2026_06_33_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29875855, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29875856, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29875857, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29875858, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29875859, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29875860, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29875861, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29875862, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29875863, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29875864, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29875865, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29875866, '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 = 29876194 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': 4301315, 'mtr_portfolio_id': 29876194, 'created_at': datetime.datetime(2026, 1, 2, 6, 52, 31), 'result': '0.05190981045133743', 'result_long': None, 'result_double': None}] Qualite : 0.05190981045133743 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29876194 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29876194_02-01-2026_06_52_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29876194 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_P29876194_02-01-2026_06_52_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 29876199, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29876200, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29876201, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29876202, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29876203, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29876204, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29876205, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29876206, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29876207, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29876208, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29876209, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29876210, 'pht': 3726}}" where mtr_portfolio_id = 29876194 and dashboard_run_id = 2838649 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`=29876194 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18936486, 0.05190981045133743, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29876194_02-01-2026_06_52_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 29876199, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29876200, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29876201, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29876202, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29876203, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29876204, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29876205, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29876206, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29876207, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29876208, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29876209, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29876210, '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 = 29876652 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': 4301388, 'mtr_portfolio_id': 29876652, 'created_at': datetime.datetime(2026, 1, 2, 7, 2, 59), 'result': '0.05348336988569866', 'result_long': None, 'result_double': None}] Qualite : 0.05348336988569866 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29876652 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29876652_02-01-2026_07_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29876652 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_P29876652_02-01-2026_07_03_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29876653, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29876654, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29876655, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29876656, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29876657, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29876658, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29876659, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29876660, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29876661, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29876662, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29876663, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29876664, 'pht': 3726}}" where mtr_portfolio_id = 29876652 and dashboard_run_id = 2838649 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`=29876652 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18936487, 0.05348336988569866, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29876652_02-01-2026_07_03_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29876653, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29876654, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29876655, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29876656, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29876657, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29876658, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29876659, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29876660, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29876661, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29876662, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29876663, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29876664, '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 = 29876801 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': 4301433, 'mtr_portfolio_id': 29876801, 'created_at': datetime.datetime(2026, 1, 2, 7, 16, 58), 'result': '0.04076281109278468', 'result_long': None, 'result_double': None}] Qualite : 0.04076281109278468 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29876801 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29876801_02-01-2026_07_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29876801 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_P29876801_02-01-2026_07_16_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29876851, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29876852, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29876853, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29876854, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29876855, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29876856, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29876857, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29876858, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29876859, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29876860, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29876861, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29876862, 'pht': 3726}}" where mtr_portfolio_id = 29876801 and dashboard_run_id = 2838649 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`=29876801 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18936488, 0.04076281109278468, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29876801_02-01-2026_07_16_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29876851, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29876852, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29876853, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29876854, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29876855, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29876856, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29876857, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29876858, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29876859, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29876860, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29876861, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29876862, '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 = 29877372 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': 4301509, 'mtr_portfolio_id': 29877372, 'created_at': datetime.datetime(2026, 1, 2, 7, 33, 34), 'result': '0.07603382662942415', 'result_long': None, 'result_double': None}] Qualite : 0.07603382662942415 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29877372 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29877372_02-01-2026_07_33_34.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29877372 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_P29877372_02-01-2026_07_33_34.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29877428, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29877429, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29877430, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29877431, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29877432, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29877433, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29877434, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29877435, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29877436, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29877437, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29877438, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29877439, 'pht': 3726}}" where mtr_portfolio_id = 29877372 and dashboard_run_id = 2838649 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`=29877372 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18936489, 0.07603382662942415, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29877372_02-01-2026_07_33_34.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29877428, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29877429, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29877430, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29877431, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29877432, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29877433, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29877434, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29877435, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29877436, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29877437, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29877438, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29877439, '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 = 29878166 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': 4301599, 'mtr_portfolio_id': 29878166, 'created_at': datetime.datetime(2026, 1, 2, 7, 48, 59), 'result': '0.05564820976051616', 'result_long': None, 'result_double': None}] Qualite : 0.05564820976051616 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29878166 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29878166_02-01-2026_07_49_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29878166 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_P29878166_02-01-2026_07_49_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29878167, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29878168, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29878169, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29878170, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29878171, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29878172, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29878173, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29878174, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29878175, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29878176, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29878177, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29878178, 'pht': 3726}}" where mtr_portfolio_id = 29878166 and dashboard_run_id = 2838649 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`=29878166 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18936490, 0.05564820976051616, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29878166_02-01-2026_07_49_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29878167, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29878168, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29878169, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29878170, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29878171, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29878172, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29878173, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29878174, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29878175, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29878176, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29878177, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29878178, '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 = 29879046 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': 4301685, 'mtr_portfolio_id': 29879046, 'created_at': datetime.datetime(2026, 1, 2, 8, 2, 59), 'result': '0.07583762117707248', 'result_long': None, 'result_double': None}] Qualite : 0.07583762117707248 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29879046 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29879046_02-01-2026_08_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29879046 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_P29879046_02-01-2026_08_02_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29879072, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29879073, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29879074, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29879075, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29879076, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29879077, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29879078, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29879079, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29879080, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29879081, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29879082, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29879083, 'pht': 3726}}" where mtr_portfolio_id = 29879046 and dashboard_run_id = 2838649 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`=29879046 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18936491, 0.07583762117707248, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29879046_02-01-2026_08_02_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29879072, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29879073, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29879074, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29879075, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29879076, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29879077, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29879078, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29879079, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29879080, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29879081, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29879082, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29879083, '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 = 29879603 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': 4301764, 'mtr_portfolio_id': 29879603, 'created_at': datetime.datetime(2026, 1, 2, 8, 20, 59), 'result': '0.08415306723980351', 'result_long': None, 'result_double': None}] Qualite : 0.08415306723980351 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29879603 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29879603_02-01-2026_08_21_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29879603 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_P29879603_02-01-2026_08_21_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29879618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29879619, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29879620, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29879621, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29879622, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29879623, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29879624, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29879625, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29879626, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29879627, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29879628, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29879629, 'pht': 3726}}" where mtr_portfolio_id = 29879603 and dashboard_run_id = 2838649 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`=29879603 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18936492, 0.08415306723980351, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29879603_02-01-2026_08_21_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29879618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29879619, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29879620, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29879621, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29879622, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29879623, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29879624, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29879625, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29879626, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29879627, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29879628, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29879629, '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 = 29880964 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': 4301941, 'mtr_portfolio_id': 29880964, 'created_at': datetime.datetime(2026, 1, 2, 9, 32, 58), 'result': '0.034355635543217904', 'result_long': None, 'result_double': None}] Qualite : 0.034355635543217904 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29880964 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29880964_02-01-2026_09_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29880964 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_P29880964_02-01-2026_09_32_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29880989, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29880990, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29880991, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29880992, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29880993, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29880994, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29880995, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29880996, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29880997, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29880998, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29880999, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29881000, 'pht': 3726}}" where mtr_portfolio_id = 29880964 and dashboard_run_id = 2838649 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`=29880964 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18936493, 0.034355635543217904, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29880964_02-01-2026_09_32_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29880989, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29880990, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29880991, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29880992, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29880993, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29880994, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29880995, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29880996, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29880997, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29880998, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29880999, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29881000, '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 = 29882264 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': 4302074, 'mtr_portfolio_id': 29882264, 'created_at': datetime.datetime(2026, 1, 2, 9, 46, 58), 'result': '0.055925634359195155', 'result_long': None, 'result_double': None}] Qualite : 0.055925634359195155 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29882264 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29882264_02-01-2026_09_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29882264 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_P29882264_02-01-2026_09_46_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29882286, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29882287, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29882288, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29882289, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29882290, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29882291, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29882292, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29882293, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29882294, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29882295, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29882296, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29882297, 'pht': 3726}}" where mtr_portfolio_id = 29882264 and dashboard_run_id = 2838649 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`=29882264 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18936494, 0.055925634359195155, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29882264_02-01-2026_09_46_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29882286, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29882287, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29882288, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29882289, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29882290, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29882291, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29882292, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29882293, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29882294, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29882295, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29882296, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29882297, '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 = 29882750 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': 4302114, 'mtr_portfolio_id': 29882750, 'created_at': datetime.datetime(2026, 1, 2, 10, 3), 'result': '0.04812454678514593', 'result_long': None, 'result_double': None}] Qualite : 0.04812454678514593 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29882750 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29882750_02-01-2026_10_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29882750 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_P29882750_02-01-2026_10_03_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29882754, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29882755, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29882756, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29882757, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29882758, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29882759, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29882760, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29882761, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29882762, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29882763, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29882764, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29882765, 'pht': 3726}}" where mtr_portfolio_id = 29882750 and dashboard_run_id = 2838649 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`=29882750 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18936495, 0.04812454678514593, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29882750_02-01-2026_10_03_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29882754, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29882755, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29882756, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29882757, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29882758, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29882759, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29882760, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29882761, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29882762, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29882763, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29882764, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29882765, '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 = 29883285 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': 4302179, 'mtr_portfolio_id': 29883285, 'created_at': datetime.datetime(2026, 1, 2, 10, 16, 59), 'result': '0.05391099478832504', 'result_long': None, 'result_double': None}] Qualite : 0.05391099478832504 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29883285 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29883285_02-01-2026_10_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29883285 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_P29883285_02-01-2026_10_17_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29883321, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29883322, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29883323, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29883324, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29883325, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29883326, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29883327, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29883328, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29883329, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29883330, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29883331, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29883332, 'pht': 3726}}" where mtr_portfolio_id = 29883285 and dashboard_run_id = 2838649 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`=29883285 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18936496, 0.05391099478832504, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29883285_02-01-2026_10_17_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29883321, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29883322, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29883323, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29883324, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29883325, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29883326, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29883327, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29883328, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29883329, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29883330, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29883331, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29883332, '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 = 29883844 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': 4302271, 'mtr_portfolio_id': 29883844, 'created_at': datetime.datetime(2026, 1, 2, 10, 32, 57), 'result': '0.05451822525507153', 'result_long': None, 'result_double': None}] Qualite : 0.05451822525507153 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29883844 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29883844_02-01-2026_10_32_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29883844 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_P29883844_02-01-2026_10_32_57.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29883853, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29883854, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29883855, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29883856, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29883857, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29883858, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29883859, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29883860, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29883861, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29883862, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29883863, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29883864, 'pht': 3726}}" where mtr_portfolio_id = 29883844 and dashboard_run_id = 2838651 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`=29883844 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18936497, 0.05451822525507153, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29883844_02-01-2026_10_32_57.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29883853, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29883854, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29883855, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29883856, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29883857, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29883858, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29883859, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29883860, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29883861, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29883862, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29883863, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29883864, '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 = 29884459 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': 4302343, 'mtr_portfolio_id': 29884459, 'created_at': datetime.datetime(2026, 1, 2, 10, 51), 'result': '0.09581224431587343', 'result_long': None, 'result_double': None}] Qualite : 0.09581224431587343 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29884459 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29884459_02-01-2026_10_51_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29884459 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_P29884459_02-01-2026_10_51_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29884482, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29884484, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29884485, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29884486, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29884487, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29884488, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29884489, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29884490, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29884491, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29884492, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29884493, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29884494, 'pht': 3726}}" where mtr_portfolio_id = 29884459 and dashboard_run_id = 2838651 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`=29884459 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18936498, 0.09581224431587343, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29884459_02-01-2026_10_51_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29884482, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29884484, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29884485, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29884486, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29884487, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29884488, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29884489, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29884490, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29884491, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29884492, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29884493, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29884494, '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 = 29885052 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': 4302410, 'mtr_portfolio_id': 29885052, 'created_at': datetime.datetime(2026, 1, 2, 11, 3), 'result': '0.04917771762162418', 'result_long': None, 'result_double': None}] Qualite : 0.04917771762162418 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29885052 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29885052_02-01-2026_11_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29885052 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_P29885052_02-01-2026_11_03_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29885054, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29885055, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29885056, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29885057, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29885058, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29885059, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29885060, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29885061, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29885062, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29885063, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29885064, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29885065, 'pht': 3726}}" where mtr_portfolio_id = 29885052 and dashboard_run_id = 2838651 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`=29885052 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18936499, 0.04917771762162418, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29885052_02-01-2026_11_03_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29885054, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29885055, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29885056, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29885057, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29885058, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29885059, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29885060, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29885061, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29885062, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29885063, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29885064, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29885065, '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 = 29885399 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 = 29885399 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 = 29885399 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29885399 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 = 29885399 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 = 29885399 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29885399_02-01-2026_11_05_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29885399 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_P29885399_02-01-2026_11_05_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29885444, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29885445, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29885446, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29885447, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29885448, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29885449, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29885450, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29885451, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29885452, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29885453, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29885454, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29885455, 'pht': 3726}}" where mtr_portfolio_id = 29885399 and dashboard_run_id = 2838651 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29875698,29875852,29876194,29876652,29876801,29877372,29878166,29879046,29879603,29880964,29882264,29882750,29883285,29883844,29884459,29885052,29885399) result : ((1402107997,), (1402108121,), (1402108122,), (1402108136,), (1402108137,), (1402108139,), (1402108157,), (1402108158,), (1402108174,), (1402108176,), (1402108178,), (1402108195,), (1402108197,), (1402108198,), (1402108199,), (1402108223,), (1402108221,), (1402108243,), (1402108244,), (1402108245,), (1402108246,), (1402108250,), (1402108280,), (1402108282,), (1402108284,), (1402108309,), (1402108310,), (1402108311,), (1402108312,), (1402108316,), (1402108342,), (1402108344,), (1402108346,), (1402108349,), (1402108352,), (1402108355,), (1402108362,), (1402108363,), (1402108364,), (1402108369,), (1402108371,), (1402108372,), (1402108396,), (1402108397,), (1402108398,), (1402108399,), (1402108417,), (1402108419,), (1402108440,), (1402108441,), (1402108442,), (1402108464,), (1402108466,), (1402108489,), (1402108491,), (1402108493,), (1402108495,), (1402108499,), (1402108515,), (1402108517,), (1402108518,), (1402108519,), (1402108546,), (1402108547,), (1402108549,), (1402108552,), (1402108555,), (1402108568,), (1402108570,), (1402108572,), (1402108601,), (1402108603,), (1402108628,), (1402108625,), (1402108626,), (1402108646,), (1402108648,), (1402108665,), (1402108666,), (1402108690,), (1402108691,), (1402108693,), (1402108717,), (1402108718,), (1402108719,), (1402108744,), (1402108746,), (1402108769,), (1402108771,), (1402108774,), (1402108794,), (1402108798,), (1402108801,), (1402108805,), (1402108809,), (1402108819,), (1402108821,), (1402108823,), (1402108846,), (1402108847,), (1402108848,), (1402108849,), (1402108851,), (1402108853,), (1402108872,), (1402108874,), (1402108876,), (1402108897,), (1402108899,), (1402108900,), (1402108902,), (1402108924,), (1402109147,), (1402109145,), (1402109179,), (1402109180,), (1402109198,), (1402109199,), (1402109200,), (1402109221,), (1402109223,), (1402109224,), (1402109237,), (1402109239,), (1402109242,), (1402109245,), (1402109261,), (1402109264,), (1402109268,), (1402109273,), (1402109277,), (1402109308,), (1402109344,), (1402109388,), (1402110195,), (1402110146,), (1402110174,), (1402110184,), (1402110362,), (1402110363,), (1402110364,), (1402110365,), (1402110367,), (1402110382,), (1402110384,), (1402110387,), (1402110391,), (1402110408,), (1402110410,), (1402110412,), (1402110415,), (1402110438,), (1402110441,), (1402110442,), (1402110444,), (1402110616,), (1402110632,), (1402110636,), (1402110638,), (1402110642,), (1402110655,), (1402110657,), (1402110678,), (1402110679,), (1402110680,), (1402110682,), (1402110697,), (1402110699,), (1402110711,), (1402110830,), (1402110835,), (1402110846,), (1402110854,), (1402110883,), (1402110887,), (1402110889,), (1402110902,), (1402110950,), (1402110954,), (1402110977,), (1402110978,), (1402110980,), (1402110982,), (1402110985,), (1402110988,), (1402111007,), (1402111009,), (1402111012,), (1402111015,), (1402111035,), (1402111037,), (1402111039,), (1402111041,), (1402111043,), (1402111079,), (1402111074,), (1402111075,), (1402111077,), (1402111095,), (1402111097,), (1402111104,), (1402111131,), (1402111142,), (1402111174,), (1402111211,), (1402111246,), (1402111324,), (1402111325,), (1402111326,), (1402111328,), (1402111332,), (1402111448,), (1402111463,), (1402111466,), (1402111526,), (1402111568,), (1402111601,), (1402111671,), (1402111677,), (1402111712,), (1402111736,), (1402111737,), (1402111741,), (1402111773,), (1402111775,), (1402111777,), (1402111779,), (1402111783,), (1402111858,), (1402111890,), (1402111901,), (1402111915,), (1402112101,), (1402112143,), (1402112173,), (1402112206,), (1402112304,), (1402112305,), (1402112306,), (1402112323,), (1402112325,), (1402112327,), (1402112329,), (1402112353,), (1402112354,), (1402112356,), (1402112368,), (1402112734,), (1402112736,), (1402112737,), (1402112759,), (1402112790,), (1402113028,), (1402113069,), (1402113083,), (1402113084,), (1402113146,), (1402113153,), (1402113165,), (1402113223,), (1402113213,), (1402113214,), (1402113216,), (1402113219,), (1402113433,), (1402113512,), (1402113520,), (1402113560,), (1402113576,), (1402113658,), (1402113659,), (1402113661,), (1402113684,), (1402113712,), (1402113714,), (1402113717,), (1402113736,), (1402113745,), (1402113967,), (1402113969,), (1402113971,), (1402114131,), (1402114174,), (1402114175,), (1402114216,), (1402114302,), (1402114303,), (1402114305,), (1402114307,), (1402114617,), (1402114644,), (1402114648,), (1402114652,), (1402114687,), (1402114712,), (1402114741,), (1402114743,), (1402114761,), (1402114846,), (1402114848,), (1402114850,), (1402114853,), (1402114867,), (1402114869,), (1402114877,), (1402115241,), (1402115256,), (1402115288,), (1402115306,), (1402115325,), (1402115326,), (1402115328,), (1402115331,), (1402115445,), (1402115447,), (1402115471,), (1402115499,), (1402115500,), (1402115503,), (1402115504,), (1402115508,), (1402115545,), (1402115532,), (1402115534,), (1402115537,), (1402115539,), (1402115542,), (1402115734,), (1402115735,), (1402115767,), (1402116105,), (1402116106,), (1402116108,), (1402116110,), (1402116138,), (1402116139,), (1402116141,), (1402116142,), (1402116162,), (1402116164,), (1402116167,), (1402116186,), (1402116340,), (1402116356,), (1402116357,), (1402116360,), (1402116398,), (1402116400,), (1402116424,), (1402116425,), (1402116426,), (1402116428,), (1402116443,), (1402116445,), (1402116447,), (1402116475,), (1402116476,), (1402116478,), (1402116480,), (1402116612,), (1402116615,), (1402116618,), (1402116642,), (1402116647,), (1402116651,), (1402116635,), (1402116637,), (1402116639,), (1402116679,), (1402116701,), (1402116732,), (1402117153,), (1402117191,), (1402117249,), (1402117315,), (1402117374,), (1402117436,), (1402117879,), (1402117880,), (1402117882,), (1402118318,), (1402118426,), (1402118428,), (1402118429,), (1402118448,), (1402118450,), (1402118479,), (1402118501,), (1402118502,), (1402118504,), (1402118570,), (1402118572,), (1402118592,), (1402118593,), (1402118619,), (1402118625,), (1402118628,), (1402118642,), (1402118644,), (1402118645,), (1402118864,), (1402120314,), (1402120321,), (1402120689,), (1402120721,), (1402120797,), (1402120799,), (1402120821,), (1402121078,), (1402121080,), (1402121298,), (1402121312,), (1402121317,), (1402121329,), (1402121343,), (1402121469,), (1402121471,), (1402121544,), (1402121741,), (1402121742,), (1402121800,), (1402121809,), (1402126312,), (1402126560,), (1402126566,), (1402126568,), (1402126571,), (1402126674,), (1402126688,), (1402126745,), (1402126765,), (1402126771,), (1402126788,), (1402127066,), (1402127092,), (1402127093,), (1402127157,), (1402127162,), (1402127164,), (1402127167,), (1402127170,), (1402127172,), (1402127183,), (1402127184,), (1402127185,), (1402127213,), (1402127216,), (1402127218,), (1402127220,), (1402127223,), (1402127263,), (1402127264,), (1402127265,), (1402127701,), (1402127733,), (1402127766,), (1402127799,), (1402128190,), (1402128224,), (1402128230,), (1402128232,), (1402128408,), (1402128447,), (1402128481,), (1402128505,), (1402128752,), (1402128786,), (1402128829,), (1402128853,), (1402129170,), (1402129134,), (1402129324,), (1402129357,), (1402129408,), (1402129409,), (1402129411,), (1402129414,), (1402129438,), (1402129439,), (1402129441,), (1402129444,), (1402129728,), (1402129758,), (1402129795,), (1402129798,), (1402129801,), (1402129804,), (1402129814,), (1402129815,), (1402129817,), (1402129852,), (1402129853,), (1402129855,), (1402129870,), (1402129871,), (1402129890,), (1402129892,), (1402129894,), (1402129918,), (1402129920,), (1402129923,), (1402129942,), (1402129965,), (1402129967,), (1402129969,), (1402129972,), (1402129975,), (1402130059,), (1402130069,), (1402130079,), (1402130117,), (1402130119,), (1402130120,), (1402130122,), (1402130125,), (1402130890,), (1402130958,), (1402131023,), (1402131069,), (1402131160,), (1402131294,), (1402131356,), (1402131361,), (1402131383,), (1402131679,), (1402131651,), (1402131673,), (1402131676,), (1402131805,), (1402131810,), (1402131812,), (1402131851,), (1402131995,), (1402131996,), (1402131998,), (1402132025,), (1402132026,), (1402132027,), (1402132030,), (1402132061,), (1402132062,), (1402132064,), (1402132067,), (1402132096,), (1402132098,), (1402132100,), (1402132103,), (1402132107,), (1402132138,), (1402132139,), (1402132141,), (1402132262,), (1402132273,), (1402132275,), (1402132278,), (1402132295,), (1402132296,), (1402132297,), (1402132396,), (1402132436,), (1402132470,), (1402132502,), (1402132657,), (1402132697,), (1402132698,), (1402132701,), (1402132714,), (1402132716,), (1402132720,), (1402132770,), (1402132771,), (1402132794,), (1402132795,), (1402132797,), (1402132799,), (1402132802,), (1402132805,), (1402132954,), (1402132987,), (1402133014,), (1402133017,), (1402133063,), (1402133057,), (1402133058,), (1402133059,), (1402133060,), (1402133198,), (1402133200,), (1402133202,), (1402133205,), (1402133223,), (1402133225,), (1402133227,), (1402133229,), (1402133232,), (1402133391,), (1402133398,), (1402133399,), (1402133400,), (1402133403,), (1402133429,), (1402133547,), (1402133550,), (1402133552,), (1402133555,), (1402133558,), (1402133560,), (1402133566,), (1402133568,), (1402133570,), (1402133572,), (1402133574,), (1402133577,), (1402133578,), (1402133581,), (1402133584,), (1402133590,), (1402133593,), (1402133610,), (1402133612,), (1402133614,), (1402133617,), (1402133669,), (1402133670,), (1402133679,), (1402133681,), (1402133684,), (1402133686,), (1402133737,), (1402133739,), (1402133742,), (1402133745,), (1402133798,), (1402133799,), (1402133800,), (1402133802,), (1402133805,), (1402133807,), (1402133828,), (1402133830,), (1402133832,), (1402133835,), (1402133838,), (1402133855,), (1402133856,), (1402133857,), (1402133858,), (1402133862,), (1402133864,), (1402133910,), (1402133912,), (1402133914,), (1402133917,), (1402133921,), (1402133935,), (1402133971,), (1402133973,), (1402134017,), (1402134013,), (1402134015,), (1402134038,), (1402134039,), (1402134040,), (1402134900,), (1402134899,), (1402134929,), (1402134931,), (1402134933,), (1402134935,), (1402134938,), (1402134962,), (1402135006,), (1402135008,), (1402135010,), (1402135044,), (1402135045,), (1402135046,), (1402135048,), (1402135150,), (1402135152,), (1402135154,), (1402135157,), (1402135201,), (1402135202,), (1402135204,), (1402135211,), (1402135292,), (1402135295,), (1402135297,), (1402135316,), (1402135318,), (1402135320,), (1402135323,), (1402135397,), (1402135427,), (1402135458,), (1402136052,), (1402136087,), (1402136124,), (1402136158,), (1402136160,), (1402136163,), (1402136367,), (1402136359,), (1402136362,), (1402136365,), (1402136383,), (1402136386,), (1402136388,), (1402136390,), (1402136393,), (1402136407,), (1402136408,), (1402136409,), (1402136410,), (1402136412,), (1402137035,), (1402137045,), (1402137089,), (1402137175,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'02012026': {'nb_upload': 17, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29885399]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1402137175, 1402137089, 1402137045, 1402137035, 1402136412, 1402136410, 1402136409, 1402136408, 1402136407, 1402136393, 1402136390, 1402136388, 1402136386, 1402136383] map_info['map_portfolio_photo'] : {29885399: [1402137175, 1402137089, 1402137045, 1402137035, 1402136412, 1402136410, 1402136409, 1402136408, 1402136407, 1402136393, 1402136390, 1402136388, 1402136386, 1402136383, 1402136365, 1402136362, 1402136359]} final : True mtd_id 4302 list_pids : [1402137175, 1402137089, 1402137045, 1402137035, 1402136412, 1402136410, 1402136409, 1402136408, 1402136407, 1402136393, 1402136390, 1402136388, 1402136386, 1402136383] Looping around the photos to save general results len do output : 1 /29885399Didn'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, '4302470') ('4302', '29885399', '1402137175', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402137089', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402137045', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402137035', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136412', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136410', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136409', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136408', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136407', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136393', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136390', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136388', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136386', None, None, None, None, None, '4302470') ('4302', None, None, None, None, None, None, None, '4302470') ('4302', '29885399', '1402136383', None, None, None, None, None, '4302470') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 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, '29885399', 'None', None, None, None, None, '4302470'), ('4302', '29885399', '1402137175', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402137089', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402137045', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402137035', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136412', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136410', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136409', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136408', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136407', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136393', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136390', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136388', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136386', None, None, None, None, None, '4302470'), ('4302', '29885399', '1402136383', None, None, None, None, None, '4302470')] time used for this insertion : 0.02184748649597168 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.482048749923706 time spend to save output : 0.022109270095825195 total time spend for step 5 : 1.5041580200195312 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 (4302470) 2.44user 2.27system 0:09.85elapsed 47%CPU (0avgtext+0avgdata 167684maxresident)k 328inputs+7808outputs (21major+79707minor)pagefaults 0swaps