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 : 856553 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 (4073958) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4073958) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28693616 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4073958'] with mtr_portfolio_ids : ['28693616'] and first list_photo_ids : [] new path : /proc/856553/ Name: python3 Umask: 0002 State: R (running) Tgid: 856553 Ngid: 0 Pid: 856553 PPid: 856552 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 856553 NSpid: 856553 NSpgid: 855248 NSsid: 855248 VmPeak: 1106908 kB VmSize: 1106884 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98764 kB VmRSS: 98764 kB RssAnon: 59908 kB RssFile: 38856 kB RssShmem: 0 kB VmData: 865636 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 608 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: 44 nonvoluntary_ctxt_switches: 88 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '856553', 'Ngid': '0', 'Pid': '856553', 'PPid': '856552', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '856553', 'NSpid': '856553', 'NSpgid': '855248', 'NSsid': '855248', 'VmPeak': '1106908 kB', 'VmSize': '1106884 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98764 kB', 'VmRSS': '98764 kB', 'RssAnon': '59908 kB', 'RssFile': '38856 kB', 'RssShmem': '0 kB', 'VmData': '865636 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '608 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': '44', 'nonvoluntary_ctxt_switches': '88'} ('datou_batch_current', '856553', '1106908', '0', '1106884', '865636', '98764', b'', 'marlene', '4073958') 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 (28693616) 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 (4073958 ) ) 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 (28693616) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1395150402, 'portfolio_id': 28693616}, {'photo_id': 1395150380, 'portfolio_id': 28693616}, {'photo_id': 1395150366, 'portfolio_id': 28693616}, {'photo_id': 1395150363, 'portfolio_id': 28693616}, {'photo_id': 1395150359, 'portfolio_id': 28693616}, {'photo_id': 1395150300, 'portfolio_id': 28693616}, {'photo_id': 1395150275, 'portfolio_id': 28693616}, {'photo_id': 1395150212, 'portfolio_id': 28693616}, {'photo_id': 1395150033, 'portfolio_id': 28693616}, {'photo_id': 1395149893, 'portfolio_id': 28693616}, {'photo_id': 1395149793, 'portfolio_id': 28693616}, {'photo_id': 1395149747, 'portfolio_id': 28693616}, {'photo_id': 1395149679, 'portfolio_id': 28693616}, {'photo_id': 1395149670, 'portfolio_id': 28693616}, {'photo_id': 1395149562, 'portfolio_id': 28693616}, {'photo_id': 1395149543, 'portfolio_id': 28693616}, {'photo_id': 1395149458, 'portfolio_id': 28693616}, {'photo_id': 1395149453, 'portfolio_id': 28693616}, {'photo_id': 1395149452, 'portfolio_id': 28693616}, {'photo_id': 1395149451, 'portfolio_id': 28693616}, {'photo_id': 1395149450, 'portfolio_id': 28693616}, {'photo_id': 1395149446, 'portfolio_id': 28693616}, {'photo_id': 1395149445, 'portfolio_id': 28693616}, {'photo_id': 1395149429, 'portfolio_id': 28693616}, {'photo_id': 1395149423, 'portfolio_id': 28693616}, {'photo_id': 1395149419, 'portfolio_id': 28693616}, {'photo_id': 1395149418, 'portfolio_id': 28693616}, {'photo_id': 1395149415, 'portfolio_id': 28693616}, {'photo_id': 1395149407, 'portfolio_id': 28693616}, {'photo_id': 1395149405, 'portfolio_id': 28693616}, {'photo_id': 1395149396, 'portfolio_id': 28693616}, {'photo_id': 1395149393, 'portfolio_id': 28693616}, {'photo_id': 1395149380, 'portfolio_id': 28693616}, {'photo_id': 1395149379, 'portfolio_id': 28693616}, {'photo_id': 1395149370, 'portfolio_id': 28693616}, {'photo_id': 1395149363, 'portfolio_id': 28693616}, {'photo_id': 1395149362, 'portfolio_id': 28693616}, {'photo_id': 1395149358, 'portfolio_id': 28693616}, {'photo_id': 1395149355, 'portfolio_id': 28693616}, {'photo_id': 1395149353, 'portfolio_id': 28693616}, {'photo_id': 1395149351, 'portfolio_id': 28693616}, {'photo_id': 1395149348, 'portfolio_id': 28693616}, {'photo_id': 1395149347, 'portfolio_id': 28693616}, {'photo_id': 1395149346, 'portfolio_id': 28693616}, {'photo_id': 1395149344, 'portfolio_id': 28693616}, {'photo_id': 1395149341, 'portfolio_id': 28693616}, {'photo_id': 1395149338, 'portfolio_id': 28693616}, {'photo_id': 1395149337, 'portfolio_id': 28693616}, {'photo_id': 1395149335, 'portfolio_id': 28693616}, {'photo_id': 1395149333, 'portfolio_id': 28693616}, {'photo_id': 1395149326, 'portfolio_id': 28693616}, {'photo_id': 1395149320, 'portfolio_id': 28693616}, {'photo_id': 1395149317, 'portfolio_id': 28693616}, {'photo_id': 1395149308, 'portfolio_id': 28693616}, {'photo_id': 1395149303, 'portfolio_id': 28693616}, {'photo_id': 1395149298, 'portfolio_id': 28693616}, {'photo_id': 1395149297, 'portfolio_id': 28693616}, {'photo_id': 1395149292, 'portfolio_id': 28693616}, {'photo_id': 1395149287, 'portfolio_id': 28693616}, {'photo_id': 1395149266, 'portfolio_id': 28693616}, {'photo_id': 1395149264, 'portfolio_id': 28693616}, {'photo_id': 1395149254, 'portfolio_id': 28693616}, {'photo_id': 1395149241, 'portfolio_id': 28693616}, {'photo_id': 1395149239, 'portfolio_id': 28693616}, {'photo_id': 1395149235, 'portfolio_id': 28693616}, {'photo_id': 1395149229, 'portfolio_id': 28693616}, {'photo_id': 1395149228, 'portfolio_id': 28693616}, {'photo_id': 1395149225, 'portfolio_id': 28693616}, {'photo_id': 1395149222, 'portfolio_id': 28693616}, {'photo_id': 1395149219, 'portfolio_id': 28693616}, {'photo_id': 1395149215, 'portfolio_id': 28693616}, {'photo_id': 1395149203, 'portfolio_id': 28693616}, {'photo_id': 1395149170, 'portfolio_id': 28693616}, {'photo_id': 1395149153, 'portfolio_id': 28693616}] map_portfolio_id_photo_id: {28693616: [1395150402, 1395150380, 1395150366, 1395150363, 1395150359, 1395150300, 1395150275, 1395150212, 1395150033, 1395149893, 1395149793, 1395149747, 1395149679, 1395149670, 1395149562, 1395149543, 1395149458, 1395149453, 1395149452, 1395149451, 1395149450, 1395149446, 1395149445, 1395149429, 1395149423, 1395149419, 1395149418, 1395149415, 1395149407, 1395149405, 1395149396, 1395149393, 1395149380, 1395149379, 1395149370, 1395149363, 1395149362, 1395149358, 1395149355, 1395149353, 1395149351, 1395149348, 1395149347, 1395149346, 1395149344, 1395149341, 1395149338, 1395149337, 1395149335, 1395149333, 1395149326, 1395149320, 1395149317, 1395149308, 1395149303, 1395149298, 1395149297, 1395149292, 1395149287, 1395149266, 1395149264, 1395149254, 1395149241, 1395149239, 1395149235, 1395149229, 1395149228, 1395149225, 1395149222, 1395149219, 1395149215, 1395149203, 1395149170, 1395149153]} ##### 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.0168454647064209 #### 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 Wed Nov 19 06:14:57 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 (28693616) 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 : 28693616 get user id for portfolio 28693616 get sub ptf for main ptf 28693616, type 3726 and hashtags ['mal_croppe', 'Carton_brun', 'environnement', 'cartonnette', 'kraft', 'Carton_gris', 'autre_refus', 'Teint_Dans_La_Masse', 'flou', 'plastique', 'papier', 'metal'] 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`=28693616 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','Carton_brun','environnement','cartonnette','kraft','Carton_gris','autre_refus','Teint_Dans_La_Masse','flou','plastique','papier','metal')) 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`=28693616 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','Carton_brun','environnement','cartonnette','kraft','Carton_gris','autre_refus','Teint_Dans_La_Masse','flou','plastique','papier','metal')) AND mptpi.`min_score`=0.5 To do returned map {'cartonnette': {'main_port_id': 28693616, 'sub_port_id': 28693638, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459800, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 56)}, 'Teint_Dans_La_Masse': {'main_port_id': 28693616, 'sub_port_id': 28693639, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459801, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 56)}, 'autre_refus': {'main_port_id': 28693616, 'sub_port_id': 28693640, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459802, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 56)}, 'mal_croppe': {'main_port_id': 28693616, 'sub_port_id': 28693641, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459803, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 56)}, 'flou': {'main_port_id': 28693616, 'sub_port_id': 28693642, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459804, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 56)}, 'papier': {'main_port_id': 28693616, 'sub_port_id': 28693643, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459805, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 56)}, 'metal': {'main_port_id': 28693616, 'sub_port_id': 28693644, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459806, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 56)}, 'plastique': {'main_port_id': 28693616, 'sub_port_id': 28693645, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459807, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 56)}, 'kraft': {'main_port_id': 28693616, 'sub_port_id': 28693646, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459808, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 56)}, 'Carton_brun': {'main_port_id': 28693616, 'sub_port_id': 28693647, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459809, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 56)}, 'environnement': {'main_port_id': 28693616, 'sub_port_id': 28693648, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459810, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 56)}, 'Carton_gris': {'main_port_id': 28693616, 'sub_port_id': 28693649, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459811, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 56)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28693638 , 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=28693616 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 (28693638) result : ((1395149866,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28693616) result : ((1395149153,), (1395149170,), (1395149203,), (1395149215,), (1395149219,), (1395149222,), (1395149225,), (1395149228,), (1395149229,), (1395149235,), (1395149239,), (1395149241,), (1395149254,), (1395149264,), (1395149266,), (1395149287,), (1395149292,), (1395149297,), (1395149298,), (1395149303,), (1395149308,), (1395149317,), (1395149320,), (1395149326,), (1395149333,), (1395149335,), (1395149337,), (1395149338,), (1395149341,), (1395149344,), (1395149346,), (1395149347,), (1395149348,), (1395149351,), (1395149353,), (1395149355,), (1395149358,), (1395149362,), (1395149363,), (1395149370,), (1395149379,), (1395149380,), (1395149393,), (1395149396,), (1395149405,), (1395149407,), (1395149415,), (1395149418,), (1395149419,), (1395149423,), (1395149429,), (1395149445,), (1395149446,), (1395149450,), (1395149451,), (1395149452,), (1395149453,), (1395149458,), (1395149543,), (1395149562,), (1395149670,), (1395149679,), (1395149747,), (1395149793,), (1395149893,), (1395150033,), (1395150212,), (1395150275,), (1395150300,), (1395150359,), (1395150363,), (1395150366,), (1395150380,), (1395150402,)) 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 (1395150300) 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 28693639 , 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=28693616 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 (28693639) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28693616) result : ((1395149153,), (1395149170,), (1395149203,), (1395149215,), (1395149219,), (1395149222,), (1395149225,), (1395149228,), (1395149229,), (1395149235,), (1395149239,), (1395149241,), (1395149254,), (1395149264,), (1395149266,), (1395149287,), (1395149292,), (1395149297,), (1395149298,), (1395149303,), (1395149308,), (1395149317,), (1395149320,), (1395149326,), (1395149333,), (1395149335,), (1395149337,), (1395149338,), (1395149341,), (1395149344,), (1395149346,), (1395149347,), (1395149348,), (1395149351,), (1395149353,), (1395149355,), (1395149358,), (1395149362,), (1395149363,), (1395149370,), (1395149379,), (1395149380,), (1395149393,), (1395149396,), (1395149405,), (1395149407,), (1395149415,), (1395149418,), (1395149419,), (1395149423,), (1395149429,), (1395149445,), (1395149446,), (1395149450,), (1395149451,), (1395149452,), (1395149453,), (1395149458,), (1395149543,), (1395149562,), (1395149670,), (1395149679,), (1395149747,), (1395149793,), (1395149893,), (1395150033,), (1395150212,), (1395150275,), (1395150300,), (1395150359,), (1395150363,), (1395150366,), (1395150380,), (1395150402,)) 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 (1395150300) 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 28693640 , 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=28693616 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 (28693640) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28693616) result : ((1395149153,), (1395149170,), (1395149203,), (1395149215,), (1395149219,), (1395149222,), (1395149225,), (1395149228,), (1395149229,), (1395149235,), (1395149239,), (1395149241,), (1395149254,), (1395149264,), (1395149266,), (1395149287,), (1395149292,), (1395149297,), (1395149298,), (1395149303,), (1395149308,), (1395149317,), (1395149320,), (1395149326,), (1395149333,), (1395149335,), (1395149337,), (1395149338,), (1395149341,), (1395149344,), (1395149346,), (1395149347,), (1395149348,), (1395149351,), (1395149353,), (1395149355,), (1395149358,), (1395149362,), (1395149363,), (1395149370,), (1395149379,), (1395149380,), (1395149393,), (1395149396,), (1395149405,), (1395149407,), (1395149415,), (1395149418,), (1395149419,), (1395149423,), (1395149429,), (1395149445,), (1395149446,), (1395149450,), (1395149451,), (1395149452,), (1395149453,), (1395149458,), (1395149543,), (1395149562,), (1395149670,), (1395149679,), (1395149747,), (1395149793,), (1395149893,), (1395150033,), (1395150212,), (1395150275,), (1395150300,), (1395150359,), (1395150363,), (1395150366,), (1395150380,), (1395150402,)) 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 (1395150300) 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 28693641 , 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=28693616 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 (28693641) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28693616) result : ((1395149153,), (1395149170,), (1395149203,), (1395149215,), (1395149219,), (1395149222,), (1395149225,), (1395149228,), (1395149229,), (1395149235,), (1395149239,), (1395149241,), (1395149254,), (1395149264,), (1395149266,), (1395149287,), (1395149292,), (1395149297,), (1395149298,), (1395149303,), (1395149308,), (1395149317,), (1395149320,), (1395149326,), (1395149333,), (1395149335,), (1395149337,), (1395149338,), (1395149341,), (1395149344,), (1395149346,), (1395149347,), (1395149348,), (1395149351,), (1395149353,), (1395149355,), (1395149358,), (1395149362,), (1395149363,), (1395149370,), (1395149379,), (1395149380,), (1395149393,), (1395149396,), (1395149405,), (1395149407,), (1395149415,), (1395149418,), (1395149419,), (1395149423,), (1395149429,), (1395149445,), (1395149446,), (1395149450,), (1395149451,), (1395149452,), (1395149453,), (1395149458,), (1395149543,), (1395149562,), (1395149670,), (1395149679,), (1395149747,), (1395149793,), (1395149893,), (1395150033,), (1395150212,), (1395150275,), (1395150300,), (1395150359,), (1395150363,), (1395150366,), (1395150380,), (1395150402,)) 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 (1395150300) 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 28693642 , 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=28693616 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 (28693642) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28693616) result : ((1395149153,), (1395149170,), (1395149203,), (1395149215,), (1395149219,), (1395149222,), (1395149225,), (1395149228,), (1395149229,), (1395149235,), (1395149239,), (1395149241,), (1395149254,), (1395149264,), (1395149266,), (1395149287,), (1395149292,), (1395149297,), (1395149298,), (1395149303,), (1395149308,), (1395149317,), (1395149320,), (1395149326,), (1395149333,), (1395149335,), (1395149337,), (1395149338,), (1395149341,), (1395149344,), (1395149346,), (1395149347,), (1395149348,), (1395149351,), (1395149353,), (1395149355,), (1395149358,), (1395149362,), (1395149363,), (1395149370,), (1395149379,), (1395149380,), (1395149393,), (1395149396,), (1395149405,), (1395149407,), (1395149415,), (1395149418,), (1395149419,), (1395149423,), (1395149429,), (1395149445,), (1395149446,), (1395149450,), (1395149451,), (1395149452,), (1395149453,), (1395149458,), (1395149543,), (1395149562,), (1395149670,), (1395149679,), (1395149747,), (1395149793,), (1395149893,), (1395150033,), (1395150212,), (1395150275,), (1395150300,), (1395150359,), (1395150363,), (1395150366,), (1395150380,), (1395150402,)) 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 (1395150300) 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 28693643 , 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=28693616 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 (28693643) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28693616) result : ((1395149153,), (1395149170,), (1395149203,), (1395149215,), (1395149219,), (1395149222,), (1395149225,), (1395149228,), (1395149229,), (1395149235,), (1395149239,), (1395149241,), (1395149254,), (1395149264,), (1395149266,), (1395149287,), (1395149292,), (1395149297,), (1395149298,), (1395149303,), (1395149308,), (1395149317,), (1395149320,), (1395149326,), (1395149333,), (1395149335,), (1395149337,), (1395149338,), (1395149341,), (1395149344,), (1395149346,), (1395149347,), (1395149348,), (1395149351,), (1395149353,), (1395149355,), (1395149358,), (1395149362,), (1395149363,), (1395149370,), (1395149379,), (1395149380,), (1395149393,), (1395149396,), (1395149405,), (1395149407,), (1395149415,), (1395149418,), (1395149419,), (1395149423,), (1395149429,), (1395149445,), (1395149446,), (1395149450,), (1395149451,), (1395149452,), (1395149453,), (1395149458,), (1395149543,), (1395149562,), (1395149670,), (1395149679,), (1395149747,), (1395149793,), (1395149893,), (1395150033,), (1395150212,), (1395150275,), (1395150300,), (1395150359,), (1395150363,), (1395150366,), (1395150380,), (1395150402,)) 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 (1395150300) 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 28693644 , 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=28693616 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 (28693644) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28693616) result : ((1395149153,), (1395149170,), (1395149203,), (1395149215,), (1395149219,), (1395149222,), (1395149225,), (1395149228,), (1395149229,), (1395149235,), (1395149239,), (1395149241,), (1395149254,), (1395149264,), (1395149266,), (1395149287,), (1395149292,), (1395149297,), (1395149298,), (1395149303,), (1395149308,), (1395149317,), (1395149320,), (1395149326,), (1395149333,), (1395149335,), (1395149337,), (1395149338,), (1395149341,), (1395149344,), (1395149346,), (1395149347,), (1395149348,), (1395149351,), (1395149353,), (1395149355,), (1395149358,), (1395149362,), (1395149363,), (1395149370,), (1395149379,), (1395149380,), (1395149393,), (1395149396,), (1395149405,), (1395149407,), (1395149415,), (1395149418,), (1395149419,), (1395149423,), (1395149429,), (1395149445,), (1395149446,), (1395149450,), (1395149451,), (1395149452,), (1395149453,), (1395149458,), (1395149543,), (1395149562,), (1395149670,), (1395149679,), (1395149747,), (1395149793,), (1395149893,), (1395150033,), (1395150212,), (1395150275,), (1395150300,), (1395150359,), (1395150363,), (1395150366,), (1395150380,), (1395150402,)) 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 (1395150300) 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 28693645 , 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=28693616 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 (28693645) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28693616) result : ((1395149153,), (1395149170,), (1395149203,), (1395149215,), (1395149219,), (1395149222,), (1395149225,), (1395149228,), (1395149229,), (1395149235,), (1395149239,), (1395149241,), (1395149254,), (1395149264,), (1395149266,), (1395149287,), (1395149292,), (1395149297,), (1395149298,), (1395149303,), (1395149308,), (1395149317,), (1395149320,), (1395149326,), (1395149333,), (1395149335,), (1395149337,), (1395149338,), (1395149341,), (1395149344,), (1395149346,), (1395149347,), (1395149348,), (1395149351,), (1395149353,), (1395149355,), (1395149358,), (1395149362,), (1395149363,), (1395149370,), (1395149379,), (1395149380,), (1395149393,), (1395149396,), (1395149405,), (1395149407,), (1395149415,), (1395149418,), (1395149419,), (1395149423,), (1395149429,), (1395149445,), (1395149446,), (1395149450,), (1395149451,), (1395149452,), (1395149453,), (1395149458,), (1395149543,), (1395149562,), (1395149670,), (1395149679,), (1395149747,), (1395149793,), (1395149893,), (1395150033,), (1395150212,), (1395150275,), (1395150300,), (1395150359,), (1395150363,), (1395150366,), (1395150380,), (1395150402,)) 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 (1395150300) 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 28693646 , 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=28693616 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 (28693646) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28693616) result : ((1395149153,), (1395149170,), (1395149203,), (1395149215,), (1395149219,), (1395149222,), (1395149225,), (1395149228,), (1395149229,), (1395149235,), (1395149239,), (1395149241,), (1395149254,), (1395149264,), (1395149266,), (1395149287,), (1395149292,), (1395149297,), (1395149298,), (1395149303,), (1395149308,), (1395149317,), (1395149320,), (1395149326,), (1395149333,), (1395149335,), (1395149337,), (1395149338,), (1395149341,), (1395149344,), (1395149346,), (1395149347,), (1395149348,), (1395149351,), (1395149353,), (1395149355,), (1395149358,), (1395149362,), (1395149363,), (1395149370,), (1395149379,), (1395149380,), (1395149393,), (1395149396,), (1395149405,), (1395149407,), (1395149415,), (1395149418,), (1395149419,), (1395149423,), (1395149429,), (1395149445,), (1395149446,), (1395149450,), (1395149451,), (1395149452,), (1395149453,), (1395149458,), (1395149543,), (1395149562,), (1395149670,), (1395149679,), (1395149747,), (1395149793,), (1395149893,), (1395150033,), (1395150212,), (1395150275,), (1395150300,), (1395150359,), (1395150363,), (1395150366,), (1395150380,), (1395150402,)) 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 (1395150300) 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 28693647 , 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=28693616 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 (28693647) result : ((1395149883,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28693616) result : ((1395149153,), (1395149170,), (1395149203,), (1395149215,), (1395149219,), (1395149222,), (1395149225,), (1395149228,), (1395149229,), (1395149235,), (1395149239,), (1395149241,), (1395149254,), (1395149264,), (1395149266,), (1395149287,), (1395149292,), (1395149297,), (1395149298,), (1395149303,), (1395149308,), (1395149317,), (1395149320,), (1395149326,), (1395149333,), (1395149335,), (1395149337,), (1395149338,), (1395149341,), (1395149344,), (1395149346,), (1395149347,), (1395149348,), (1395149351,), (1395149353,), (1395149355,), (1395149358,), (1395149362,), (1395149363,), (1395149370,), (1395149379,), (1395149380,), (1395149393,), (1395149396,), (1395149405,), (1395149407,), (1395149415,), (1395149418,), (1395149419,), (1395149423,), (1395149429,), (1395149445,), (1395149446,), (1395149450,), (1395149451,), (1395149452,), (1395149453,), (1395149458,), (1395149543,), (1395149562,), (1395149670,), (1395149679,), (1395149747,), (1395149793,), (1395149893,), (1395150033,), (1395150212,), (1395150275,), (1395150300,), (1395150359,), (1395150363,), (1395150366,), (1395150380,), (1395150402,)) 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 (1395150300) 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 28693648 , 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=28693616 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 (28693648) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28693616) result : ((1395149153,), (1395149170,), (1395149203,), (1395149215,), (1395149219,), (1395149222,), (1395149225,), (1395149228,), (1395149229,), (1395149235,), (1395149239,), (1395149241,), (1395149254,), (1395149264,), (1395149266,), (1395149287,), (1395149292,), (1395149297,), (1395149298,), (1395149303,), (1395149308,), (1395149317,), (1395149320,), (1395149326,), (1395149333,), (1395149335,), (1395149337,), (1395149338,), (1395149341,), (1395149344,), (1395149346,), (1395149347,), (1395149348,), (1395149351,), (1395149353,), (1395149355,), (1395149358,), (1395149362,), (1395149363,), (1395149370,), (1395149379,), (1395149380,), (1395149393,), (1395149396,), (1395149405,), (1395149407,), (1395149415,), (1395149418,), (1395149419,), (1395149423,), (1395149429,), (1395149445,), (1395149446,), (1395149450,), (1395149451,), (1395149452,), (1395149453,), (1395149458,), (1395149543,), (1395149562,), (1395149670,), (1395149679,), (1395149747,), (1395149793,), (1395149893,), (1395150033,), (1395150212,), (1395150275,), (1395150300,), (1395150359,), (1395150363,), (1395150366,), (1395150380,), (1395150402,)) 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 (1395150300) 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 28693649 , 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=28693616 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 (28693649) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28693616) result : ((1395149153,), (1395149170,), (1395149203,), (1395149215,), (1395149219,), (1395149222,), (1395149225,), (1395149228,), (1395149229,), (1395149235,), (1395149239,), (1395149241,), (1395149254,), (1395149264,), (1395149266,), (1395149287,), (1395149292,), (1395149297,), (1395149298,), (1395149303,), (1395149308,), (1395149317,), (1395149320,), (1395149326,), (1395149333,), (1395149335,), (1395149337,), (1395149338,), (1395149341,), (1395149344,), (1395149346,), (1395149347,), (1395149348,), (1395149351,), (1395149353,), (1395149355,), (1395149358,), (1395149362,), (1395149363,), (1395149370,), (1395149379,), (1395149380,), (1395149393,), (1395149396,), (1395149405,), (1395149407,), (1395149415,), (1395149418,), (1395149419,), (1395149423,), (1395149429,), (1395149445,), (1395149446,), (1395149450,), (1395149451,), (1395149452,), (1395149453,), (1395149458,), (1395149543,), (1395149562,), (1395149670,), (1395149679,), (1395149747,), (1395149793,), (1395149893,), (1395150033,), (1395150212,), (1395150275,), (1395150300,), (1395150359,), (1395150363,), (1395150366,), (1395150380,), (1395150402,)) 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 (1395150300) 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`=28693616 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','Carton_brun','environnement','cartonnette','kraft','Carton_gris','autre_refus','Teint_Dans_La_Masse','flou','plastique','papier','metal')) 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`=28693616 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','Carton_brun','environnement','cartonnette','kraft','Carton_gris','autre_refus','Teint_Dans_La_Masse','flou','plastique','papier','metal')) AND mptpi.`min_score`=0.5 To do returned map {'cartonnette': {'main_port_id': 28693616, 'sub_port_id': 28693661, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459824, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 28693616, 'sub_port_id': 28693663, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459825, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 58)}, 'autre_refus': {'main_port_id': 28693616, 'sub_port_id': 28693664, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459826, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 58)}, 'mal_croppe': {'main_port_id': 28693616, 'sub_port_id': 28693665, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459827, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 58)}, 'flou': {'main_port_id': 28693616, 'sub_port_id': 28693667, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459828, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 58)}, 'papier': {'main_port_id': 28693616, 'sub_port_id': 28693668, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459829, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 58)}, 'metal': {'main_port_id': 28693616, 'sub_port_id': 28693669, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459830, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 58)}, 'plastique': {'main_port_id': 28693616, 'sub_port_id': 28693670, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459831, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 58)}, 'kraft': {'main_port_id': 28693616, 'sub_port_id': 28693671, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459832, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 58)}, 'Carton_brun': {'main_port_id': 28693616, 'sub_port_id': 28693672, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459833, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 58)}, 'environnement': {'main_port_id': 28693616, 'sub_port_id': 28693673, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459834, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 58)}, 'Carton_gris': {'main_port_id': 28693616, 'sub_port_id': 28693674, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19459835, 'last_updated_at': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 19, 6, 12, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 19, 6, 4, 58)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28693661,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28693638 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28693663,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28693639 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28693664,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28693640 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28693665,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28693641 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28693667,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28693642 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28693668,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28693643 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28693669,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28693644 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28693670,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28693645 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28693671,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28693646 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28693672,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28693647 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28693673,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28693648 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28693674,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28693649 lien utilise dans velours : https://marlene.fotonower.com/velours/28693661,28693663,28693664,28693665,28693667,28693668,28693669,28693670,28693671,28693672,28693673,28693674?tags=cartonnette,Teint_Dans_La_Masse,autre_refus,mal_croppe,flou,papier,metal,plastique,kraft,Carton_brun,environnement,Carton_gris After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28693616]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1395150402, 1395150380, 1395150366, 1395150363, 1395150359, 1395150300, 1395150275, 1395150212, 1395150033, 1395149893, 1395149793, 1395149747] map_info['map_portfolio_photo'] : {28693616: [1395150402, 1395150380, 1395150366, 1395150363, 1395150359, 1395150300, 1395150275, 1395150212, 1395150033, 1395149893, 1395149793, 1395149747, 1395149679, 1395149670, 1395149562, 1395149543, 1395149458, 1395149453, 1395149452, 1395149451, 1395149450, 1395149446, 1395149445, 1395149429, 1395149423, 1395149419, 1395149418, 1395149415, 1395149407, 1395149405, 1395149396, 1395149393, 1395149380, 1395149379, 1395149370, 1395149363, 1395149362, 1395149358, 1395149355, 1395149353, 1395149351, 1395149348, 1395149347, 1395149346, 1395149344, 1395149341, 1395149338, 1395149337, 1395149335, 1395149333, 1395149326, 1395149320, 1395149317, 1395149308, 1395149303, 1395149298, 1395149297, 1395149292, 1395149287, 1395149266, 1395149264, 1395149254, 1395149241, 1395149239, 1395149235, 1395149229, 1395149228, 1395149225, 1395149222, 1395149219, 1395149215, 1395149203, 1395149170, 1395149153]} final : False mtd_id 4302 list_pids : [1395150402, 1395150380, 1395150366, 1395150363, 1395150359, 1395150300, 1395150275, 1395150212, 1395150033, 1395149893, 1395149793, 1395149747] Looping around the photos to save general results len do output : 1 /28693616. 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, '4073958') ('4302', '28693616', '1395150402', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150380', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150366', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150363', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150359', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150300', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150275', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150212', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150033', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395149893', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395149793', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395149747', None, None, None, None, None, '4073958') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 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, '28693616', "{'cartonnette': 28693638, 'Teint_Dans_La_Masse': 28693639, 'autre_refus': 28693640, 'mal_croppe': 28693641, 'flou': 28693642, 'papier': 28693643, 'metal': 28693644, 'plastique': 28693645, 'kraft': 28693646, 'Carton_brun': 28693647, 'environnement': 28693648, 'Carton_gris': 28693649}", None, None, None, None, '4073958'), ('4302', '28693616', '1395150402', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150380', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150366', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150363', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150359', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150300', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150275', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150212', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150033', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395149893', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395149793', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395149747', None, None, None, None, None, '4073958')] time used for this insertion : 0.015735387802124023 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.42459893226623535 time spend to save output : 0.016062498092651367 total time spend for step 1 : 0.4406614303588867 step2:final Wed Nov 19 06:14:57 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 (28693616) 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 28693616 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1395149170,1395149153,1395149241,1395149228,1395149222,1395149219,1395149215,1395149287,1395149264,1395149203,1395149239,1395149235,1395149229,1395149225,1395149317,1395149298,1395149297,1395149292,1395149266,1395149254,1395149335,1395149333,1395149326,1395149320,1395149308,1395149362,1395149358,1395149303,1395149351,1395149355,1395149348,1395149353,1395149346,1395149347,1395149341,1395149344,1395149337,1395149338,1395149407,1395149396,1395149380,1395149379,1395149423,1395149370,1395149363,1395149419,1395149418,1395149415,1395149405,1395149393,1395149679,1395149543,1395149452,1395149446,1395149670,1395149445,1395149562,1395149429,1395149458,1395149453,1395149451,1395149450,1395150300,1395150212,1395150033,1395149893,1395149793,1395149747,1395150402,1395150380,1395150366,1395150363,1395150359,1395150275); 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([28693616]) Inside saveOutput : final : False verbose : True original output for save of step final : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ('0.03257721176718173',), 1395149893: ('0.03257721176718173',), 1395149793: ('0.03257721176718173',), 1395149747: ('0.03257721176718173',)} new output for save of step final : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ('0.03257721176718173',), 1395149893: ('0.03257721176718173',), 1395149793: ('0.03257721176718173',), 1395149747: ('0.03257721176718173',)} [1395150402, 1395150380, 1395150366, 1395150363, 1395150359, 1395150300, 1395150275, 1395150212, 1395150033, 1395149893, 1395149793, 1395149747] map_info['map_portfolio_photo'] : {28693616: [1395150402, 1395150380, 1395150366, 1395150363, 1395150359, 1395150300, 1395150275, 1395150212, 1395150033, 1395149893, 1395149793, 1395149747, 1395149679, 1395149670, 1395149562, 1395149543, 1395149458, 1395149453, 1395149452, 1395149451, 1395149450, 1395149446, 1395149445, 1395149429, 1395149423, 1395149419, 1395149418, 1395149415, 1395149407, 1395149405, 1395149396, 1395149393, 1395149380, 1395149379, 1395149370, 1395149363, 1395149362, 1395149358, 1395149355, 1395149353, 1395149351, 1395149348, 1395149347, 1395149346, 1395149344, 1395149341, 1395149338, 1395149337, 1395149335, 1395149333, 1395149326, 1395149320, 1395149317, 1395149308, 1395149303, 1395149298, 1395149297, 1395149292, 1395149287, 1395149266, 1395149264, 1395149254, 1395149241, 1395149239, 1395149235, 1395149229, 1395149228, 1395149225, 1395149222, 1395149219, 1395149215, 1395149203, 1395149170, 1395149153]} final : False mtd_id 4302 list_pids : [1395150402, 1395150380, 1395150366, 1395150363, 1395150359, 1395150300, 1395150275, 1395150212, 1395150033, 1395149893, 1395149793, 1395149747] Looping around the photos to save general results len do output : 12 /1395150402.Didn't retrieve data . /1395150380.Didn't retrieve data . /1395150366.Didn't retrieve data . /1395150363.Didn't retrieve data . /1395150359.Didn't retrieve data . /1395150300.Didn't retrieve data . /1395150275.Didn't retrieve data . /1395150212.Didn't retrieve data . /1395150033.Didn't retrieve data . /1395149893.Didn't retrieve data . /1395149793.Didn't retrieve data . /1395149747.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, '4073958') ('4302', '28693616', '1395150402', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150380', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150366', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150363', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150359', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150300', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150275', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150212', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150033', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395149893', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395149793', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395149747', None, None, None, None, None, '4073958') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 36 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', '28693616', '1395150402', '0.03257721176718173', None, None, None, None, '4073958'), ('4302', '28693616', '1395150380', '0.03257721176718173', None, None, None, None, '4073958'), ('4302', '28693616', '1395150366', '0.03257721176718173', None, None, None, None, '4073958'), ('4302', '28693616', '1395150363', '0.03257721176718173', None, None, None, None, '4073958'), ('4302', '28693616', '1395150359', '0.03257721176718173', None, None, None, None, '4073958'), ('4302', '28693616', '1395150300', '0.03257721176718173', None, None, None, None, '4073958'), ('4302', '28693616', '1395150275', '0.03257721176718173', None, None, None, None, '4073958'), ('4302', '28693616', '1395150212', '0.03257721176718173', None, None, None, None, '4073958'), ('4302', '28693616', '1395150033', '0.03257721176718173', None, None, None, None, '4073958'), ('4302', '28693616', '1395149893', '0.03257721176718173', None, None, None, None, '4073958'), ('4302', '28693616', '1395149793', '0.03257721176718173', None, None, None, None, '4073958'), ('4302', '28693616', '1395149747', '0.03257721176718173', None, None, None, None, '4073958')] time used for this insertion : 0.014292240142822266 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06382560729980469 time spend to save output : 0.014924049377441406 total time spend for step 2 : 0.0787496566772461 step3:velours_tree Wed Nov 19 06:14:57 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 : {28693616: [{'cartonnette': 28693638, 'Teint_Dans_La_Masse': 28693639, 'autre_refus': 28693640, 'mal_croppe': 28693641, 'flou': 28693642, 'papier': 28693643, 'metal': 28693644, 'plastique': 28693645, 'kraft': 28693646, 'Carton_brun': 28693647, 'environnement': 28693648, 'Carton_gris': 28693649}]} input_args_next_step : {28693616: ()} output_args : {28693616: [{'cartonnette': 28693638, 'Teint_Dans_La_Masse': 28693639, 'autre_refus': 28693640, 'mal_croppe': 28693641, 'flou': 28693642, 'papier': 28693643, 'metal': 28693644, 'plastique': 28693645, 'kraft': 28693646, 'Carton_brun': 28693647, 'environnement': 28693648, 'Carton_gris': 28693649}]} args : 28693616 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 : ({'cartonnette': 28693638, 'Teint_Dans_La_Masse': 28693639, 'autre_refus': 28693640, 'mal_croppe': 28693641, 'flou': 28693642, 'papier': 28693643, 'metal': 28693644, 'plastique': 28693645, 'kraft': 28693646, 'Carton_brun': 28693647, 'environnement': 28693648, 'Carton_gris': 28693649},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28693616) 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([28693616]) 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.30782389640808105 time spend to save output : 7.224082946777344e-05 total time spend for step 3 : 0.30789613723754883 step4:send_mail_cod Wed Nov 19 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 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 : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ('0.03257721176718173',), 1395149893: ('0.03257721176718173',), 1395149793: ('0.03257721176718173',), 1395149747: ('0.03257721176718173',)} input_args_next_step : {1395150402: ()} output_args : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ('0.03257721176718173',), 1395149893: ('0.03257721176718173',), 1395149793: ('0.03257721176718173',), 1395149747: ('0.03257721176718173',)} args : 1395150402 depend.output_id : 0 input_args_next_step : {1395150402: ('0.03257721176718173',), 1395150380: ()} output_args : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ('0.03257721176718173',), 1395149893: ('0.03257721176718173',), 1395149793: ('0.03257721176718173',), 1395149747: ('0.03257721176718173',)} args : 1395150380 depend.output_id : 0 input_args_next_step : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ()} output_args : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ('0.03257721176718173',), 1395149893: ('0.03257721176718173',), 1395149793: ('0.03257721176718173',), 1395149747: ('0.03257721176718173',)} args : 1395150366 depend.output_id : 0 input_args_next_step : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ()} output_args : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ('0.03257721176718173',), 1395149893: ('0.03257721176718173',), 1395149793: ('0.03257721176718173',), 1395149747: ('0.03257721176718173',)} args : 1395150363 depend.output_id : 0 input_args_next_step : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ()} output_args : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ('0.03257721176718173',), 1395149893: ('0.03257721176718173',), 1395149793: ('0.03257721176718173',), 1395149747: ('0.03257721176718173',)} args : 1395150359 depend.output_id : 0 input_args_next_step : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ()} output_args : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ('0.03257721176718173',), 1395149893: ('0.03257721176718173',), 1395149793: ('0.03257721176718173',), 1395149747: ('0.03257721176718173',)} args : 1395150300 depend.output_id : 0 input_args_next_step : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ()} output_args : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ('0.03257721176718173',), 1395149893: ('0.03257721176718173',), 1395149793: ('0.03257721176718173',), 1395149747: ('0.03257721176718173',)} args : 1395150275 depend.output_id : 0 input_args_next_step : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ()} output_args : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ('0.03257721176718173',), 1395149893: ('0.03257721176718173',), 1395149793: ('0.03257721176718173',), 1395149747: ('0.03257721176718173',)} args : 1395150212 depend.output_id : 0 input_args_next_step : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ()} output_args : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ('0.03257721176718173',), 1395149893: ('0.03257721176718173',), 1395149793: ('0.03257721176718173',), 1395149747: ('0.03257721176718173',)} args : 1395150033 depend.output_id : 0 input_args_next_step : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ('0.03257721176718173',), 1395149893: ()} output_args : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ('0.03257721176718173',), 1395149893: ('0.03257721176718173',), 1395149793: ('0.03257721176718173',), 1395149747: ('0.03257721176718173',)} args : 1395149893 depend.output_id : 0 input_args_next_step : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ('0.03257721176718173',), 1395149893: ('0.03257721176718173',), 1395149793: ()} output_args : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ('0.03257721176718173',), 1395149893: ('0.03257721176718173',), 1395149793: ('0.03257721176718173',), 1395149747: ('0.03257721176718173',)} args : 1395149793 depend.output_id : 0 input_args_next_step : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ('0.03257721176718173',), 1395149893: ('0.03257721176718173',), 1395149793: ('0.03257721176718173',), 1395149747: ()} output_args : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ('0.03257721176718173',), 1395149893: ('0.03257721176718173',), 1395149793: ('0.03257721176718173',), 1395149747: ('0.03257721176718173',)} args : 1395149747 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 : {28693616: [{'cartonnette': 28693638, 'Teint_Dans_La_Masse': 28693639, 'autre_refus': 28693640, 'mal_croppe': 28693641, 'flou': 28693642, 'papier': 28693643, 'metal': 28693644, 'plastique': 28693645, 'kraft': 28693646, 'Carton_brun': 28693647, 'environnement': 28693648, 'Carton_gris': 28693649}]} input_args_next_step : {1395150402: ('0.03257721176718173',), 1395150380: ('0.03257721176718173',), 1395150366: ('0.03257721176718173',), 1395150363: ('0.03257721176718173',), 1395150359: ('0.03257721176718173',), 1395150300: ('0.03257721176718173',), 1395150275: ('0.03257721176718173',), 1395150212: ('0.03257721176718173',), 1395150033: ('0.03257721176718173',), 1395149893: ('0.03257721176718173',), 1395149793: ('0.03257721176718173',), 1395149747: ('0.03257721176718173',), 28693616: ()} output_args : {28693616: [{'cartonnette': 28693638, 'Teint_Dans_La_Masse': 28693639, 'autre_refus': 28693640, 'mal_croppe': 28693641, 'flou': 28693642, 'papier': 28693643, 'metal': 28693644, 'plastique': 28693645, 'kraft': 28693646, 'Carton_brun': 28693647, 'environnement': 28693648, 'Carton_gris': 28693649}]} args : 28693616 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 :13, first value : ('0.03257721176718173',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28693616) 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 (1395150402,1395150380,1395150366,1395150363,1395150359,1395150300,1395150275,1395150212,1395150033,1395149893,1395149793,1395149747) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1395149747 begin to download photo : 1395150033 begin to download photo : 1395150300 begin to download photo : 1395150366 download finish for photo 1395150300 begin to download photo : 1395150359 download finish for photo 1395149747 begin to download photo : 1395149793 download finish for photo 1395150366 begin to download photo : 1395150380 download finish for photo 1395150033 begin to download photo : 1395150212 download finish for photo 1395150359 begin to download photo : 1395150363 download finish for photo 1395150380 begin to download photo : 1395150402 download finish for photo 1395149793 begin to download photo : 1395149893 download finish for photo 1395150212 begin to download photo : 1395150275 download finish for photo 1395150275 download finish for photo 1395150363 download finish for photo 1395149893 download finish for photo 1395150402 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P28693616_19-11-2025_06_14_58.pdf 28693638 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=28693638 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1395149866: '1763529087_3234187_1395149170_4faed896cdfdd8f266f2cd5a4b65f5e8_rle_crop_4038384300_0.png'} change filename to text .imagette286936381763529298/ imagette286936381763529298/1763529087_3234187_1395149170_4faed896cdfdd8f266f2cd5a4b65f5e8_rle_crop_4038384300_0.png.png imagette286936401763529298/ imagette286936411763529298/ imagette286936421763529298/ imagette286936441763529298/ imagette286936451763529298/ imagette286936461763529298/ imagette286936391763529298/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/19/e291bcdeda07c886a5c2a5c14bd76fc4_47329992.png imagette286936381763529298 28693640 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=28693640 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette286936401763529298 28693641 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=28693641 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette286936411763529298 28693642 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=28693642 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette286936421763529298 28693644 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=28693644 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette286936441763529298 28693645 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=28693645 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette286936451763529298 28693646 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=28693646 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette286936461763529298 28693639 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=28693639 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette286936391763529298 28693647 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=28693647 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1395149883: '1763529087_3234187_1395149170_4faed896cdfdd8f266f2cd5a4b65f5e8_rle_crop_4038384298_0.png'} change filename to text .imagette286936471763529298/ imagette286936471763529298/1763529087_3234187_1395149170_4faed896cdfdd8f266f2cd5a4b65f5e8_rle_crop_4038384298_0.png.png imagette286936491763529298/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/19/4fc7e2342f87b87907bf6b89a215c2aa_52068378.png imagette286936471763529298 28693649 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=28693649 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette286936491763529298 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=28693616 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/28693661,28693663,28693664,28693665,28693667,28693668,28693669,28693670,28693671,28693672,28693673,28693674?tags=cartonnette,Teint_Dans_La_Masse,autre_refus,mal_croppe,flou,papier,metal,plastique,kraft,Carton_brun,environnement,Carton_gris your option no_mail is active, we will not send the real mail to your client args[1395150402] : ('0.03257721176718173',) no score found for photo 1395150402 We are sending mail with results at report@fotonower.com args[1395150380] : ('0.03257721176718173',) no score found for photo 1395150380 We are sending mail with results at report@fotonower.com args[1395150366] : ('0.03257721176718173',) no score found for photo 1395150366 We are sending mail with results at report@fotonower.com args[1395150363] : ('0.03257721176718173',) no score found for photo 1395150363 We are sending mail with results at report@fotonower.com args[1395150359] : ('0.03257721176718173',) no score found for photo 1395150359 We are sending mail with results at report@fotonower.com args[1395150300] : ('0.03257721176718173',) no score found for photo 1395150300 We are sending mail with results at report@fotonower.com args[1395150275] : ('0.03257721176718173',) no score found for photo 1395150275 We are sending mail with results at report@fotonower.com args[1395150212] : ('0.03257721176718173',) no score found for photo 1395150212 We are sending mail with results at report@fotonower.com args[1395150033] : ('0.03257721176718173',) no score found for photo 1395150033 We are sending mail with results at report@fotonower.com args[1395149893] : ('0.03257721176718173',) no score found for photo 1395149893 We are sending mail with results at report@fotonower.com args[1395149793] : ('0.03257721176718173',) no score found for photo 1395149793 We are sending mail with results at report@fotonower.com args[1395149747] : ('0.03257721176718173',) no score found for photo 1395149747 We are sending mail with results at report@fotonower.com refus_total : 0.03257721176718173 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=28693616 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_P28693616_19-11-2025_06_14_58.pdf results_Auto_P28693616_19-11-2025_06_14_58.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28693616_19-11-2025_06_14_58.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','28693616','results_Auto_P28693616_19-11-2025_06_14_58.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28693616_19-11-2025_06_14_58.pdf','pdf','','0.11','0.03257721176718173') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28693616]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1395150402, 1395150380, 1395150366, 1395150363, 1395150359, 1395150300, 1395150275, 1395150212, 1395150033, 1395149893, 1395149793, 1395149747] map_info['map_portfolio_photo'] : {28693616: [1395150402, 1395150380, 1395150366, 1395150363, 1395150359, 1395150300, 1395150275, 1395150212, 1395150033, 1395149893, 1395149793, 1395149747, 1395149679, 1395149670, 1395149562, 1395149543, 1395149458, 1395149453, 1395149452, 1395149451, 1395149450, 1395149446, 1395149445, 1395149429, 1395149423, 1395149419, 1395149418, 1395149415, 1395149407, 1395149405, 1395149396, 1395149393, 1395149380, 1395149379, 1395149370, 1395149363, 1395149362, 1395149358, 1395149355, 1395149353, 1395149351, 1395149348, 1395149347, 1395149346, 1395149344, 1395149341, 1395149338, 1395149337, 1395149335, 1395149333, 1395149326, 1395149320, 1395149317, 1395149308, 1395149303, 1395149298, 1395149297, 1395149292, 1395149287, 1395149266, 1395149264, 1395149254, 1395149241, 1395149239, 1395149235, 1395149229, 1395149228, 1395149225, 1395149222, 1395149219, 1395149215, 1395149203, 1395149170, 1395149153]} final : False mtd_id 4302 list_pids : [1395150402, 1395150380, 1395150366, 1395150363, 1395150359, 1395150300, 1395150275, 1395150212, 1395150033, 1395149893, 1395149793, 1395149747] 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, '4073958') ('4302', '28693616', '1395150402', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150380', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150366', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150363', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150359', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150300', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150275', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150212', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150033', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395149893', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395149793', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395149747', None, None, None, None, None, '4073958') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 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', '28693616', '1395150402', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150380', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150366', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150363', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150359', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150300', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150275', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150212', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150033', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395149893', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395149793', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395149747', None, None, None, None, None, '4073958')] time used for this insertion : 0.014782428741455078 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.9919631481170654 time spend to save output : 0.015065193176269531 total time spend for step 4 : 2.007028341293335 step5:split_time_score Wed Nov 19 06:15:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['28693616'] 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 : [('28693616',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28693616) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1395150033: {'path': 'temp/1763529298_856553_1395150033_18e39d9fcb8580a88ef41098492e1563.jpg', 'extension': 'jpg'}, 1395150212: {'path': 'temp/1763529298_856553_1395150212_c0d5a31b1d0990115373914eccf9251e.jpg', 'extension': 'jpg'}, 1395150275: {'path': 'temp/1763529298_856553_1395150275_8e19662a59d7819807956196f116aba4.jpg', 'extension': 'jpg'}, 1395150300: {'path': 'temp/1763529298_856553_1395150300_7959e17ec692e762e87f7acb56f9020c.jpg', 'extension': 'jpg'}, 1395150359: {'path': 'temp/1763529298_856553_1395150359_b542439258d417c1ad1f858b2a8a618c.jpg', 'extension': 'jpg'}, 1395150363: {'path': 'temp/1763529298_856553_1395150363_6fa53fa33508f2eda3d31cedb47536e6.jpg', 'extension': 'jpg'}, 1395149747: {'path': 'temp/1763529298_856553_1395149747_d29486de9566fbeebec0f2f6deed1945.jpg', 'extension': 'jpg'}, 1395149793: {'path': 'temp/1763529298_856553_1395149793_556f55493dd6285419dc63ebee3f1698.jpg', 'extension': 'jpg'}, 1395149893: {'path': 'temp/1763529298_856553_1395149893_9e23a151a71265fe9d6a47e6951cbb86.jpg', 'extension': 'jpg'}, 1395150366: {'path': 'temp/1763529298_856553_1395150366_46dd73282b23bb49f95d59a2fa3aa371.jpg', 'extension': 'jpg'}, 1395150380: {'path': 'temp/1763529298_856553_1395150380_2bb68ede06358bf6dcb36a49c00899af.jpg', 'extension': 'jpg'}, 1395150402: {'path': 'temp/1763529298_856553_1395150402_d8bb947f8958fa47116d09d00348e36f.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 = 28693616; (('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 = 28693616 group by h (('06', 74),) 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=28693616 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 (28693616) 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 (28693616) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 19112025 28693616 Nombre de photos uploadées : 74 / 23040 (0%) 19112025 28693616 Nombre de photos taguées (types de déchets): 0 / 74 (0%) 19112025 28693616 Nombre de photos taguées (volume) : 0 / 74 (0%) [{'photo_id': 1395149170, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/19/4faed896cdfdd8f266f2cd5a4b65f5e8.jpg', 'username': None, 'uploaded_at': 1763528467, 'text': 'image_19112025_06_00_15_10203.jpg'}, {'photo_id': 1395149153, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/19/351bbe234d2d5c2435c7b879684fdb03.jpg', 'username': None, 'uploaded_at': 1763528467, 'text': 'image_19112025_06_00_25_10142.jpg'}, {'photo_id': 1395149241, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/19/ef7a93de51f27ad5f4c945829f95b323.jpg', 'username': None, 'uploaded_at': 1763528532, 'text': 'image_19112025_06_00_55_10134.jpg'}, {'photo_id': 1395149228, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/19/06715458d737f6b99c43f99032a999ff.jpg', 'username': None, 'uploaded_at': 1763528532, 'text': 'image_19112025_06_01_05_10134.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.6226043701171875e-06 elapsed_time : order_list_meta_photo_and_scores 7.3909759521484375e-06 ?????????????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.004309892654418945 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 28693616, '2025-11-19' ) 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-19' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2606833,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.2097024917602539 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= 2606833 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28683578, 'dashboard_result_id': 17477713, '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_P28683578_19-11-2025_00_18_57.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28683583, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28683584, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28683585, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28683586, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28683587, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28683588, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28683589, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28683590, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28683591, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28683592, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28683593, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28683594, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28683926, 'dashboard_result_id': 17477714, '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_P28683926_19-11-2025_00_32_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28684020, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28684021, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28684022, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28684023, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28684024, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28684025, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28684026, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28684027, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28684028, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28684029, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28684030, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28684031, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28684479, 'dashboard_result_id': 17477715, '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_P28684479_19-11-2025_00_48_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28684486, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28684487, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28684488, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28684489, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28684490, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28684491, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28684492, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28684493, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28684494, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28684495, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28684496, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28684497, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28684827, 'dashboard_result_id': 17477716, '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_P28684827_19-11-2025_01_02_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28684836, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28684837, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28684838, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28684839, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28684840, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28684841, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28684842, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28684843, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28684844, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28684845, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28684846, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28684847, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28686230, 'dashboard_result_id': 17477717, '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_P28686230_19-11-2025_01_47_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28686234, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28686235, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28686236, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28686237, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28686238, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28686239, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28686240, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28686241, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28686242, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28686243, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28686244, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28686245, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28686572, 'dashboard_result_id': 17477718, '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_P28686572_19-11-2025_02_08_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28686581, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28686582, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28686583, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28686584, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28686585, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28686586, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28686587, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28686588, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28686589, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28686590, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28686591, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28686592, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28686897, 'dashboard_result_id': 17477719, '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_P28686897_19-11-2025_02_18_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28686918, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28686919, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28686920, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28686921, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28686922, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28686923, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28686924, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28686925, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28686926, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28686927, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28686928, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28686929, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28687492, 'dashboard_result_id': 17477720, '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_P28687492_19-11-2025_02_32_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28687526, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28687527, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28687528, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28687529, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28687530, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28687531, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28687532, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28687533, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28687534, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28687535, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28687536, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28687537, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28688047, 'dashboard_result_id': 17477721, '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_P28688047_19-11-2025_02_49_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28688069, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28688070, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28688071, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28688072, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28688073, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28688074, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28688075, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28688076, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28688077, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28688078, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28688079, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28688080, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28688672, 'dashboard_result_id': 17477722, '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_P28688672_19-11-2025_03_28_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28688673, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28688674, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28688675, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28688676, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28688677, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28688678, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28688679, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28688680, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28688681, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28688684, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28688686, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28688688, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28689189, 'dashboard_result_id': 17477723, '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_P28689189_19-11-2025_03_29_30.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28689202, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28689203, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28689204, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28689205, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28689206, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28689207, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28689208, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28689209, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28689210, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28689211, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28689212, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28689213, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28689419, 'dashboard_result_id': 17477724, '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_P28689419_19-11-2025_03_49_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28689452, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28689453, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28689454, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28689455, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28689456, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28689457, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28689458, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28689459, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28689460, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28689461, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28689462, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28689463, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28689948, 'dashboard_result_id': 17477725, '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_P28689948_19-11-2025_03_49_29.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28689981, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28689982, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28689983, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28689984, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28689985, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28689986, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28689987, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28689988, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28689990, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28689991, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28689992, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28689993, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28690373, 'dashboard_result_id': 17477726, '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_P28690373_19-11-2025_04_59_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28690393, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28690394, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28690395, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28690396, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28690397, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28690398, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28690399, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28690400, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28690401, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28690402, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28690403, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28690404, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28690950, 'dashboard_result_id': 17477727, '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_P28690950_19-11-2025_06_01_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28691008, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28691009, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28691010, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28691011, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28691012, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28691013, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28691014, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28691015, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28691016, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28691017, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28691018, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28691019, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28691357, 'dashboard_result_id': 17477728, '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_P28691357_19-11-2025_04_49_31.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28691358, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28691359, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28691360, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28691361, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28691362, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28691363, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28691364, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28691365, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28691366, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28691367, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28691368, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28691369, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28692204, 'dashboard_result_id': 17477729, '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_P28692204_19-11-2025_05_31_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28692256, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28692257, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28692258, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28692259, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28692260, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28692261, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28692262, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28692263, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28692264, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28692265, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28692266, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28692267, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28692570, 'dashboard_result_id': 17477730, '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_P28692570_19-11-2025_05_47_29.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28692576, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28692577, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28692578, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28692579, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28692580, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28692581, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28692582, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28692583, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28692584, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28692585, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28692586, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28692587, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28692799, 'dashboard_result_id': 17477731, '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_P28692799_19-11-2025_05_53_28.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28692809, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28692810, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28692811, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28692812, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28692813, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28692814, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28692815, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28692816, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28692817, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28692818, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28692819, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28692820, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28693135, 'dashboard_result_id': 17477732, '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_P28693135_19-11-2025_06_01_13.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28693144, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28693145, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28693146, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28693147, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28693148, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28693149, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28693150, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28693151, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28693152, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28693153, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28693154, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28693155, 'pht': 3726}}"}, {'dashboat_entry_day': 2606833, 'dashboard_run_id': 2615616, 'mtr_portfolio_id': 28693616, 'dashboard_result_id': 17477733, '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_P28693616_19-11-2025_06_12_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28693638, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28693639, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28693640, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28693641, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28693642, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28693643, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28693644, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28693645, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28693646, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28693647, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28693648, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28693649, '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 = 28683578 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': 4071775, 'mtr_portfolio_id': 28683578, 'created_at': datetime.datetime(2025, 11, 19, 0, 18, 57), 'result': '0.06859068223752736', 'result_long': None, 'result_double': None}] Qualite : 0.06859068223752736 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28683578 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28683578_19-11-2025_00_18_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28683578 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_P28683578_19-11-2025_00_18_57.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28683583, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28683584, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28683585, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28683586, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28683587, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28683588, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28683589, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28683590, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28683591, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28683592, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28683593, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28683594, 'pht': 3726}}" where mtr_portfolio_id = 28683578 and dashboard_run_id = 2615616 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`=28683578 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477713, 0.06859068223752736, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28683578_19-11-2025_00_18_57.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28683583, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28683584, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28683585, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28683586, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28683587, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28683588, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28683589, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28683590, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28683591, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28683592, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28683593, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28683594, '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 = 28683926 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': 4071817, 'mtr_portfolio_id': 28683926, 'created_at': datetime.datetime(2025, 11, 19, 0, 32, 58), 'result': '0.04735229230456491', 'result_long': None, 'result_double': None}] Qualite : 0.04735229230456491 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28683926 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28683926_19-11-2025_00_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28683926 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_P28683926_19-11-2025_00_32_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28684020, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28684021, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28684022, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28684023, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28684024, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28684025, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28684026, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28684027, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28684028, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28684029, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28684030, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28684031, 'pht': 3726}}" where mtr_portfolio_id = 28683926 and dashboard_run_id = 2615616 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`=28683926 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477714, 0.04735229230456491, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28683926_19-11-2025_00_32_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28684020, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28684021, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28684022, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28684023, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28684024, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28684025, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28684026, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28684027, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28684028, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28684029, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28684030, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28684031, '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 = 28684479 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': 4071877, 'mtr_portfolio_id': 28684479, 'created_at': datetime.datetime(2025, 11, 19, 0, 48, 57), 'result': '0.05278299411704772', 'result_long': None, 'result_double': None}] Qualite : 0.05278299411704772 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28684479 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28684479_19-11-2025_00_48_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28684479 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_P28684479_19-11-2025_00_48_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28684486, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28684487, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28684488, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28684489, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28684490, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28684491, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28684492, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28684493, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28684494, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28684495, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28684496, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28684497, 'pht': 3726}}" where mtr_portfolio_id = 28684479 and dashboard_run_id = 2615616 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`=28684479 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477715, 0.05278299411704772, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28684479_19-11-2025_00_48_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28684486, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28684487, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28684488, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28684489, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28684490, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28684491, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28684492, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28684493, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28684494, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28684495, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28684496, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28684497, '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 = 28684827 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': 4071952, 'mtr_portfolio_id': 28684827, 'created_at': datetime.datetime(2025, 11, 19, 1, 2, 58), 'result': '0.04383896474179003', 'result_long': None, 'result_double': None}] Qualite : 0.04383896474179003 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28684827 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28684827_19-11-2025_01_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28684827 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_P28684827_19-11-2025_01_02_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28684836, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28684837, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28684838, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28684839, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28684840, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28684841, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28684842, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28684843, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28684844, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28684845, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28684846, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28684847, 'pht': 3726}}" where mtr_portfolio_id = 28684827 and dashboard_run_id = 2615616 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`=28684827 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477716, 0.04383896474179003, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28684827_19-11-2025_01_02_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28684836, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28684837, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28684838, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28684839, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28684840, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28684841, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28684842, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28684843, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28684844, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28684845, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28684846, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28684847, '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 = 28686230 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': 4072200, 'mtr_portfolio_id': 28686230, 'created_at': datetime.datetime(2025, 11, 19, 1, 46, 59), 'result': '0.039356498307019164', 'result_long': None, 'result_double': None}] Qualite : 0.039356498307019164 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28686230 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28686230_19-11-2025_01_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28686230 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_P28686230_19-11-2025_01_47_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28686234, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28686235, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28686236, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28686237, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28686238, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28686239, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28686240, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28686241, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28686242, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28686243, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28686244, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28686245, 'pht': 3726}}" where mtr_portfolio_id = 28686230 and dashboard_run_id = 2615616 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`=28686230 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477717, 0.039356498307019164, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28686230_19-11-2025_01_47_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28686234, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28686235, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28686236, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28686237, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28686238, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28686239, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28686240, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28686241, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28686242, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28686243, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28686244, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28686245, '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 = 28686572 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': 4072259, 'mtr_portfolio_id': 28686572, 'created_at': datetime.datetime(2025, 11, 19, 2, 8, 59), 'result': '0.05508646509665104', 'result_long': None, 'result_double': None}] Qualite : 0.05508646509665104 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28686572 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28686572_19-11-2025_02_08_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28686572 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_P28686572_19-11-2025_02_08_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28686581, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28686582, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28686583, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28686584, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28686585, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28686586, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28686587, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28686588, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28686589, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28686590, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28686591, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28686592, 'pht': 3726}}" where mtr_portfolio_id = 28686572 and dashboard_run_id = 2615616 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`=28686572 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477718, 0.05508646509665104, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28686572_19-11-2025_02_08_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28686581, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28686582, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28686583, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28686584, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28686585, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28686586, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28686587, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28686588, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28686589, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28686590, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28686591, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28686592, '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 = 28686897 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': 4072364, 'mtr_portfolio_id': 28686897, 'created_at': datetime.datetime(2025, 11, 19, 2, 18, 57), 'result': '0.061163519065488246', 'result_long': None, 'result_double': None}] Qualite : 0.061163519065488246 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28686897 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28686897_19-11-2025_02_18_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28686897 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_P28686897_19-11-2025_02_18_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28686918, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28686919, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28686920, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28686921, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28686922, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28686923, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28686924, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28686925, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28686926, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28686927, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28686928, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28686929, 'pht': 3726}}" where mtr_portfolio_id = 28686897 and dashboard_run_id = 2615616 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`=28686897 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477719, 0.061163519065488246, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28686897_19-11-2025_02_18_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28686918, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28686919, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28686920, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28686921, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28686922, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28686923, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28686924, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28686925, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28686926, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28686927, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28686928, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28686929, '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 = 28687492 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': 4072450, 'mtr_portfolio_id': 28687492, 'created_at': datetime.datetime(2025, 11, 19, 2, 32, 58), 'result': '0.046952447594466894', 'result_long': None, 'result_double': None}] Qualite : 0.046952447594466894 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28687492 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28687492_19-11-2025_02_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28687492 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_P28687492_19-11-2025_02_32_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28687526, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28687527, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28687528, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28687529, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28687530, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28687531, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28687532, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28687533, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28687534, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28687535, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28687536, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28687537, 'pht': 3726}}" where mtr_portfolio_id = 28687492 and dashboard_run_id = 2615616 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`=28687492 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477720, 0.046952447594466894, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28687492_19-11-2025_02_32_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28687526, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28687527, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28687528, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28687529, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28687530, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28687531, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28687532, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28687533, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28687534, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28687535, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28687536, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28687537, '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 = 28688047 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': 4072571, 'mtr_portfolio_id': 28688047, 'created_at': datetime.datetime(2025, 11, 19, 2, 49), 'result': '0.02812286848423722', 'result_long': None, 'result_double': None}] Qualite : 0.02812286848423722 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28688047 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28688047_19-11-2025_02_49_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28688047 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_P28688047_19-11-2025_02_49_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28688069, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28688070, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28688071, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28688072, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28688073, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28688074, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28688075, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28688076, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28688077, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28688078, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28688079, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28688080, 'pht': 3726}}" where mtr_portfolio_id = 28688047 and dashboard_run_id = 2615616 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`=28688047 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477721, 0.02812286848423722, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28688047_19-11-2025_02_49_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28688069, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28688070, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28688071, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28688072, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28688073, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28688074, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28688075, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28688076, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28688077, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28688078, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28688079, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28688080, '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 = 28688672 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': 4072668, 'mtr_portfolio_id': 28688672, 'created_at': datetime.datetime(2025, 11, 19, 3, 28, 58), 'result': '0.06533965874564587', 'result_long': None, 'result_double': None}] Qualite : 0.06533965874564587 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28688672 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28688672_19-11-2025_03_28_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28688672 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_P28688672_19-11-2025_03_28_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28688673, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28688674, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28688675, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28688676, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28688677, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28688678, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28688679, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28688680, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28688681, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28688684, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28688686, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28688688, 'pht': 3726}}" where mtr_portfolio_id = 28688672 and dashboard_run_id = 2615616 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`=28688672 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477722, 0.06533965874564587, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28688672_19-11-2025_03_28_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28688673, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28688674, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28688675, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28688676, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28688677, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28688678, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28688679, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28688680, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28688681, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28688684, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28688686, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28688688, '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 = 28689189 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': 4072750, 'mtr_portfolio_id': 28689189, 'created_at': datetime.datetime(2025, 11, 19, 3, 29, 29), 'result': '0.051424722326917346', 'result_long': None, 'result_double': None}] Qualite : 0.051424722326917346 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28689189 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28689189_19-11-2025_03_29_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28689189 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_P28689189_19-11-2025_03_29_30.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28689202, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28689203, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28689204, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28689205, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28689206, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28689207, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28689208, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28689209, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28689210, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28689211, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28689212, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28689213, 'pht': 3726}}" where mtr_portfolio_id = 28689189 and dashboard_run_id = 2615616 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`=28689189 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477723, 0.051424722326917346, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28689189_19-11-2025_03_29_30.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28689202, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28689203, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28689204, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28689205, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28689206, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28689207, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28689208, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28689209, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28689210, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28689211, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28689212, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28689213, '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 = 28689419 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': 4072815, 'mtr_portfolio_id': 28689419, 'created_at': datetime.datetime(2025, 11, 19, 3, 49), 'result': '0.06120917962167015', 'result_long': None, 'result_double': None}] Qualite : 0.06120917962167015 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28689419 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28689419_19-11-2025_03_49_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28689419 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_P28689419_19-11-2025_03_49_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28689452, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28689453, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28689454, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28689455, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28689456, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28689457, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28689458, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28689459, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28689460, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28689461, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28689462, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28689463, 'pht': 3726}}" where mtr_portfolio_id = 28689419 and dashboard_run_id = 2615616 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`=28689419 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477724, 0.06120917962167015, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28689419_19-11-2025_03_49_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28689452, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28689453, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28689454, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28689455, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28689456, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28689457, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28689458, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28689459, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28689460, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28689461, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28689462, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28689463, '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 = 28689948 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': 4072922, 'mtr_portfolio_id': 28689948, 'created_at': datetime.datetime(2025, 11, 19, 3, 49, 28), 'result': '0.046299302299172305', 'result_long': None, 'result_double': None}] Qualite : 0.046299302299172305 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28689948 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28689948_19-11-2025_03_49_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28689948 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_P28689948_19-11-2025_03_49_29.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28689981, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28689982, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28689983, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28689984, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28689985, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28689986, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28689987, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28689988, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28689990, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28689991, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28689992, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28689993, 'pht': 3726}}" where mtr_portfolio_id = 28689948 and dashboard_run_id = 2615616 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`=28689948 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477725, 0.046299302299172305, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28689948_19-11-2025_03_49_29.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28689981, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28689982, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28689983, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28689984, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28689985, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28689986, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28689987, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28689988, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28689990, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28689991, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28689992, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28689993, '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 = 28690373 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': 4073022, 'mtr_portfolio_id': 28690373, 'created_at': datetime.datetime(2025, 11, 19, 4, 59, 58), 'result': '0.04552436819199868', 'result_long': None, 'result_double': None}] Qualite : 0.04552436819199868 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28690373 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28690373_19-11-2025_04_59_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28690373 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_P28690373_19-11-2025_04_59_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28690393, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28690394, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28690395, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28690396, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28690397, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28690398, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28690399, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28690400, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28690401, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28690402, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28690403, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28690404, 'pht': 3726}}" where mtr_portfolio_id = 28690373 and dashboard_run_id = 2615616 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`=28690373 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477726, 0.04552436819199868, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28690373_19-11-2025_04_59_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28690393, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28690394, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28690395, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28690396, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28690397, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28690398, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28690399, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28690400, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28690401, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28690402, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28690403, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28690404, '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 = 28690950 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': 4073170, 'mtr_portfolio_id': 28690950, 'created_at': datetime.datetime(2025, 11, 19, 6, 1), 'result': '0.05381331789013537', 'result_long': None, 'result_double': None}] Qualite : 0.05381331789013537 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28690950 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28690950_19-11-2025_06_01_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28690950 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_P28690950_19-11-2025_06_01_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28691008, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28691009, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28691010, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28691011, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28691012, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28691013, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28691014, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28691015, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28691016, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28691017, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28691018, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28691019, 'pht': 3726}}" where mtr_portfolio_id = 28690950 and dashboard_run_id = 2615616 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`=28690950 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477727, 0.05381331789013537, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28690950_19-11-2025_06_01_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28691008, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28691009, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28691010, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28691011, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28691012, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28691013, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28691014, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28691015, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28691016, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28691017, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28691018, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28691019, '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 = 28691357 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 = 28691357 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 = 28691357 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 28691357 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 = 28691357 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': 4073294, 'mtr_portfolio_id': 28691357, 'created_at': datetime.datetime(2025, 11, 19, 4, 49, 30), '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 = 28691357 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28691357_19-11-2025_04_49_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28691357 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_P28691357_19-11-2025_04_49_31.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28691358, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28691359, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28691360, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28691361, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28691362, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28691363, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28691364, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28691365, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28691366, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28691367, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28691368, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28691369, 'pht': 3726}}" where mtr_portfolio_id = 28691357 and dashboard_run_id = 2615616 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`=28691357 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477728, 0.0, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28691357_19-11-2025_04_49_31.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28691358, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28691359, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28691360, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28691361, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28691362, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28691363, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28691364, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28691365, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28691366, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28691367, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28691368, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28691369, '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 = 28692204 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': 4073444, 'mtr_portfolio_id': 28692204, 'created_at': datetime.datetime(2025, 11, 19, 5, 30, 59), 'result': '0.026008078819930072', 'result_long': None, 'result_double': None}] Qualite : 0.026008078819930072 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28692204 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28692204_19-11-2025_05_31_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28692204 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_P28692204_19-11-2025_05_31_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28692256, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28692257, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28692258, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28692259, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28692260, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28692261, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28692262, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28692263, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28692264, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28692265, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28692266, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28692267, 'pht': 3726}}" where mtr_portfolio_id = 28692204 and dashboard_run_id = 2615616 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`=28692204 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477729, 0.026008078819930072, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28692204_19-11-2025_05_31_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28692256, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28692257, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28692258, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28692259, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28692260, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28692261, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28692262, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28692263, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28692264, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28692265, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28692266, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28692267, '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 = 28692570 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': 4073479, 'mtr_portfolio_id': 28692570, 'created_at': datetime.datetime(2025, 11, 19, 5, 47, 29), 'result': '0.05410028750618288', 'result_long': None, 'result_double': None}] Qualite : 0.05410028750618288 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28692570 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28692570_19-11-2025_05_47_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28692570 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_P28692570_19-11-2025_05_47_29.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28692576, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28692577, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28692578, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28692579, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28692580, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28692581, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28692582, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28692583, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28692584, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28692585, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28692586, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28692587, 'pht': 3726}}" where mtr_portfolio_id = 28692570 and dashboard_run_id = 2615618 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`=28692570 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477730, 0.05410028750618288, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28692570_19-11-2025_05_47_29.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28692576, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28692577, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28692578, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28692579, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28692580, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28692581, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28692582, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28692583, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28692584, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28692585, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28692586, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28692587, '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 = 28692799 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': 4073560, 'mtr_portfolio_id': 28692799, 'created_at': datetime.datetime(2025, 11, 19, 5, 53, 28), 'result': '0.057078653336937374', 'result_long': None, 'result_double': None}] Qualite : 0.057078653336937374 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28692799 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28692799_19-11-2025_05_53_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28692799 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_P28692799_19-11-2025_05_53_28.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28692809, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28692810, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28692811, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28692812, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28692813, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28692814, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28692815, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28692816, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28692817, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28692818, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28692819, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28692820, 'pht': 3726}}" where mtr_portfolio_id = 28692799 and dashboard_run_id = 2615618 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`=28692799 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477731, 0.057078653336937374, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28692799_19-11-2025_05_53_28.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28692809, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28692810, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28692811, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28692812, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28692813, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28692814, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28692815, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28692816, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28692817, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28692818, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28692819, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28692820, '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 = 28693135 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': 4073790, 'mtr_portfolio_id': 28693135, 'created_at': datetime.datetime(2025, 11, 19, 6, 5, 30), 'result': '0.04388013355701251', 'result_long': None, 'result_double': None}] Qualite : 0.04388013355701251 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28693135 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28693135_19-11-2025_06_01_13.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28693135 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_P28693135_19-11-2025_06_01_13.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28693144, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28693145, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28693146, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28693147, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28693148, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28693149, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28693150, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28693151, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28693152, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28693153, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28693154, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28693155, 'pht': 3726}}" where mtr_portfolio_id = 28693135 and dashboard_run_id = 2615618 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`=28693135 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477732, 0.04388013355701251, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28693135_19-11-2025_06_01_13.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28693144, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28693145, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28693146, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28693147, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28693148, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28693149, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28693150, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28693151, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28693152, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28693153, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28693154, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28693155, '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 = 28693616 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': 4073958, 'mtr_portfolio_id': 28693616, 'created_at': datetime.datetime(2025, 11, 19, 6, 14, 57), 'result': '0.03257721176718173', 'result_long': None, 'result_double': None}] Qualite : 0.03257721176718173 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28693616 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28693616_19-11-2025_06_14_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28693616 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_P28693616_19-11-2025_06_14_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28693638, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28693639, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28693640, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28693641, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28693642, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28693643, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28693644, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28693645, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28693646, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28693647, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28693648, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28693649, 'pht': 3726}}" where mtr_portfolio_id = 28693616 and dashboard_run_id = 2615618 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`=28693616 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (17477733, 0.03257721176718173, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28693616_19-11-2025_06_14_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28693638, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28693639, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28693640, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28693641, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28693642, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28693643, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28693644, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28693645, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28693646, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28693647, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28693648, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28693649, '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 (28683578,28683926,28684479,28684827,28686230,28686572,28686897,28687492,28688047,28688672,28689189,28689419,28689948,28690373,28690950,28691357,28692204,28692570,28692799,28693135,28693616) result : ((1395115440,), (1395115447,), (1395115450,), (1395115453,), (1395115457,), (1395115461,), (1395115491,), (1395115493,), (1395115496,), (1395115500,), (1395115505,), (1395115549,), (1395115551,), (1395115552,), (1395115580,), (1395115583,), (1395115586,), (1395115589,), (1395115592,), (1395115611,), (1395115618,), (1395115619,), (1395115625,), (1395115629,), (1395115630,), (1395115648,), (1395115684,), (1395115726,), (1395116060,), (1395116093,), (1395116125,), (1395116141,), (1395116336,), (1395116357,), (1395116390,), (1395116424,), (1395116460,), (1395116678,), (1395116686,), (1395116688,), (1395116701,), (1395116706,), (1395116718,), (1395116719,), (1395116727,), (1395116729,), (1395116733,), (1395116750,), (1395116752,), (1395116754,), (1395116758,), (1395116878,), (1395116903,), (1395116915,), (1395116922,), (1395116934,), (1395116991,), (1395117028,), (1395117065,), (1395117100,), (1395117462,), (1395117501,), (1395117538,), (1395117572,), (1395117612,), (1395117652,), (1395117874,), (1395117876,), (1395117888,), (1395117923,), (1395117941,), (1395117957,), (1395117966,), (1395117980,), (1395117981,), (1395117983,), (1395118010,), (1395117994,), (1395117998,), (1395118001,), (1395118004,), (1395118007,), (1395118013,), (1395118015,), (1395118017,), (1395118020,), (1395118024,), (1395118028,), (1395118055,), (1395118058,), (1395118061,), (1395118066,), (1395118080,), (1395118086,), (1395118088,), (1395118089,), (1395118094,), (1395118126,), (1395118132,), (1395118141,), (1395118152,), (1395118170,), (1395118183,), (1395118196,), (1395118198,), (1395118200,), (1395118238,), (1395118239,), (1395118240,), (1395118242,), (1395118246,), (1395118263,), (1395118265,), (1395118267,), (1395118269,), (1395118273,), (1395118297,), (1395118298,), (1395118299,), (1395118302,), (1395118306,), (1395118329,), (1395118331,), (1395118344,), (1395118348,), (1395118354,), (1395118357,), (1395118370,), (1395118373,), (1395118377,), (1395118381,), (1395118384,), (1395118392,), (1395118397,), (1395118399,), (1395118402,), (1395118405,), (1395118407,), (1395118409,), (1395118422,), (1395118423,), (1395118425,), (1395118427,), (1395118434,), (1395118435,), (1395118439,), (1395118440,), (1395118454,), (1395118455,), (1395118457,), (1395118458,), (1395118495,), (1395118504,), (1395118512,), (1395118524,), (1395118539,), (1395118543,), (1395118547,), (1395118551,), (1395118554,), (1395118557,), (1395118562,), (1395118564,), (1395118566,), (1395118568,), (1395118574,), (1395118579,), (1395118585,), (1395118589,), (1395118594,), (1395118596,), (1395118642,), (1395118644,), (1395118648,), (1395118653,), (1395118654,), (1395118655,), (1395118656,), (1395118628,), (1395118632,), (1395118637,), (1395118678,), (1395118682,), (1395118686,), (1395118690,), (1395118693,), (1395118695,), (1395118700,), (1395118702,), (1395118704,), (1395118706,), (1395118741,), (1395118744,), (1395118747,), (1395118750,), (1395118767,), (1395118769,), (1395118772,), (1395118781,), (1395118785,), (1395118788,), (1395118792,), (1395118793,), (1395118794,), (1395118796,), (1395118805,), (1395118810,), (1395118813,), (1395118816,), (1395118855,), (1395118857,), (1395118860,), (1395118865,), (1395118883,), (1395118884,), (1395118886,), (1395118889,), (1395119017,), (1395119025,), (1395119031,), (1395119035,), (1395119040,), (1395119056,), (1395119057,), (1395119058,), (1395119061,), (1395119065,), (1395119085,), (1395119086,), (1395119088,), (1395119091,), (1395119114,), (1395119116,), (1395119120,), (1395119123,), (1395119150,), (1395119152,), (1395119155,), (1395119158,), (1395119162,), (1395119165,), (1395119179,), (1395119186,), (1395119198,), (1395119208,), (1395119227,), (1395119235,), (1395119238,), (1395119241,), (1395119244,), (1395119248,), (1395119257,), (1395119262,), (1395119292,), (1395119275,), (1395119277,), (1395119281,), (1395119285,), (1395119288,), (1395119305,), (1395119306,), (1395119307,), (1395119309,), (1395119313,), (1395119353,), (1395119360,), (1395119361,), (1395119363,), (1395119457,), (1395119458,), (1395119460,), (1395119464,), (1395119493,), (1395119494,), (1395119496,), (1395119499,), (1395119503,), (1395119517,), (1395119539,), (1395119541,), (1395119543,), (1395119547,), (1395119575,), (1395119577,), (1395119580,), (1395119587,), (1395119643,), (1395119649,), (1395119659,), (1395119661,), (1395119666,), (1395119670,), (1395119683,), (1395119685,), (1395119687,), (1395119726,), (1395119728,), (1395119731,), (1395119740,), (1395119749,), (1395119752,), (1395119763,), (1395119765,), (1395119776,), (1395119777,), (1395119792,), (1395119796,), (1395119800,), (1395119829,), (1395119831,), (1395119832,), (1395119834,), (1395119859,), (1395119860,), (1395119861,), (1395119864,), (1395119874,), (1395119884,), (1395119921,), (1395119925,), (1395119934,), (1395119939,), (1395119940,), (1395119946,), (1395119951,), (1395119956,), (1395119960,), (1395119961,), (1395119965,), (1395123686,), (1395123689,), (1395123699,), (1395123704,), (1395123707,), (1395123759,), (1395123762,), (1395123764,), (1395123803,), (1395123827,), (1395123828,), (1395123830,), (1395123833,), (1395123856,), (1395123858,), (1395123860,), (1395123863,), (1395123917,), (1395123919,), (1395123920,), (1395123924,), (1395123959,), (1395123961,), (1395123963,), (1395123971,), (1395123998,), (1395123999,), (1395124000,), (1395124002,), (1395124007,), (1395124012,), (1395124030,), (1395124033,), (1395124041,), (1395124050,), (1395124054,), (1395124062,), (1395124064,), (1395124108,), (1395124109,), (1395124110,), (1395124112,), (1395124115,), (1395124119,), (1395124150,), (1395124153,), (1395124181,), (1395124192,), (1395124199,), (1395124203,), (1395124225,), (1395124227,), (1395124229,), (1395124232,), (1395124238,), (1395124261,), (1395124263,), (1395124266,), (1395124270,), (1395124274,), (1395124279,), (1395124288,), (1395124290,), (1395124310,), (1395124308,), (1395124309,), (1395124335,), (1395124337,), (1395124339,), (1395124418,), (1395124420,), (1395124422,), (1395124425,), (1395124450,), (1395124454,), (1395124459,), (1395124464,), (1395124470,), (1395124475,), (1395124489,), (1395124494,), (1395124518,), (1395124520,), (1395124522,), (1395124525,), (1395124529,), (1395124551,), (1395124552,), (1395124554,), (1395124557,), (1395124560,), (1395124594,), (1395124602,), (1395124606,), (1395124613,), (1395124618,), (1395124662,), (1395124664,), (1395124696,), (1395124699,), (1395124702,), (1395124720,), (1395124721,), (1395124722,), (1395124724,), (1395124742,), (1395124745,), (1395124748,), (1395124753,), (1395124776,), (1395125104,), (1395125109,), (1395125187,), (1395125290,), (1395125812,), (1395125815,), (1395126084,), (1395126087,), (1395126091,), (1395126108,), (1395126110,), (1395126499,), (1395126556,), (1395126559,), (1395126566,), (1395126601,), (1395125504,), (1395125636,), (1395125731,), (1395125787,), (1395125825,), (1395125851,), (1395125902,), (1395125966,), (1395125976,), (1395125979,), (1395126077,), (1395126081,), (1395126083,), (1395126097,), (1395126100,), (1395126103,), (1395126106,), (1395126125,), (1395126129,), (1395126132,), (1395126135,), (1395126139,), (1395126142,), (1395126154,), (1395126158,), (1395126161,), (1395126164,), (1395126168,), (1395126172,), (1395126314,), (1395126351,), (1395126387,), (1395126424,), (1395126462,), (1395126699,), (1395126721,), (1395126740,), (1395126748,), (1395126752,), (1395126756,), (1395126763,), (1395126770,), (1395126775,), (1395126794,), (1395126798,), (1395126802,), (1395126845,), (1395126860,), (1395126865,), (1395126873,), (1395126889,), (1395126924,), (1395127253,), (1395127287,), (1395127540,), (1395127542,), (1395127544,), (1395127590,), (1395127591,), (1395127592,), (1395127595,), (1395127624,), (1395127662,), (1395127959,), (1395127966,), (1395127968,), (1395128117,), (1395128118,), (1395128119,), (1395128411,), (1395128412,), (1395128414,), (1395128439,), (1395128480,), (1395128490,), (1395128542,), (1395128543,), (1395128557,), (1395128546,), (1395128547,), (1395128549,), (1395128553,), (1395128576,), (1395128580,), (1395128582,), (1395128585,), (1395128600,), (1395128601,), (1395128608,), (1395128652,), (1395128693,), (1395128922,), (1395128923,), (1395128924,), (1395128927,), (1395128949,), (1395129125,), (1395129127,), (1395129346,), (1395129356,), (1395129364,), (1395129378,), (1395129389,), (1395129421,), (1395129429,), (1395129437,), (1395129443,), (1395129487,), (1395129488,), (1395129489,), (1395129492,), (1395129531,), (1395129533,), (1395129979,), (1395130011,), (1395130016,), (1395130018,), (1395130022,), (1395130190,), (1395130195,), (1395130198,), (1395130201,), (1395130204,), (1395130207,), (1395130222,), (1395130225,), (1395130226,), (1395130258,), (1395130259,), (1395130260,), (1395130262,), (1395130287,), (1395130289,), (1395130291,), (1395130294,), (1395130298,), (1395130317,), (1395130318,), (1395130322,), (1395130350,), (1395130352,), (1395130359,), (1395130369,), (1395130345,), (1395130347,), (1395130349,), (1395130378,), (1395130386,), (1395130424,), (1395130426,), (1395130427,), (1395130431,), (1395130475,), (1395130477,), (1395130478,), (1395130481,), (1395130499,), (1395130502,), (1395130507,), (1395130513,), (1395130518,), (1395130519,), (1395130526,), (1395130532,), (1395130534,), (1395130536,), (1395130540,), (1395130581,), (1395130583,), (1395130584,), (1395130586,), (1395130660,), (1395130663,), (1395130664,), (1395130666,), (1395130670,), (1395130691,), (1395130693,), (1395130721,), (1395130754,), (1395130793,), (1395130856,), (1395130858,), (1395130860,), (1395130864,), (1395130881,), (1395130883,), (1395130887,), (1395130893,), (1395130909,), (1395130913,), (1395130918,), (1395130935,), (1395130940,), (1395130957,), (1395130959,), (1395130961,), (1395130964,), (1395130968,), (1395130994,), (1395130996,), (1395130998,), (1395131002,), (1395131007,), (1395131017,), (1395131020,), (1395131023,), (1395131026,), (1395131030,), (1395131033,), (1395131038,), (1395131039,), (1395131040,), (1395131042,), (1395131064,), (1395131053,), (1395131055,), (1395131058,), (1395131061,), (1395131088,), (1395131102,), (1395131104,), (1395131113,), (1395131143,), (1395131144,), (1395131145,), (1395131238,), (1395131271,), (1395131277,), (1395131278,), (1395131292,), (1395131323,), (1395131346,), (1395131349,), (1395131352,), (1395131355,), (1395131358,), (1395131366,), (1395131369,), (1395131404,), (1395131407,), (1395131454,), (1395131455,), (1395131470,), (1395131480,), (1395131489,), (1395131517,), (1395131519,), (1395131521,), (1395131523,), (1395131556,), (1395131570,), (1395131572,), (1395131576,), (1395131580,), (1395131584,), (1395131597,), (1395131598,), (1395131601,), (1395131603,), (1395131606,), (1395131621,), (1395131628,), (1395131635,), (1395131639,), (1395131671,), (1395131672,), (1395131674,), (1395131676,), (1395131681,), (1395131685,), (1395131701,), (1395131705,), (1395131708,), (1395131713,), (1395131765,), (1395131772,), (1395132866,), (1395132870,), (1395131755,), (1395131762,), (1395131775,), (1395131777,), (1395131788,), (1395131794,), (1395131795,), (1395131797,), (1395131801,), (1395131803,), (1395131817,), (1395131828,), (1395131833,), (1395131837,), (1395131841,), (1395131843,), (1395131847,), (1395131849,), (1395131856,), (1395131862,), (1395131865,), (1395131873,), (1395131876,), (1395131879,), (1395131884,), (1395131887,), (1395131925,), (1395131930,), (1395131935,), (1395131937,), (1395131940,), (1395131943,), (1395131949,), (1395131953,), (1395131957,), (1395131960,), (1395131963,), (1395131965,), (1395131971,), (1395131973,), (1395131976,), (1395131979,), (1395131981,), (1395131983,), (1395131997,), (1395131998,), (1395132001,), (1395132005,), (1395132007,), (1395132009,), (1395132028,), (1395132030,), (1395132032,), (1395132036,), (1395132041,), (1395132044,), (1395132052,), (1395132055,), (1395132057,), (1395132059,), (1395132062,), (1395132065,), (1395132082,), (1395132086,), (1395132090,), (1395132092,), (1395132095,), (1395132097,), (1395132106,), (1395132116,), (1395132119,), (1395132122,), (1395132126,), (1395132130,), (1395132138,), (1395132140,), (1395132142,), (1395132144,), (1395132147,), (1395132148,), (1395132158,), (1395132161,), (1395132165,), (1395132168,), (1395132170,), (1395132171,), (1395132174,), (1395132178,), (1395132182,), (1395132187,), (1395132195,), (1395132203,), (1395132226,), (1395132233,), (1395132280,), (1395132298,), (1395132301,), (1395132357,), (1395132358,), (1395132360,), (1395132362,), (1395132377,), (1395132505,), (1395132542,), (1395132563,), (1395132568,), (1395132593,), (1395132596,), (1395132847,), (1395132849,), (1395132210,), (1395132213,), (1395132216,), (1395132219,), (1395132238,), (1395132258,), (1395132262,), (1395132273,), (1395132277,), (1395132288,), (1395132289,), (1395132290,), (1395132293,), (1395132319,), (1395132320,), (1395132322,), (1395132328,), (1395132335,), (1395132344,), (1395132356,), (1395132486,), (1395132502,), (1395132574,), (1395132576,), (1395132581,), (1395132586,), (1395132602,), (1395132605,), (1395132607,), (1395132623,), (1395132658,), (1395132700,), (1395132756,), (1395132758,), (1395132762,), (1395132765,), (1395132767,), (1395132769,), (1395132802,), (1395132804,), (1395132806,), (1395132807,), (1395132809,), (1395132816,), (1395132831,), (1395132833,), (1395132836,), (1395132839,), (1395132841,), (1395132842,), (1395132843,), (1395132845,), (1395132881,), (1395132911,), (1395132913,), (1395133014,), (1395133029,), (1395133058,), (1395133082,), (1395133086,), (1395133099,), (1395133152,), (1395133167,), (1395133172,), (1395133183,), (1395133190,), (1395133194,), (1395133271,), (1395133279,), (1395133329,), (1395133334,), (1395133459,), (1395134320,), (1395134406,), (1395134407,), (1395134409,), (1395134412,), (1395134417,), (1395134578,), (1395133191,), (1395133196,), (1395133385,), (1395133404,), (1395133430,), (1395133448,), (1395133457,), (1395133461,), (1395133462,), (1395133467,), (1395133568,), (1395133572,), (1395133579,), (1395133583,), (1395133586,), (1395133589,), (1395133600,), (1395133720,), (1395133788,), (1395133814,), (1395133816,), (1395133852,), (1395133887,), (1395133891,), (1395133926,), (1395133927,), (1395133966,), (1395134017,), (1395134036,), (1395134049,), (1395134056,), (1395134060,), (1395134068,), (1395134071,), (1395134073,), (1395134075,), (1395134080,), (1395134089,), (1395134091,), (1395134093,), (1395134094,), (1395134097,), (1395134100,), (1395134109,), (1395134112,), (1395134114,), (1395134116,), (1395134121,), (1395134128,), (1395134153,), (1395134167,), (1395134168,), (1395134170,), (1395134171,), (1395134172,), (1395134175,), (1395134180,), (1395134186,), (1395134193,), (1395134201,), (1395134208,), (1395134213,), (1395134216,), (1395134219,), (1395134222,), (1395134225,), (1395134234,), (1395134253,), (1395134255,), (1395134257,), (1395134259,), (1395134262,), (1395134265,), (1395134269,), (1395134275,), (1395134281,), (1395134283,), (1395134287,), (1395134292,), (1395134308,), (1395134311,), (1395134313,), (1395134315,), (1395134317,), (1395134340,), (1395134341,), (1395134343,), (1395134347,), (1395134356,), (1395134360,), (1395134366,), (1395134370,), (1395134373,), (1395134375,), (1395134378,), (1395134381,), (1395134399,), (1395134402,), (1395134405,), (1395134387,), (1395134389,), (1395134392,), (1395134395,), (1395134518,), (1395134528,), (1395134533,), (1395134553,), (1395134574,), (1395134590,), (1395134591,), (1395134592,), (1395134611,), (1395134613,), (1395134615,), (1395134620,), (1395134626,), (1395134731,), (1395134760,), (1395134864,), (1395134868,), (1395134883,), (1395134889,), (1395134893,), (1395134902,), (1395134904,), (1395134908,), (1395134911,), (1395134922,), (1395134924,), (1395135122,), (1395135123,), (1395135125,), (1395135128,), (1395135133,), (1395135152,), (1395135154,), (1395135157,), (1395135161,), (1395135165,), (1395135168,), (1395135175,), (1395135176,), (1395135284,), (1395135287,), (1395135317,), (1395135321,), (1395135383,), (1395135385,), (1395135387,), (1395135671,), (1395135682,), (1395135683,), (1395135893,), (1395135955,), (1395135957,), (1395135981,), (1395135988,), (1395136020,), (1395136108,), (1395136290,), (1395136302,), (1395142392,), (1395142400,), (1395142401,), (1395142403,), (1395142430,), (1395142433,), (1395142436,), (1395142440,), (1395142450,), (1395142452,), (1395135992,), (1395136000,), (1395136005,), (1395136008,), (1395136013,), (1395136016,), (1395136022,), (1395136060,), (1395136166,), (1395136200,), (1395136350,), (1395136381,), (1395136461,), (1395136470,), (1395136485,), (1395136520,), (1395136521,), (1395136543,), (1395136549,), (1395136550,), (1395136551,), (1395136557,), (1395136564,), (1395136605,), (1395136680,), (1395136681,), (1395136700,), (1395136794,), (1395136867,), (1395136869,), (1395136911,), (1395136987,), (1395136990,), (1395136992,), (1395137005,), (1395137006,), (1395137014,), (1395137054,), (1395137055,), (1395137076,), (1395137083,), (1395137084,), (1395137086,), (1395137116,), (1395137124,), (1395137137,), (1395137143,), (1395137147,), (1395137149,), (1395137150,), (1395137152,), (1395137157,), (1395137162,), (1395137169,), (1395137171,), (1395137177,), (1395137179,), (1395137278,), (1395137423,), (1395137667,), (1395137686,), (1395137809,), (1395137884,), (1395137976,), (1395137983,), (1395138038,), (1395138041,), (1395138048,), (1395138139,), (1395138198,), (1395138204,), (1395138267,), (1395138268,), (1395138269,), (1395138308,), (1395138315,), (1395138321,), (1395138325,), (1395138328,), (1395138335,), (1395138339,), (1395138346,), (1395138348,), (1395138352,), (1395138360,), (1395138363,), (1395138365,), (1395138366,), (1395138375,), (1395138381,), (1395138385,), (1395138392,), (1395138397,), (1395138398,), (1395138403,), (1395138435,), (1395138559,), (1395138575,), (1395138624,), (1395138638,), (1395138639,), (1395138643,), (1395138644,), (1395138646,), (1395138653,), (1395138655,), (1395138656,), (1395138658,), (1395138661,), (1395138664,), (1395138665,), (1395138670,), (1395138673,), (1395138677,), (1395138730,), (1395138737,), (1395138778,), (1395138804,), (1395138805,), (1395138822,), (1395138828,), (1395138845,), (1395138848,), (1395138849,), (1395138852,), (1395138856,), (1395138862,), (1395138864,), (1395138871,), (1395138881,), (1395138891,), (1395138896,), (1395139217,), (1395139236,), (1395139240,), (1395139313,), (1395139350,), (1395139433,), (1395139474,), (1395139495,), (1395139533,), (1395139674,), (1395139676,), (1395139678,), (1395139681,), (1395139689,), (1395139694,), (1395139702,), (1395139706,), (1395139710,), (1395139718,), (1395139731,), (1395139737,), (1395139741,), (1395139744,), (1395139751,), (1395139769,), (1395139772,), (1395139776,), (1395139808,), (1395139841,), (1395140038,), (1395140073,), (1395140151,), (1395140155,), (1395140190,), (1395140200,), (1395140327,), (1395140362,), (1395140366,), (1395140408,), (1395140412,), (1395140413,), (1395140419,), (1395140448,), (1395140552,), (1395140597,), (1395140759,), (1395140924,), (1395140998,), (1395141124,), (1395141128,), (1395141169,), (1395141182,), (1395141255,), (1395141290,), (1395141329,), (1395141332,), (1395141341,), (1395141345,), (1395141348,), (1395141349,), (1395141355,), (1395141371,), (1395141379,), (1395141382,), (1395141390,), (1395141395,), (1395141397,), (1395141417,), (1395141419,), (1395141427,), (1395141431,), (1395141432,), (1395141434,), (1395141440,), (1395141444,), (1395141456,), (1395141460,), (1395141464,), (1395141471,), (1395141507,), (1395141594,), (1395141598,), (1395141649,), (1395141653,), (1395141655,), (1395141659,), (1395141662,), (1395141671,), (1395141675,), (1395141680,), (1395141682,), (1395141684,), (1395141685,), (1395141689,), (1395141693,), (1395141695,), (1395141720,), (1395141728,), (1395141731,), (1395141736,), (1395141750,), (1395141751,), (1395141763,), (1395141784,), (1395141794,), (1395141800,), (1395141811,), (1395141815,), (1395141819,), (1395141825,), (1395141828,), (1395141867,), (1395141872,), (1395141877,), (1395141879,), (1395141884,), (1395141905,), (1395141910,), (1395141914,), (1395141919,), (1395141923,), (1395141927,), (1395141933,), (1395141936,), (1395141938,), (1395141942,), (1395141946,), (1395141951,), (1395142123,), (1395142124,), (1395142134,), (1395142135,), (1395142144,), (1395142149,), (1395142211,), (1395142214,), (1395142217,), (1395142222,), (1395142223,), (1395142224,), (1395142236,), (1395142238,), (1395142242,), (1395142248,), (1395142254,), (1395142259,), (1395142280,), (1395142282,), (1395142284,), (1395142287,), (1395142305,), (1395142311,), (1395142342,), (1395142347,), (1395142352,), (1395142355,), (1395142357,), (1395142359,), (1395142370,), (1395142377,), (1395142420,), (1395142425,), (1395144669,), (1395138359,), (1395138387,), (1395138505,), (1395138627,), (1395138628,), (1395138662,), (1395138767,), (1395138840,), (1395139436,), (1395139671,), (1395139696,), (1395139725,), (1395139756,), (1395140111,), (1395140112,), (1395140360,), (1395140476,), (1395141129,), (1395141334,), (1395141359,), (1395141392,), (1395141425,), (1395141447,), (1395141554,), (1395141656,), (1395141672,), (1395141707,), (1395141741,), (1395141801,), (1395141862,), (1395144519,), (1395144665,), (1395145554,), (1395145792,), (1395145944,), (1395145962,), (1395146145,), (1395146184,), (1395146196,), (1395146288,), (1395146292,), (1395146320,), (1395146322,), (1395146325,), (1395146328,), (1395146331,), (1395146368,), (1395146374,), (1395146377,), (1395146380,), (1395146383,), (1395146406,), (1395146411,), (1395146415,), (1395146417,), (1395146422,), (1395146427,), (1395146431,), (1395146444,), (1395146458,), (1395146460,), (1395146463,), (1395146468,), (1395146470,), (1395146475,), (1395146477,), (1395146479,), (1395146484,), (1395146531,), (1395146622,), (1395146628,), (1395146635,), (1395146639,), (1395146724,), (1395146744,), (1395146750,), (1395146792,), (1395147032,), (1395147036,), (1395147040,), (1395147052,), (1395147058,), (1395147062,), (1395147097,), (1395147103,), (1395146483,), (1395146489,), (1395146500,), (1395146503,), (1395146507,), (1395146512,), (1395146514,), (1395146516,), (1395146521,), (1395146524,), (1395146527,), (1395146535,), (1395146536,), (1395146541,), (1395146542,), (1395146549,), (1395146553,), (1395146556,), (1395146559,), (1395146564,), (1395146566,), (1395146569,), (1395146570,), (1395146583,), (1395146585,), (1395146589,), (1395146593,), (1395146596,), (1395146598,), (1395146606,), (1395146615,), (1395146643,), (1395146645,), (1395146646,), (1395146648,), (1395146653,), (1395146659,), (1395146678,), (1395146685,), (1395146689,), (1395146709,), (1395146715,), (1395146731,), (1395146736,), (1395146738,), (1395146741,), (1395146763,), (1395146769,), (1395146775,), (1395146782,), (1395146789,), (1395146834,), (1395146859,), (1395146873,), (1395146890,), (1395146894,), (1395146897,), (1395146905,), (1395146910,), (1395146914,), (1395146916,), (1395146920,), (1395146929,), (1395146945,), (1395146947,), (1395146952,), (1395146955,), (1395146957,), (1395146961,), (1395146977,), (1395146985,), (1395146999,), (1395147003,), (1395147007,), (1395147011,), (1395147074,), (1395147079,), (1395147088,), (1395147093,), (1395147113,), (1395147117,), (1395147126,), (1395147132,), (1395147164,), (1395147175,), (1395147180,), (1395147184,), (1395147185,), (1395147238,), (1395147244,), (1395147250,), (1395147531,), (1395147585,), (1395147621,), (1395147660,), (1395147667,), (1395147198,), (1395147208,), (1395147210,), (1395147255,), (1395147262,), (1395147270,), (1395147273,), (1395147278,), (1395147281,), (1395147286,), (1395147289,), (1395147294,), (1395147299,), (1395147305,), (1395147308,), (1395147322,), (1395147327,), (1395147330,), (1395147332,), (1395147335,), (1395147342,), (1395147356,), (1395147357,), (1395147361,), (1395147363,), (1395147366,), (1395147367,), (1395147370,), (1395147371,), (1395147375,), (1395147376,), (1395147380,), (1395147381,), (1395147388,), (1395147392,), (1395147395,), (1395147397,), (1395147400,), (1395147403,), (1395147408,), (1395147412,), (1395147416,), (1395147421,), (1395147426,), (1395147430,), (1395147443,), (1395147447,), (1395147451,), (1395147457,), (1395147461,), (1395147464,), (1395147472,), (1395147476,), (1395147479,), (1395147484,), (1395147487,), (1395147492,), (1395147502,), (1395147506,), (1395147510,), (1395147522,), (1395147525,), (1395147538,), (1395147542,), (1395147544,), (1395147550,), (1395147553,), (1395147557,), (1395147565,), (1395147570,), (1395147572,), (1395147576,), (1395147578,), (1395147592,), (1395147594,), (1395147597,), (1395147609,), (1395147614,), (1395147626,), (1395147628,), (1395147631,), (1395147635,), (1395147640,), (1395147644,), (1395147652,), (1395147654,), (1395147655,), (1395147657,), (1395147687,), (1395147693,), (1395147702,), (1395147710,), (1395147719,), (1395147724,), (1395147760,), (1395147782,), (1395147786,), (1395147977,), (1395148021,), (1395148074,), (1395148099,), (1395148123,), (1395148138,), (1395148323,), (1395147732,), (1395147736,), (1395147745,), (1395147748,), (1395147753,), (1395147770,), (1395147773,), (1395147776,), (1395147779,), (1395148226,), (1395148243,), (1395148246,), (1395148249,), (1395148253,), (1395148256,), (1395148268,), (1395148282,), (1395148296,), (1395148305,), (1395148314,), (1395148332,), (1395148342,), (1395148343,), (1395148352,), (1395148356,), (1395148358,), (1395148361,), (1395148366,), (1395148370,), (1395148374,), (1395148379,), (1395148381,), (1395148382,), (1395148387,), (1395148395,), (1395148397,), (1395148401,), (1395148406,), (1395148414,), (1395148419,), (1395148424,), (1395148428,), (1395148432,), (1395148436,), (1395148444,), (1395148447,), (1395148451,), (1395148461,), (1395148467,), (1395148472,), (1395148479,), (1395148482,), (1395148485,), (1395148488,), (1395148495,), (1395148499,), (1395148506,), (1395148513,), (1395148657,), (1395148671,), (1395148677,), (1395148719,), (1395148764,), (1395148768,), (1395148771,), (1395148775,), (1395148781,), (1395148785,), (1395148941,), (1395148981,), (1395149065,), (1395149114,), (1395149137,), (1395149158,), (1395149195,), (1395149211,), (1395149220,), (1395149223,), (1395149153,), (1395149170,), (1395149203,), (1395149215,), (1395149219,), (1395149222,), (1395149225,), (1395149228,), (1395149229,), (1395149235,), (1395149239,), (1395149241,), (1395149254,), (1395149264,), (1395149266,), (1395149287,), (1395149292,), (1395149297,), (1395149298,), (1395149303,), (1395149308,), (1395149317,), (1395149320,), (1395149326,), (1395149333,), (1395149335,), (1395149337,), (1395149338,), (1395149341,), (1395149344,), (1395149346,), (1395149347,), (1395149348,), (1395149351,), (1395149353,), (1395149355,), (1395149358,), (1395149362,), (1395149363,), (1395149370,), (1395149379,), (1395149380,), (1395149393,), (1395149396,), (1395149405,), (1395149407,), (1395149415,), (1395149418,), (1395149419,), (1395149423,), (1395149429,), (1395149445,), (1395149446,), (1395149450,), (1395149451,), (1395149452,), (1395149453,), (1395149458,), (1395149543,), (1395149562,), (1395149670,), (1395149679,), (1395149747,), (1395149793,), (1395149893,), (1395150033,), (1395150212,), (1395150275,), (1395150300,), (1395150359,), (1395150363,), (1395150366,), (1395150380,), (1395150402,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'19112025': {'nb_upload': 74, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28693616]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1395150402, 1395150380, 1395150366, 1395150363, 1395150359, 1395150300, 1395150275, 1395150212, 1395150033, 1395149893, 1395149793, 1395149747] map_info['map_portfolio_photo'] : {28693616: [1395150402, 1395150380, 1395150366, 1395150363, 1395150359, 1395150300, 1395150275, 1395150212, 1395150033, 1395149893, 1395149793, 1395149747, 1395149679, 1395149670, 1395149562, 1395149543, 1395149458, 1395149453, 1395149452, 1395149451, 1395149450, 1395149446, 1395149445, 1395149429, 1395149423, 1395149419, 1395149418, 1395149415, 1395149407, 1395149405, 1395149396, 1395149393, 1395149380, 1395149379, 1395149370, 1395149363, 1395149362, 1395149358, 1395149355, 1395149353, 1395149351, 1395149348, 1395149347, 1395149346, 1395149344, 1395149341, 1395149338, 1395149337, 1395149335, 1395149333, 1395149326, 1395149320, 1395149317, 1395149308, 1395149303, 1395149298, 1395149297, 1395149292, 1395149287, 1395149266, 1395149264, 1395149254, 1395149241, 1395149239, 1395149235, 1395149229, 1395149228, 1395149225, 1395149222, 1395149219, 1395149215, 1395149203, 1395149170, 1395149153]} final : True mtd_id 4302 list_pids : [1395150402, 1395150380, 1395150366, 1395150363, 1395150359, 1395150300, 1395150275, 1395150212, 1395150033, 1395149893, 1395149793, 1395149747] Looping around the photos to save general results len do output : 1 /28693616Didn'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, '4073958') ('4302', '28693616', '1395150402', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150380', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150366', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150363', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150359', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150300', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150275', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150212', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395150033', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395149893', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395149793', None, None, None, None, None, '4073958') ('4302', None, None, None, None, None, None, None, '4073958') ('4302', '28693616', '1395149747', None, None, None, None, None, '4073958') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 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, '28693616', 'None', None, None, None, None, '4073958'), ('4302', '28693616', '1395150402', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150380', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150366', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150363', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150359', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150300', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150275', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150212', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395150033', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395149893', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395149793', None, None, None, None, None, '4073958'), ('4302', '28693616', '1395149747', None, None, None, None, None, '4073958')] time used for this insertion : 0.0191648006439209 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.1476709842681885 time spend to save output : 0.01941990852355957 total time spend for step 5 : 2.167090892791748 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 (4073958) 2.18user 2.49system 0:06.71elapsed 69%CPU (0avgtext+0avgdata 159980maxresident)k 320inputs+6600outputs (15major+64075minor)pagefaults 0swaps