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 : 345705 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 (4039769) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4039769) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28475207 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4039769'] with mtr_portfolio_ids : ['28475207'] and first list_photo_ids : [] new path : /proc/345705/ Name: python3 Umask: 0002 State: R (running) Tgid: 345705 Ngid: 0 Pid: 345705 PPid: 345704 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 345705 NSpid: 345705 NSpgid: 344372 NSsid: 344372 VmPeak: 1106908 kB VmSize: 1106884 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99540 kB VmRSS: 99540 kB RssAnon: 59908 kB RssFile: 39632 kB RssShmem: 0 kB VmData: 865636 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 596 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 50 nonvoluntary_ctxt_switches: 91 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '345705', 'Ngid': '0', 'Pid': '345705', 'PPid': '345704', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '345705', 'NSpid': '345705', 'NSpgid': '344372', 'NSsid': '344372', 'VmPeak': '1106908 kB', 'VmSize': '1106884 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99540 kB', 'VmRSS': '99540 kB', 'RssAnon': '59908 kB', 'RssFile': '39632 kB', 'RssShmem': '0 kB', 'VmData': '865636 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '596 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '50', 'nonvoluntary_ctxt_switches': '91'} ('datou_batch_current', '345705', '1106908', '0', '1106884', '865636', '99540', b'', 'marlene', '4039769') 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 (28475207) 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 (4039769 ) ) 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 (28475207) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1394155583, 'portfolio_id': 28475207}, {'photo_id': 1394155580, 'portfolio_id': 28475207}, {'photo_id': 1394155578, 'portfolio_id': 28475207}, {'photo_id': 1394155545, 'portfolio_id': 28475207}, {'photo_id': 1394155543, 'portfolio_id': 28475207}, {'photo_id': 1394155539, 'portfolio_id': 28475207}, {'photo_id': 1394155535, 'portfolio_id': 28475207}, {'photo_id': 1394155532, 'portfolio_id': 28475207}, {'photo_id': 1394155530, 'portfolio_id': 28475207}, {'photo_id': 1394155505, 'portfolio_id': 28475207}, {'photo_id': 1394155502, 'portfolio_id': 28475207}, {'photo_id': 1394155500, 'portfolio_id': 28475207}, {'photo_id': 1394155498, 'portfolio_id': 28475207}, {'photo_id': 1394155470, 'portfolio_id': 28475207}, {'photo_id': 1394155467, 'portfolio_id': 28475207}, {'photo_id': 1394155465, 'portfolio_id': 28475207}, {'photo_id': 1394155462, 'portfolio_id': 28475207}, {'photo_id': 1394155438, 'portfolio_id': 28475207}, {'photo_id': 1394155436, 'portfolio_id': 28475207}, {'photo_id': 1394155383, 'portfolio_id': 28475207}, {'photo_id': 1394155380, 'portfolio_id': 28475207}, {'photo_id': 1394155359, 'portfolio_id': 28475207}, {'photo_id': 1394155357, 'portfolio_id': 28475207}, {'photo_id': 1394155356, 'portfolio_id': 28475207}, {'photo_id': 1394155354, 'portfolio_id': 28475207}, {'photo_id': 1394155325, 'portfolio_id': 28475207}, {'photo_id': 1394155321, 'portfolio_id': 28475207}, {'photo_id': 1394155319, 'portfolio_id': 28475207}, {'photo_id': 1394155317, 'portfolio_id': 28475207}, {'photo_id': 1394155289, 'portfolio_id': 28475207}, {'photo_id': 1394155287, 'portfolio_id': 28475207}, {'photo_id': 1394155285, 'portfolio_id': 28475207}, {'photo_id': 1394155137, 'portfolio_id': 28475207}, {'photo_id': 1394155135, 'portfolio_id': 28475207}, {'photo_id': 1394155132, 'portfolio_id': 28475207}, {'photo_id': 1394154835, 'portfolio_id': 28475207}, {'photo_id': 1394154795, 'portfolio_id': 28475207}, {'photo_id': 1394154758, 'portfolio_id': 28475207}, {'photo_id': 1394154725, 'portfolio_id': 28475207}, {'photo_id': 1394154691, 'portfolio_id': 28475207}, {'photo_id': 1394154656, 'portfolio_id': 28475207}, {'photo_id': 1394154500, 'portfolio_id': 28475207}, {'photo_id': 1394154497, 'portfolio_id': 28475207}, {'photo_id': 1394154495, 'portfolio_id': 28475207}, {'photo_id': 1394154493, 'portfolio_id': 28475207}, {'photo_id': 1394154473, 'portfolio_id': 28475207}, {'photo_id': 1394154467, 'portfolio_id': 28475207}, {'photo_id': 1394154462, 'portfolio_id': 28475207}, {'photo_id': 1394154457, 'portfolio_id': 28475207}, {'photo_id': 1394154453, 'portfolio_id': 28475207}, {'photo_id': 1394154422, 'portfolio_id': 28475207}, {'photo_id': 1394154420, 'portfolio_id': 28475207}] map_portfolio_id_photo_id: {28475207: [1394155583, 1394155580, 1394155578, 1394155545, 1394155543, 1394155539, 1394155535, 1394155532, 1394155530, 1394155505, 1394155502, 1394155500, 1394155498, 1394155470, 1394155467, 1394155465, 1394155462, 1394155438, 1394155436, 1394155383, 1394155380, 1394155359, 1394155357, 1394155356, 1394155354, 1394155325, 1394155321, 1394155319, 1394155317, 1394155289, 1394155287, 1394155285, 1394155137, 1394155135, 1394155132, 1394154835, 1394154795, 1394154758, 1394154725, 1394154691, 1394154656, 1394154500, 1394154497, 1394154495, 1394154493, 1394154473, 1394154467, 1394154462, 1394154457, 1394154453, 1394154422, 1394154420]} ##### 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.01623678207397461 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Thu Nov 13 06:14:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28475207) 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 : 28475207 get user id for portfolio 28475207 get sub ptf for main ptf 28475207, type 3726 and hashtags ['kraft', 'environnement', 'metal', 'autre_refus', 'Carton_brun', 'plastique', 'Carton_gris', 'Teint_Dans_La_Masse', 'papier', 'mal_croppe', 'cartonnette', 'flou'] 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`=28475207 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','environnement','metal','autre_refus','Carton_brun','plastique','Carton_gris','Teint_Dans_La_Masse','papier','mal_croppe','cartonnette','flou')) 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`=28475207 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','environnement','metal','autre_refus','Carton_brun','plastique','Carton_gris','Teint_Dans_La_Masse','papier','mal_croppe','cartonnette','flou')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 28475207, 'sub_port_id': 28475267, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291472, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 2, 59)}, 'mal_croppe': {'main_port_id': 28475207, 'sub_port_id': 28475268, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291473, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 2, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 28475207, 'sub_port_id': 28475269, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291474, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 2, 59)}, 'Carton_brun': {'main_port_id': 28475207, 'sub_port_id': 28475270, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291475, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 2, 59)}, 'Carton_gris': {'main_port_id': 28475207, 'sub_port_id': 28475271, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291476, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 2, 59)}, 'kraft': {'main_port_id': 28475207, 'sub_port_id': 28475272, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291477, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 2, 59)}, 'plastique': {'main_port_id': 28475207, 'sub_port_id': 28475273, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291478, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 2, 59)}, 'flou': {'main_port_id': 28475207, 'sub_port_id': 28475274, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291479, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 2, 59)}, 'environnement': {'main_port_id': 28475207, 'sub_port_id': 28475275, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291480, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 2, 59)}, 'papier': {'main_port_id': 28475207, 'sub_port_id': 28475276, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291481, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 2, 59)}, 'cartonnette': {'main_port_id': 28475207, 'sub_port_id': 28475277, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291482, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 2, 59)}, 'autre_refus': {'main_port_id': 28475207, 'sub_port_id': 28475278, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291483, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 2, 59)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28475267 , 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=28475207 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 (28475267) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28475207) result : ((1394154420,), (1394154422,), (1394154453,), (1394154457,), (1394154462,), (1394154467,), (1394154473,), (1394154493,), (1394154495,), (1394154497,), (1394154500,), (1394154656,), (1394154691,), (1394154725,), (1394154758,), (1394154795,), (1394154835,), (1394155132,), (1394155135,), (1394155137,), (1394155285,), (1394155287,), (1394155289,), (1394155317,), (1394155319,), (1394155321,), (1394155325,), (1394155354,), (1394155356,), (1394155357,), (1394155359,), (1394155380,), (1394155383,), (1394155436,), (1394155438,), (1394155462,), (1394155465,), (1394155467,), (1394155470,), (1394155498,), (1394155500,), (1394155502,), (1394155505,), (1394155530,), (1394155532,), (1394155535,), (1394155539,), (1394155543,), (1394155545,), (1394155578,), (1394155580,), (1394155583,)) 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 (1394154500,1394155500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28475268 , 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=28475207 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 (28475268) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28475207) result : ((1394154420,), (1394154422,), (1394154453,), (1394154457,), (1394154462,), (1394154467,), (1394154473,), (1394154493,), (1394154495,), (1394154497,), (1394154500,), (1394154656,), (1394154691,), (1394154725,), (1394154758,), (1394154795,), (1394154835,), (1394155132,), (1394155135,), (1394155137,), (1394155285,), (1394155287,), (1394155289,), (1394155317,), (1394155319,), (1394155321,), (1394155325,), (1394155354,), (1394155356,), (1394155357,), (1394155359,), (1394155380,), (1394155383,), (1394155436,), (1394155438,), (1394155462,), (1394155465,), (1394155467,), (1394155470,), (1394155498,), (1394155500,), (1394155502,), (1394155505,), (1394155530,), (1394155532,), (1394155535,), (1394155539,), (1394155543,), (1394155545,), (1394155578,), (1394155580,), (1394155583,)) 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 (1394154500,1394155500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28475269 , 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=28475207 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 (28475269) result : ((1394155221,), (1394155391,), (1394155393,), (1394155394,), (1394155422,), (1394155423,), (1394155424,), (1394155425,), (1394155491,), (1394155549,), (1394155562,), (1394155563,), (1394155564,), (1394155565,), (1394155566,), (1394155567,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28475207) result : ((1394154420,), (1394154422,), (1394154453,), (1394154457,), (1394154462,), (1394154467,), (1394154473,), (1394154493,), (1394154495,), (1394154497,), (1394154500,), (1394154656,), (1394154691,), (1394154725,), (1394154758,), (1394154795,), (1394154835,), (1394155132,), (1394155135,), (1394155137,), (1394155285,), (1394155287,), (1394155289,), (1394155317,), (1394155319,), (1394155321,), (1394155325,), (1394155354,), (1394155356,), (1394155357,), (1394155359,), (1394155380,), (1394155383,), (1394155436,), (1394155438,), (1394155462,), (1394155465,), (1394155467,), (1394155470,), (1394155498,), (1394155500,), (1394155502,), (1394155505,), (1394155530,), (1394155532,), (1394155535,), (1394155539,), (1394155543,), (1394155545,), (1394155578,), (1394155580,), (1394155583,)) 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 (1394154500,1394155500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28475270 , 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=28475207 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 (28475270) result : ((1394155241,), (1394155430,), (1394155570,), (1394155571,), (1394155572,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28475207) result : ((1394154420,), (1394154422,), (1394154453,), (1394154457,), (1394154462,), (1394154467,), (1394154473,), (1394154493,), (1394154495,), (1394154497,), (1394154500,), (1394154656,), (1394154691,), (1394154725,), (1394154758,), (1394154795,), (1394154835,), (1394155132,), (1394155135,), (1394155137,), (1394155285,), (1394155287,), (1394155289,), (1394155317,), (1394155319,), (1394155321,), (1394155325,), (1394155354,), (1394155356,), (1394155357,), (1394155359,), (1394155380,), (1394155383,), (1394155436,), (1394155438,), (1394155462,), (1394155465,), (1394155467,), (1394155470,), (1394155498,), (1394155500,), (1394155502,), (1394155505,), (1394155530,), (1394155532,), (1394155535,), (1394155539,), (1394155543,), (1394155545,), (1394155578,), (1394155580,), (1394155583,)) 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 (1394154500,1394155500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28475271 , 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=28475207 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 (28475271) result : ((1394155222,), (1394155426,), (1394155492,), (1394155553,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28475207) result : ((1394154420,), (1394154422,), (1394154453,), (1394154457,), (1394154462,), (1394154467,), (1394154473,), (1394154493,), (1394154495,), (1394154497,), (1394154500,), (1394154656,), (1394154691,), (1394154725,), (1394154758,), (1394154795,), (1394154835,), (1394155132,), (1394155135,), (1394155137,), (1394155285,), (1394155287,), (1394155289,), (1394155317,), (1394155319,), (1394155321,), (1394155325,), (1394155354,), (1394155356,), (1394155357,), (1394155359,), (1394155380,), (1394155383,), (1394155436,), (1394155438,), (1394155462,), (1394155465,), (1394155467,), (1394155470,), (1394155498,), (1394155500,), (1394155502,), (1394155505,), (1394155530,), (1394155532,), (1394155535,), (1394155539,), (1394155543,), (1394155545,), (1394155578,), (1394155580,), (1394155583,)) 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 (1394154500,1394155500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28475272 , 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=28475207 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 (28475272) result : ((1394155554,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28475207) result : ((1394154420,), (1394154422,), (1394154453,), (1394154457,), (1394154462,), (1394154467,), (1394154473,), (1394154493,), (1394154495,), (1394154497,), (1394154500,), (1394154656,), (1394154691,), (1394154725,), (1394154758,), (1394154795,), (1394154835,), (1394155132,), (1394155135,), (1394155137,), (1394155285,), (1394155287,), (1394155289,), (1394155317,), (1394155319,), (1394155321,), (1394155325,), (1394155354,), (1394155356,), (1394155357,), (1394155359,), (1394155380,), (1394155383,), (1394155436,), (1394155438,), (1394155462,), (1394155465,), (1394155467,), (1394155470,), (1394155498,), (1394155500,), (1394155502,), (1394155505,), (1394155530,), (1394155532,), (1394155535,), (1394155539,), (1394155543,), (1394155545,), (1394155578,), (1394155580,), (1394155583,)) 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 (1394154500,1394155500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28475273 , 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=28475207 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 (28475273) result : ((1394155431,), (1394155573,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28475207) result : ((1394154420,), (1394154422,), (1394154453,), (1394154457,), (1394154462,), (1394154467,), (1394154473,), (1394154493,), (1394154495,), (1394154497,), (1394154500,), (1394154656,), (1394154691,), (1394154725,), (1394154758,), (1394154795,), (1394154835,), (1394155132,), (1394155135,), (1394155137,), (1394155285,), (1394155287,), (1394155289,), (1394155317,), (1394155319,), (1394155321,), (1394155325,), (1394155354,), (1394155356,), (1394155357,), (1394155359,), (1394155380,), (1394155383,), (1394155436,), (1394155438,), (1394155462,), (1394155465,), (1394155467,), (1394155470,), (1394155498,), (1394155500,), (1394155502,), (1394155505,), (1394155530,), (1394155532,), (1394155535,), (1394155539,), (1394155543,), (1394155545,), (1394155578,), (1394155580,), (1394155583,)) 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 (1394154500,1394155500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28475274 , 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=28475207 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 (28475274) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28475207) result : ((1394154420,), (1394154422,), (1394154453,), (1394154457,), (1394154462,), (1394154467,), (1394154473,), (1394154493,), (1394154495,), (1394154497,), (1394154500,), (1394154656,), (1394154691,), (1394154725,), (1394154758,), (1394154795,), (1394154835,), (1394155132,), (1394155135,), (1394155137,), (1394155285,), (1394155287,), (1394155289,), (1394155317,), (1394155319,), (1394155321,), (1394155325,), (1394155354,), (1394155356,), (1394155357,), (1394155359,), (1394155380,), (1394155383,), (1394155436,), (1394155438,), (1394155462,), (1394155465,), (1394155467,), (1394155470,), (1394155498,), (1394155500,), (1394155502,), (1394155505,), (1394155530,), (1394155532,), (1394155535,), (1394155539,), (1394155543,), (1394155545,), (1394155578,), (1394155580,), (1394155583,)) 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 (1394154500,1394155500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28475275 , 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=28475207 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 (28475275) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28475207) result : ((1394154420,), (1394154422,), (1394154453,), (1394154457,), (1394154462,), (1394154467,), (1394154473,), (1394154493,), (1394154495,), (1394154497,), (1394154500,), (1394154656,), (1394154691,), (1394154725,), (1394154758,), (1394154795,), (1394154835,), (1394155132,), (1394155135,), (1394155137,), (1394155285,), (1394155287,), (1394155289,), (1394155317,), (1394155319,), (1394155321,), (1394155325,), (1394155354,), (1394155356,), (1394155357,), (1394155359,), (1394155380,), (1394155383,), (1394155436,), (1394155438,), (1394155462,), (1394155465,), (1394155467,), (1394155470,), (1394155498,), (1394155500,), (1394155502,), (1394155505,), (1394155530,), (1394155532,), (1394155535,), (1394155539,), (1394155543,), (1394155545,), (1394155578,), (1394155580,), (1394155583,)) 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 (1394154500,1394155500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28475276 , 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=28475207 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 (28475276) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28475207) result : ((1394154420,), (1394154422,), (1394154453,), (1394154457,), (1394154462,), (1394154467,), (1394154473,), (1394154493,), (1394154495,), (1394154497,), (1394154500,), (1394154656,), (1394154691,), (1394154725,), (1394154758,), (1394154795,), (1394154835,), (1394155132,), (1394155135,), (1394155137,), (1394155285,), (1394155287,), (1394155289,), (1394155317,), (1394155319,), (1394155321,), (1394155325,), (1394155354,), (1394155356,), (1394155357,), (1394155359,), (1394155380,), (1394155383,), (1394155436,), (1394155438,), (1394155462,), (1394155465,), (1394155467,), (1394155470,), (1394155498,), (1394155500,), (1394155502,), (1394155505,), (1394155530,), (1394155532,), (1394155535,), (1394155539,), (1394155543,), (1394155545,), (1394155578,), (1394155580,), (1394155583,)) 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 (1394154500,1394155500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28475277 , 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=28475207 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 (28475277) result : ((1394155229,), (1394155231,), (1394155233,), (1394155282,), (1394155283,), (1394155428,), (1394155568,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28475207) result : ((1394154420,), (1394154422,), (1394154453,), (1394154457,), (1394154462,), (1394154467,), (1394154473,), (1394154493,), (1394154495,), (1394154497,), (1394154500,), (1394154656,), (1394154691,), (1394154725,), (1394154758,), (1394154795,), (1394154835,), (1394155132,), (1394155135,), (1394155137,), (1394155285,), (1394155287,), (1394155289,), (1394155317,), (1394155319,), (1394155321,), (1394155325,), (1394155354,), (1394155356,), (1394155357,), (1394155359,), (1394155380,), (1394155383,), (1394155436,), (1394155438,), (1394155462,), (1394155465,), (1394155467,), (1394155470,), (1394155498,), (1394155500,), (1394155502,), (1394155505,), (1394155530,), (1394155532,), (1394155535,), (1394155539,), (1394155543,), (1394155545,), (1394155578,), (1394155580,), (1394155583,)) 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 (1394154500,1394155500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28475278 , 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=28475207 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 (28475278) result : ((1394155551,), (1394155552,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28475207) result : ((1394154420,), (1394154422,), (1394154453,), (1394154457,), (1394154462,), (1394154467,), (1394154473,), (1394154493,), (1394154495,), (1394154497,), (1394154500,), (1394154656,), (1394154691,), (1394154725,), (1394154758,), (1394154795,), (1394154835,), (1394155132,), (1394155135,), (1394155137,), (1394155285,), (1394155287,), (1394155289,), (1394155317,), (1394155319,), (1394155321,), (1394155325,), (1394155354,), (1394155356,), (1394155357,), (1394155359,), (1394155380,), (1394155383,), (1394155436,), (1394155438,), (1394155462,), (1394155465,), (1394155467,), (1394155470,), (1394155498,), (1394155500,), (1394155502,), (1394155505,), (1394155530,), (1394155532,), (1394155535,), (1394155539,), (1394155543,), (1394155545,), (1394155578,), (1394155580,), (1394155583,)) 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 (1394154500,1394155500) and cspi.crop_hashtag_id = chi.id; To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=28475207 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','environnement','metal','autre_refus','Carton_brun','plastique','Carton_gris','Teint_Dans_La_Masse','papier','mal_croppe','cartonnette','flou')) 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`=28475207 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','environnement','metal','autre_refus','Carton_brun','plastique','Carton_gris','Teint_Dans_La_Masse','papier','mal_croppe','cartonnette','flou')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 28475207, 'sub_port_id': 28475280, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291484, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 3, 1)}, 'mal_croppe': {'main_port_id': 28475207, 'sub_port_id': 28475281, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291485, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 3, 1)}, 'Teint_Dans_La_Masse': {'main_port_id': 28475207, 'sub_port_id': 28475282, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291486, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 3, 1)}, 'Carton_brun': {'main_port_id': 28475207, 'sub_port_id': 28475283, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291487, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 3, 1)}, 'Carton_gris': {'main_port_id': 28475207, 'sub_port_id': 28475284, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291488, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 3, 1)}, 'kraft': {'main_port_id': 28475207, 'sub_port_id': 28475285, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291489, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 3, 1)}, 'plastique': {'main_port_id': 28475207, 'sub_port_id': 28475286, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291490, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 3, 1)}, 'flou': {'main_port_id': 28475207, 'sub_port_id': 28475287, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291491, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 3, 1)}, 'environnement': {'main_port_id': 28475207, 'sub_port_id': 28475288, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291492, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 3, 1)}, 'papier': {'main_port_id': 28475207, 'sub_port_id': 28475289, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291493, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 3, 1)}, 'cartonnette': {'main_port_id': 28475207, 'sub_port_id': 28475290, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291494, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 3, 1)}, 'autre_refus': {'main_port_id': 28475207, 'sub_port_id': 28475291, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19291495, 'last_updated_at': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 13, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 13, 6, 3, 1)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28475280,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28475267 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28475281,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28475268 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28475282,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28475269 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28475283,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28475270 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28475284,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28475271 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28475285,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28475272 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28475286,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28475273 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28475287,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28475274 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28475288,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28475275 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28475289,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28475276 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28475290,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28475277 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28475291,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28475278 lien utilise dans velours : https://marlene.fotonower.com/velours/28475280,28475281,28475282,28475283,28475284,28475285,28475286,28475287,28475288,28475289,28475290,28475291?tags=metal,mal_croppe,Teint_Dans_La_Masse,Carton_brun,Carton_gris,kraft,plastique,flou,environnement,papier,cartonnette,autre_refus After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28475207]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1394155583, 1394155580, 1394155578, 1394155545, 1394155543, 1394155539, 1394155535, 1394155532, 1394155530] map_info['map_portfolio_photo'] : {28475207: [1394155583, 1394155580, 1394155578, 1394155545, 1394155543, 1394155539, 1394155535, 1394155532, 1394155530, 1394155505, 1394155502, 1394155500, 1394155498, 1394155470, 1394155467, 1394155465, 1394155462, 1394155438, 1394155436, 1394155383, 1394155380, 1394155359, 1394155357, 1394155356, 1394155354, 1394155325, 1394155321, 1394155319, 1394155317, 1394155289, 1394155287, 1394155285, 1394155137, 1394155135, 1394155132, 1394154835, 1394154795, 1394154758, 1394154725, 1394154691, 1394154656, 1394154500, 1394154497, 1394154495, 1394154493, 1394154473, 1394154467, 1394154462, 1394154457, 1394154453, 1394154422, 1394154420]} final : False mtd_id 4302 list_pids : [1394155583, 1394155580, 1394155578, 1394155545, 1394155543, 1394155539, 1394155535, 1394155532, 1394155530] Looping around the photos to save general results len do output : 1 /28475207. 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, '4039769') ('4302', '28475207', '1394155583', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155580', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155578', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155545', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155543', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155539', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155535', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155532', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155530', None, None, None, None, None, '4039769') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '28475207', "{'metal': 28475267, 'mal_croppe': 28475268, 'Teint_Dans_La_Masse': 28475269, 'Carton_brun': 28475270, 'Carton_gris': 28475271, 'kraft': 28475272, 'plastique': 28475273, 'flou': 28475274, 'environnement': 28475275, 'papier': 28475276, 'cartonnette': 28475277, 'autre_refus': 28475278}", None, None, None, None, '4039769'), ('4302', '28475207', '1394155583', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155580', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155578', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155545', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155543', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155539', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155535', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155532', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155530', None, None, None, None, None, '4039769')] time used for this insertion : 0.013877153396606445 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.48024916648864746 time spend to save output : 0.014156579971313477 total time spend for step 1 : 0.49440574645996094 step2:final Thu Nov 13 06:14:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 (28475207) 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 28475207 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1394154422,1394154420,1394154473,1394154467,1394154462,1394154457,1394154453,1394154500,1394154497,1394154495,1394154493,1394154835,1394154795,1394154758,1394154725,1394154691,1394154656,1394155137,1394155135,1394155132,1394155289,1394155287,1394155285,1394155325,1394155321,1394155319,1394155317,1394155359,1394155357,1394155356,1394155354,1394155383,1394155380,1394155438,1394155436,1394155470,1394155467,1394155465,1394155462,1394155505,1394155502,1394155500,1394155498,1394155545,1394155543,1394155539,1394155535,1394155532,1394155530,1394155583,1394155580,1394155578); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28475207]) Inside saveOutput : final : False verbose : True original output for save of step final : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ('0.03766127268443711',), 1394155545: ('0.03766127268443711',), 1394155543: ('0.03766127268443711',), 1394155539: ('0.03766127268443711',), 1394155535: ('0.03766127268443711',), 1394155532: ('0.03766127268443711',), 1394155530: ('0.03766127268443711',)} new output for save of step final : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ('0.03766127268443711',), 1394155545: ('0.03766127268443711',), 1394155543: ('0.03766127268443711',), 1394155539: ('0.03766127268443711',), 1394155535: ('0.03766127268443711',), 1394155532: ('0.03766127268443711',), 1394155530: ('0.03766127268443711',)} [1394155583, 1394155580, 1394155578, 1394155545, 1394155543, 1394155539, 1394155535, 1394155532, 1394155530] map_info['map_portfolio_photo'] : {28475207: [1394155583, 1394155580, 1394155578, 1394155545, 1394155543, 1394155539, 1394155535, 1394155532, 1394155530, 1394155505, 1394155502, 1394155500, 1394155498, 1394155470, 1394155467, 1394155465, 1394155462, 1394155438, 1394155436, 1394155383, 1394155380, 1394155359, 1394155357, 1394155356, 1394155354, 1394155325, 1394155321, 1394155319, 1394155317, 1394155289, 1394155287, 1394155285, 1394155137, 1394155135, 1394155132, 1394154835, 1394154795, 1394154758, 1394154725, 1394154691, 1394154656, 1394154500, 1394154497, 1394154495, 1394154493, 1394154473, 1394154467, 1394154462, 1394154457, 1394154453, 1394154422, 1394154420]} final : False mtd_id 4302 list_pids : [1394155583, 1394155580, 1394155578, 1394155545, 1394155543, 1394155539, 1394155535, 1394155532, 1394155530] Looping around the photos to save general results len do output : 9 /1394155583.Didn't retrieve data . /1394155580.Didn't retrieve data . /1394155578.Didn't retrieve data . /1394155545.Didn't retrieve data . /1394155543.Didn't retrieve data . /1394155539.Didn't retrieve data . /1394155535.Didn't retrieve data . /1394155532.Didn't retrieve data . /1394155530.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, '4039769') ('4302', '28475207', '1394155583', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155580', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155578', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155545', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155543', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155539', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155535', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155532', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155530', None, None, None, None, None, '4039769') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 27 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', '28475207', '1394155583', '0.03766127268443711', None, None, None, None, '4039769'), ('4302', '28475207', '1394155580', '0.03766127268443711', None, None, None, None, '4039769'), ('4302', '28475207', '1394155578', '0.03766127268443711', None, None, None, None, '4039769'), ('4302', '28475207', '1394155545', '0.03766127268443711', None, None, None, None, '4039769'), ('4302', '28475207', '1394155543', '0.03766127268443711', None, None, None, None, '4039769'), ('4302', '28475207', '1394155539', '0.03766127268443711', None, None, None, None, '4039769'), ('4302', '28475207', '1394155535', '0.03766127268443711', None, None, None, None, '4039769'), ('4302', '28475207', '1394155532', '0.03766127268443711', None, None, None, None, '4039769'), ('4302', '28475207', '1394155530', '0.03766127268443711', None, None, None, None, '4039769')] time used for this insertion : 0.01356363296508789 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06689739227294922 time spend to save output : 0.014004945755004883 total time spend for step 2 : 0.0809023380279541 step3:velours_tree Thu Nov 13 06:14:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {28475207: [{'metal': 28475267, 'mal_croppe': 28475268, 'Teint_Dans_La_Masse': 28475269, 'Carton_brun': 28475270, 'Carton_gris': 28475271, 'kraft': 28475272, 'plastique': 28475273, 'flou': 28475274, 'environnement': 28475275, 'papier': 28475276, 'cartonnette': 28475277, 'autre_refus': 28475278}]} input_args_next_step : {28475207: ()} output_args : {28475207: [{'metal': 28475267, 'mal_croppe': 28475268, 'Teint_Dans_La_Masse': 28475269, 'Carton_brun': 28475270, 'Carton_gris': 28475271, 'kraft': 28475272, 'plastique': 28475273, 'flou': 28475274, 'environnement': 28475275, 'papier': 28475276, 'cartonnette': 28475277, 'autre_refus': 28475278}]} args : 28475207 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'metal': 28475267, 'mal_croppe': 28475268, 'Teint_Dans_La_Masse': 28475269, 'Carton_brun': 28475270, 'Carton_gris': 28475271, 'kraft': 28475272, 'plastique': 28475273, 'flou': 28475274, 'environnement': 28475275, 'papier': 28475276, 'cartonnette': 28475277, 'autre_refus': 28475278},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28475207) 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([28475207]) 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.26664090156555176 time spend to save output : 4.792213439941406e-05 total time spend for step 3 : 0.26668882369995117 step4:send_mail_cod Thu Nov 13 06:14:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ('0.03766127268443711',), 1394155545: ('0.03766127268443711',), 1394155543: ('0.03766127268443711',), 1394155539: ('0.03766127268443711',), 1394155535: ('0.03766127268443711',), 1394155532: ('0.03766127268443711',), 1394155530: ('0.03766127268443711',)} input_args_next_step : {1394155583: ()} output_args : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ('0.03766127268443711',), 1394155545: ('0.03766127268443711',), 1394155543: ('0.03766127268443711',), 1394155539: ('0.03766127268443711',), 1394155535: ('0.03766127268443711',), 1394155532: ('0.03766127268443711',), 1394155530: ('0.03766127268443711',)} args : 1394155583 depend.output_id : 0 input_args_next_step : {1394155583: ('0.03766127268443711',), 1394155580: ()} output_args : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ('0.03766127268443711',), 1394155545: ('0.03766127268443711',), 1394155543: ('0.03766127268443711',), 1394155539: ('0.03766127268443711',), 1394155535: ('0.03766127268443711',), 1394155532: ('0.03766127268443711',), 1394155530: ('0.03766127268443711',)} args : 1394155580 depend.output_id : 0 input_args_next_step : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ()} output_args : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ('0.03766127268443711',), 1394155545: ('0.03766127268443711',), 1394155543: ('0.03766127268443711',), 1394155539: ('0.03766127268443711',), 1394155535: ('0.03766127268443711',), 1394155532: ('0.03766127268443711',), 1394155530: ('0.03766127268443711',)} args : 1394155578 depend.output_id : 0 input_args_next_step : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ('0.03766127268443711',), 1394155545: ()} output_args : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ('0.03766127268443711',), 1394155545: ('0.03766127268443711',), 1394155543: ('0.03766127268443711',), 1394155539: ('0.03766127268443711',), 1394155535: ('0.03766127268443711',), 1394155532: ('0.03766127268443711',), 1394155530: ('0.03766127268443711',)} args : 1394155545 depend.output_id : 0 input_args_next_step : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ('0.03766127268443711',), 1394155545: ('0.03766127268443711',), 1394155543: ()} output_args : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ('0.03766127268443711',), 1394155545: ('0.03766127268443711',), 1394155543: ('0.03766127268443711',), 1394155539: ('0.03766127268443711',), 1394155535: ('0.03766127268443711',), 1394155532: ('0.03766127268443711',), 1394155530: ('0.03766127268443711',)} args : 1394155543 depend.output_id : 0 input_args_next_step : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ('0.03766127268443711',), 1394155545: ('0.03766127268443711',), 1394155543: ('0.03766127268443711',), 1394155539: ()} output_args : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ('0.03766127268443711',), 1394155545: ('0.03766127268443711',), 1394155543: ('0.03766127268443711',), 1394155539: ('0.03766127268443711',), 1394155535: ('0.03766127268443711',), 1394155532: ('0.03766127268443711',), 1394155530: ('0.03766127268443711',)} args : 1394155539 depend.output_id : 0 input_args_next_step : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ('0.03766127268443711',), 1394155545: ('0.03766127268443711',), 1394155543: ('0.03766127268443711',), 1394155539: ('0.03766127268443711',), 1394155535: ()} output_args : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ('0.03766127268443711',), 1394155545: ('0.03766127268443711',), 1394155543: ('0.03766127268443711',), 1394155539: ('0.03766127268443711',), 1394155535: ('0.03766127268443711',), 1394155532: ('0.03766127268443711',), 1394155530: ('0.03766127268443711',)} args : 1394155535 depend.output_id : 0 input_args_next_step : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ('0.03766127268443711',), 1394155545: ('0.03766127268443711',), 1394155543: ('0.03766127268443711',), 1394155539: ('0.03766127268443711',), 1394155535: ('0.03766127268443711',), 1394155532: ()} output_args : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ('0.03766127268443711',), 1394155545: ('0.03766127268443711',), 1394155543: ('0.03766127268443711',), 1394155539: ('0.03766127268443711',), 1394155535: ('0.03766127268443711',), 1394155532: ('0.03766127268443711',), 1394155530: ('0.03766127268443711',)} args : 1394155532 depend.output_id : 0 input_args_next_step : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ('0.03766127268443711',), 1394155545: ('0.03766127268443711',), 1394155543: ('0.03766127268443711',), 1394155539: ('0.03766127268443711',), 1394155535: ('0.03766127268443711',), 1394155532: ('0.03766127268443711',), 1394155530: ()} output_args : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ('0.03766127268443711',), 1394155545: ('0.03766127268443711',), 1394155543: ('0.03766127268443711',), 1394155539: ('0.03766127268443711',), 1394155535: ('0.03766127268443711',), 1394155532: ('0.03766127268443711',), 1394155530: ('0.03766127268443711',)} args : 1394155530 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 : {28475207: [{'metal': 28475267, 'mal_croppe': 28475268, 'Teint_Dans_La_Masse': 28475269, 'Carton_brun': 28475270, 'Carton_gris': 28475271, 'kraft': 28475272, 'plastique': 28475273, 'flou': 28475274, 'environnement': 28475275, 'papier': 28475276, 'cartonnette': 28475277, 'autre_refus': 28475278}]} input_args_next_step : {1394155583: ('0.03766127268443711',), 1394155580: ('0.03766127268443711',), 1394155578: ('0.03766127268443711',), 1394155545: ('0.03766127268443711',), 1394155543: ('0.03766127268443711',), 1394155539: ('0.03766127268443711',), 1394155535: ('0.03766127268443711',), 1394155532: ('0.03766127268443711',), 1394155530: ('0.03766127268443711',), 28475207: ()} output_args : {28475207: [{'metal': 28475267, 'mal_croppe': 28475268, 'Teint_Dans_La_Masse': 28475269, 'Carton_brun': 28475270, 'Carton_gris': 28475271, 'kraft': 28475272, 'plastique': 28475273, 'flou': 28475274, 'environnement': 28475275, 'papier': 28475276, 'cartonnette': 28475277, 'autre_refus': 28475278}]} args : 28475207 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 :10, first value : ('0.03766127268443711',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28475207) 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 (1394155583,1394155580,1394155578,1394155545,1394155543,1394155539,1394155535,1394155532,1394155530) Found this number of photos: 9 ##### Call download_photos : nb_thread : 5 begin to download photo : 1394155530 begin to download photo : 1394155535 begin to download photo : 1394155543 begin to download photo : 1394155578 begin to download photo : 1394155583 download finish for photo 1394155543 begin to download photo : 1394155545 download finish for photo 1394155578 begin to download photo : 1394155580 download finish for photo 1394155530 begin to download photo : 1394155532 download finish for photo 1394155583 download finish for photo 1394155545 download finish for photo 1394155535 begin to download photo : 1394155539 download finish for photo 1394155532 download finish for photo 1394155580 download finish for photo 1394155539 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette284752671763010900/ imagette284752681763010900/ length of list_filenames : 9 ; length of list_pids : 9 ; length of list_args : 9 results_Auto_P28475207_13-11-2025_06_15_00.pdf 28475267 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=28475267 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette284752671763010900 28475268 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=28475268 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette284752681763010900 28475272 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=28475272 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1394155554: '1763010787_2111854_1394155317_538e71536e84b41a1a5a1798a52a9431_rle_crop_4032007686_0.png'} change filename to text .imagette284752721763010900/ imagette284752721763010900/1763010787_2111854_1394155317_538e71536e84b41a1a5a1798a52a9431_rle_crop_4032007686_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/8c8344446f61a87d00877b0de2abe794_13775321.png imagette284752721763010900 28475273 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=28475273 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1394155431: '1763010566_2099347_1394155356_02d1e6be989b6b29d8172191565bc1e4_rle_crop_4032007279_0.png', 1394155573: '1763010806_2112265_1394155502_0a17922c24c41c77b5810fb329595673_rle_crop_4032007780_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/f0b9ada05cd69b3458aa9865e941cf10_16305164.png change filename to text .imagette284752731763010900/ imagette284752731763010900/1763010566_2099347_1394155356_02d1e6be989b6b29d8172191565bc1e4_rle_crop_4032007279_0.png.png imagette284752731763010900/1763010806_2112265_1394155502_0a17922c24c41c77b5810fb329595673_rle_crop_4032007780_0.png.png imagette284752741763010900/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/67d618a14bddce67850f0a32c2a3ad89_73706299.png imagette284752731763010900 28475274 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=28475274 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette284752741763010900 28475277 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=28475277 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1394155229: '1763010307_2083330_1394154497_b88f9798ce0a18222948ae0759be2314_rle_crop_4032006811_0.png', 1394155231: '1763010307_2083330_1394154495_d3e48804d9a71bfdcfa6fb5d80c4df92_rle_crop_4032006823_0.png', 1394155233: '1763010307_2083330_1394154495_d3e48804d9a71bfdcfa6fb5d80c4df92_rle_crop_4032006825_0.png', 1394155282: '1763010327_2085089_1394154467_9cf2d9954d38db0f7b3d227c3337275a_rle_crop_4032006975_0.png', 1394155283: '1763010327_2085089_1394154462_b6f2748db755d529dd0d8f838dbf8578_rle_crop_4032006985_0.png', 1394155428: '1763010566_2099347_1394155354_bb951b9875337b22d38ed7265907d2e9_rle_crop_4032007295_0.png', 1394155568: '1763010806_2112265_1394155498_43435c4dc61f8f0dd5b4bfc4933cc8f0_rle_crop_4032007814_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/ecfce3cf33c66a23054931a063bfff61_37557207.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/e0d0087a40531080a4bac3f01f7d64ff_34212532.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/cf35618da81143be7e8b09b3f05540dd_69176278.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/3113b3635f518e6372e7b4d99c4f4e01_38105570.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/0d9bb0df704c5149c3994c80049546ed_65729131.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/95ab6eecadbcdc793915c64ff888a140_46454998.png change filename to text .imagette284752771763010900/ imagette284752771763010900/1763010806_2112265_1394155498_43435c4dc61f8f0dd5b4bfc4933cc8f0_rle_crop_4032007814_0.png.png imagette284752771763010900/1763010327_2085089_1394154467_9cf2d9954d38db0f7b3d227c3337275a_rle_crop_4032006975_0.png.png imagette284752771763010900/1763010307_2083330_1394154495_d3e48804d9a71bfdcfa6fb5d80c4df92_rle_crop_4032006823_0.png.png imagette284752771763010900/1763010307_2083330_1394154497_b88f9798ce0a18222948ae0759be2314_rle_crop_4032006811_0.png.png imagette284752771763010900/1763010566_2099347_1394155354_bb951b9875337b22d38ed7265907d2e9_rle_crop_4032007295_0.png.png imagette284752771763010900/1763010307_2083330_1394154495_d3e48804d9a71bfdcfa6fb5d80c4df92_rle_crop_4032006825_0.png.png imagette284752771763010900/1763010327_2085089_1394154462_b6f2748db755d529dd0d8f838dbf8578_rle_crop_4032006985_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/77e662efae2f57204ab415e643c666b7_677532.png imagette284752771763010900 28475278 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=28475278 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1394155551: '1763010787_2111854_1394155319_7e7342dbf1a0f3e0e7a894d4e5d21023_rle_crop_4032007669_0.png', 1394155552: '1763010787_2111854_1394155317_538e71536e84b41a1a5a1798a52a9431_rle_crop_4032007681_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/b4e3622e9d9f475069cf44d27645998b_1560084.png change filename to text .imagette284752781763010901/ imagette284752781763010901/1763010787_2111854_1394155319_7e7342dbf1a0f3e0e7a894d4e5d21023_rle_crop_4032007669_0.png.png imagette284752781763010901/1763010787_2111854_1394155317_538e71536e84b41a1a5a1798a52a9431_rle_crop_4032007681_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/4c5ec22e8720d89d868bbed7ae800479_22951390.png imagette284752781763010901 28475269 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=28475269 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1394155221: '1763010307_2083330_1394154493_07ede75e67911c009ff2dea35155c047_rle_crop_4032006840_0.png', 1394155391: '1763010547_2098896_1394155135_00290eae54295917122ed0e8e030b797_rle_crop_4032007125_0.png', 1394155393: '1763010547_2098896_1394155132_ca9c3478121af4a6957195573a5bb542_rle_crop_4032007135_0.png', 1394155394: '1763010547_2098896_1394155132_ca9c3478121af4a6957195573a5bb542_rle_crop_4032007132_0.png', 1394155422: '1763010566_2099347_1394155357_7332e85d3296e3fff7d1de713d3805d2_rle_crop_4032007267_0.png', 1394155423: '1763010566_2099347_1394155356_02d1e6be989b6b29d8172191565bc1e4_rle_crop_4032007285_0.png', 1394155424: '1763010566_2099347_1394155356_02d1e6be989b6b29d8172191565bc1e4_rle_crop_4032007288_0.png', 1394155425: '1763010566_2099347_1394155354_bb951b9875337b22d38ed7265907d2e9_rle_crop_4032007300_0.png', 1394155491: '1763010687_2106444_1394155380_522af78e57ee3faeef37bf8d5fc2e91f_rle_crop_4032007531_0.png', 1394155549: '1763010787_2111854_1394155319_7e7342dbf1a0f3e0e7a894d4e5d21023_rle_crop_4032007668_0.png', 1394155562: '1763010806_2112265_1394155502_0a17922c24c41c77b5810fb329595673_rle_crop_4032007787_0.png', 1394155563: '1763010806_2112265_1394155502_0a17922c24c41c77b5810fb329595673_rle_crop_4032007781_0.png', 1394155564: '1763010806_2112265_1394155502_0a17922c24c41c77b5810fb329595673_rle_crop_4032007791_0.png', 1394155565: '1763010806_2112265_1394155502_0a17922c24c41c77b5810fb329595673_rle_crop_4032007786_0.png', 1394155566: '1763010806_2112265_1394155500_8d37d22b844c4c83d9a237f9e7d60469_rle_crop_4032007808_0.png', 1394155567: '1763010806_2112265_1394155498_43435c4dc61f8f0dd5b4bfc4933cc8f0_rle_crop_4032007820_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/556c7ade0edb64204aa420d0b8972660_8621519.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/f15bbe1ccccd6e20fd7168b78f75f241_55633912.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/19d0f4e31845890d4ac59eb6f71f76f5_58179500.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/6d86e894b46ab2dbe446c1d657190d3e_44378916.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/387d5d3f17c618caed8f433b5784fc6c_89342322.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/1f51f04987ecf20b34a9f270f4e0c1c2_3336981.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/cd733409fe028518075c9d220bf38b9f_35749243.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/a84a8a102b34c7116058e4f0cbbdea49_35734181.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/78edddac9fa1a33b680bb174029ac7e0_51742162.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/1e8b3366a40890360ae00589b3611e2a_92412778.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/f6c862de1f3cca5dd9c2229845d8fb74_51995963.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/893a5a8c8e5b2407c77644fcb8dc4210_79231930.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/802e4b760123f4802dc8c702e6b1b22f_34446885.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/d3e0b40354eae3028481bd2e48894f05_98583197.png change filename to text .wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/d07fc34561165de476dccb15f86a2cab_49591842.png change filename to text .imagette284752691763010901/ imagette284752691763010901/1763010806_2112265_1394155500_8d37d22b844c4c83d9a237f9e7d60469_rle_crop_4032007808_0.png.png imagette284752691763010901/1763010806_2112265_1394155498_43435c4dc61f8f0dd5b4bfc4933cc8f0_rle_crop_4032007820_0.png.png imagette284752691763010901/1763010566_2099347_1394155357_7332e85d3296e3fff7d1de713d3805d2_rle_crop_4032007267_0.png.png imagette284752691763010901/1763010307_2083330_1394154493_07ede75e67911c009ff2dea35155c047_rle_crop_4032006840_0.png.png imagette284752691763010901/1763010566_2099347_1394155354_bb951b9875337b22d38ed7265907d2e9_rle_crop_4032007300_0.png.png imagette284752691763010901/1763010547_2098896_1394155132_ca9c3478121af4a6957195573a5bb542_rle_crop_4032007132_0.png.png imagette284752691763010901/1763010806_2112265_1394155502_0a17922c24c41c77b5810fb329595673_rle_crop_4032007787_0.png.png imagette284752691763010901/1763010566_2099347_1394155356_02d1e6be989b6b29d8172191565bc1e4_rle_crop_4032007285_0.png.png imagette284752691763010901/1763010787_2111854_1394155319_7e7342dbf1a0f3e0e7a894d4e5d21023_rle_crop_4032007668_0.png.png imagette284752691763010901/1763010547_2098896_1394155132_ca9c3478121af4a6957195573a5bb542_rle_crop_4032007135_0.png.png imagette284752691763010901/1763010687_2106444_1394155380_522af78e57ee3faeef37bf8d5fc2e91f_rle_crop_4032007531_0.png.png imagette284752691763010901/1763010566_2099347_1394155356_02d1e6be989b6b29d8172191565bc1e4_rle_crop_4032007288_0.png.png imagette284752691763010901/1763010806_2112265_1394155502_0a17922c24c41c77b5810fb329595673_rle_crop_4032007786_0.png.png imagette284752691763010901/1763010806_2112265_1394155502_0a17922c24c41c77b5810fb329595673_rle_crop_4032007781_0.png.png imagette284752691763010901/1763010806_2112265_1394155502_0a17922c24c41c77b5810fb329595673_rle_crop_4032007791_0.png.png imagette284752691763010901/1763010547_2098896_1394155135_00290eae54295917122ed0e8e030b797_rle_crop_4032007125_0.png.png wget -O 16.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/42db67419ee076d151990f3f08eee280_17204484.png imagette284752691763010901 28475270 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=28475270 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1394155241: '1763010307_2083330_1394154493_07ede75e67911c009ff2dea35155c047_rle_crop_4032006843_0.png', 1394155430: '1763010566_2099347_1394155357_7332e85d3296e3fff7d1de713d3805d2_rle_crop_4032007264_0.png', 1394155570: '1763010806_2112265_1394155502_0a17922c24c41c77b5810fb329595673_rle_crop_4032007783_0.png', 1394155571: '1763010806_2112265_1394155500_8d37d22b844c4c83d9a237f9e7d60469_rle_crop_4032007801_0.png', 1394155572: '1763010806_2112265_1394155498_43435c4dc61f8f0dd5b4bfc4933cc8f0_rle_crop_4032007816_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/c2fdd1d956182117b2b3cae105a45ec2_55874197.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/317d2d3a1a7e75a76887f5caea69dc3b_2910818.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/6be1ba72b2cb403ab1244496d34f06c6_11282921.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/7e9a81e1c043ea098341e55f56643527_6598018.png change filename to text .imagette284752701763010902/ imagette284752701763010902/1763010806_2112265_1394155498_43435c4dc61f8f0dd5b4bfc4933cc8f0_rle_crop_4032007816_0.png.png imagette284752701763010902/1763010566_2099347_1394155357_7332e85d3296e3fff7d1de713d3805d2_rle_crop_4032007264_0.png.png imagette284752701763010902/1763010307_2083330_1394154493_07ede75e67911c009ff2dea35155c047_rle_crop_4032006843_0.png.png imagette284752701763010902/1763010806_2112265_1394155502_0a17922c24c41c77b5810fb329595673_rle_crop_4032007783_0.png.png imagette284752701763010902/1763010806_2112265_1394155500_8d37d22b844c4c83d9a237f9e7d60469_rle_crop_4032007801_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/bdc1a2c5bf1abbc729850362bce5d701_71876635.png imagette284752701763010902 28475271 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=28475271 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1394155222: '1763010307_2083330_1394154493_07ede75e67911c009ff2dea35155c047_rle_crop_4032006833_0.png', 1394155426: '1763010566_2099347_1394155357_7332e85d3296e3fff7d1de713d3805d2_rle_crop_4032007260_0.png', 1394155492: '1763010687_2106444_1394155380_522af78e57ee3faeef37bf8d5fc2e91f_rle_crop_4032007528_0.png', 1394155553: '1763010787_2111854_1394155317_538e71536e84b41a1a5a1798a52a9431_rle_crop_4032007682_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/5f9e9d6eeb33b30d6c80bb2e396c12b5_14090524.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/13b146f98c299277dcf046dd95e1d88c_18003714.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/598ff14d4a41d2f83e7442263518b71f_42063013.png change filename to text .imagette284752711763010902/ imagette284752711763010902/1763010687_2106444_1394155380_522af78e57ee3faeef37bf8d5fc2e91f_rle_crop_4032007528_0.png.png imagette284752711763010902/1763010566_2099347_1394155357_7332e85d3296e3fff7d1de713d3805d2_rle_crop_4032007260_0.png.png imagette284752711763010902/1763010787_2111854_1394155317_538e71536e84b41a1a5a1798a52a9431_rle_crop_4032007682_0.png.png imagette284752711763010902/1763010307_2083330_1394154493_07ede75e67911c009ff2dea35155c047_rle_crop_4032006833_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/fa6c6ca544798ce41a5c480d9edc1d3c_55393756.png imagette284752711763010902 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=28475207 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/28475280,28475281,28475282,28475283,28475284,28475285,28475286,28475287,28475288,28475289,28475290,28475291?tags=metal,mal_croppe,Teint_Dans_La_Masse,Carton_brun,Carton_gris,kraft,plastique,flou,environnement,papier,cartonnette,autre_refus your option no_mail is active, we will not send the real mail to your client args[1394155583] : ('0.03766127268443711',) no score found for photo 1394155583 We are sending mail with results at report@fotonower.com args[1394155580] : ('0.03766127268443711',) no score found for photo 1394155580 We are sending mail with results at report@fotonower.com args[1394155578] : ('0.03766127268443711',) no score found for photo 1394155578 We are sending mail with results at report@fotonower.com args[1394155545] : ('0.03766127268443711',) no score found for photo 1394155545 We are sending mail with results at report@fotonower.com args[1394155543] : ('0.03766127268443711',) no score found for photo 1394155543 We are sending mail with results at report@fotonower.com args[1394155539] : ('0.03766127268443711',) no score found for photo 1394155539 We are sending mail with results at report@fotonower.com args[1394155535] : ('0.03766127268443711',) no score found for photo 1394155535 We are sending mail with results at report@fotonower.com args[1394155532] : ('0.03766127268443711',) no score found for photo 1394155532 We are sending mail with results at report@fotonower.com args[1394155530] : ('0.03766127268443711',) no score found for photo 1394155530 We are sending mail with results at report@fotonower.com refus_total : 0.03766127268443711 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=28475207 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_P28475207_13-11-2025_06_15_00.pdf results_Auto_P28475207_13-11-2025_06_15_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28475207_13-11-2025_06_15_00.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','28475207','results_Auto_P28475207_13-11-2025_06_15_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28475207_13-11-2025_06_15_00.pdf','pdf','','0.19','0.03766127268443711') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28475207]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1394155583, 1394155580, 1394155578, 1394155545, 1394155543, 1394155539, 1394155535, 1394155532, 1394155530] map_info['map_portfolio_photo'] : {28475207: [1394155583, 1394155580, 1394155578, 1394155545, 1394155543, 1394155539, 1394155535, 1394155532, 1394155530, 1394155505, 1394155502, 1394155500, 1394155498, 1394155470, 1394155467, 1394155465, 1394155462, 1394155438, 1394155436, 1394155383, 1394155380, 1394155359, 1394155357, 1394155356, 1394155354, 1394155325, 1394155321, 1394155319, 1394155317, 1394155289, 1394155287, 1394155285, 1394155137, 1394155135, 1394155132, 1394154835, 1394154795, 1394154758, 1394154725, 1394154691, 1394154656, 1394154500, 1394154497, 1394154495, 1394154493, 1394154473, 1394154467, 1394154462, 1394154457, 1394154453, 1394154422, 1394154420]} final : False mtd_id 4302 list_pids : [1394155583, 1394155580, 1394155578, 1394155545, 1394155543, 1394155539, 1394155535, 1394155532, 1394155530] 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, '4039769') ('4302', '28475207', '1394155583', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155580', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155578', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155545', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155543', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155539', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155535', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155532', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155530', None, None, None, None, None, '4039769') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 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', '28475207', '1394155583', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155580', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155578', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155545', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155543', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155539', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155535', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155532', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155530', None, None, None, None, None, '4039769')] time used for this insertion : 0.011845588684082031 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.452700138092041 time spend to save output : 0.0120697021484375 total time spend for step 4 : 4.4647698402404785 step5:split_time_score Thu Nov 13 06:15:04 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['28475207'] 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 : [('28475207',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28475207) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1394155583: {'path': 'temp/1763010899_345705_1394155583_d1e9075bc895850a2422b4af8422f53e.jpg', 'extension': 'jpg'}, 1394155543: {'path': 'temp/1763010899_345705_1394155543_f096c93288d67cb275a6c84888e42909.jpg', 'extension': 'jpg'}, 1394155545: {'path': 'temp/1763010899_345705_1394155545_f1a965361eaa75d6ded7bd10a4b7b89a.jpg', 'extension': 'jpg'}, 1394155530: {'path': 'temp/1763010899_345705_1394155530_3b69a69f666dd375f1098fd82f5f1f4f.jpg', 'extension': 'jpg'}, 1394155532: {'path': 'temp/1763010899_345705_1394155532_4ac338d0d933cd8e424960fb2ca53d46.jpg', 'extension': 'jpg'}, 1394155578: {'path': 'temp/1763010899_345705_1394155578_c5f02da5aecf9a5d1f0aa33d424ff35f.jpg', 'extension': 'jpg'}, 1394155580: {'path': 'temp/1763010899_345705_1394155580_741bcd565d53ef187a31193a9bb53cb5.jpg', 'extension': 'jpg'}, 1394155535: {'path': 'temp/1763010899_345705_1394155535_803ddc58c3310f4186a9c57701c80eb1.jpg', 'extension': 'jpg'}, 1394155539: {'path': 'temp/1763010899_345705_1394155539_330f99422e2de82884dace0ab914d44a.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 = 28475207; (('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 = 28475207 group by h (('06', 52),) 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=28475207 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 (28475207) 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 (28475207) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 13112025 28475207 Nombre de photos uploadées : 52 / 23040 (0%) 13112025 28475207 Nombre de photos taguées (types de déchets): 0 / 52 (0%) 13112025 28475207 Nombre de photos taguées (volume) : 0 / 52 (0%) [{'photo_id': 1394154422, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/3c2e0e7ed90e0c0dbc6979767c22f14a.jpg', 'username': None, 'uploaded_at': 1763010067, 'text': 'image_13112025_06_00_14_010199m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1394154420, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/11667cde64470d58b09371a94e98cd87.jpg', 'username': None, 'uploaded_at': 1763010067, 'text': 'image_13112025_06_00_34_010134m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1394154473, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/c6bca2951a8438ec2a49faddfc6531a7.jpg', 'username': None, 'uploaded_at': 1763010127, 'text': 'image_13112025_06_00_54_010135m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1394154467, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/13/9cf2d9954d38db0f7b3d227c3337275a.jpg', 'username': None, 'uploaded_at': 1763010127, 'text': 'image_13112025_06_01_04_010166m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 5.0067901611328125e-06 ???????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.002301454544067383 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 28475207, '2025-11-13' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-11-13' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2571511,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.21352005004882812 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= 2571511 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580280, 'mtr_portfolio_id': 28472071, 'dashboard_result_id': 17186913, '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_P28472071_13-11-2025_05_59_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28472072, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28472073, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28472074, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28472075, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28472076, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28472077, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28472078, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28472079, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28472080, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28472081, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28472082, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28472083, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580280, 'mtr_portfolio_id': 28472625, 'dashboard_result_id': 17186914, '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_P28472625_13-11-2025_06_00_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28472626, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28472627, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28472628, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28472629, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28472630, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28472631, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28472632, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28472633, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28472634, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28472635, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28472636, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28472637, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580280, 'mtr_portfolio_id': 28472733, 'dashboard_result_id': 17186915, '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_P28472733_13-11-2025_02_02_29.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28472734, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28472735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28472736, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28472737, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28472738, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28472739, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28472740, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28472741, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28472742, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28472743, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28472744, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28472745, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580280, 'mtr_portfolio_id': 28472999, 'dashboard_result_id': 17186916, '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_P28472999_13-11-2025_02_16_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473000, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473001, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473002, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473003, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473004, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473005, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473006, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473007, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473008, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473010, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473011, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580280, 'mtr_portfolio_id': 28473209, 'dashboard_result_id': 17186917, '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_P28473209_13-11-2025_02_34_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28473210, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473211, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473212, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473213, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473214, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473215, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473216, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473217, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473218, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473219, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473220, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473221, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580280, 'mtr_portfolio_id': 28473342, 'dashboard_result_id': 17186918, '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_P28473342_13-11-2025_02_46_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 28473343, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473344, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473345, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473346, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473347, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473348, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473349, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473350, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473351, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473352, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473353, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473354, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580280, 'mtr_portfolio_id': 28473449, 'dashboard_result_id': 17186919, '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_P28473449_13-11-2025_03_02_29.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473450, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473451, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473452, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473453, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473454, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473455, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473456, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473457, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473458, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473459, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473460, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473461, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580280, 'mtr_portfolio_id': 28473687, 'dashboard_result_id': 17186920, '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_P28473687_13-11-2025_03_19_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28473690, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473691, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473692, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473693, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473694, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473695, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473696, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473697, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473698, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473699, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473700, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473701, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580280, 'mtr_portfolio_id': 28473852, 'dashboard_result_id': 17186921, '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_P28473852_13-11-2025_03_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473854, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473855, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473856, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473857, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473858, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473859, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473860, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473861, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473862, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473863, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473864, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473865, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580280, 'mtr_portfolio_id': 28473961, 'dashboard_result_id': 17186922, '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_P28473961_13-11-2025_03_47_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473963, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473964, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473965, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473966, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473967, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473968, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473969, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473970, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473971, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473972, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473973, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473974, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580280, 'mtr_portfolio_id': 28474121, 'dashboard_result_id': 17186923, '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_P28474121_13-11-2025_04_02_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28474122, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474123, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28474124, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474125, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28474126, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474127, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28474128, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28474129, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474130, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474131, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28474132, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28474133, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580280, 'mtr_portfolio_id': 28474652, 'dashboard_result_id': 17186924, '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_P28474652_13-11-2025_05_17_02.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28474653, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474654, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474655, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28474656, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28474657, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474658, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474659, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474660, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28474661, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28474662, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28474663, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28474664, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580280, 'mtr_portfolio_id': 28474833, 'dashboard_result_id': 17186925, '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_P28474833_13-11-2025_06_05_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474844, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28474845, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28474846, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28474847, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474849, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28474850, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474851, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28474853, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28474854, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28474855, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474857, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474858, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580280, 'mtr_portfolio_id': 28474994, 'dashboard_result_id': 17186926, '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_P28474994_13-11-2025_05_46_32.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474995, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474996, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474997, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474998, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474999, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28475000, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28475001, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28475002, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28475003, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28475004, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28475005, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28475006, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580280, 'mtr_portfolio_id': 28475052, 'dashboard_result_id': 17186927, '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_P28475052_13-11-2025_06_03_29.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28475053, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28475054, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28475055, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28475056, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28475057, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28475058, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28475059, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28475060, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28475061, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28475062, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28475063, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28475064, 'pht': 3726}}"}, {'dashboat_entry_day': 2571511, 'dashboard_run_id': 2580280, 'mtr_portfolio_id': 28475207, 'dashboard_result_id': 17186928, '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_P28475207_13-11-2025_06_12_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28475267, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28475268, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28475269, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28475270, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28475271, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28475272, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28475273, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28475274, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28475275, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28475276, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28475277, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28475278, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 28472071 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': 4039643, 'mtr_portfolio_id': 28472071, 'created_at': datetime.datetime(2025, 11, 13, 5, 59, 30), 'result': '0.07328867128515715', 'result_long': None, 'result_double': None}] Qualite : 0.07328867128515715 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28472071 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28472071_13-11-2025_05_59_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28472071 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_P28472071_13-11-2025_05_59_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28472072, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28472073, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28472074, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28472075, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28472076, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28472077, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28472078, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28472079, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28472080, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28472081, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28472082, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28472083, 'pht': 3726}}" where mtr_portfolio_id = 28472071 and dashboard_run_id = 2580280 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`=28472071 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186913, 0.07328867128515715, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28472071_13-11-2025_05_59_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28472072, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28472073, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28472074, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28472075, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28472076, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28472077, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28472078, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28472079, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28472080, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28472081, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28472082, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28472083, '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 = 28472625 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': 4039644, 'mtr_portfolio_id': 28472625, 'created_at': datetime.datetime(2025, 11, 13, 5, 59, 59), 'result': '0.05459551597737143', 'result_long': None, 'result_double': None}] Qualite : 0.05459551597737143 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28472625 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28472625_13-11-2025_06_00_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28472625 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_P28472625_13-11-2025_06_00_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28472626, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28472627, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28472628, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28472629, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28472630, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28472631, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28472632, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28472633, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28472634, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28472635, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28472636, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28472637, 'pht': 3726}}" where mtr_portfolio_id = 28472625 and dashboard_run_id = 2580280 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`=28472625 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186914, 0.05459551597737143, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28472625_13-11-2025_06_00_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28472626, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28472627, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28472628, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28472629, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28472630, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28472631, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28472632, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28472633, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28472634, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28472635, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28472636, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28472637, '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 = 28472733 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': 4039645, 'mtr_portfolio_id': 28472733, 'created_at': datetime.datetime(2025, 11, 13, 6, 0, 34), 'result': '0.06486000606200416', 'result_long': None, 'result_double': None}] Qualite : 0.06486000606200416 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28472733 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28472733_13-11-2025_06_00_35.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28472733 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_P28472733_13-11-2025_06_00_35.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28472734, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28472735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28472736, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28472737, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28472738, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28472739, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28472740, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28472741, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28472742, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28472743, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28472744, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28472745, 'pht': 3726}}" where mtr_portfolio_id = 28472733 and dashboard_run_id = 2580280 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`=28472733 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186915, 0.06486000606200416, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28472733_13-11-2025_06_00_35.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28472734, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28472735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28472736, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28472737, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28472738, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28472739, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28472740, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28472741, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28472742, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28472743, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28472744, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28472745, '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 = 28472999 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 = 28472999 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 = 28472999 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 28472999 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 = 28472999 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 4039646, 'mtr_portfolio_id': 28472999, 'created_at': datetime.datetime(2025, 11, 13, 6, 1, 1), 'result': 0.0, 'result_long': None, 'result_double': None}] Qualite : 0.0 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28472999 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28472999_13-11-2025_06_01_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28472999 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_P28472999_13-11-2025_06_01_02.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473000, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473001, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473002, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473003, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473004, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473005, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473006, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473007, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473008, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473010, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473011, 'pht': 3726}}" where mtr_portfolio_id = 28472999 and dashboard_run_id = 2580280 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`=28472999 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186916, 0.0, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28472999_13-11-2025_06_01_02.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473000, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473001, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473002, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473003, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473004, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473005, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473006, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473007, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473008, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473010, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473011, '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 = 28473209 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': 4039647, 'mtr_portfolio_id': 28473209, 'created_at': datetime.datetime(2025, 11, 13, 6, 1, 13), 'result': '0.10468934540547628', 'result_long': None, 'result_double': None}] Qualite : 0.10468934540547628 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28473209 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473209_13-11-2025_06_01_14.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28473209 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_P28473209_13-11-2025_06_01_14.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28473210, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473211, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473212, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473213, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473214, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473215, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473216, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473217, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473218, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473219, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473220, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473221, 'pht': 3726}}" where mtr_portfolio_id = 28473209 and dashboard_run_id = 2580280 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`=28473209 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186917, 0.10468934540547628, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473209_13-11-2025_06_01_14.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28473210, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473211, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473212, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473213, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473214, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473215, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473216, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473217, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473218, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473219, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473220, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473221, '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 = 28473342 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': 4039648, 'mtr_portfolio_id': 28473342, 'created_at': datetime.datetime(2025, 11, 13, 6, 1, 30), 'result': '0.0243220349400973', 'result_long': None, 'result_double': None}] Qualite : 0.0243220349400973 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28473342 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473342_13-11-2025_06_01_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28473342 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_P28473342_13-11-2025_06_01_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 28473343, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473344, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473345, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473346, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473347, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473348, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473349, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473350, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473351, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473352, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473353, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473354, 'pht': 3726}}" where mtr_portfolio_id = 28473342 and dashboard_run_id = 2580280 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`=28473342 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186918, 0.0243220349400973, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473342_13-11-2025_06_01_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 28473343, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473344, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473345, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473346, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473347, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473348, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473349, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473350, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473351, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473352, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473353, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473354, '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 = 28473449 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': 4039649, 'mtr_portfolio_id': 28473449, 'created_at': datetime.datetime(2025, 11, 13, 6, 1, 57), 'result': '0.07468073642089822', 'result_long': None, 'result_double': None}] Qualite : 0.07468073642089822 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28473449 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473449_13-11-2025_06_01_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28473449 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_P28473449_13-11-2025_06_01_58.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473450, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473451, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473452, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473453, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473454, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473455, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473456, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473457, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473458, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473459, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473460, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473461, 'pht': 3726}}" where mtr_portfolio_id = 28473449 and dashboard_run_id = 2580280 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`=28473449 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186919, 0.07468073642089822, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473449_13-11-2025_06_01_58.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473450, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473451, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473452, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473453, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473454, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473455, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473456, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473457, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473458, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473459, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473460, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473461, '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 = 28473687 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': 4039650, 'mtr_portfolio_id': 28473687, 'created_at': datetime.datetime(2025, 11, 13, 6, 2, 29), 'result': '0.06107707693387454', 'result_long': None, 'result_double': None}] Qualite : 0.06107707693387454 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28473687 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473687_13-11-2025_06_02_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28473687 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_P28473687_13-11-2025_06_02_30.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28473690, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473691, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473692, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473693, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473694, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473695, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473696, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473697, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473698, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473699, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473700, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473701, 'pht': 3726}}" where mtr_portfolio_id = 28473687 and dashboard_run_id = 2580280 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`=28473687 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186920, 0.06107707693387454, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473687_13-11-2025_06_02_30.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 28473690, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473691, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473692, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473693, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473694, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473695, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473696, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473697, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473698, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473699, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473700, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473701, '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 = 28473852 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': 4039651, 'mtr_portfolio_id': 28473852, 'created_at': datetime.datetime(2025, 11, 13, 6, 3, 56), 'result': '0.0649765457543171', 'result_long': None, 'result_double': None}] Qualite : 0.0649765457543171 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28473852 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473852_13-11-2025_06_03_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28473852 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_P28473852_13-11-2025_06_03_57.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473854, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473855, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473856, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473857, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473858, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473859, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473860, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473861, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473862, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473863, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473864, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473865, 'pht': 3726}}" where mtr_portfolio_id = 28473852 and dashboard_run_id = 2580280 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`=28473852 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186921, 0.0649765457543171, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473852_13-11-2025_06_03_57.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473854, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473855, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473856, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473857, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473858, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473859, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473860, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473861, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473862, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473863, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473864, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473865, '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 = 28473961 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': 4039652, 'mtr_portfolio_id': 28473961, 'created_at': datetime.datetime(2025, 11, 13, 6, 4, 59), 'result': '0.02444975978011983', 'result_long': None, 'result_double': None}] Qualite : 0.02444975978011983 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28473961 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473961_13-11-2025_06_05_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28473961 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_P28473961_13-11-2025_06_05_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473963, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473964, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473965, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473966, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473967, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473968, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473969, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473970, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473971, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473972, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473973, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473974, 'pht': 3726}}" where mtr_portfolio_id = 28473961 and dashboard_run_id = 2580280 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`=28473961 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186922, 0.02444975978011983, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28473961_13-11-2025_06_05_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28473963, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28473964, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28473965, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28473966, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28473967, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28473968, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28473969, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28473970, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28473971, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28473972, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28473973, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28473974, '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 = 28474121 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': 4039653, 'mtr_portfolio_id': 28474121, 'created_at': datetime.datetime(2025, 11, 13, 6, 5, 28), 'result': '0.0528851463779323', 'result_long': None, 'result_double': None}] Qualite : 0.0528851463779323 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28474121 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28474121_13-11-2025_06_05_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28474121 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_P28474121_13-11-2025_06_05_29.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28474122, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474123, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28474124, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474125, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28474126, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474127, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28474128, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28474129, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474130, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474131, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28474132, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28474133, 'pht': 3726}}" where mtr_portfolio_id = 28474121 and dashboard_run_id = 2580280 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`=28474121 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186923, 0.0528851463779323, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28474121_13-11-2025_06_05_29.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28474122, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474123, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28474124, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474125, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28474126, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474127, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28474128, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28474129, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474130, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474131, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28474132, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28474133, '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 = 28474652 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': 4039654, 'mtr_portfolio_id': 28474652, 'created_at': datetime.datetime(2025, 11, 13, 6, 5, 40), 'result': '0.06999538444913557', 'result_long': None, 'result_double': None}] Qualite : 0.06999538444913557 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28474652 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28474652_13-11-2025_06_05_41.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28474652 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_P28474652_13-11-2025_06_05_41.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28474653, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474654, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474655, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28474656, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28474657, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474658, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474659, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474660, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28474661, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28474662, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28474663, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28474664, 'pht': 3726}}" where mtr_portfolio_id = 28474652 and dashboard_run_id = 2580280 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`=28474652 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186924, 0.06999538444913557, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28474652_13-11-2025_06_05_41.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28474653, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474654, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474655, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28474656, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28474657, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474658, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474659, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474660, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28474661, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28474662, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28474663, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28474664, '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 = 28474833 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': 4039655, 'mtr_portfolio_id': 28474833, 'created_at': datetime.datetime(2025, 11, 13, 6, 5, 58), 'result': '0.048134693199410335', 'result_long': None, 'result_double': None}] Qualite : 0.048134693199410335 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28474833 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28474833_13-11-2025_06_05_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28474833 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_P28474833_13-11-2025_06_05_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474844, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28474845, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28474846, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28474847, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474849, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28474850, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474851, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28474853, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28474854, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28474855, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474857, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474858, 'pht': 3726}}" where mtr_portfolio_id = 28474833 and dashboard_run_id = 2580279 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`=28474833 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186925, 0.048134693199410335, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28474833_13-11-2025_06_05_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474844, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28474845, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28474846, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28474847, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474849, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28474850, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474851, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28474853, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28474854, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28474855, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474857, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474858, '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 = 28474994 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 = 28474994 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 = 28474994 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 28474994 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 = 28474994 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 = 28474994 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28474994_13-11-2025_05_46_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28474994 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_P28474994_13-11-2025_05_46_32.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28474995, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28474996, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28474997, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28474998, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28474999, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28475000, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28475001, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28475002, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28475003, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28475004, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28475005, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28475006, 'pht': 3726}}" where mtr_portfolio_id = 28474994 and dashboard_run_id = 2580279 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 = 28475052 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': 4039741, 'mtr_portfolio_id': 28475052, 'created_at': datetime.datetime(2025, 11, 13, 6, 3, 28), 'result': '0.022063713505945114', 'result_long': None, 'result_double': None}] Qualite : 0.022063713505945114 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28475052 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28475052_13-11-2025_06_03_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28475052 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_P28475052_13-11-2025_06_03_29.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28475053, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28475054, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28475055, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28475056, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28475057, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28475058, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28475059, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28475060, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28475061, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28475062, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28475063, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28475064, 'pht': 3726}}" where mtr_portfolio_id = 28475052 and dashboard_run_id = 2580279 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`=28475052 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186927, 0.022063713505945114, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28475052_13-11-2025_06_03_29.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28475053, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28475054, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28475055, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28475056, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28475057, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28475058, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28475059, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28475060, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28475061, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28475062, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28475063, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28475064, '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 = 28475207 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': 4039769, 'mtr_portfolio_id': 28475207, 'created_at': datetime.datetime(2025, 11, 13, 6, 14, 59), 'result': '0.03766127268443711', 'result_long': None, 'result_double': None}] Qualite : 0.03766127268443711 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28475207 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28475207_13-11-2025_06_15_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28475207 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_P28475207_13-11-2025_06_15_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28475267, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28475268, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28475269, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28475270, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28475271, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28475272, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28475273, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28475274, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28475275, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28475276, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28475277, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28475278, 'pht': 3726}}" where mtr_portfolio_id = 28475207 and dashboard_run_id = 2580279 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`=28475207 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17186928, 0.03766127268443711, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28475207_13-11-2025_06_15_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28475267, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28475268, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28475269, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28475270, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28475271, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28475272, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28475273, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28475274, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28475275, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28475276, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28475277, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28475278, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28472071,28472625,28472733,28472999,28473209,28473342,28473449,28473687,28473852,28473961,28474121,28474652,28474833,28474994,28475052,28475207) result : ((1394133573,), (1394133823,), (1394133824,), (1394134091,), (1394134214,), (1394134217,), (1394134284,), (1394134287,), (1394134367,), (1394138510,), (1394138536,), (1394138610,), (1394138613,), (1394138650,), (1394138652,), (1394138653,), (1394138654,), (1394138713,), (1394138715,), (1394138806,), (1394138831,), (1394138858,), (1394138860,), (1394139061,), (1394139063,), (1394140058,), (1394140070,), (1394140096,), (1394140116,), (1394140139,), (1394140137,), (1394140490,), (1394141894,), (1394142345,), (1394142365,), (1394142499,), (1394142573,), (1394142676,), (1394142709,), (1394142736,), (1394142782,), (1394142838,), (1394142884,), (1394142910,), (1394142940,), (1394142943,), (1394142963,), (1394142964,), (1394142965,), (1394142967,), (1394143056,), (1394143059,), (1394143062,), (1394143087,), (1394143174,), (1394143168,), (1394143197,), (1394143250,), (1394143252,), (1394143253,), (1394143378,), (1394143400,), (1394143405,), (1394143408,), (1394143457,), (1394143482,), (1394143484,), (1394143517,), (1394143555,), (1394143585,), (1394143586,), (1394143663,), (1394143666,), (1394143688,), (1394143689,), (1394143795,), (1394143797,), (1394143798,), (1394143818,), (1394144370,), (1394144422,), (1394144426,), (1394144843,), (1394144871,), (1394144900,), (1394145458,), (1394145460,), (1394145580,), (1394145581,), (1394145634,), (1394145657,), (1394145706,), (1394145737,), (1394145758,), (1394145793,), (1394145843,), (1394145841,), (1394145873,), (1394145926,), (1394145928,), (1394145954,), (1394145980,), (1394146009,), (1394146050,), (1394146069,), (1394146072,), (1394146100,), (1394146125,), (1394146170,), (1394146192,), (1394146211,), (1394146214,), (1394146246,), (1394146249,), (1394146349,), (1394146351,), (1394146403,), (1394146405,), (1394146424,), (1394146485,), (1394146541,), (1394146543,), (1394146594,), (1394146593,), (1394146621,), (1394146649,), (1394146699,), (1394146700,), (1394146724,), (1394146754,), (1394146755,), (1394146840,), (1394146845,), (1394146866,), (1394146868,), (1394148200,), (1394151231,), (1394151862,), (1394151896,), (1394151952,), (1394151954,), (1394151987,), (1394151989,), (1394151992,), (1394152017,), (1394152018,), (1394152043,), (1394152046,), (1394152084,), (1394152107,), (1394152109,), (1394152111,), (1394152144,), (1394152146,), (1394152148,), (1394152172,), (1394152174,), (1394152176,), (1394152180,), (1394152185,), (1394152212,), (1394152209,), (1394152210,), (1394152239,), (1394152241,), (1394152242,), (1394152244,), (1394152248,), (1394152250,), (1394152274,), (1394152277,), (1394152278,), (1394152280,), (1394152301,), (1394153021,), (1394152822,), (1394153019,), (1394153042,), (1394153070,), (1394153091,), (1394153248,), (1394153273,), (1394153277,), (1394153280,), (1394153283,), (1394153286,), (1394153304,), (1394153307,), (1394153311,), (1394153316,), (1394153320,), (1394153337,), (1394153338,), (1394153339,), (1394153342,), (1394153346,), (1394153366,), (1394153368,), (1394153402,), (1394153404,), (1394153405,), (1394153406,), (1394154128,), (1394154177,), (1394154214,), (1394154245,), (1394154254,), (1394154424,), (1394154420,), (1394154422,), (1394154453,), (1394154457,), (1394154462,), (1394154467,), (1394154473,), (1394154493,), (1394154495,), (1394154497,), (1394154500,), (1394154656,), (1394154691,), (1394154725,), (1394154758,), (1394154795,), (1394154835,), (1394155132,), (1394155135,), (1394155137,), (1394155285,), (1394155287,), (1394155289,), (1394155317,), (1394155319,), (1394155321,), (1394155325,), (1394155354,), (1394155356,), (1394155357,), (1394155359,), (1394155380,), (1394155383,), (1394155436,), (1394155438,), (1394155462,), (1394155465,), (1394155467,), (1394155470,), (1394155498,), (1394155500,), (1394155502,), (1394155505,), (1394155530,), (1394155532,), (1394155535,), (1394155539,), (1394155543,), (1394155545,), (1394155578,), (1394155580,), (1394155583,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'13112025': {'nb_upload': 52, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28475207]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1394155583, 1394155580, 1394155578, 1394155545, 1394155543, 1394155539, 1394155535, 1394155532, 1394155530] map_info['map_portfolio_photo'] : {28475207: [1394155583, 1394155580, 1394155578, 1394155545, 1394155543, 1394155539, 1394155535, 1394155532, 1394155530, 1394155505, 1394155502, 1394155500, 1394155498, 1394155470, 1394155467, 1394155465, 1394155462, 1394155438, 1394155436, 1394155383, 1394155380, 1394155359, 1394155357, 1394155356, 1394155354, 1394155325, 1394155321, 1394155319, 1394155317, 1394155289, 1394155287, 1394155285, 1394155137, 1394155135, 1394155132, 1394154835, 1394154795, 1394154758, 1394154725, 1394154691, 1394154656, 1394154500, 1394154497, 1394154495, 1394154493, 1394154473, 1394154467, 1394154462, 1394154457, 1394154453, 1394154422, 1394154420]} final : True mtd_id 4302 list_pids : [1394155583, 1394155580, 1394155578, 1394155545, 1394155543, 1394155539, 1394155535, 1394155532, 1394155530] Looping around the photos to save general results len do output : 1 /28475207Didn'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, '4039769') ('4302', '28475207', '1394155583', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155580', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155578', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155545', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155543', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155539', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155535', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155532', None, None, None, None, None, '4039769') ('4302', None, None, None, None, None, None, None, '4039769') ('4302', '28475207', '1394155530', None, None, None, None, None, '4039769') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '28475207', 'None', None, None, None, None, '4039769'), ('4302', '28475207', '1394155583', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155580', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155578', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155545', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155543', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155539', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155535', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155532', None, None, None, None, None, '4039769'), ('4302', '28475207', '1394155530', None, None, None, None, None, '4039769')] time used for this insertion : 0.013595104217529297 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.6919054985046387 time spend to save output : 0.01386713981628418 total time spend for step 5 : 1.7057726383209229 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 (4039769) 1.98user 2.47system 0:10.95elapsed 40%CPU (0avgtext+0avgdata 160780maxresident)k 240inputs+9744outputs (1major+64137minor)pagefaults 0swaps