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 : 1335530 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 (3744846) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3744846) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27024999 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3744846'] with mtr_portfolio_ids : ['27024999'] and first list_photo_ids : [] new path : /proc/1335530/ Name: python3 Umask: 0002 State: R (running) Tgid: 1335530 Ngid: 0 Pid: 1335530 PPid: 1335529 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1335530 NSpid: 1335530 NSpgid: 1334666 NSsid: 1334666 VmPeak: 1107252 kB VmSize: 1107252 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99232 kB VmRSS: 99232 kB RssAnon: 60168 kB RssFile: 39064 kB RssShmem: 0 kB VmData: 866004 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 600 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: 51 nonvoluntary_ctxt_switches: 74 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1335530', 'Ngid': '0', 'Pid': '1335530', 'PPid': '1335529', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1335530', 'NSpid': '1335530', 'NSpgid': '1334666', 'NSsid': '1334666', 'VmPeak': '1107252 kB', 'VmSize': '1107252 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99232 kB', 'VmRSS': '99232 kB', 'RssAnon': '60168 kB', 'RssFile': '39064 kB', 'RssShmem': '0 kB', 'VmData': '866004 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '600 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': '51', 'nonvoluntary_ctxt_switches': '74'} ('datou_batch_current', '1335530', '1107252', '0', '1107252', '866004', '99232', b'', 'marlene', '3744846') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (27024999) 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 (3744846 ) ) 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 (27024999) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1384997359, 'portfolio_id': 27024999}, {'photo_id': 1384997357, 'portfolio_id': 27024999}, {'photo_id': 1384997355, 'portfolio_id': 27024999}, {'photo_id': 1384997352, 'portfolio_id': 27024999}, {'photo_id': 1384997351, 'portfolio_id': 27024999}, {'photo_id': 1384997349, 'portfolio_id': 27024999}, {'photo_id': 1384997345, 'portfolio_id': 27024999}, {'photo_id': 1384997308, 'portfolio_id': 27024999}, {'photo_id': 1384997246, 'portfolio_id': 27024999}, {'photo_id': 1384997243, 'portfolio_id': 27024999}, {'photo_id': 1384997242, 'portfolio_id': 27024999}, {'photo_id': 1384997219, 'portfolio_id': 27024999}, {'photo_id': 1384997217, 'portfolio_id': 27024999}, {'photo_id': 1384997216, 'portfolio_id': 27024999}, {'photo_id': 1384997215, 'portfolio_id': 27024999}] map_portfolio_id_photo_id: {27024999: [1384997359, 1384997357, 1384997355, 1384997352, 1384997351, 1384997349, 1384997345, 1384997308, 1384997246, 1384997243, 1384997242, 1384997219, 1384997217, 1384997216, 1384997215]} ##### 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.014633893966674805 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Fri Sep 19 05:34:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27024999) 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 : 27024999 get user id for portfolio 27024999 get sub ptf for main ptf 27024999, type 3726 and hashtags ['Teint_Dans_La_Masse', 'metal', 'kraft', 'plastique', 'mal_croppe', 'Carton_gris', 'cartonnette', 'flou', 'Carton_brun', 'papier', 'autre_refus', 'environnement'] 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`=27024999 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','metal','kraft','plastique','mal_croppe','Carton_gris','cartonnette','flou','Carton_brun','papier','autre_refus','environnement')) 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`=27024999 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','metal','kraft','plastique','mal_croppe','Carton_gris','cartonnette','flou','Carton_brun','papier','autre_refus','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 27024999, 'sub_port_id': 27025005, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236732, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 28)}, 'mal_croppe': {'main_port_id': 27024999, 'sub_port_id': 27025006, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236733, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 27024999, 'sub_port_id': 27025007, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236734, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 28)}, 'Carton_brun': {'main_port_id': 27024999, 'sub_port_id': 27025008, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236735, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 28)}, 'papier': {'main_port_id': 27024999, 'sub_port_id': 27025009, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236736, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 28)}, 'cartonnette': {'main_port_id': 27024999, 'sub_port_id': 27025010, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236737, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 28)}, 'plastique': {'main_port_id': 27024999, 'sub_port_id': 27025011, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236738, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 28)}, 'autre_refus': {'main_port_id': 27024999, 'sub_port_id': 27025012, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236739, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 28)}, 'metal': {'main_port_id': 27024999, 'sub_port_id': 27025013, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236740, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 28)}, 'flou': {'main_port_id': 27024999, 'sub_port_id': 27025014, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236741, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 28)}, 'Carton_gris': {'main_port_id': 27024999, 'sub_port_id': 27025015, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236742, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 28)}, 'environnement': {'main_port_id': 27024999, 'sub_port_id': 27025016, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236743, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27025005 , 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=27024999 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 (27025005) result : ((1384997385,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27024999) result : ((1384997215,), (1384997216,), (1384997217,), (1384997219,), (1384997242,), (1384997243,), (1384997246,), (1384997308,), (1384997345,), (1384997349,), (1384997351,), (1384997352,), (1384997355,), (1384997357,), (1384997359,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27025006 , 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=27024999 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 (27025006) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27024999) result : ((1384997215,), (1384997216,), (1384997217,), (1384997219,), (1384997242,), (1384997243,), (1384997246,), (1384997308,), (1384997345,), (1384997349,), (1384997351,), (1384997352,), (1384997355,), (1384997357,), (1384997359,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27025007 , 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=27024999 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 (27025007) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27024999) result : ((1384997215,), (1384997216,), (1384997217,), (1384997219,), (1384997242,), (1384997243,), (1384997246,), (1384997308,), (1384997345,), (1384997349,), (1384997351,), (1384997352,), (1384997355,), (1384997357,), (1384997359,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27025008 , 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=27024999 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 (27025008) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27024999) result : ((1384997215,), (1384997216,), (1384997217,), (1384997219,), (1384997242,), (1384997243,), (1384997246,), (1384997308,), (1384997345,), (1384997349,), (1384997351,), (1384997352,), (1384997355,), (1384997357,), (1384997359,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27025009 , 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=27024999 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 (27025009) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27024999) result : ((1384997215,), (1384997216,), (1384997217,), (1384997219,), (1384997242,), (1384997243,), (1384997246,), (1384997308,), (1384997345,), (1384997349,), (1384997351,), (1384997352,), (1384997355,), (1384997357,), (1384997359,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27025010 , 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=27024999 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 (27025010) result : ((1384997382,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27024999) result : ((1384997215,), (1384997216,), (1384997217,), (1384997219,), (1384997242,), (1384997243,), (1384997246,), (1384997308,), (1384997345,), (1384997349,), (1384997351,), (1384997352,), (1384997355,), (1384997357,), (1384997359,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27025011 , 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=27024999 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 (27025011) result : ((1384997383,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27024999) result : ((1384997215,), (1384997216,), (1384997217,), (1384997219,), (1384997242,), (1384997243,), (1384997246,), (1384997308,), (1384997345,), (1384997349,), (1384997351,), (1384997352,), (1384997355,), (1384997357,), (1384997359,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27025012 , 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=27024999 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 (27025012) result : ((1384997380,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27024999) result : ((1384997215,), (1384997216,), (1384997217,), (1384997219,), (1384997242,), (1384997243,), (1384997246,), (1384997308,), (1384997345,), (1384997349,), (1384997351,), (1384997352,), (1384997355,), (1384997357,), (1384997359,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27025013 , 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=27024999 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 (27025013) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27024999) result : ((1384997215,), (1384997216,), (1384997217,), (1384997219,), (1384997242,), (1384997243,), (1384997246,), (1384997308,), (1384997345,), (1384997349,), (1384997351,), (1384997352,), (1384997355,), (1384997357,), (1384997359,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27025014 , 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=27024999 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 (27025014) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27024999) result : ((1384997215,), (1384997216,), (1384997217,), (1384997219,), (1384997242,), (1384997243,), (1384997246,), (1384997308,), (1384997345,), (1384997349,), (1384997351,), (1384997352,), (1384997355,), (1384997357,), (1384997359,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27025015 , 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=27024999 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 (27025015) result : ((1384997381,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27024999) result : ((1384997215,), (1384997216,), (1384997217,), (1384997219,), (1384997242,), (1384997243,), (1384997246,), (1384997308,), (1384997345,), (1384997349,), (1384997351,), (1384997352,), (1384997355,), (1384997357,), (1384997359,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27025016 , 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=27024999 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 (27025016) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27024999) result : ((1384997215,), (1384997216,), (1384997217,), (1384997219,), (1384997242,), (1384997243,), (1384997246,), (1384997308,), (1384997345,), (1384997349,), (1384997351,), (1384997352,), (1384997355,), (1384997357,), (1384997359,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27024999 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','metal','kraft','plastique','mal_croppe','Carton_gris','cartonnette','flou','Carton_brun','papier','autre_refus','environnement')) 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`=27024999 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','metal','kraft','plastique','mal_croppe','Carton_gris','cartonnette','flou','Carton_brun','papier','autre_refus','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 27024999, 'sub_port_id': 27025017, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236744, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 30)}, 'mal_croppe': {'main_port_id': 27024999, 'sub_port_id': 27025018, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236745, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 30)}, 'Teint_Dans_La_Masse': {'main_port_id': 27024999, 'sub_port_id': 27025019, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236746, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 30)}, 'Carton_brun': {'main_port_id': 27024999, 'sub_port_id': 27025020, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236747, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 30)}, 'papier': {'main_port_id': 27024999, 'sub_port_id': 27025021, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236748, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 30)}, 'cartonnette': {'main_port_id': 27024999, 'sub_port_id': 27025022, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236749, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 30)}, 'plastique': {'main_port_id': 27024999, 'sub_port_id': 27025023, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236750, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 30)}, 'autre_refus': {'main_port_id': 27024999, 'sub_port_id': 27025024, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236751, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 30)}, 'metal': {'main_port_id': 27024999, 'sub_port_id': 27025025, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236752, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 30)}, 'flou': {'main_port_id': 27024999, 'sub_port_id': 27025026, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236753, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 30)}, 'Carton_gris': {'main_port_id': 27024999, 'sub_port_id': 27025027, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236754, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 30)}, 'environnement': {'main_port_id': 27024999, 'sub_port_id': 27025028, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18236755, 'last_updated_at': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 19, 5, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 19, 5, 33, 30)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27025017,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27025005 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27025018,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27025006 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27025019,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27025007 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27025020,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27025008 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27025021,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27025009 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27025022,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27025010 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27025023,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27025011 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27025024,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27025012 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27025025,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27025013 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27025026,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27025014 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27025027,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27025015 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27025028,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27025016 lien utilise dans velours : https://marlene.fotonower.com/velours/27025017,27025018,27025019,27025020,27025021,27025022,27025023,27025024,27025025,27025026,27025027,27025028?tags=kraft,mal_croppe,Teint_Dans_La_Masse,Carton_brun,papier,cartonnette,plastique,autre_refus,metal,flou,Carton_gris,environnement After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27024999]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1384997359, 1384997357, 1384997355, 1384997352, 1384997351, 1384997349, 1384997345, 1384997308, 1384997246, 1384997243, 1384997242] map_info['map_portfolio_photo'] : {27024999: [1384997359, 1384997357, 1384997355, 1384997352, 1384997351, 1384997349, 1384997345, 1384997308, 1384997246, 1384997243, 1384997242, 1384997219, 1384997217, 1384997216, 1384997215]} final : False mtd_id 4302 list_pids : [1384997359, 1384997357, 1384997355, 1384997352, 1384997351, 1384997349, 1384997345, 1384997308, 1384997246, 1384997243, 1384997242] Looping around the photos to save general results len do output : 1 /27024999. 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, '3744846') ('4302', '27024999', '1384997359', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997357', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997355', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997352', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997351', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997349', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997345', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997308', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997246', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997243', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997242', None, None, None, None, None, '3744846') 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', None, '27024999', "{'kraft': 27025005, 'mal_croppe': 27025006, 'Teint_Dans_La_Masse': 27025007, 'Carton_brun': 27025008, 'papier': 27025009, 'cartonnette': 27025010, 'plastique': 27025011, 'autre_refus': 27025012, 'metal': 27025013, 'flou': 27025014, 'Carton_gris': 27025015, 'environnement': 27025016}", None, None, None, None, '3744846'), ('4302', '27024999', '1384997359', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997357', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997355', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997352', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997351', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997349', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997345', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997308', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997246', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997243', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997242', None, None, None, None, None, '3744846')] time used for this insertion : 0.09499144554138184 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5960536003112793 time spend to save output : 0.09525728225708008 total time spend for step 1 : 1.6913108825683594 step2:final Fri Sep 19 05:35:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27024999) 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 27024999 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1384997219,1384997217,1384997216,1384997215,1384997345,1384997308,1384997246,1384997243,1384997242,1384997359,1384997357,1384997355,1384997352,1384997351,1384997349); 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([27024999]) Inside saveOutput : final : False verbose : True original output for save of step final : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ('0.026617184055405436',), 1384997308: ('0.026617184055405436',), 1384997246: ('0.026617184055405436',), 1384997243: ('0.026617184055405436',), 1384997242: ('0.026617184055405436',)} new output for save of step final : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ('0.026617184055405436',), 1384997308: ('0.026617184055405436',), 1384997246: ('0.026617184055405436',), 1384997243: ('0.026617184055405436',), 1384997242: ('0.026617184055405436',)} [1384997359, 1384997357, 1384997355, 1384997352, 1384997351, 1384997349, 1384997345, 1384997308, 1384997246, 1384997243, 1384997242] map_info['map_portfolio_photo'] : {27024999: [1384997359, 1384997357, 1384997355, 1384997352, 1384997351, 1384997349, 1384997345, 1384997308, 1384997246, 1384997243, 1384997242, 1384997219, 1384997217, 1384997216, 1384997215]} final : False mtd_id 4302 list_pids : [1384997359, 1384997357, 1384997355, 1384997352, 1384997351, 1384997349, 1384997345, 1384997308, 1384997246, 1384997243, 1384997242] Looping around the photos to save general results len do output : 11 /1384997359.Didn't retrieve data . /1384997357.Didn't retrieve data . /1384997355.Didn't retrieve data . /1384997352.Didn't retrieve data . /1384997351.Didn't retrieve data . /1384997349.Didn't retrieve data . /1384997345.Didn't retrieve data . /1384997308.Didn't retrieve data . /1384997246.Didn't retrieve data . /1384997243.Didn't retrieve data . /1384997242.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, '3744846') ('4302', '27024999', '1384997359', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997357', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997355', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997352', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997351', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997349', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997345', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997308', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997246', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997243', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997242', None, None, None, None, None, '3744846') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 33 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', '27024999', '1384997359', '0.026617184055405436', None, None, None, None, '3744846'), ('4302', '27024999', '1384997357', '0.026617184055405436', None, None, None, None, '3744846'), ('4302', '27024999', '1384997355', '0.026617184055405436', None, None, None, None, '3744846'), ('4302', '27024999', '1384997352', '0.026617184055405436', None, None, None, None, '3744846'), ('4302', '27024999', '1384997351', '0.026617184055405436', None, None, None, None, '3744846'), ('4302', '27024999', '1384997349', '0.026617184055405436', None, None, None, None, '3744846'), ('4302', '27024999', '1384997345', '0.026617184055405436', None, None, None, None, '3744846'), ('4302', '27024999', '1384997308', '0.026617184055405436', None, None, None, None, '3744846'), ('4302', '27024999', '1384997246', '0.026617184055405436', None, None, None, None, '3744846'), ('4302', '27024999', '1384997243', '0.026617184055405436', None, None, None, None, '3744846'), ('4302', '27024999', '1384997242', '0.026617184055405436', None, None, None, None, '3744846')] time used for this insertion : 0.09523153305053711 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.12915921211242676 time spend to save output : 0.09580039978027344 total time spend for step 2 : 0.2249596118927002 step3:velours_tree Fri Sep 19 05:35: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 : {27024999: [{'kraft': 27025005, 'mal_croppe': 27025006, 'Teint_Dans_La_Masse': 27025007, 'Carton_brun': 27025008, 'papier': 27025009, 'cartonnette': 27025010, 'plastique': 27025011, 'autre_refus': 27025012, 'metal': 27025013, 'flou': 27025014, 'Carton_gris': 27025015, 'environnement': 27025016}]} input_args_next_step : {27024999: ()} output_args : {27024999: [{'kraft': 27025005, 'mal_croppe': 27025006, 'Teint_Dans_La_Masse': 27025007, 'Carton_brun': 27025008, 'papier': 27025009, 'cartonnette': 27025010, 'plastique': 27025011, 'autre_refus': 27025012, 'metal': 27025013, 'flou': 27025014, 'Carton_gris': 27025015, 'environnement': 27025016}]} args : 27024999 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 : ({'kraft': 27025005, 'mal_croppe': 27025006, 'Teint_Dans_La_Masse': 27025007, 'Carton_brun': 27025008, 'papier': 27025009, 'cartonnette': 27025010, 'plastique': 27025011, 'autre_refus': 27025012, 'metal': 27025013, 'flou': 27025014, 'Carton_gris': 27025015, 'environnement': 27025016},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27024999) 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([27024999]) 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.3195154666900635 time spend to save output : 5.2928924560546875e-05 total time spend for step 3 : 0.319568395614624 step4:send_mail_cod Fri Sep 19 05:35:01 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 : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ('0.026617184055405436',), 1384997308: ('0.026617184055405436',), 1384997246: ('0.026617184055405436',), 1384997243: ('0.026617184055405436',), 1384997242: ('0.026617184055405436',)} input_args_next_step : {1384997359: ()} output_args : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ('0.026617184055405436',), 1384997308: ('0.026617184055405436',), 1384997246: ('0.026617184055405436',), 1384997243: ('0.026617184055405436',), 1384997242: ('0.026617184055405436',)} args : 1384997359 depend.output_id : 0 input_args_next_step : {1384997359: ('0.026617184055405436',), 1384997357: ()} output_args : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ('0.026617184055405436',), 1384997308: ('0.026617184055405436',), 1384997246: ('0.026617184055405436',), 1384997243: ('0.026617184055405436',), 1384997242: ('0.026617184055405436',)} args : 1384997357 depend.output_id : 0 input_args_next_step : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ()} output_args : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ('0.026617184055405436',), 1384997308: ('0.026617184055405436',), 1384997246: ('0.026617184055405436',), 1384997243: ('0.026617184055405436',), 1384997242: ('0.026617184055405436',)} args : 1384997355 depend.output_id : 0 input_args_next_step : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ()} output_args : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ('0.026617184055405436',), 1384997308: ('0.026617184055405436',), 1384997246: ('0.026617184055405436',), 1384997243: ('0.026617184055405436',), 1384997242: ('0.026617184055405436',)} args : 1384997352 depend.output_id : 0 input_args_next_step : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ()} output_args : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ('0.026617184055405436',), 1384997308: ('0.026617184055405436',), 1384997246: ('0.026617184055405436',), 1384997243: ('0.026617184055405436',), 1384997242: ('0.026617184055405436',)} args : 1384997351 depend.output_id : 0 input_args_next_step : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ()} output_args : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ('0.026617184055405436',), 1384997308: ('0.026617184055405436',), 1384997246: ('0.026617184055405436',), 1384997243: ('0.026617184055405436',), 1384997242: ('0.026617184055405436',)} args : 1384997349 depend.output_id : 0 input_args_next_step : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ()} output_args : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ('0.026617184055405436',), 1384997308: ('0.026617184055405436',), 1384997246: ('0.026617184055405436',), 1384997243: ('0.026617184055405436',), 1384997242: ('0.026617184055405436',)} args : 1384997345 depend.output_id : 0 input_args_next_step : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ('0.026617184055405436',), 1384997308: ()} output_args : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ('0.026617184055405436',), 1384997308: ('0.026617184055405436',), 1384997246: ('0.026617184055405436',), 1384997243: ('0.026617184055405436',), 1384997242: ('0.026617184055405436',)} args : 1384997308 depend.output_id : 0 input_args_next_step : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ('0.026617184055405436',), 1384997308: ('0.026617184055405436',), 1384997246: ()} output_args : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ('0.026617184055405436',), 1384997308: ('0.026617184055405436',), 1384997246: ('0.026617184055405436',), 1384997243: ('0.026617184055405436',), 1384997242: ('0.026617184055405436',)} args : 1384997246 depend.output_id : 0 input_args_next_step : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ('0.026617184055405436',), 1384997308: ('0.026617184055405436',), 1384997246: ('0.026617184055405436',), 1384997243: ()} output_args : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ('0.026617184055405436',), 1384997308: ('0.026617184055405436',), 1384997246: ('0.026617184055405436',), 1384997243: ('0.026617184055405436',), 1384997242: ('0.026617184055405436',)} args : 1384997243 depend.output_id : 0 input_args_next_step : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ('0.026617184055405436',), 1384997308: ('0.026617184055405436',), 1384997246: ('0.026617184055405436',), 1384997243: ('0.026617184055405436',), 1384997242: ()} output_args : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ('0.026617184055405436',), 1384997308: ('0.026617184055405436',), 1384997246: ('0.026617184055405436',), 1384997243: ('0.026617184055405436',), 1384997242: ('0.026617184055405436',)} args : 1384997242 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 : {27024999: [{'kraft': 27025005, 'mal_croppe': 27025006, 'Teint_Dans_La_Masse': 27025007, 'Carton_brun': 27025008, 'papier': 27025009, 'cartonnette': 27025010, 'plastique': 27025011, 'autre_refus': 27025012, 'metal': 27025013, 'flou': 27025014, 'Carton_gris': 27025015, 'environnement': 27025016}]} input_args_next_step : {1384997359: ('0.026617184055405436',), 1384997357: ('0.026617184055405436',), 1384997355: ('0.026617184055405436',), 1384997352: ('0.026617184055405436',), 1384997351: ('0.026617184055405436',), 1384997349: ('0.026617184055405436',), 1384997345: ('0.026617184055405436',), 1384997308: ('0.026617184055405436',), 1384997246: ('0.026617184055405436',), 1384997243: ('0.026617184055405436',), 1384997242: ('0.026617184055405436',), 27024999: ()} output_args : {27024999: [{'kraft': 27025005, 'mal_croppe': 27025006, 'Teint_Dans_La_Masse': 27025007, 'Carton_brun': 27025008, 'papier': 27025009, 'cartonnette': 27025010, 'plastique': 27025011, 'autre_refus': 27025012, 'metal': 27025013, 'flou': 27025014, 'Carton_gris': 27025015, 'environnement': 27025016}]} args : 27024999 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 :12, first value : ('0.026617184055405436',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27024999) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1384997359,1384997357,1384997355,1384997352,1384997351,1384997349,1384997345,1384997308,1384997246,1384997243,1384997242) Found this number of photos: 11 ##### Call download_photos : nb_thread : 5 begin to download photo : 1384997242 begin to download photo : 1384997308 begin to download photo : 1384997351 begin to download photo : 1384997357 download finish for photo 1384997308 begin to download photo : 1384997345 download finish for photo 1384997351 begin to download photo : 1384997352 download finish for photo 1384997242 begin to download photo : 1384997243 download finish for photo 1384997357 begin to download photo : 1384997359 download finish for photo 1384997345 begin to download photo : 1384997349 download finish for photo 1384997352 begin to download photo : 1384997355 download finish for photo 1384997243 begin to download photo : 1384997246 download finish for photo 1384997359 download finish for photo 1384997246 download finish for photo 1384997355 download finish for photo 1384997349 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 : 11 ; length of list_pids : 11 ; length of list_args : 11 results_Auto_P27024999_19-09-2025_05_35_01.pdf 27025005 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27025005 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384997385: '1758252806_2270675_1384997219_837d147fd6f8a613d3661b5592c34e55_rle_crop_3967250936_0.png'} change filename to text .imagette270250051758252901/ imagette270250051758252901/1758252806_2270675_1384997219_837d147fd6f8a613d3661b5592c34e55_rle_crop_3967250936_0.png.png imagette270250061758252901/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/17bd331dc301d70da63782ba188b9f64_65022923.png imagette270250051758252901 27025006 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27025006 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette270250061758252901 27025010 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27025010 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384997382: '1758252806_2270675_1384997215_9b3f4e8fbb822d0225ee7f850a836592_rle_crop_3967250968_0.png'} change filename to text .imagette270250101758252901/ imagette270250101758252901/1758252806_2270675_1384997215_9b3f4e8fbb822d0225ee7f850a836592_rle_crop_3967250968_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/a98a30cca80c52a14fa03786ddf45884_18050134.png imagette270250101758252901 27025011 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27025011 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384997383: '1758252806_2270675_1384997215_9b3f4e8fbb822d0225ee7f850a836592_rle_crop_3967250965_0.png'} change filename to text .imagette270250111758252901/ imagette270250111758252901/1758252806_2270675_1384997215_9b3f4e8fbb822d0225ee7f850a836592_rle_crop_3967250965_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/ea03d30e11cc09ce776436518ebd72b2_43536410.png imagette270250111758252901 27025012 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27025012 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384997380: '1758252806_2270675_1384997219_837d147fd6f8a613d3661b5592c34e55_rle_crop_3967250937_0.png'} change filename to text .imagette270250121758252901/ imagette270250121758252901/1758252806_2270675_1384997219_837d147fd6f8a613d3661b5592c34e55_rle_crop_3967250937_0.png.png imagette270250131758252901/ imagette270250141758252901/ imagette270250071758252901/ imagette270250081758252901/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/8e93c99b6a28f1fcb70088006e34c10f_89041121.png imagette270250121758252901 27025013 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27025013 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette270250131758252901 27025014 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27025014 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette270250141758252901 27025007 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27025007 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette270250071758252901 27025008 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27025008 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette270250081758252901 27025015 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27025015 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1384997381: '1758252806_2270675_1384997216_99b133042d3d93738217bd9b81650e9a_rle_crop_3967250956_0.png'} change filename to text .imagette270250151758252901/ imagette270250151758252901/1758252806_2270675_1384997216_99b133042d3d93738217bd9b81650e9a_rle_crop_3967250956_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/a508b58ac74326cba64e28f5a48a1509_64897739.png imagette270250151758252901 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=27024999 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/27025017,27025018,27025019,27025020,27025021,27025022,27025023,27025024,27025025,27025026,27025027,27025028?tags=kraft,mal_croppe,Teint_Dans_La_Masse,Carton_brun,papier,cartonnette,plastique,autre_refus,metal,flou,Carton_gris,environnement your option no_mail is active, we will not send the real mail to your client args[1384997359] : ('0.026617184055405436',) no score found for photo 1384997359 We are sending mail with results at report@fotonower.com args[1384997357] : ('0.026617184055405436',) no score found for photo 1384997357 We are sending mail with results at report@fotonower.com args[1384997355] : ('0.026617184055405436',) no score found for photo 1384997355 We are sending mail with results at report@fotonower.com args[1384997352] : ('0.026617184055405436',) no score found for photo 1384997352 We are sending mail with results at report@fotonower.com args[1384997351] : ('0.026617184055405436',) no score found for photo 1384997351 We are sending mail with results at report@fotonower.com args[1384997349] : ('0.026617184055405436',) no score found for photo 1384997349 We are sending mail with results at report@fotonower.com args[1384997345] : ('0.026617184055405436',) no score found for photo 1384997345 We are sending mail with results at report@fotonower.com args[1384997308] : ('0.026617184055405436',) no score found for photo 1384997308 We are sending mail with results at report@fotonower.com args[1384997246] : ('0.026617184055405436',) no score found for photo 1384997246 We are sending mail with results at report@fotonower.com args[1384997243] : ('0.026617184055405436',) no score found for photo 1384997243 We are sending mail with results at report@fotonower.com args[1384997242] : ('0.026617184055405436',) no score found for photo 1384997242 We are sending mail with results at report@fotonower.com refus_total : 0.026617184055405436 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27024999 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_P27024999_19-09-2025_05_35_01.pdf results_Auto_P27024999_19-09-2025_05_35_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27024999_19-09-2025_05_35_01.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','27024999','results_Auto_P27024999_19-09-2025_05_35_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27024999_19-09-2025_05_35_01.pdf','pdf','','0.11','0.026617184055405436') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27024999]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1384997359, 1384997357, 1384997355, 1384997352, 1384997351, 1384997349, 1384997345, 1384997308, 1384997246, 1384997243, 1384997242] map_info['map_portfolio_photo'] : {27024999: [1384997359, 1384997357, 1384997355, 1384997352, 1384997351, 1384997349, 1384997345, 1384997308, 1384997246, 1384997243, 1384997242, 1384997219, 1384997217, 1384997216, 1384997215]} final : False mtd_id 4302 list_pids : [1384997359, 1384997357, 1384997355, 1384997352, 1384997351, 1384997349, 1384997345, 1384997308, 1384997246, 1384997243, 1384997242] 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, '3744846') ('4302', '27024999', '1384997359', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997357', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997355', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997352', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997351', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997349', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997345', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997308', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997246', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997243', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997242', None, None, None, None, None, '3744846') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '27024999', '1384997359', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997357', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997355', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997352', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997351', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997349', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997345', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997308', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997246', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997243', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997242', None, None, None, None, None, '3744846')] time used for this insertion : 0.0167691707611084 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.8486747741699219 time spend to save output : 0.01698160171508789 total time spend for step 4 : 1.8656563758850098 step5:split_time_score Fri Sep 19 05:35:02 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 : ['27024999'] 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 : [('27024999',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27024999) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1384997357: {'path': 'temp/1758252901_1335530_1384997357_365d38dda1bd525a779bcc31fee31b1a.jpg', 'extension': 'jpg'}, 1384997359: {'path': 'temp/1758252901_1335530_1384997359_775458fe10178acd9669d175f5737904.jpg', 'extension': 'jpg'}, 1384997242: {'path': 'temp/1758252901_1335530_1384997242_ff236b579f085198060544c8e35c8f41.jpg', 'extension': 'jpg'}, 1384997243: {'path': 'temp/1758252901_1335530_1384997243_c37a4c6206e2e02c182443e1aef1308f.jpg', 'extension': 'jpg'}, 1384997246: {'path': 'temp/1758252901_1335530_1384997246_470e993e4b32885ff346ce8506052e8c.jpg', 'extension': 'jpg'}, 1384997351: {'path': 'temp/1758252901_1335530_1384997351_539bf154094ba7a2ad9c488c8f0b1637.jpg', 'extension': 'jpg'}, 1384997352: {'path': 'temp/1758252901_1335530_1384997352_3d4f3411ab49440b30c33a77316cff2b.jpg', 'extension': 'jpg'}, 1384997355: {'path': 'temp/1758252901_1335530_1384997355_5495fd133effa1102762a765147fe3dc.jpg', 'extension': 'jpg'}, 1384997308: {'path': 'temp/1758252901_1335530_1384997308_03b89fd274675ae33bd5b690edbd80f2.jpg', 'extension': 'jpg'}, 1384997345: {'path': 'temp/1758252901_1335530_1384997345_8c55b09553dc37defecf78c159494680.jpg', 'extension': 'jpg'}, 1384997349: {'path': 'temp/1758252901_1335530_1384997349_f237cf01ee659244fa540266dd9b9a7b.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 = 27024999; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 27024999 group by h (('05', 15),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27024999 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 (27024999) 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 (27024999) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 19092025 27024999 Nombre de photos uploadées : 15 / 23040 (0%) 19092025 27024999 Nombre de photos taguées (types de déchets): 0 / 15 (0%) 19092025 27024999 Nombre de photos taguées (volume) : 0 / 15 (0%) [{'photo_id': 1384997219, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/837d147fd6f8a613d3661b5592c34e55.jpg', 'username': None, 'uploaded_at': 1758252668, 'text': 'image_19092025_05_30_05_10148.jpg'}, {'photo_id': 1384997217, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/b25f070165730702c8f3422998da6e29.jpg', 'username': None, 'uploaded_at': 1758252668, 'text': 'image_19092025_05_30_15_10137.jpg'}, {'photo_id': 1384997216, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/99b133042d3d93738217bd9b81650e9a.jpg', 'username': None, 'uploaded_at': 1758252668, 'text': 'image_19092025_05_30_24_9125.jpg'}, {'photo_id': 1384997215, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/19/9b3f4e8fbb822d0225ee7f850a836592.jpg', 'username': None, 'uploaded_at': 1758252668, 'text': 'image_19092025_05_30_34_10136.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.000988006591796875 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 27024999, '2025-09-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-09-19' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2316270,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.2246103286743164 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= 2316270 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2316270, 'dashboard_run_id': 2324935, 'mtr_portfolio_id': 27016220, 'dashboard_result_id': 15395176, '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_P27016220_19-09-2025_00_19_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27016222, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27016223, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27016224, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27016225, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27016226, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27016227, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27016228, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27016229, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27016230, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27016231, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27016232, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27016233, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2324935, 'mtr_portfolio_id': 27016631, 'dashboard_result_id': 15395177, '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_P27016631_19-09-2025_00_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27016641, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27016642, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27016643, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27016644, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27016645, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27016646, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27016647, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27016648, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27016649, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27016650, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27016651, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27016652, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2324935, 'mtr_portfolio_id': 27017094, 'dashboard_result_id': 15395178, '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_P27017094_19-09-2025_00_48_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27017105, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27017106, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27017107, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27017108, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27017109, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27017110, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27017111, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27017112, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27017113, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27017114, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27017115, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27017116, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2324935, 'mtr_portfolio_id': 27017607, 'dashboard_result_id': 15395179, '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_P27017607_19-09-2025_01_23_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27017633, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27017634, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27017635, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27017636, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27017637, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27017638, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27017639, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27017640, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27017641, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27017642, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27017643, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27017644, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2324935, 'mtr_portfolio_id': 27018718, 'dashboard_result_id': 15395180, '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_P27018718_19-09-2025_01_46_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27018721, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27018722, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27018723, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27018724, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27018725, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27018726, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27018727, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27018728, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27018729, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27018730, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27018731, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27018732, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2324935, 'mtr_portfolio_id': 27018974, 'dashboard_result_id': 15395181, '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_P27018974_19-09-2025_02_03_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27018980, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27018981, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27018982, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27018983, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27018984, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27018985, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27018986, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27018987, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27018988, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27018989, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27018990, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27018991, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2324935, 'mtr_portfolio_id': 27019443, 'dashboard_result_id': 15395182, '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_P27019443_19-09-2025_02_19_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27019456, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27019457, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27019458, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27019459, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27019460, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27019461, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27019462, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27019463, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27019464, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27019465, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27019466, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27019467, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2324935, 'mtr_portfolio_id': 27020070, 'dashboard_result_id': 15395183, '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_P27020070_19-09-2025_02_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27020076, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27020077, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27020078, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27020079, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27020080, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27020081, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27020082, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27020083, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27020084, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27020085, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27020086, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27020087, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2324935, 'mtr_portfolio_id': 27020597, 'dashboard_result_id': 15395184, '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_P27020597_19-09-2025_02_46_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27020606, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27020607, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27020608, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27020609, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27020610, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27020611, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27020612, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27020613, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27020614, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27020615, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27020616, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27020617, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2324935, 'mtr_portfolio_id': 27021151, 'dashboard_result_id': 15395185, '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_P27021151_19-09-2025_03_11_28.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27021157, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27021158, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27021159, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27021160, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27021161, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27021162, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27021163, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27021164, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27021165, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27021166, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27021167, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27021168, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2324935, 'mtr_portfolio_id': 27021458, 'dashboard_result_id': 15395186, '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_P27021458_19-09-2025_03_03_34.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27021467, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27021468, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27021469, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27021470, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27021471, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27021472, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27021473, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27021474, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27021475, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27021476, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27021477, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27021478, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2324935, 'mtr_portfolio_id': 27021942, 'dashboard_result_id': 15395187, '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_P27021942_19-09-2025_03_33_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27021943, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27021944, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27021945, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27021946, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27021947, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27021948, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27021949, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27021950, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27021951, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27021952, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27021953, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27021954, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2324935, 'mtr_portfolio_id': 27022438, 'dashboard_result_id': 15395188, '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_P27022438_19-09-2025_03_49_29.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27022452, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27022453, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27022454, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27022455, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27022456, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27022457, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27022458, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27022459, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27022460, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27022461, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27022462, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27022463, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2324935, 'mtr_portfolio_id': 27022921, 'dashboard_result_id': 15395189, '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_P27022921_19-09-2025_04_03_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27022925, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27022926, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27022927, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27022928, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27022929, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27022930, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27022931, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27022932, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27022933, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27022934, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27022935, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27022936, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2324935, 'mtr_portfolio_id': 27023216, 'dashboard_result_id': 15395190, '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_P27023216_19-09-2025_04_12_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27023217, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27023218, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27023219, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27023220, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27023221, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27023222, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27023223, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27023224, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27023225, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27023226, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27023227, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27023228, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2324935, 'mtr_portfolio_id': 27024179, 'dashboard_result_id': 15395191, '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_P27024179_19-09-2025_05_17_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27024181, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27024182, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27024183, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27024184, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27024185, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27024186, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27024187, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27024188, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27024189, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27024190, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27024191, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27024192, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2324935, 'mtr_portfolio_id': 27024594, 'dashboard_result_id': 15395192, '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_P27024594_19-09-2025_05_32_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27024614, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27024615, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27024616, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27024617, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27024618, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27024619, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27024620, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27024621, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27024622, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27024623, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27024624, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27024625, 'pht': 3726}}"}, {'dashboat_entry_day': 2316270, 'dashboard_run_id': 2324935, 'mtr_portfolio_id': 27024999, 'dashboard_result_id': 15395193, '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_P27024999_19-09-2025_05_33_31.pdf'}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27016220 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': 3743435, 'mtr_portfolio_id': 27016220, 'created_at': datetime.datetime(2025, 9, 19, 0, 19), 'result': '0.0367684899895796', 'result_long': None, 'result_double': None}] Qualite : 0.0367684899895796 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27016220 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27016220_19-09-2025_00_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27016220 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_P27016220_19-09-2025_00_19_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27016222, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27016223, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27016224, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27016225, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27016226, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27016227, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27016228, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27016229, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27016230, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27016231, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27016232, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27016233, 'pht': 3726}}" where mtr_portfolio_id = 27016220 and dashboard_run_id = 2324935 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`=27016220 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15395176, 0.0367684899895796, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27016220_19-09-2025_00_19_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27016222, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27016223, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27016224, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27016225, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27016226, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27016227, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27016228, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27016229, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27016230, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27016231, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27016232, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27016233, '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 = 27016631 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': 3743481, 'mtr_portfolio_id': 27016631, 'created_at': datetime.datetime(2025, 9, 19, 0, 32, 58), 'result': '0.02573315192667667', 'result_long': None, 'result_double': None}] Qualite : 0.02573315192667667 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27016631 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27016631_19-09-2025_00_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27016631 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_P27016631_19-09-2025_00_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27016641, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27016642, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27016643, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27016644, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27016645, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27016646, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27016647, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27016648, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27016649, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27016650, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27016651, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27016652, 'pht': 3726}}" where mtr_portfolio_id = 27016631 and dashboard_run_id = 2324935 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`=27016631 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15395177, 0.02573315192667667, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27016631_19-09-2025_00_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27016641, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27016642, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27016643, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27016644, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27016645, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27016646, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27016647, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27016648, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27016649, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27016650, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27016651, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27016652, '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 = 27017094 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': 3743586, 'mtr_portfolio_id': 27017094, 'created_at': datetime.datetime(2025, 9, 19, 0, 48, 58), 'result': '0.049743802151738764', 'result_long': None, 'result_double': None}] Qualite : 0.049743802151738764 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27017094 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27017094_19-09-2025_00_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27017094 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_P27017094_19-09-2025_00_48_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27017105, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27017106, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27017107, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27017108, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27017109, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27017110, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27017111, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27017112, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27017113, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27017114, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27017115, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27017116, 'pht': 3726}}" where mtr_portfolio_id = 27017094 and dashboard_run_id = 2324935 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`=27017094 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15395178, 0.049743802151738764, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27017094_19-09-2025_00_48_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27017105, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27017106, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27017107, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27017108, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27017109, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27017110, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27017111, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27017112, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27017113, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27017114, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27017115, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27017116, '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 = 27017607 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': 3743683, 'mtr_portfolio_id': 27017607, 'created_at': datetime.datetime(2025, 9, 19, 1, 22, 59), 'result': '0.044356041169144905', 'result_long': None, 'result_double': None}] Qualite : 0.044356041169144905 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27017607 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27017607_19-09-2025_01_23_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27017607 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_P27017607_19-09-2025_01_23_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27017633, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27017634, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27017635, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27017636, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27017637, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27017638, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27017639, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27017640, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27017641, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27017642, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27017643, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27017644, 'pht': 3726}}" where mtr_portfolio_id = 27017607 and dashboard_run_id = 2324935 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`=27017607 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15395179, 0.044356041169144905, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27017607_19-09-2025_01_23_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27017633, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27017634, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27017635, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27017636, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27017637, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27017638, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27017639, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27017640, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27017641, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27017642, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27017643, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27017644, '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 = 27018718 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': 3743870, 'mtr_portfolio_id': 27018718, 'created_at': datetime.datetime(2025, 9, 19, 1, 46, 58), 'result': '0.0857532345072127', 'result_long': None, 'result_double': None}] Qualite : 0.0857532345072127 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27018718 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27018718_19-09-2025_01_46_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27018718 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_P27018718_19-09-2025_01_46_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27018721, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27018722, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27018723, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27018724, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27018725, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27018726, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27018727, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27018728, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27018729, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27018730, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27018731, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27018732, 'pht': 3726}}" where mtr_portfolio_id = 27018718 and dashboard_run_id = 2324935 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`=27018718 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15395180, 0.0857532345072127, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27018718_19-09-2025_01_46_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27018721, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27018722, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27018723, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27018724, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27018725, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27018726, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27018727, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27018728, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27018729, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27018730, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27018731, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27018732, '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 = 27018974 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': 3743903, 'mtr_portfolio_id': 27018974, 'created_at': datetime.datetime(2025, 9, 19, 2, 3), 'result': '0.06347647068740062', 'result_long': None, 'result_double': None}] Qualite : 0.06347647068740062 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27018974 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27018974_19-09-2025_02_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27018974 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_P27018974_19-09-2025_02_03_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27018980, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27018981, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27018982, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27018983, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27018984, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27018985, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27018986, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27018987, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27018988, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27018989, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27018990, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27018991, 'pht': 3726}}" where mtr_portfolio_id = 27018974 and dashboard_run_id = 2324935 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`=27018974 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15395181, 0.06347647068740062, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27018974_19-09-2025_02_03_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27018980, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27018981, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27018982, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27018983, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27018984, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27018985, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27018986, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27018987, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27018988, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27018989, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27018990, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27018991, '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 = 27019443 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': 3743979, 'mtr_portfolio_id': 27019443, 'created_at': datetime.datetime(2025, 9, 19, 2, 19), 'result': '0.053145788173201806', 'result_long': None, 'result_double': None}] Qualite : 0.053145788173201806 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27019443 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27019443_19-09-2025_02_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27019443 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_P27019443_19-09-2025_02_19_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27019456, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27019457, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27019458, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27019459, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27019460, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27019461, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27019462, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27019463, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27019464, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27019465, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27019466, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27019467, 'pht': 3726}}" where mtr_portfolio_id = 27019443 and dashboard_run_id = 2324935 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`=27019443 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15395182, 0.053145788173201806, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27019443_19-09-2025_02_19_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27019456, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27019457, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27019458, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27019459, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27019460, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27019461, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27019462, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27019463, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27019464, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27019465, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27019466, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27019467, '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 = 27020070 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': 3744051, 'mtr_portfolio_id': 27020070, 'created_at': datetime.datetime(2025, 9, 19, 2, 32, 59), 'result': '0.061725226742409545', 'result_long': None, 'result_double': None}] Qualite : 0.061725226742409545 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27020070 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27020070_19-09-2025_02_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27020070 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_P27020070_19-09-2025_02_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27020076, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27020077, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27020078, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27020079, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27020080, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27020081, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27020082, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27020083, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27020084, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27020085, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27020086, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27020087, 'pht': 3726}}" where mtr_portfolio_id = 27020070 and dashboard_run_id = 2324935 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`=27020070 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15395183, 0.061725226742409545, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27020070_19-09-2025_02_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27020076, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27020077, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27020078, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27020079, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27020080, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27020081, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27020082, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27020083, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27020084, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27020085, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27020086, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27020087, '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 = 27020597 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': 3744121, 'mtr_portfolio_id': 27020597, 'created_at': datetime.datetime(2025, 9, 19, 2, 46, 57), 'result': '0.03853125272805721', 'result_long': None, 'result_double': None}] Qualite : 0.03853125272805721 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27020597 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27020597_19-09-2025_02_46_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27020597 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_P27020597_19-09-2025_02_46_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27020606, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27020607, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27020608, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27020609, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27020610, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27020611, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27020612, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27020613, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27020614, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27020615, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27020616, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27020617, 'pht': 3726}}" where mtr_portfolio_id = 27020597 and dashboard_run_id = 2324935 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`=27020597 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15395184, 0.03853125272805721, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27020597_19-09-2025_02_46_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27020606, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27020607, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27020608, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27020609, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27020610, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27020611, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27020612, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27020613, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27020614, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27020615, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27020616, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27020617, '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 = 27021151 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': 3744226, 'mtr_portfolio_id': 27021151, 'created_at': datetime.datetime(2025, 9, 19, 3, 11, 28), 'result': '0.07270040931202376', 'result_long': None, 'result_double': None}] Qualite : 0.07270040931202376 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27021151 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27021151_19-09-2025_03_11_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27021151 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_P27021151_19-09-2025_03_11_28.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27021157, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27021158, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27021159, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27021160, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27021161, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27021162, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27021163, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27021164, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27021165, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27021166, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27021167, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27021168, 'pht': 3726}}" where mtr_portfolio_id = 27021151 and dashboard_run_id = 2324935 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`=27021151 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15395185, 0.07270040931202376, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27021151_19-09-2025_03_11_28.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27021157, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27021158, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27021159, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27021160, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27021161, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27021162, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27021163, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27021164, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27021165, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27021166, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27021167, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27021168, '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 = 27021458 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 = 27021458 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 = 27021458 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27021458 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 = 27021458 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27021458 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27021458_19-09-2025_03_03_34.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27021458 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_P27021458_19-09-2025_03_03_34.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27021467, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27021468, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27021469, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27021470, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27021471, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27021472, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27021473, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27021474, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27021475, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27021476, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27021477, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27021478, 'pht': 3726}}" where mtr_portfolio_id = 27021458 and dashboard_run_id = 2324935 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 = 27021942 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': 3744347, 'mtr_portfolio_id': 27021942, 'created_at': datetime.datetime(2025, 9, 19, 3, 33), 'result': '0.056415460163813', 'result_long': None, 'result_double': None}] Qualite : 0.056415460163813 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27021942 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27021942_19-09-2025_03_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27021942 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_P27021942_19-09-2025_03_33_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27021943, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27021944, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27021945, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27021946, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27021947, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27021948, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27021949, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27021950, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27021951, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27021952, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27021953, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27021954, 'pht': 3726}}" where mtr_portfolio_id = 27021942 and dashboard_run_id = 2324935 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`=27021942 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15395187, 0.056415460163813, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27021942_19-09-2025_03_33_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27021943, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27021944, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27021945, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27021946, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27021947, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27021948, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27021949, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27021950, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27021951, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27021952, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27021953, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27021954, '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 = 27022438 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': 3744417, 'mtr_portfolio_id': 27022438, 'created_at': datetime.datetime(2025, 9, 19, 3, 49, 28), 'result': '0.06286608249322609', 'result_long': None, 'result_double': None}] Qualite : 0.06286608249322609 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27022438 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27022438_19-09-2025_03_49_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27022438 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_P27022438_19-09-2025_03_49_29.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27022452, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27022453, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27022454, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27022455, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27022456, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27022457, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27022458, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27022459, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27022460, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27022461, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27022462, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27022463, 'pht': 3726}}" where mtr_portfolio_id = 27022438 and dashboard_run_id = 2324935 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`=27022438 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15395188, 0.06286608249322609, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27022438_19-09-2025_03_49_29.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27022452, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27022453, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27022454, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27022455, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27022456, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27022457, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27022458, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27022459, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27022460, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27022461, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27022462, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27022463, '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 = 27022921 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': 3744501, 'mtr_portfolio_id': 27022921, 'created_at': datetime.datetime(2025, 9, 19, 4, 3), 'result': '0.042867360108915877', 'result_long': None, 'result_double': None}] Qualite : 0.042867360108915877 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27022921 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27022921_19-09-2025_04_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27022921 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_P27022921_19-09-2025_04_03_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27022925, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27022926, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27022927, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27022928, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27022929, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27022930, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27022931, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27022932, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27022933, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27022934, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27022935, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27022936, 'pht': 3726}}" where mtr_portfolio_id = 27022921 and dashboard_run_id = 2324935 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`=27022921 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15395189, 0.042867360108915877, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27022921_19-09-2025_04_03_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27022925, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27022926, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27022927, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27022928, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27022929, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27022930, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27022931, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27022932, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27022933, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27022934, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27022935, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27022936, '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 = 27023216 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': 3744564, 'mtr_portfolio_id': 27023216, 'created_at': datetime.datetime(2025, 9, 19, 4, 12, 58), 'result': '0.05604337444282506', 'result_long': None, 'result_double': None}] Qualite : 0.05604337444282506 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27023216 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27023216_19-09-2025_04_12_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27023216 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_P27023216_19-09-2025_04_12_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27023217, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27023218, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27023219, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27023220, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27023221, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27023222, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27023223, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27023224, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27023225, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27023226, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27023227, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27023228, 'pht': 3726}}" where mtr_portfolio_id = 27023216 and dashboard_run_id = 2324935 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`=27023216 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15395190, 0.05604337444282506, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27023216_19-09-2025_04_12_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27023217, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27023218, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27023219, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27023220, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27023221, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27023222, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27023223, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27023224, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27023225, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27023226, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27023227, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27023228, '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 = 27024179 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': 3744759, 'mtr_portfolio_id': 27024179, 'created_at': datetime.datetime(2025, 9, 19, 5, 16, 59), 'result': '0.04947802389703054', 'result_long': None, 'result_double': None}] Qualite : 0.04947802389703054 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27024179 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27024179_19-09-2025_05_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27024179 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_P27024179_19-09-2025_05_17_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27024181, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27024182, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27024183, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27024184, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27024185, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27024186, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27024187, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27024188, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27024189, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27024190, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27024191, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27024192, 'pht': 3726}}" where mtr_portfolio_id = 27024179 and dashboard_run_id = 2324939 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`=27024179 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15395191, 0.04947802389703054, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27024179_19-09-2025_05_17_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27024181, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27024182, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27024183, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27024184, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27024185, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27024186, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27024187, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27024188, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27024189, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27024190, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27024191, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27024192, '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 = 27024594 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': 3744789, 'mtr_portfolio_id': 27024594, 'created_at': datetime.datetime(2025, 9, 19, 5, 32, 58), 'result': '0.040447578567797474', 'result_long': None, 'result_double': None}] Qualite : 0.040447578567797474 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27024594 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27024594_19-09-2025_05_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27024594 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_P27024594_19-09-2025_05_32_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27024614, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27024615, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27024616, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27024617, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27024618, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27024619, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27024620, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27024621, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27024622, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27024623, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27024624, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27024625, 'pht': 3726}}" where mtr_portfolio_id = 27024594 and dashboard_run_id = 2324939 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`=27024594 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15395192, 0.040447578567797474, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27024594_19-09-2025_05_32_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27024614, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27024615, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27024616, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27024617, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27024618, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27024619, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27024620, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27024621, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27024622, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27024623, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27024624, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27024625, '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 = 27024999 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': 3744846, 'mtr_portfolio_id': 27024999, 'created_at': datetime.datetime(2025, 9, 19, 5, 35), 'result': '0.026617184055405436', 'result_long': None, 'result_double': None}] Qualite : 0.026617184055405436 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27024999 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27024999_19-09-2025_05_35_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27024999 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_P27024999_19-09-2025_05_35_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27025005, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27025006, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27025007, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27025008, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27025009, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27025010, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27025011, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27025012, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27025013, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27025014, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27025015, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27025016, 'pht': 3726}}" where mtr_portfolio_id = 27024999 and dashboard_run_id = 2324939 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`=27024999 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15395193, 0.026617184055405436, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27024999_19-09-2025_05_35_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27025005, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27025006, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27025007, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27025008, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27025009, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27025010, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27025011, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27025012, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27025013, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27025014, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27025015, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27025016, '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 (27016220,27016631,27017094,27017607,27018718,27018974,27019443,27020070,27020597,27021151,27021458,27021942,27022438,27022921,27023216,27024179,27024594,27024999) result : ((1384957280,), (1384957283,), (1384957285,), (1384957286,), (1384957344,), (1384957379,), (1384957444,), (1384957513,), (1384957566,), (1384957957,), (1384958006,), (1384958061,), (1384958113,), (1384958163,), (1384958744,), (1384958797,), (1384959190,), (1384959193,), (1384959197,), (1384959215,), (1384959624,), (1384959654,), (1384959682,), (1384959702,), (1384959722,), (1384959891,), (1384959916,), (1384959917,), (1384959920,), (1384959929,), (1384959964,), (1384959966,), (1384959969,), (1384960051,), (1384960052,), (1384960076,), (1384960082,), (1384960128,), (1384960135,), (1384960138,), (1384960142,), (1384960145,), (1384960146,), (1384960154,), (1384960156,), (1384960158,), (1384960250,), (1384960275,), (1384960290,), (1384960295,), (1384960316,), (1384960437,), (1384960445,), (1384960446,), (1384960449,), (1384960494,), (1384960501,), (1384960502,), (1384960504,), (1384960508,), (1384960510,), (1384960573,), (1384960597,), (1384960626,), (1384960653,), (1384960666,), (1384960668,), (1384960673,), (1384960685,), (1384960687,), (1384960689,), (1384960691,), (1384960705,), (1384960693,), (1384960698,), (1384960902,), (1384960975,), (1384961080,), (1384961159,), (1384961894,), (1384961939,), (1384961940,), (1384961942,), (1384961945,), (1384961968,), (1384961972,), (1384961975,), (1384961976,), (1384961979,), (1384962309,), (1384962365,), (1384962370,), (1384962544,), (1384962546,), (1384962547,), (1384962549,), (1384962567,), (1384962590,), (1384962692,), (1384962699,), (1384962701,), (1384962714,), (1384962718,), (1384962810,), (1384962811,), (1384962812,), (1384962814,), (1384962817,), (1384962838,), (1384962845,), (1384962848,), (1384962850,), (1384962852,), (1384963002,), (1384963026,), (1384963048,), (1384963073,), (1384963098,), (1384963122,), (1384963186,), (1384963191,), (1384963198,), (1384963199,), (1384963200,), (1384963203,), (1384963207,), (1384963210,), (1384963218,), (1384963274,), (1384963284,), (1384963553,), (1384963555,), (1384963557,), (1384963560,), (1384963573,), (1384963574,), (1384963577,), (1384963581,), (1384963684,), (1384963703,), (1384963706,), (1384963730,), (1384963752,), (1384963635,), (1384963637,), (1384963654,), (1384963778,), (1384963779,), (1384963782,), (1384963785,), (1384963788,), (1384963791,), (1384963804,), (1384963805,), (1384963806,), (1384963808,), (1384963837,), (1384963839,), (1384963841,), (1384963844,), (1384963847,), (1384963851,), (1384963868,), (1384963869,), (1384963871,), (1384963874,), (1384963875,), (1384963878,), (1384963885,), (1384963887,), (1384963888,), (1384963890,), (1384963891,), (1384963893,), (1384963900,), (1384963907,), (1384963923,), (1384963949,), (1384963954,), (1384963958,), (1384963962,), (1384963965,), (1384963968,), (1384963997,), (1384963998,), (1384964000,), (1384964007,), (1384964014,), (1384964018,), (1384964040,), (1384964041,), (1384964042,), (1384964044,), (1384964075,), (1384964077,), (1384964079,), (1384964081,), (1384964085,), (1384964099,), (1384964101,), (1384964103,), (1384964106,), (1384964135,), (1384964136,), (1384964137,), (1384964139,), (1384964142,), (1384964164,), (1384964171,), (1384964217,), (1384964218,), (1384964219,), (1384964222,), (1384964225,), (1384964227,), (1384964275,), (1384964254,), (1384964256,), (1384964258,), (1384964261,), (1384964451,), (1384964475,), (1384964480,), (1384964492,), (1384964634,), (1384964646,), (1384964657,), (1384964660,), (1384964664,), (1384964748,), (1384964772,), (1384964795,), (1384964807,), (1384964809,), (1384964881,), (1384964882,), (1384964908,), (1384964910,), (1384964912,), (1384964917,), (1384964922,), (1384964960,), (1384964961,), (1384964962,), (1384964965,), (1384964991,), (1384964997,), (1384965058,), (1384965063,), (1384965064,), (1384965066,), (1384965086,), (1384965116,), (1384965117,), (1384965118,), (1384965141,), (1384965142,), (1384965143,), (1384965146,), (1384965150,), (1384965162,), (1384965164,), (1384965168,), (1384965230,), (1384965238,), (1384965239,), (1384965244,), (1384965307,), (1384965309,), (1384965311,), (1384965314,), (1384965318,), (1384965330,), (1384965333,), (1384965337,), (1384965339,), (1384965343,), (1384965367,), (1384965369,), (1384965371,), (1384965374,), (1384965377,), (1384965379,), (1384965464,), (1384965489,), (1384965513,), (1384969912,), (1384970225,), (1384970227,), (1384970229,), (1384970300,), (1384970303,), (1384970305,), (1384970372,), (1384970373,), (1384970374,), (1384970375,), (1384970427,), (1384970438,), (1384970442,), (1384970452,), (1384970454,), (1384970468,), (1384970469,), (1384970470,), (1384970471,), (1384970473,), (1384970498,), (1384970499,), (1384970517,), (1384970523,), (1384970534,), (1384970558,), (1384970560,), (1384970562,), (1384970564,), (1384970566,), (1384970573,), (1384970575,), (1384970577,), (1384970579,), (1384970581,), (1384970583,), (1384970589,), (1384970591,), (1384970593,), (1384970596,), (1384970617,), (1384970618,), (1384970619,), (1384970620,), (1384970622,), (1384970636,), (1384970638,), (1384970640,), (1384970643,), (1384970653,), (1384970655,), (1384970657,), (1384970695,), (1384970688,), (1384970690,), (1384970692,), (1384970705,), (1384970706,), (1384970707,), (1384970711,), (1384970713,), (1384970735,), (1384970737,), (1384970739,), (1384970743,), (1384970745,), (1384970775,), (1384970779,), (1384970783,), (1384970784,), (1384970801,), (1384970812,), (1384970814,), (1384970817,), (1384970819,), (1384970825,), (1384970827,), (1384970829,), (1384970831,), (1384970833,), (1384970836,), (1384970878,), (1384970881,), (1384970942,), (1384970944,), (1384970945,), (1384970960,), (1384970963,), (1384970970,), (1384970977,), (1384970980,), (1384971027,), (1384971030,), (1384971032,), (1384971036,), (1384971038,), (1384971054,), (1384971056,), (1384971059,), (1384971068,), (1384971069,), (1384971070,), (1384971072,), (1384971073,), (1384971075,), (1384971116,), (1384971117,), (1384971118,), (1384971120,), (1384971123,), (1384971125,), (1384971130,), (1384971133,), (1384971136,), (1384971141,), (1384971144,), (1384971147,), (1384971181,), (1384971183,), (1384971185,), (1384971190,), (1384971191,), (1384971192,), (1384971193,), (1384971194,), (1384971203,), (1384971176,), (1384971177,), (1384971178,), (1384971213,), (1384971216,), (1384971219,), (1384971235,), (1384971251,), (1384971279,), (1384971287,), (1384971535,), (1384971558,), (1384971590,), (1384971618,), (1384971641,), (1384971669,), (1384971799,), (1384971825,), (1384971847,), (1384971869,), (1384972406,), (1384972477,), (1384972566,), (1384972646,), (1384972714,), (1384972787,), (1384973338,), (1384973386,), (1384973442,), (1384973492,), (1384973540,), (1384973605,), (1384974114,), (1384974145,), (1384974172,), (1384974614,), (1384974639,), (1384974663,), (1384974690,), (1384975049,), (1384975126,), (1384975174,), (1384975230,), (1384975399,), (1384975401,), (1384975404,), (1384975406,), (1384975422,), (1384975430,), (1384976002,), (1384976031,), (1384976509,), (1384976384,), (1384976409,), (1384976431,), (1384976460,), (1384976484,), (1384976722,), (1384976723,), (1384976724,), (1384977031,), (1384977057,), (1384977644,), (1384977695,), (1384977743,), (1384977782,), (1384978166,), (1384978194,), (1384978220,), (1384978366,), (1384978368,), (1384978369,), (1384978371,), (1384978457,), (1384978485,), (1384978510,), (1384978934,), (1384978958,), (1384979007,), (1384979030,), (1384979153,), (1384979156,), (1384979159,), (1384979162,), (1384979163,), (1384979174,), (1384979192,), (1384979216,), (1384979482,), (1384979483,), (1384979484,), (1384979485,), (1384979487,), (1384979489,), (1384979495,), (1384979498,), (1384979499,), (1384979501,), (1384979503,), (1384979505,), (1384979525,), (1384979542,), (1384979545,), (1384979550,), (1384979552,), (1384979554,), (1384979571,), (1384979573,), (1384979575,), (1384979602,), (1384979594,), (1384979596,), (1384979598,), (1384979600,), (1384979624,), (1384979630,), (1384979631,), (1384979693,), (1384979696,), (1384979698,), (1384979701,), (1384979704,), (1384979705,), (1384979717,), (1384979719,), (1384979721,), (1384979724,), (1384979736,), (1384979738,), (1384979741,), (1384979745,), (1384979763,), (1384979765,), (1384979767,), (1384979771,), (1384979774,), (1384979777,), (1384979785,), (1384979786,), (1384979787,), (1384979832,), (1384979836,), (1384979843,), (1384979845,), (1384979848,), (1384979884,), (1384979887,), (1384979890,), (1384979891,), (1384979922,), (1384979924,), (1384979926,), (1384979929,), (1384979943,), (1384979944,), (1384979945,), (1384979963,), (1384979990,), (1384979991,), (1384980010,), (1384980028,), (1384980034,), (1384980039,), (1384980042,), (1384980088,), (1384980254,), (1384980297,), (1384980298,), (1384980364,), (1384980366,), (1384980368,), (1384980371,), (1384980380,), (1384980398,), (1384980399,), (1384980401,), (1384980405,), (1384980442,), (1384980444,), (1384980447,), (1384980450,), (1384980453,), (1384980455,), (1384980466,), (1384980476,), (1384980512,), (1384980520,), (1384980522,), (1384980525,), (1384980529,), (1384980603,), (1384980605,), (1384980607,), (1384980611,), (1384980615,), (1384980617,), (1384980796,), (1384980797,), (1384980798,), (1384980800,), (1384980803,), (1384980806,), (1384980817,), (1384980819,), (1384980823,), (1384980828,), (1384980835,), (1384980837,), (1384980838,), (1384980858,), (1384980852,), (1384980855,), (1384980856,), (1384980874,), (1384980885,), (1384981375,), (1384981549,), (1384981603,), (1384981654,), (1384981707,), (1384982155,), (1384982209,), (1384982262,), (1384982313,), (1384982368,), (1384982622,), (1384982625,), (1384982627,), (1384982630,), (1384982632,), (1384982940,), (1384982991,), (1384983024,), (1384983061,), (1384983119,), (1384983224,), (1384983227,), (1384983230,), (1384983233,), (1384983244,), (1384983246,), (1384983248,), (1384983249,), (1384983252,), (1384983254,), (1384983259,), (1384983261,), (1384983263,), (1384983318,), (1384983325,), (1384983328,), (1384983334,), (1384983336,), (1384983339,), (1384983341,), (1384983343,), (1384983347,), (1384983348,), (1384983350,), (1384983353,), (1384983356,), (1384983358,), (1384983398,), (1384983399,), (1384983402,), (1384983406,), (1384983409,), (1384983428,), (1384983429,), (1384983439,), (1384983443,), (1384983446,), (1384983448,), (1384983450,), (1384983453,), (1384983888,), (1384983708,), (1384983778,), (1384983838,), (1384984486,), (1384984552,), (1384984609,), (1384984657,), (1384984661,), (1384984687,), (1384984689,), (1384984691,), (1384985074,), (1384985083,), (1384985086,), (1384985118,), (1384985138,), (1384985208,), (1384985212,), (1384985213,), (1384985215,), (1384985219,), (1384985222,), (1384985228,), (1384985229,), (1384985230,), (1384985231,), (1384985235,), (1384985269,), (1384985270,), (1384985272,), (1384985280,), (1384985282,), (1384985284,), (1384985310,), (1384985311,), (1384985312,), (1384985357,), (1384985381,), (1384985416,), (1384985418,), (1384985433,), (1384985434,), (1384985435,), (1384985436,), (1384985438,), (1384985508,), (1384985538,), (1384985559,), (1384985561,), (1384985569,), (1384985570,), (1384985607,), (1384985612,), (1384985615,), (1384985616,), (1384985626,), (1384985628,), (1384985630,), (1384985652,), (1384985653,), (1384985654,), (1384985669,), (1384985671,), (1384985673,), (1384985676,), (1384985700,), (1384985701,), (1384985702,), (1384985703,), (1384985706,), (1384985713,), (1384985714,), (1384985715,), (1384985717,), (1384985720,), (1384985736,), (1384985743,), (1384985750,), (1384985752,), (1384985762,), (1384985763,), (1384985778,), (1384985781,), (1384985784,), (1384985834,), (1384985835,), (1384985837,), (1384985839,), (1384985842,), (1384985864,), (1384985865,), (1384985866,), (1384985867,), (1384985879,), (1384985882,), (1384985883,), (1384985886,), (1384985927,), (1384985915,), (1384985917,), (1384985920,), (1384985923,), (1384985925,), (1384985932,), (1384985933,), (1384985934,), (1384985936,), (1384985939,), (1384985941,), (1384986001,), (1384986003,), (1384986005,), (1384986007,), (1384986025,), (1384986026,), (1384986027,), (1384986043,), (1384986045,), (1384986047,), (1384986049,), (1384986059,), (1384986060,), (1384986061,), (1384986062,), (1384986065,), (1384986088,), (1384986093,), (1384986095,), (1384986098,), (1384986102,), (1384986103,), (1384986108,), (1384986109,), (1384986110,), (1384986123,), (1384986124,), (1384986125,), (1384986127,), (1384986129,), (1384986144,), (1384986146,), (1384986148,), (1384986150,), (1384986158,), (1384986160,), (1384986161,), (1384986172,), (1384986173,), (1384986177,), (1384986180,), (1384986182,), (1384986183,), (1384986184,), (1384986185,), (1384986193,), (1384986195,), (1384986197,), (1384986199,), (1384986350,), (1384986452,), (1384986492,), (1384986540,), (1384986587,), (1384986637,), (1384986208,), (1384986239,), (1384986264,), (1384986305,), (1384986327,), (1384986787,), (1384986788,), (1384986837,), (1384986842,), (1384986891,), (1384986896,), (1384987145,), (1384987758,), (1384987803,), (1384987845,), (1384988248,), (1384988272,), (1384988294,), (1384988319,), (1384988364,), (1384988864,), (1384988909,), (1384988969,), (1384989476,), (1384989597,), (1384989624,), (1384989648,), (1384989847,), (1384989849,), (1384989852,), (1384989876,), (1384989878,), (1384989881,), (1384989884,), (1384990057,), (1384990089,), (1384990113,), (1384990153,), (1384990178,), (1384990302,), (1384992563,), (1384993299,), (1384993370,), (1384993882,), (1384994870,), (1384994873,), (1384994876,), (1384994928,), (1384994957,), (1384995244,), (1384995246,), (1384995265,), (1384995291,), (1384995294,), (1384995333,), (1384995386,), (1384995403,), (1384995410,), (1384995433,), (1384995451,), (1384995454,), (1384995513,), (1384995516,), (1384995520,), (1384995581,), (1384995607,), (1384995631,), (1384995776,), (1384995778,), (1384996068,), (1384996062,), (1384996064,), (1384996066,), (1384996129,), (1384996133,), (1384996135,), (1384996138,), (1384996141,), (1384996154,), (1384996157,), (1384996158,), (1384996160,), (1384996162,), (1384996178,), (1384996179,), (1384996180,), (1384996195,), (1384996197,), (1384996199,), (1384996201,), (1384996203,), (1384996205,), (1384996209,), (1384996211,), (1384996212,), (1384996214,), (1384996470,), (1384996500,), (1384996520,), (1384996537,), (1384996541,), (1384996576,), (1384996577,), (1384996583,), (1384996585,), (1384996596,), (1384996599,), (1384996647,), (1384996648,), (1384996649,), (1384996651,), (1384996653,), (1384996655,), (1384996674,), (1384996676,), (1384996678,), (1384996693,), (1384996695,), (1384996697,), (1384996699,), (1384996701,), (1384996780,), (1384996782,), (1384996783,), (1384996786,), (1384996789,), (1384996844,), (1384996888,), (1384996912,), (1384996938,), (1384996964,), (1384996986,), (1384997040,), (1384997076,), (1384997079,), (1384997081,), (1384997087,), (1384997188,), (1384997192,), (1384997194,), (1384997196,), (1384997198,), (1384997221,), (1384997215,), (1384997216,), (1384997217,), (1384997219,), (1384997242,), (1384997243,), (1384997246,), (1384997308,), (1384997345,), (1384997349,), (1384997351,), (1384997352,), (1384997355,), (1384997357,), (1384997359,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'19092025': {'nb_upload': 15, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27024999]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1384997359, 1384997357, 1384997355, 1384997352, 1384997351, 1384997349, 1384997345, 1384997308, 1384997246, 1384997243, 1384997242] map_info['map_portfolio_photo'] : {27024999: [1384997359, 1384997357, 1384997355, 1384997352, 1384997351, 1384997349, 1384997345, 1384997308, 1384997246, 1384997243, 1384997242, 1384997219, 1384997217, 1384997216, 1384997215]} final : True mtd_id 4302 list_pids : [1384997359, 1384997357, 1384997355, 1384997352, 1384997351, 1384997349, 1384997345, 1384997308, 1384997246, 1384997243, 1384997242] Looping around the photos to save general results len do output : 1 /27024999Didn'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, '3744846') ('4302', '27024999', '1384997359', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997357', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997355', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997352', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997351', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997349', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997345', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997308', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997246', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997243', None, None, None, None, None, '3744846') ('4302', None, None, None, None, None, None, None, '3744846') ('4302', '27024999', '1384997242', None, None, None, None, None, '3744846') 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', None, '27024999', 'None', None, None, None, None, '3744846'), ('4302', '27024999', '1384997359', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997357', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997355', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997352', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997351', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997349', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997345', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997308', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997246', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997243', None, None, None, None, None, '3744846'), ('4302', '27024999', '1384997242', None, None, None, None, None, '3744846')] time used for this insertion : 0.015340805053710938 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.7014038562774658 time spend to save output : 0.01555013656616211 total time spend for step 5 : 1.716953992843628 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 (3744846) 1.92user 2.53system 0:09.23elapsed 48%CPU (0avgtext+0avgdata 160236maxresident)k 248inputs+6872outputs (0major+64299minor)pagefaults 0swaps