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 : 1794463 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 (3313061) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3313061) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25123001 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3313061'] with mtr_portfolio_ids : ['25123001'] and first list_photo_ids : [] new path : /proc/1794463/ Name: python3 Umask: 0002 State: R (running) Tgid: 1794463 Ngid: 0 Pid: 1794463 PPid: 1794462 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1794463 NSpid: 1794463 NSpgid: 1791927 NSsid: 1791927 VmPeak: 1106884 kB VmSize: 1106884 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98920 kB VmRSS: 98920 kB RssAnon: 59788 kB RssFile: 39132 kB RssShmem: 0 kB VmData: 865636 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 604 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: 52 nonvoluntary_ctxt_switches: 90 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1794463', 'Ngid': '0', 'Pid': '1794463', 'PPid': '1794462', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1794463', 'NSpid': '1794463', 'NSpgid': '1791927', 'NSsid': '1791927', 'VmPeak': '1106884 kB', 'VmSize': '1106884 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98920 kB', 'VmRSS': '98920 kB', 'RssAnon': '59788 kB', 'RssFile': '39132 kB', 'RssShmem': '0 kB', 'VmData': '865636 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '604 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': '52', 'nonvoluntary_ctxt_switches': '90'} ('datou_batch_current', '1794463', '1106884', '0', '1106884', '865636', '98920', b'', 'marlene', '3313061') 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 (25123001) 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 (3313061 ) ) 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 (25123001) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1372975741, 'portfolio_id': 25123001}, {'photo_id': 1372975739, 'portfolio_id': 25123001}, {'photo_id': 1372975736, 'portfolio_id': 25123001}, {'photo_id': 1372975734, 'portfolio_id': 25123001}, {'photo_id': 1372975731, 'portfolio_id': 25123001}, {'photo_id': 1372975729, 'portfolio_id': 25123001}, {'photo_id': 1372975708, 'portfolio_id': 25123001}, {'photo_id': 1372975706, 'portfolio_id': 25123001}, {'photo_id': 1372975704, 'portfolio_id': 25123001}, {'photo_id': 1372975702, 'portfolio_id': 25123001}, {'photo_id': 1372975701, 'portfolio_id': 25123001}, {'photo_id': 1372975699, 'portfolio_id': 25123001}, {'photo_id': 1372975672, 'portfolio_id': 25123001}, {'photo_id': 1372975670, 'portfolio_id': 25123001}, {'photo_id': 1372975668, 'portfolio_id': 25123001}, {'photo_id': 1372975666, 'portfolio_id': 25123001}, {'photo_id': 1372975664, 'portfolio_id': 25123001}, {'photo_id': 1372975663, 'portfolio_id': 25123001}, {'photo_id': 1372975639, 'portfolio_id': 25123001}, {'photo_id': 1372975637, 'portfolio_id': 25123001}, {'photo_id': 1372975635, 'portfolio_id': 25123001}, {'photo_id': 1372975633, 'portfolio_id': 25123001}, {'photo_id': 1372975631, 'portfolio_id': 25123001}, {'photo_id': 1372975630, 'portfolio_id': 25123001}, {'photo_id': 1372975606, 'portfolio_id': 25123001}, {'photo_id': 1372975604, 'portfolio_id': 25123001}, {'photo_id': 1372975601, 'portfolio_id': 25123001}, {'photo_id': 1372975598, 'portfolio_id': 25123001}, {'photo_id': 1372975595, 'portfolio_id': 25123001}, {'photo_id': 1372975594, 'portfolio_id': 25123001}, {'photo_id': 1372975568, 'portfolio_id': 25123001}, {'photo_id': 1372975565, 'portfolio_id': 25123001}, {'photo_id': 1372975562, 'portfolio_id': 25123001}, {'photo_id': 1372975559, 'portfolio_id': 25123001}, {'photo_id': 1372975558, 'portfolio_id': 25123001}, {'photo_id': 1372975556, 'portfolio_id': 25123001}, {'photo_id': 1372975524, 'portfolio_id': 25123001}, {'photo_id': 1372975521, 'portfolio_id': 25123001}, {'photo_id': 1372975519, 'portfolio_id': 25123001}, {'photo_id': 1372975517, 'portfolio_id': 25123001}, {'photo_id': 1372975516, 'portfolio_id': 25123001}, {'photo_id': 1372975506, 'portfolio_id': 25123001}, {'photo_id': 1372975489, 'portfolio_id': 25123001}, {'photo_id': 1372975486, 'portfolio_id': 25123001}, {'photo_id': 1372975483, 'portfolio_id': 25123001}, {'photo_id': 1372975480, 'portfolio_id': 25123001}, {'photo_id': 1372975478, 'portfolio_id': 25123001}, {'photo_id': 1372975477, 'portfolio_id': 25123001}, {'photo_id': 1372975445, 'portfolio_id': 25123001}, {'photo_id': 1372975417, 'portfolio_id': 25123001}, {'photo_id': 1372975415, 'portfolio_id': 25123001}, {'photo_id': 1372975413, 'portfolio_id': 25123001}, {'photo_id': 1372975412, 'portfolio_id': 25123001}, {'photo_id': 1372975410, 'portfolio_id': 25123001}, {'photo_id': 1372975408, 'portfolio_id': 25123001}, {'photo_id': 1372975385, 'portfolio_id': 25123001}, {'photo_id': 1372975382, 'portfolio_id': 25123001}, {'photo_id': 1372975379, 'portfolio_id': 25123001}, {'photo_id': 1372975376, 'portfolio_id': 25123001}, {'photo_id': 1372975370, 'portfolio_id': 25123001}, {'photo_id': 1372975356, 'portfolio_id': 25123001}, {'photo_id': 1372975336, 'portfolio_id': 25123001}, {'photo_id': 1372975334, 'portfolio_id': 25123001}, {'photo_id': 1372975332, 'portfolio_id': 25123001}, {'photo_id': 1372975331, 'portfolio_id': 25123001}, {'photo_id': 1372975327, 'portfolio_id': 25123001}, {'photo_id': 1372975323, 'portfolio_id': 25123001}, {'photo_id': 1372975297, 'portfolio_id': 25123001}, {'photo_id': 1372975295, 'portfolio_id': 25123001}, {'photo_id': 1372975292, 'portfolio_id': 25123001}, {'photo_id': 1372975290, 'portfolio_id': 25123001}, {'photo_id': 1372975287, 'portfolio_id': 25123001}, {'photo_id': 1372975283, 'portfolio_id': 25123001}, {'photo_id': 1372975261, 'portfolio_id': 25123001}, {'photo_id': 1372975259, 'portfolio_id': 25123001}, {'photo_id': 1372975257, 'portfolio_id': 25123001}, {'photo_id': 1372975255, 'portfolio_id': 25123001}, {'photo_id': 1372975254, 'portfolio_id': 25123001}, {'photo_id': 1372975252, 'portfolio_id': 25123001}, {'photo_id': 1372975227, 'portfolio_id': 25123001}, {'photo_id': 1372975225, 'portfolio_id': 25123001}, {'photo_id': 1372975223, 'portfolio_id': 25123001}, {'photo_id': 1372975222, 'portfolio_id': 25123001}, {'photo_id': 1372975221, 'portfolio_id': 25123001}, {'photo_id': 1372975220, 'portfolio_id': 25123001}] map_portfolio_id_photo_id: {25123001: [1372975741, 1372975739, 1372975736, 1372975734, 1372975731, 1372975729, 1372975708, 1372975706, 1372975704, 1372975702, 1372975701, 1372975699, 1372975672, 1372975670, 1372975668, 1372975666, 1372975664, 1372975663, 1372975639, 1372975637, 1372975635, 1372975633, 1372975631, 1372975630, 1372975606, 1372975604, 1372975601, 1372975598, 1372975595, 1372975594, 1372975568, 1372975565, 1372975562, 1372975559, 1372975558, 1372975556, 1372975524, 1372975521, 1372975519, 1372975517, 1372975516, 1372975506, 1372975489, 1372975486, 1372975483, 1372975480, 1372975478, 1372975477, 1372975445, 1372975417, 1372975415, 1372975413, 1372975412, 1372975410, 1372975408, 1372975385, 1372975382, 1372975379, 1372975376, 1372975370, 1372975356, 1372975336, 1372975334, 1372975332, 1372975331, 1372975327, 1372975323, 1372975297, 1372975295, 1372975292, 1372975290, 1372975287, 1372975283, 1372975261, 1372975259, 1372975257, 1372975255, 1372975254, 1372975252, 1372975227, 1372975225, 1372975223, 1372975222, 1372975221, 1372975220]} ##### 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.01586008071899414 #### 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 Mon Jul 21 08:30:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25123001) 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 : 25123001 get user id for portfolio 25123001 get sub ptf for main ptf 25123001, type 3726 and hashtags ['mal_croppe', 'papier', 'cartonnette', 'flou', 'Teint_Dans_La_Masse', 'Carton_brun', 'Carton_gris', 'autre_refus', 'plastique', 'metal', 'kraft', '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`=25123001 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','papier','cartonnette','flou','Teint_Dans_La_Masse','Carton_brun','Carton_gris','autre_refus','plastique','metal','kraft','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`=25123001 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','papier','cartonnette','flou','Teint_Dans_La_Masse','Carton_brun','Carton_gris','autre_refus','plastique','metal','kraft','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 25123001, 'sub_port_id': 25123005, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939099, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 57)}, 'metal': {'main_port_id': 25123001, 'sub_port_id': 25123006, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939100, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 57)}, 'Carton_gris': {'main_port_id': 25123001, 'sub_port_id': 25123007, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939101, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 57)}, 'cartonnette': {'main_port_id': 25123001, 'sub_port_id': 25123008, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939102, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 57)}, 'papier': {'main_port_id': 25123001, 'sub_port_id': 25123009, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939103, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 57)}, 'environnement': {'main_port_id': 25123001, 'sub_port_id': 25123010, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939104, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 57)}, 'kraft': {'main_port_id': 25123001, 'sub_port_id': 25123011, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939105, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 57)}, 'plastique': {'main_port_id': 25123001, 'sub_port_id': 25123012, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939106, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 57)}, 'Carton_brun': {'main_port_id': 25123001, 'sub_port_id': 25123013, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939107, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 57)}, 'mal_croppe': {'main_port_id': 25123001, 'sub_port_id': 25123014, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939108, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 57)}, 'autre_refus': {'main_port_id': 25123001, 'sub_port_id': 25123015, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939109, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 57)}, 'Teint_Dans_La_Masse': {'main_port_id': 25123001, 'sub_port_id': 25123016, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939110, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 57)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25123005 , 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=25123001 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 (25123005) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25123001) result : ((1372975220,), (1372975221,), (1372975222,), (1372975223,), (1372975225,), (1372975227,), (1372975252,), (1372975254,), (1372975255,), (1372975257,), (1372975259,), (1372975261,), (1372975283,), (1372975287,), (1372975290,), (1372975292,), (1372975295,), (1372975297,), (1372975323,), (1372975327,), (1372975331,), (1372975332,), (1372975334,), (1372975336,), (1372975356,), (1372975370,), (1372975376,), (1372975379,), (1372975382,), (1372975385,), (1372975408,), (1372975410,), (1372975412,), (1372975413,), (1372975415,), (1372975417,), (1372975445,), (1372975477,), (1372975478,), (1372975480,), (1372975483,), (1372975486,), (1372975489,), (1372975506,), (1372975516,), (1372975517,), (1372975519,), (1372975521,), (1372975524,), (1372975556,), (1372975558,), (1372975559,), (1372975562,), (1372975565,), (1372975568,), (1372975594,), (1372975595,), (1372975598,), (1372975601,), (1372975604,), (1372975606,), (1372975630,), (1372975631,), (1372975633,), (1372975635,), (1372975637,), (1372975639,), (1372975663,), (1372975664,), (1372975666,), (1372975668,), (1372975670,), (1372975672,), (1372975699,), (1372975701,), (1372975702,), (1372975704,), (1372975706,), (1372975708,), (1372975729,), (1372975731,), (1372975734,), (1372975736,), (1372975739,), (1372975741,)) 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 25123006 , 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=25123001 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 (25123006) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25123001) result : ((1372975220,), (1372975221,), (1372975222,), (1372975223,), (1372975225,), (1372975227,), (1372975252,), (1372975254,), (1372975255,), (1372975257,), (1372975259,), (1372975261,), (1372975283,), (1372975287,), (1372975290,), (1372975292,), (1372975295,), (1372975297,), (1372975323,), (1372975327,), (1372975331,), (1372975332,), (1372975334,), (1372975336,), (1372975356,), (1372975370,), (1372975376,), (1372975379,), (1372975382,), (1372975385,), (1372975408,), (1372975410,), (1372975412,), (1372975413,), (1372975415,), (1372975417,), (1372975445,), (1372975477,), (1372975478,), (1372975480,), (1372975483,), (1372975486,), (1372975489,), (1372975506,), (1372975516,), (1372975517,), (1372975519,), (1372975521,), (1372975524,), (1372975556,), (1372975558,), (1372975559,), (1372975562,), (1372975565,), (1372975568,), (1372975594,), (1372975595,), (1372975598,), (1372975601,), (1372975604,), (1372975606,), (1372975630,), (1372975631,), (1372975633,), (1372975635,), (1372975637,), (1372975639,), (1372975663,), (1372975664,), (1372975666,), (1372975668,), (1372975670,), (1372975672,), (1372975699,), (1372975701,), (1372975702,), (1372975704,), (1372975706,), (1372975708,), (1372975729,), (1372975731,), (1372975734,), (1372975736,), (1372975739,), (1372975741,)) 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 25123007 , 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=25123001 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 (25123007) result : ((1372975371,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25123001) result : ((1372975220,), (1372975221,), (1372975222,), (1372975223,), (1372975225,), (1372975227,), (1372975252,), (1372975254,), (1372975255,), (1372975257,), (1372975259,), (1372975261,), (1372975283,), (1372975287,), (1372975290,), (1372975292,), (1372975295,), (1372975297,), (1372975323,), (1372975327,), (1372975331,), (1372975332,), (1372975334,), (1372975336,), (1372975356,), (1372975370,), (1372975376,), (1372975379,), (1372975382,), (1372975385,), (1372975408,), (1372975410,), (1372975412,), (1372975413,), (1372975415,), (1372975417,), (1372975445,), (1372975477,), (1372975478,), (1372975480,), (1372975483,), (1372975486,), (1372975489,), (1372975506,), (1372975516,), (1372975517,), (1372975519,), (1372975521,), (1372975524,), (1372975556,), (1372975558,), (1372975559,), (1372975562,), (1372975565,), (1372975568,), (1372975594,), (1372975595,), (1372975598,), (1372975601,), (1372975604,), (1372975606,), (1372975630,), (1372975631,), (1372975633,), (1372975635,), (1372975637,), (1372975639,), (1372975663,), (1372975664,), (1372975666,), (1372975668,), (1372975670,), (1372975672,), (1372975699,), (1372975701,), (1372975702,), (1372975704,), (1372975706,), (1372975708,), (1372975729,), (1372975731,), (1372975734,), (1372975736,), (1372975739,), (1372975741,)) 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 25123008 , 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=25123001 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 (25123008) result : ((1372975434,), (1372975436,), (1372975437,), (1372975438,), (1372975439,), (1372975440,), (1372975463,), (1372975465,), (1372975466,), (1372975467,), (1372975468,), (1372975469,), (1372975508,), (1372975509,), (1372975510,), (1372975511,), (1372975512,), (1372975513,), (1372975515,), (1372975539,), (1372975540,), (1372975541,), (1372975542,), (1372975543,), (1372975545,), (1372975585,), (1372975586,), (1372975588,), (1372975589,), (1372975590,), (1372975591,), (1372975616,), (1372975617,), (1372975618,), (1372975619,), (1372975620,), (1372975621,), (1372975656,), (1372975657,), (1372975658,), (1372975659,), (1372975660,), (1372975661,), (1372975682,), (1372975683,), (1372975684,), (1372975685,), (1372975686,), (1372975723,), (1372975724,), (1372975725,), (1372975726,), (1372975727,), (1372975767,), (1372975768,), (1372975769,), (1372975770,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25123001) result : ((1372975220,), (1372975221,), (1372975222,), (1372975223,), (1372975225,), (1372975227,), (1372975252,), (1372975254,), (1372975255,), (1372975257,), (1372975259,), (1372975261,), (1372975283,), (1372975287,), (1372975290,), (1372975292,), (1372975295,), (1372975297,), (1372975323,), (1372975327,), (1372975331,), (1372975332,), (1372975334,), (1372975336,), (1372975356,), (1372975370,), (1372975376,), (1372975379,), (1372975382,), (1372975385,), (1372975408,), (1372975410,), (1372975412,), (1372975413,), (1372975415,), (1372975417,), (1372975445,), (1372975477,), (1372975478,), (1372975480,), (1372975483,), (1372975486,), (1372975489,), (1372975506,), (1372975516,), (1372975517,), (1372975519,), (1372975521,), (1372975524,), (1372975556,), (1372975558,), (1372975559,), (1372975562,), (1372975565,), (1372975568,), (1372975594,), (1372975595,), (1372975598,), (1372975601,), (1372975604,), (1372975606,), (1372975630,), (1372975631,), (1372975633,), (1372975635,), (1372975637,), (1372975639,), (1372975663,), (1372975664,), (1372975666,), (1372975668,), (1372975670,), (1372975672,), (1372975699,), (1372975701,), (1372975702,), (1372975704,), (1372975706,), (1372975708,), (1372975729,), (1372975731,), (1372975734,), (1372975736,), (1372975739,), (1372975741,)) 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 25123009 , 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=25123001 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 (25123009) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25123001) result : ((1372975220,), (1372975221,), (1372975222,), (1372975223,), (1372975225,), (1372975227,), (1372975252,), (1372975254,), (1372975255,), (1372975257,), (1372975259,), (1372975261,), (1372975283,), (1372975287,), (1372975290,), (1372975292,), (1372975295,), (1372975297,), (1372975323,), (1372975327,), (1372975331,), (1372975332,), (1372975334,), (1372975336,), (1372975356,), (1372975370,), (1372975376,), (1372975379,), (1372975382,), (1372975385,), (1372975408,), (1372975410,), (1372975412,), (1372975413,), (1372975415,), (1372975417,), (1372975445,), (1372975477,), (1372975478,), (1372975480,), (1372975483,), (1372975486,), (1372975489,), (1372975506,), (1372975516,), (1372975517,), (1372975519,), (1372975521,), (1372975524,), (1372975556,), (1372975558,), (1372975559,), (1372975562,), (1372975565,), (1372975568,), (1372975594,), (1372975595,), (1372975598,), (1372975601,), (1372975604,), (1372975606,), (1372975630,), (1372975631,), (1372975633,), (1372975635,), (1372975637,), (1372975639,), (1372975663,), (1372975664,), (1372975666,), (1372975668,), (1372975670,), (1372975672,), (1372975699,), (1372975701,), (1372975702,), (1372975704,), (1372975706,), (1372975708,), (1372975729,), (1372975731,), (1372975734,), (1372975736,), (1372975739,), (1372975741,)) 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 25123010 , 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=25123001 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 (25123010) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25123001) result : ((1372975220,), (1372975221,), (1372975222,), (1372975223,), (1372975225,), (1372975227,), (1372975252,), (1372975254,), (1372975255,), (1372975257,), (1372975259,), (1372975261,), (1372975283,), (1372975287,), (1372975290,), (1372975292,), (1372975295,), (1372975297,), (1372975323,), (1372975327,), (1372975331,), (1372975332,), (1372975334,), (1372975336,), (1372975356,), (1372975370,), (1372975376,), (1372975379,), (1372975382,), (1372975385,), (1372975408,), (1372975410,), (1372975412,), (1372975413,), (1372975415,), (1372975417,), (1372975445,), (1372975477,), (1372975478,), (1372975480,), (1372975483,), (1372975486,), (1372975489,), (1372975506,), (1372975516,), (1372975517,), (1372975519,), (1372975521,), (1372975524,), (1372975556,), (1372975558,), (1372975559,), (1372975562,), (1372975565,), (1372975568,), (1372975594,), (1372975595,), (1372975598,), (1372975601,), (1372975604,), (1372975606,), (1372975630,), (1372975631,), (1372975633,), (1372975635,), (1372975637,), (1372975639,), (1372975663,), (1372975664,), (1372975666,), (1372975668,), (1372975670,), (1372975672,), (1372975699,), (1372975701,), (1372975702,), (1372975704,), (1372975706,), (1372975708,), (1372975729,), (1372975731,), (1372975734,), (1372975736,), (1372975739,), (1372975741,)) 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 25123011 , 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=25123001 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 (25123011) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25123001) result : ((1372975220,), (1372975221,), (1372975222,), (1372975223,), (1372975225,), (1372975227,), (1372975252,), (1372975254,), (1372975255,), (1372975257,), (1372975259,), (1372975261,), (1372975283,), (1372975287,), (1372975290,), (1372975292,), (1372975295,), (1372975297,), (1372975323,), (1372975327,), (1372975331,), (1372975332,), (1372975334,), (1372975336,), (1372975356,), (1372975370,), (1372975376,), (1372975379,), (1372975382,), (1372975385,), (1372975408,), (1372975410,), (1372975412,), (1372975413,), (1372975415,), (1372975417,), (1372975445,), (1372975477,), (1372975478,), (1372975480,), (1372975483,), (1372975486,), (1372975489,), (1372975506,), (1372975516,), (1372975517,), (1372975519,), (1372975521,), (1372975524,), (1372975556,), (1372975558,), (1372975559,), (1372975562,), (1372975565,), (1372975568,), (1372975594,), (1372975595,), (1372975598,), (1372975601,), (1372975604,), (1372975606,), (1372975630,), (1372975631,), (1372975633,), (1372975635,), (1372975637,), (1372975639,), (1372975663,), (1372975664,), (1372975666,), (1372975668,), (1372975670,), (1372975672,), (1372975699,), (1372975701,), (1372975702,), (1372975704,), (1372975706,), (1372975708,), (1372975729,), (1372975731,), (1372975734,), (1372975736,), (1372975739,), (1372975741,)) 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 25123012 , 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=25123001 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 (25123012) result : ((1372975280,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25123001) result : ((1372975220,), (1372975221,), (1372975222,), (1372975223,), (1372975225,), (1372975227,), (1372975252,), (1372975254,), (1372975255,), (1372975257,), (1372975259,), (1372975261,), (1372975283,), (1372975287,), (1372975290,), (1372975292,), (1372975295,), (1372975297,), (1372975323,), (1372975327,), (1372975331,), (1372975332,), (1372975334,), (1372975336,), (1372975356,), (1372975370,), (1372975376,), (1372975379,), (1372975382,), (1372975385,), (1372975408,), (1372975410,), (1372975412,), (1372975413,), (1372975415,), (1372975417,), (1372975445,), (1372975477,), (1372975478,), (1372975480,), (1372975483,), (1372975486,), (1372975489,), (1372975506,), (1372975516,), (1372975517,), (1372975519,), (1372975521,), (1372975524,), (1372975556,), (1372975558,), (1372975559,), (1372975562,), (1372975565,), (1372975568,), (1372975594,), (1372975595,), (1372975598,), (1372975601,), (1372975604,), (1372975606,), (1372975630,), (1372975631,), (1372975633,), (1372975635,), (1372975637,), (1372975639,), (1372975663,), (1372975664,), (1372975666,), (1372975668,), (1372975670,), (1372975672,), (1372975699,), (1372975701,), (1372975702,), (1372975704,), (1372975706,), (1372975708,), (1372975729,), (1372975731,), (1372975734,), (1372975736,), (1372975739,), (1372975741,)) 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 25123013 , 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=25123001 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 (25123013) result : ((1372975278,), (1372975372,), (1372975373,), (1372975374,), (1372975375,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25123001) result : ((1372975220,), (1372975221,), (1372975222,), (1372975223,), (1372975225,), (1372975227,), (1372975252,), (1372975254,), (1372975255,), (1372975257,), (1372975259,), (1372975261,), (1372975283,), (1372975287,), (1372975290,), (1372975292,), (1372975295,), (1372975297,), (1372975323,), (1372975327,), (1372975331,), (1372975332,), (1372975334,), (1372975336,), (1372975356,), (1372975370,), (1372975376,), (1372975379,), (1372975382,), (1372975385,), (1372975408,), (1372975410,), (1372975412,), (1372975413,), (1372975415,), (1372975417,), (1372975445,), (1372975477,), (1372975478,), (1372975480,), (1372975483,), (1372975486,), (1372975489,), (1372975506,), (1372975516,), (1372975517,), (1372975519,), (1372975521,), (1372975524,), (1372975556,), (1372975558,), (1372975559,), (1372975562,), (1372975565,), (1372975568,), (1372975594,), (1372975595,), (1372975598,), (1372975601,), (1372975604,), (1372975606,), (1372975630,), (1372975631,), (1372975633,), (1372975635,), (1372975637,), (1372975639,), (1372975663,), (1372975664,), (1372975666,), (1372975668,), (1372975670,), (1372975672,), (1372975699,), (1372975701,), (1372975702,), (1372975704,), (1372975706,), (1372975708,), (1372975729,), (1372975731,), (1372975734,), (1372975736,), (1372975739,), (1372975741,)) 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 25123014 , 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=25123001 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 (25123014) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25123001) result : ((1372975220,), (1372975221,), (1372975222,), (1372975223,), (1372975225,), (1372975227,), (1372975252,), (1372975254,), (1372975255,), (1372975257,), (1372975259,), (1372975261,), (1372975283,), (1372975287,), (1372975290,), (1372975292,), (1372975295,), (1372975297,), (1372975323,), (1372975327,), (1372975331,), (1372975332,), (1372975334,), (1372975336,), (1372975356,), (1372975370,), (1372975376,), (1372975379,), (1372975382,), (1372975385,), (1372975408,), (1372975410,), (1372975412,), (1372975413,), (1372975415,), (1372975417,), (1372975445,), (1372975477,), (1372975478,), (1372975480,), (1372975483,), (1372975486,), (1372975489,), (1372975506,), (1372975516,), (1372975517,), (1372975519,), (1372975521,), (1372975524,), (1372975556,), (1372975558,), (1372975559,), (1372975562,), (1372975565,), (1372975568,), (1372975594,), (1372975595,), (1372975598,), (1372975601,), (1372975604,), (1372975606,), (1372975630,), (1372975631,), (1372975633,), (1372975635,), (1372975637,), (1372975639,), (1372975663,), (1372975664,), (1372975666,), (1372975668,), (1372975670,), (1372975672,), (1372975699,), (1372975701,), (1372975702,), (1372975704,), (1372975706,), (1372975708,), (1372975729,), (1372975731,), (1372975734,), (1372975736,), (1372975739,), (1372975741,)) 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 25123015 , 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=25123001 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 (25123015) result : ((1372975367,), (1372975368,), (1372975680,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25123001) result : ((1372975220,), (1372975221,), (1372975222,), (1372975223,), (1372975225,), (1372975227,), (1372975252,), (1372975254,), (1372975255,), (1372975257,), (1372975259,), (1372975261,), (1372975283,), (1372975287,), (1372975290,), (1372975292,), (1372975295,), (1372975297,), (1372975323,), (1372975327,), (1372975331,), (1372975332,), (1372975334,), (1372975336,), (1372975356,), (1372975370,), (1372975376,), (1372975379,), (1372975382,), (1372975385,), (1372975408,), (1372975410,), (1372975412,), (1372975413,), (1372975415,), (1372975417,), (1372975445,), (1372975477,), (1372975478,), (1372975480,), (1372975483,), (1372975486,), (1372975489,), (1372975506,), (1372975516,), (1372975517,), (1372975519,), (1372975521,), (1372975524,), (1372975556,), (1372975558,), (1372975559,), (1372975562,), (1372975565,), (1372975568,), (1372975594,), (1372975595,), (1372975598,), (1372975601,), (1372975604,), (1372975606,), (1372975630,), (1372975631,), (1372975633,), (1372975635,), (1372975637,), (1372975639,), (1372975663,), (1372975664,), (1372975666,), (1372975668,), (1372975670,), (1372975672,), (1372975699,), (1372975701,), (1372975702,), (1372975704,), (1372975706,), (1372975708,), (1372975729,), (1372975731,), (1372975734,), (1372975736,), (1372975739,), (1372975741,)) 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 25123016 , 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=25123001 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 (25123016) result : ((1372975357,), (1372975358,), (1372975359,), (1372975360,), (1372975362,), (1372975364,), (1372975365,), (1372975366,), (1372975507,), (1372975614,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25123001) result : ((1372975220,), (1372975221,), (1372975222,), (1372975223,), (1372975225,), (1372975227,), (1372975252,), (1372975254,), (1372975255,), (1372975257,), (1372975259,), (1372975261,), (1372975283,), (1372975287,), (1372975290,), (1372975292,), (1372975295,), (1372975297,), (1372975323,), (1372975327,), (1372975331,), (1372975332,), (1372975334,), (1372975336,), (1372975356,), (1372975370,), (1372975376,), (1372975379,), (1372975382,), (1372975385,), (1372975408,), (1372975410,), (1372975412,), (1372975413,), (1372975415,), (1372975417,), (1372975445,), (1372975477,), (1372975478,), (1372975480,), (1372975483,), (1372975486,), (1372975489,), (1372975506,), (1372975516,), (1372975517,), (1372975519,), (1372975521,), (1372975524,), (1372975556,), (1372975558,), (1372975559,), (1372975562,), (1372975565,), (1372975568,), (1372975594,), (1372975595,), (1372975598,), (1372975601,), (1372975604,), (1372975606,), (1372975630,), (1372975631,), (1372975633,), (1372975635,), (1372975637,), (1372975639,), (1372975663,), (1372975664,), (1372975666,), (1372975668,), (1372975670,), (1372975672,), (1372975699,), (1372975701,), (1372975702,), (1372975704,), (1372975706,), (1372975708,), (1372975729,), (1372975731,), (1372975734,), (1372975736,), (1372975739,), (1372975741,)) 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`=25123001 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','papier','cartonnette','flou','Teint_Dans_La_Masse','Carton_brun','Carton_gris','autre_refus','plastique','metal','kraft','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`=25123001 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','papier','cartonnette','flou','Teint_Dans_La_Masse','Carton_brun','Carton_gris','autre_refus','plastique','metal','kraft','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 25123001, 'sub_port_id': 25123017, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939111, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 59)}, 'metal': {'main_port_id': 25123001, 'sub_port_id': 25123018, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939112, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 59)}, 'Carton_gris': {'main_port_id': 25123001, 'sub_port_id': 25123019, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939113, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 59)}, 'cartonnette': {'main_port_id': 25123001, 'sub_port_id': 25123020, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939114, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 59)}, 'papier': {'main_port_id': 25123001, 'sub_port_id': 25123021, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939115, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 59)}, 'environnement': {'main_port_id': 25123001, 'sub_port_id': 25123022, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939116, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 59)}, 'kraft': {'main_port_id': 25123001, 'sub_port_id': 25123023, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939117, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 59)}, 'plastique': {'main_port_id': 25123001, 'sub_port_id': 25123024, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939118, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 59)}, 'Carton_brun': {'main_port_id': 25123001, 'sub_port_id': 25123025, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939119, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 59)}, 'mal_croppe': {'main_port_id': 25123001, 'sub_port_id': 25123026, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939120, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 59)}, 'autre_refus': {'main_port_id': 25123001, 'sub_port_id': 25123027, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939121, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 16, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 25123001, 'sub_port_id': 25123028, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16939122, 'last_updated_at': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 8, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 8, 16, 59)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25123017,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25123005 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25123018,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25123006 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25123019,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25123007 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25123020,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25123008 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25123021,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25123009 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25123022,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25123010 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25123023,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25123011 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25123024,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25123012 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25123025,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25123013 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25123026,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25123014 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25123027,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25123015 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25123028,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25123016 lien utilise dans velours : https://www.fotonower.com/velours/25123017,25123018,25123019,25123020,25123021,25123022,25123023,25123024,25123025,25123026,25123027,25123028?tags=flou,metal,Carton_gris,cartonnette,papier,environnement,kraft,plastique,Carton_brun,mal_croppe,autre_refus,Teint_Dans_La_Masse After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25123001]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1372975741, 1372975739, 1372975736, 1372975734, 1372975731, 1372975729, 1372975708, 1372975706, 1372975704, 1372975702, 1372975701, 1372975699, 1372975672, 1372975670, 1372975668, 1372975666, 1372975664, 1372975663] map_info['map_portfolio_photo'] : {25123001: [1372975741, 1372975739, 1372975736, 1372975734, 1372975731, 1372975729, 1372975708, 1372975706, 1372975704, 1372975702, 1372975701, 1372975699, 1372975672, 1372975670, 1372975668, 1372975666, 1372975664, 1372975663, 1372975639, 1372975637, 1372975635, 1372975633, 1372975631, 1372975630, 1372975606, 1372975604, 1372975601, 1372975598, 1372975595, 1372975594, 1372975568, 1372975565, 1372975562, 1372975559, 1372975558, 1372975556, 1372975524, 1372975521, 1372975519, 1372975517, 1372975516, 1372975506, 1372975489, 1372975486, 1372975483, 1372975480, 1372975478, 1372975477, 1372975445, 1372975417, 1372975415, 1372975413, 1372975412, 1372975410, 1372975408, 1372975385, 1372975382, 1372975379, 1372975376, 1372975370, 1372975356, 1372975336, 1372975334, 1372975332, 1372975331, 1372975327, 1372975323, 1372975297, 1372975295, 1372975292, 1372975290, 1372975287, 1372975283, 1372975261, 1372975259, 1372975257, 1372975255, 1372975254, 1372975252, 1372975227, 1372975225, 1372975223, 1372975222, 1372975221, 1372975220]} final : False mtd_id 4302 list_pids : [1372975741, 1372975739, 1372975736, 1372975734, 1372975731, 1372975729, 1372975708, 1372975706, 1372975704, 1372975702, 1372975701, 1372975699, 1372975672, 1372975670, 1372975668, 1372975666, 1372975664, 1372975663] Looping around the photos to save general results len do output : 1 /25123001. 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, '3313061') ('4302', '25123001', '1372975741', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975739', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975736', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975734', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975731', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975729', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975708', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975706', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975704', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975702', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975701', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975699', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975672', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975670', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975668', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975666', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975664', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975663', None, None, None, None, None, '3313061') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 19 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, '25123001', "{'flou': 25123005, 'metal': 25123006, 'Carton_gris': 25123007, 'cartonnette': 25123008, 'papier': 25123009, 'environnement': 25123010, 'kraft': 25123011, 'plastique': 25123012, 'Carton_brun': 25123013, 'mal_croppe': 25123014, 'autre_refus': 25123015, 'Teint_Dans_La_Masse': 25123016}", None, None, None, None, '3313061'), ('4302', '25123001', '1372975741', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975739', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975736', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975734', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975731', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975729', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975708', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975706', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975704', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975702', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975701', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975699', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975672', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975670', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975668', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975666', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975664', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975663', None, None, None, None, None, '3313061')] time used for this insertion : 0.0588374137878418 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.531017780303955 time spend to save output : 0.05913710594177246 total time spend for step 1 : 1.5901548862457275 step2:final Mon Jul 21 08:30:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! 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 (25123001) 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 25123001 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1372975227,1372975225,1372975223,1372975222,1372975221,1372975220,1372975261,1372975259,1372975257,1372975255,1372975254,1372975252,1372975297,1372975295,1372975292,1372975290,1372975287,1372975283,1372975336,1372975334,1372975332,1372975331,1372975327,1372975323,1372975385,1372975382,1372975379,1372975376,1372975370,1372975356,1372975417,1372975445,1372975415,1372975413,1372975412,1372975410,1372975408,1372975489,1372975486,1372975483,1372975480,1372975478,1372975477,1372975524,1372975521,1372975519,1372975517,1372975516,1372975506,1372975568,1372975565,1372975562,1372975559,1372975558,1372975556,1372975606,1372975604,1372975601,1372975598,1372975595,1372975594,1372975639,1372975637,1372975635,1372975633,1372975631,1372975630,1372975672,1372975670,1372975668,1372975666,1372975664,1372975663,1372975708,1372975706,1372975704,1372975702,1372975701,1372975699,1372975741,1372975739,1372975736,1372975734,1372975731,1372975729); 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([25123001]) Inside saveOutput : final : False verbose : True original output for save of step final : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} new output for save of step final : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} [1372975741, 1372975739, 1372975736, 1372975734, 1372975731, 1372975729, 1372975708, 1372975706, 1372975704, 1372975702, 1372975701, 1372975699, 1372975672, 1372975670, 1372975668, 1372975666, 1372975664, 1372975663] map_info['map_portfolio_photo'] : {25123001: [1372975741, 1372975739, 1372975736, 1372975734, 1372975731, 1372975729, 1372975708, 1372975706, 1372975704, 1372975702, 1372975701, 1372975699, 1372975672, 1372975670, 1372975668, 1372975666, 1372975664, 1372975663, 1372975639, 1372975637, 1372975635, 1372975633, 1372975631, 1372975630, 1372975606, 1372975604, 1372975601, 1372975598, 1372975595, 1372975594, 1372975568, 1372975565, 1372975562, 1372975559, 1372975558, 1372975556, 1372975524, 1372975521, 1372975519, 1372975517, 1372975516, 1372975506, 1372975489, 1372975486, 1372975483, 1372975480, 1372975478, 1372975477, 1372975445, 1372975417, 1372975415, 1372975413, 1372975412, 1372975410, 1372975408, 1372975385, 1372975382, 1372975379, 1372975376, 1372975370, 1372975356, 1372975336, 1372975334, 1372975332, 1372975331, 1372975327, 1372975323, 1372975297, 1372975295, 1372975292, 1372975290, 1372975287, 1372975283, 1372975261, 1372975259, 1372975257, 1372975255, 1372975254, 1372975252, 1372975227, 1372975225, 1372975223, 1372975222, 1372975221, 1372975220]} final : False mtd_id 4302 list_pids : [1372975741, 1372975739, 1372975736, 1372975734, 1372975731, 1372975729, 1372975708, 1372975706, 1372975704, 1372975702, 1372975701, 1372975699, 1372975672, 1372975670, 1372975668, 1372975666, 1372975664, 1372975663] Looping around the photos to save general results len do output : 18 /1372975741.Didn't retrieve data . /1372975739.Didn't retrieve data . /1372975736.Didn't retrieve data . /1372975734.Didn't retrieve data . /1372975731.Didn't retrieve data . /1372975729.Didn't retrieve data . /1372975708.Didn't retrieve data . /1372975706.Didn't retrieve data . /1372975704.Didn't retrieve data . /1372975702.Didn't retrieve data . /1372975701.Didn't retrieve data . /1372975699.Didn't retrieve data . /1372975672.Didn't retrieve data . /1372975670.Didn't retrieve data . /1372975668.Didn't retrieve data . /1372975666.Didn't retrieve data . /1372975664.Didn't retrieve data . /1372975663.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, '3313061') ('4302', '25123001', '1372975741', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975739', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975736', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975734', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975731', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975729', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975708', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975706', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975704', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975702', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975701', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975699', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975672', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975670', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975668', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975666', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975664', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975663', None, None, None, None, None, '3313061') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 54 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', '25123001', '1372975741', '0.04563874605983177', None, None, None, None, '3313061'), ('4302', '25123001', '1372975739', '0.04563874605983177', None, None, None, None, '3313061'), ('4302', '25123001', '1372975736', '0.04563874605983177', None, None, None, None, '3313061'), ('4302', '25123001', '1372975734', '0.04563874605983177', None, None, None, None, '3313061'), ('4302', '25123001', '1372975731', '0.04563874605983177', None, None, None, None, '3313061'), ('4302', '25123001', '1372975729', '0.04563874605983177', None, None, None, None, '3313061'), ('4302', '25123001', '1372975708', '0.04563874605983177', None, None, None, None, '3313061'), ('4302', '25123001', '1372975706', '0.04563874605983177', None, None, None, None, '3313061'), ('4302', '25123001', '1372975704', '0.04563874605983177', None, None, None, None, '3313061'), ('4302', '25123001', '1372975702', '0.04563874605983177', None, None, None, None, '3313061'), ('4302', '25123001', '1372975701', '0.04563874605983177', None, None, None, None, '3313061'), ('4302', '25123001', '1372975699', '0.04563874605983177', None, None, None, None, '3313061'), ('4302', '25123001', '1372975672', '0.04563874605983177', None, None, None, None, '3313061'), ('4302', '25123001', '1372975670', '0.04563874605983177', None, None, None, None, '3313061'), ('4302', '25123001', '1372975668', '0.04563874605983177', None, None, None, None, '3313061'), ('4302', '25123001', '1372975666', '0.04563874605983177', None, None, None, None, '3313061'), ('4302', '25123001', '1372975664', '0.04563874605983177', None, None, None, None, '3313061'), ('4302', '25123001', '1372975663', '0.04563874605983177', None, None, None, None, '3313061')] time used for this insertion : 0.05937385559082031 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.09777665138244629 time spend to save output : 0.060149192810058594 total time spend for step 2 : 0.15792584419250488 step3:velours_tree Mon Jul 21 08:30:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {25123001: [{'flou': 25123005, 'metal': 25123006, 'Carton_gris': 25123007, 'cartonnette': 25123008, 'papier': 25123009, 'environnement': 25123010, 'kraft': 25123011, 'plastique': 25123012, 'Carton_brun': 25123013, 'mal_croppe': 25123014, 'autre_refus': 25123015, 'Teint_Dans_La_Masse': 25123016}]} input_args_next_step : {25123001: ()} output_args : {25123001: [{'flou': 25123005, 'metal': 25123006, 'Carton_gris': 25123007, 'cartonnette': 25123008, 'papier': 25123009, 'environnement': 25123010, 'kraft': 25123011, 'plastique': 25123012, 'Carton_brun': 25123013, 'mal_croppe': 25123014, 'autre_refus': 25123015, 'Teint_Dans_La_Masse': 25123016}]} args : 25123001 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 : ({'flou': 25123005, 'metal': 25123006, 'Carton_gris': 25123007, 'cartonnette': 25123008, 'papier': 25123009, 'environnement': 25123010, 'kraft': 25123011, 'plastique': 25123012, 'Carton_brun': 25123013, 'mal_croppe': 25123014, 'autre_refus': 25123015, 'Teint_Dans_La_Masse': 25123016},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25123001) 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([25123001]) 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.27698826789855957 time spend to save output : 4.100799560546875e-05 total time spend for step 3 : 0.27702927589416504 step4:send_mail_cod Mon Jul 21 08:30:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} input_args_next_step : {1372975741: ()} output_args : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} args : 1372975741 depend.output_id : 0 input_args_next_step : {1372975741: ('0.04563874605983177',), 1372975739: ()} output_args : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} args : 1372975739 depend.output_id : 0 input_args_next_step : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ()} output_args : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} args : 1372975736 depend.output_id : 0 input_args_next_step : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ()} output_args : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} args : 1372975734 depend.output_id : 0 input_args_next_step : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ()} output_args : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} args : 1372975731 depend.output_id : 0 input_args_next_step : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ()} output_args : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} args : 1372975729 depend.output_id : 0 input_args_next_step : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ()} output_args : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} args : 1372975708 depend.output_id : 0 input_args_next_step : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ()} output_args : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} args : 1372975706 depend.output_id : 0 input_args_next_step : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ()} output_args : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} args : 1372975704 depend.output_id : 0 input_args_next_step : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ()} output_args : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} args : 1372975702 depend.output_id : 0 input_args_next_step : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ()} output_args : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} args : 1372975701 depend.output_id : 0 input_args_next_step : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ()} output_args : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} args : 1372975699 depend.output_id : 0 input_args_next_step : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ()} output_args : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} args : 1372975672 depend.output_id : 0 input_args_next_step : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ()} output_args : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} args : 1372975670 depend.output_id : 0 input_args_next_step : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ()} output_args : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} args : 1372975668 depend.output_id : 0 input_args_next_step : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ()} output_args : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} args : 1372975666 depend.output_id : 0 input_args_next_step : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ()} output_args : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} args : 1372975664 depend.output_id : 0 input_args_next_step : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ()} output_args : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',)} args : 1372975663 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 : {25123001: [{'flou': 25123005, 'metal': 25123006, 'Carton_gris': 25123007, 'cartonnette': 25123008, 'papier': 25123009, 'environnement': 25123010, 'kraft': 25123011, 'plastique': 25123012, 'Carton_brun': 25123013, 'mal_croppe': 25123014, 'autre_refus': 25123015, 'Teint_Dans_La_Masse': 25123016}]} input_args_next_step : {1372975741: ('0.04563874605983177',), 1372975739: ('0.04563874605983177',), 1372975736: ('0.04563874605983177',), 1372975734: ('0.04563874605983177',), 1372975731: ('0.04563874605983177',), 1372975729: ('0.04563874605983177',), 1372975708: ('0.04563874605983177',), 1372975706: ('0.04563874605983177',), 1372975704: ('0.04563874605983177',), 1372975702: ('0.04563874605983177',), 1372975701: ('0.04563874605983177',), 1372975699: ('0.04563874605983177',), 1372975672: ('0.04563874605983177',), 1372975670: ('0.04563874605983177',), 1372975668: ('0.04563874605983177',), 1372975666: ('0.04563874605983177',), 1372975664: ('0.04563874605983177',), 1372975663: ('0.04563874605983177',), 25123001: ()} output_args : {25123001: [{'flou': 25123005, 'metal': 25123006, 'Carton_gris': 25123007, 'cartonnette': 25123008, 'papier': 25123009, 'environnement': 25123010, 'kraft': 25123011, 'plastique': 25123012, 'Carton_brun': 25123013, 'mal_croppe': 25123014, 'autre_refus': 25123015, 'Teint_Dans_La_Masse': 25123016}]} args : 25123001 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 :19, first value : ('0.04563874605983177',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25123001) 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 (1372975741,1372975739,1372975736,1372975734,1372975731,1372975729,1372975708,1372975706,1372975704,1372975702,1372975701,1372975699,1372975672,1372975670,1372975668,1372975666,1372975664,1372975663) Found this number of photos: 18 ##### Call download_photos : nb_thread : 5 begin to download photo : 1372975663 begin to download photo : 1372975670 begin to download photo : 1372975702 begin to download photo : 1372975729 begin to download photo : 1372975739 download finish for photo 1372975739 begin to download photo : 1372975741 download finish for photo 1372975663 begin to download photo : 1372975664 download finish for photo 1372975702 begin to download photo : 1372975704 download finish for photo 1372975729 begin to download photo : 1372975731 download finish for photo 1372975670 begin to download photo : 1372975672 download finish for photo 1372975741 download finish for photo 1372975731 begin to download photo : 1372975734 download finish for photo 1372975664 begin to download photo : 1372975666 download finish for photo 1372975672 begin to download photo : 1372975699 download finish for photo 1372975704 begin to download photo : 1372975706 download finish for photo 1372975706 begin to download photo : 1372975708 download finish for photo 1372975666 begin to download photo : 1372975668 download finish for photo 1372975734 begin to download photo : 1372975736 download finish for photo 1372975699 begin to download photo : 1372975701 download finish for photo 1372975668 download finish for photo 1372975708 download finish for photo 1372975736 download finish for photo 1372975701 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette251230051753079459/ imagette251230061753079459/ length of list_filenames : 18 ; length of list_pids : 18 ; length of list_args : 18 results_Auto_P25123001_21-07-2025_08_30_59.pdf 25123005 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=25123005 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette251230051753079459 25123006 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=25123006 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette251230061753079459 25123008 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=25123008 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1372975682: '1753079286_2171841_1372975568_4d113ccaf3dffa4e3f47e0df5bc4a308_rle_crop_3888700353_0.png', 1372975590: '1753079125_3103880_1372975516_be2af759a3a1a39546f08eb37ac83ba4_rle_crop_3888699635_0.png', 1372975591: '1753079125_3103880_1372975506_afd42cedff7e19b9842263307d4789e4_rle_crop_3888699655_0.png', 1372975616: '1753079166_2166705_1372975489_3d801f8ccec1ab4ad46e6e63b48a1bc8_rle_crop_3888699840_0.png', 1372975617: '1753079166_2166705_1372975486_98292cea80abab876eaeeca8db62fb3f_rle_crop_3888699854_0.png', 1372975618: '1753079166_2166705_1372975483_b55920b92ba75d387180c2766ea8a6d0_rle_crop_3888699868_0.png', 1372975619: '1753079166_2166705_1372975480_39d59d7aa3f4307524d4bec1717b4f84_rle_crop_3888699879_0.png', 1372975620: '1753079166_2166705_1372975478_54ca7a806744f566157296cecf1ec1cd_rle_crop_3888699896_0.png', 1372975621: '1753079166_2166705_1372975477_fe1ea003eff94ad76de2d7659e05a215_rle_crop_3888699913_0.png', 1372975656: '1753079245_3107428_1372975606_da2767c35bd1f765acd276661b7c5d72_rle_crop_3888700101_0.png', 1372975657: '1753079245_3107428_1372975604_0a738da57af45e38a1af33406651610f_rle_crop_3888700114_0.png', 1372975658: '1753079245_3107428_1372975601_fd9cf6353629f964cf5a5e57e928e976_rle_crop_3888700134_0.png', 1372975659: '1753079245_3107428_1372975598_c5c3e572b32f5bd1cf54d67bb321de98_rle_crop_3888700148_0.png', 1372975660: '1753079245_3107428_1372975595_13bb4ff9e3408546ca4d552d4170a037_rle_crop_3888700160_0.png', 1372975661: '1753079245_3107428_1372975594_b5cf2a8fa11fe71db14e71e37c77b699_rle_crop_3888700176_0.png', 1372975589: '1753079125_3103880_1372975517_da078cfa4e7c2d69b028d726a7fe82f8_rle_crop_3888699622_0.png', 1372975683: '1753079286_2171841_1372975565_429e9866f87f45cd39b1c49d8a391eaf_rle_crop_3888700365_0.png', 1372975684: '1753079286_2171841_1372975562_aabcf2f5b2124326d13da41475e83cfd_rle_crop_3888700381_0.png', 1372975685: '1753079286_2171841_1372975559_4e7602a06bff29153f0e5c4cfb113d3e_rle_crop_3888700395_0.png', 1372975686: '1753079286_2171841_1372975558_d7ddb2c6062253ff026d02236540f309_rle_crop_3888700409_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/0fb072f7e5e5e5c48b82ae702adce257_53848815.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/b48c3f8c2c60761df8546c772759a850_43579070.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/f39896e47d3cd988ff1a78414148e773_86502267.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/ab96b26d6b78a4b0fd4695169d8874b4_75771872.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/6f8d9506282801a3cac726e9bc413384_83497638.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/f08121252cab7530788eeb99a56ff24f_4103073.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/694983215906d0cec853e6227b807089_14982544.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/b07394e38341faa22feaf957f31a3aeb_34485720.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/0c322ffbd385afd302b3d27e0e000e53_96427271.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/f45511145220dceb3d0a77eb38728aae_38700905.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/edea860f44cda15a1e319bf4fbb557b1_21485969.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/590fbdf9ede6fdb49a790e3b83a4d7c0_36790204.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/062173acf999753186702a76bd911688_97002008.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/c356d7213fb119c2c3269afe6b3cbd07_90162481.png change filename to text .wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/e3785e55bbd079a5379a28ac01628e6e_37090877.png change filename to text .wget -O 16.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/ad259d8fe7ccf7ccacd928883e0ba6c8_16132871.png change filename to text .wget -O 17.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/a5d9c615f30ca5bb1b8fb8edafcaa078_81380813.png change filename to text .wget -O 18.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/42782e8ff7a13ab42aafd7edbf4c2d10_42108778.png change filename to text .wget -O 19.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/d687470531fdede26c11483ecbe4c82a_79084805.png change filename to text .imagette251230081753079459/ imagette251230081753079459/1753079166_2166705_1372975483_b55920b92ba75d387180c2766ea8a6d0_rle_crop_3888699868_0.png.png imagette251230081753079459/1753079166_2166705_1372975486_98292cea80abab876eaeeca8db62fb3f_rle_crop_3888699854_0.png.png imagette251230081753079459/1753079245_3107428_1372975604_0a738da57af45e38a1af33406651610f_rle_crop_3888700114_0.png.png imagette251230081753079459/1753079245_3107428_1372975601_fd9cf6353629f964cf5a5e57e928e976_rle_crop_3888700134_0.png.png imagette251230081753079459/1753079166_2166705_1372975480_39d59d7aa3f4307524d4bec1717b4f84_rle_crop_3888699879_0.png.png imagette251230081753079459/1753079286_2171841_1372975559_4e7602a06bff29153f0e5c4cfb113d3e_rle_crop_3888700395_0.png.png imagette251230081753079459/1753079286_2171841_1372975568_4d113ccaf3dffa4e3f47e0df5bc4a308_rle_crop_3888700353_0.png.png imagette251230081753079459/1753079125_3103880_1372975517_da078cfa4e7c2d69b028d726a7fe82f8_rle_crop_3888699622_0.png.png imagette251230081753079459/1753079166_2166705_1372975477_fe1ea003eff94ad76de2d7659e05a215_rle_crop_3888699913_0.png.png imagette251230081753079459/1753079245_3107428_1372975606_da2767c35bd1f765acd276661b7c5d72_rle_crop_3888700101_0.png.png imagette251230081753079459/1753079286_2171841_1372975565_429e9866f87f45cd39b1c49d8a391eaf_rle_crop_3888700365_0.png.png imagette251230081753079459/1753079125_3103880_1372975516_be2af759a3a1a39546f08eb37ac83ba4_rle_crop_3888699635_0.png.png imagette251230081753079459/1753079245_3107428_1372975594_b5cf2a8fa11fe71db14e71e37c77b699_rle_crop_3888700176_0.png.png imagette251230081753079459/1753079125_3103880_1372975506_afd42cedff7e19b9842263307d4789e4_rle_crop_3888699655_0.png.png imagette251230081753079459/1753079286_2171841_1372975558_d7ddb2c6062253ff026d02236540f309_rle_crop_3888700409_0.png.png imagette251230081753079459/1753079245_3107428_1372975598_c5c3e572b32f5bd1cf54d67bb321de98_rle_crop_3888700148_0.png.png imagette251230081753079459/1753079245_3107428_1372975595_13bb4ff9e3408546ca4d552d4170a037_rle_crop_3888700160_0.png.png imagette251230081753079459/1753079166_2166705_1372975478_54ca7a806744f566157296cecf1ec1cd_rle_crop_3888699896_0.png.png imagette251230081753079459/1753079166_2166705_1372975489_3d801f8ccec1ab4ad46e6e63b48a1bc8_rle_crop_3888699840_0.png.png imagette251230081753079459/1753079286_2171841_1372975562_aabcf2f5b2124326d13da41475e83cfd_rle_crop_3888700381_0.png.png imagette251230111753079460/ wget -O 20.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/9fedaaae9d88b9f353d9d5eadcadfe06_20257490.png imagette251230081753079459 25123011 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=25123011 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette251230111753079460 25123012 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=25123012 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1372975280: '1753078646_3091768_1372975220_d514f57c030fe9ac200d30256f994573_rle_crop_3888697526_0.png'} change filename to text .imagette251230121753079460/ imagette251230121753079460/1753078646_3091768_1372975220_d514f57c030fe9ac200d30256f994573_rle_crop_3888697526_0.png.png imagette251230141753079461/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/f4b6103fce158e5f52d7c497cce2433c_17876572.png imagette251230121753079460 25123014 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=25123014 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette251230141753079461 25123015 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=25123015 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1372975367: '1753078767_3094566_1372975261_93b4e17e7b61704ee5bb8031404bda45_rle_crop_3888698140_0.png', 1372975368: '1753078767_3094566_1372975252_c9969a66f0fc3434a1a78b1c032bf785_rle_crop_3888698304_0.png', 1372975680: '1753079286_2171841_1372975565_429e9866f87f45cd39b1c49d8a391eaf_rle_crop_3888700364_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/9d2e80d32cb653e7f9d10013164f2f49_80318327.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/7435bb5b17a1f6a07676f90c916d11be_33086118.png change filename to text .imagette251230151753079461/ imagette251230151753079461/1753078767_3094566_1372975252_c9969a66f0fc3434a1a78b1c032bf785_rle_crop_3888698304_0.png.png imagette251230151753079461/1753079286_2171841_1372975565_429e9866f87f45cd39b1c49d8a391eaf_rle_crop_3888700364_0.png.png imagette251230151753079461/1753078767_3094566_1372975261_93b4e17e7b61704ee5bb8031404bda45_rle_crop_3888698140_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/10480ab03f6c2c7cb953c044eaf85805_62488495.png imagette251230151753079461 25123007 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=25123007 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1372975371: '1753078767_3094566_1372975255_4217b698f00c7cc840a9f5de69a3b71e_rle_crop_3888698246_0.png'} change filename to text .imagette251230071753079461/ imagette251230071753079461/1753078767_3094566_1372975255_4217b698f00c7cc840a9f5de69a3b71e_rle_crop_3888698246_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/73a248f70c18f45bd106e704bb006d0d_57307100.png imagette251230071753079461 25123013 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=25123013 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1372975278: '1753078646_3091768_1372975220_d514f57c030fe9ac200d30256f994573_rle_crop_3888697525_0.png', 1372975372: '1753078767_3094566_1372975261_93b4e17e7b61704ee5bb8031404bda45_rle_crop_3888698145_0.png', 1372975373: '1753078767_3094566_1372975259_40c5384bd19fc3b14e1780bcf976d9c4_rle_crop_3888698177_0.png', 1372975374: '1753078767_3094566_1372975257_da2218077780d570b04d414800fc574e_rle_crop_3888698211_0.png', 1372975375: '1753078767_3094566_1372975255_4217b698f00c7cc840a9f5de69a3b71e_rle_crop_3888698257_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/5fd6eb1eb52171f1731ec8337e0737d0_40694479.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/220021c5bcb2bc57f4a77f86871436da_36121969.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/b41a6ec6a2700f7071a4cc5cd84eb949_94309765.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/def6199376f900123b760762bbe3c346_62895041.png change filename to text .imagette251230131753079461/ imagette251230131753079461/1753078767_3094566_1372975259_40c5384bd19fc3b14e1780bcf976d9c4_rle_crop_3888698177_0.png.png imagette251230131753079461/1753078767_3094566_1372975261_93b4e17e7b61704ee5bb8031404bda45_rle_crop_3888698145_0.png.png imagette251230131753079461/1753078646_3091768_1372975220_d514f57c030fe9ac200d30256f994573_rle_crop_3888697525_0.png.png imagette251230131753079461/1753078767_3094566_1372975255_4217b698f00c7cc840a9f5de69a3b71e_rle_crop_3888698257_0.png.png imagette251230131753079461/1753078767_3094566_1372975257_da2218077780d570b04d414800fc574e_rle_crop_3888698211_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/5d05766fbf3c98ae1071ec23dc97bc73_67230900.png imagette251230131753079461 25123016 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=25123016 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1372975357: '1753078767_3094566_1372975261_93b4e17e7b61704ee5bb8031404bda45_rle_crop_3888698144_0.png', 1372975358: '1753078767_3094566_1372975259_40c5384bd19fc3b14e1780bcf976d9c4_rle_crop_3888698173_0.png', 1372975359: '1753078767_3094566_1372975259_40c5384bd19fc3b14e1780bcf976d9c4_rle_crop_3888698183_0.png', 1372975360: '1753078767_3094566_1372975257_da2218077780d570b04d414800fc574e_rle_crop_3888698209_0.png', 1372975362: '1753078767_3094566_1372975257_da2218077780d570b04d414800fc574e_rle_crop_3888698214_0.png', 1372975364: '1753078767_3094566_1372975255_4217b698f00c7cc840a9f5de69a3b71e_rle_crop_3888698255_0.png', 1372975365: '1753078767_3094566_1372975255_4217b698f00c7cc840a9f5de69a3b71e_rle_crop_3888698261_0.png', 1372975366: '1753078767_3094566_1372975252_c9969a66f0fc3434a1a78b1c032bf785_rle_crop_3888698306_0.png', 1372975507: '1753079007_3101060_1372975413_06b63e6e22a40e4de4d6c52782ad2e24_rle_crop_3888699101_0.png', 1372975614: '1753079166_2166705_1372975489_3d801f8ccec1ab4ad46e6e63b48a1bc8_rle_crop_3888699838_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/90369818978dabaee50382945cc4b37e_81265934.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/d8ab7c7da1269726a980f7f6b63873ca_17105669.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/f5385302a609303a3d534f3ceaf669e8_22979083.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/2f3c7cb9ae4b87d64fcc55375ee45fb5_90520106.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/3c70aa05ecdcc99ab9748fbd2115fa00_72595819.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/67985fc74f6f65ae5c8f18c949d1bab1_10374929.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/cdf3e94354b10331dc027c96beb16ea4_97702581.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/cdc297ecc2f01084bc0555814f74a86d_1984644.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/da4dfe5edc9c542515027690c1641343_14128181.png change filename to text .imagette251230161753079461/ imagette251230161753079461/1753078767_3094566_1372975259_40c5384bd19fc3b14e1780bcf976d9c4_rle_crop_3888698173_0.png.png imagette251230161753079461/1753078767_3094566_1372975257_da2218077780d570b04d414800fc574e_rle_crop_3888698214_0.png.png imagette251230161753079461/1753078767_3094566_1372975261_93b4e17e7b61704ee5bb8031404bda45_rle_crop_3888698144_0.png.png imagette251230161753079461/1753078767_3094566_1372975259_40c5384bd19fc3b14e1780bcf976d9c4_rle_crop_3888698183_0.png.png imagette251230161753079461/1753079166_2166705_1372975489_3d801f8ccec1ab4ad46e6e63b48a1bc8_rle_crop_3888699838_0.png.png imagette251230161753079461/1753078767_3094566_1372975255_4217b698f00c7cc840a9f5de69a3b71e_rle_crop_3888698255_0.png.png imagette251230161753079461/1753078767_3094566_1372975252_c9969a66f0fc3434a1a78b1c032bf785_rle_crop_3888698306_0.png.png imagette251230161753079461/1753078767_3094566_1372975257_da2218077780d570b04d414800fc574e_rle_crop_3888698209_0.png.png imagette251230161753079461/1753078767_3094566_1372975255_4217b698f00c7cc840a9f5de69a3b71e_rle_crop_3888698261_0.png.png imagette251230161753079461/1753079007_3101060_1372975413_06b63e6e22a40e4de4d6c52782ad2e24_rle_crop_3888699101_0.png.png wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/b255eba6ae614d81dae84c11f6d92784_96826602.png imagette251230161753079461 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=25123001 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/25123017,25123018,25123019,25123020,25123021,25123022,25123023,25123024,25123025,25123026,25123027,25123028?tags=flou,metal,Carton_gris,cartonnette,papier,environnement,kraft,plastique,Carton_brun,mal_croppe,autre_refus,Teint_Dans_La_Masse your option no_mail is active, we will not send the real mail to your client args[1372975741] : ('0.04563874605983177',) no score found for photo 1372975741 We are sending mail with results at report@fotonower.com args[1372975739] : ('0.04563874605983177',) no score found for photo 1372975739 We are sending mail with results at report@fotonower.com args[1372975736] : ('0.04563874605983177',) no score found for photo 1372975736 We are sending mail with results at report@fotonower.com args[1372975734] : ('0.04563874605983177',) no score found for photo 1372975734 We are sending mail with results at report@fotonower.com args[1372975731] : ('0.04563874605983177',) no score found for photo 1372975731 We are sending mail with results at report@fotonower.com args[1372975729] : ('0.04563874605983177',) no score found for photo 1372975729 We are sending mail with results at report@fotonower.com args[1372975708] : ('0.04563874605983177',) no score found for photo 1372975708 We are sending mail with results at report@fotonower.com args[1372975706] : ('0.04563874605983177',) no score found for photo 1372975706 We are sending mail with results at report@fotonower.com args[1372975704] : ('0.04563874605983177',) no score found for photo 1372975704 We are sending mail with results at report@fotonower.com args[1372975702] : ('0.04563874605983177',) no score found for photo 1372975702 We are sending mail with results at report@fotonower.com args[1372975701] : ('0.04563874605983177',) no score found for photo 1372975701 We are sending mail with results at report@fotonower.com args[1372975699] : ('0.04563874605983177',) no score found for photo 1372975699 We are sending mail with results at report@fotonower.com args[1372975672] : ('0.04563874605983177',) no score found for photo 1372975672 We are sending mail with results at report@fotonower.com args[1372975670] : ('0.04563874605983177',) no score found for photo 1372975670 We are sending mail with results at report@fotonower.com args[1372975668] : ('0.04563874605983177',) no score found for photo 1372975668 We are sending mail with results at report@fotonower.com args[1372975666] : ('0.04563874605983177',) no score found for photo 1372975666 We are sending mail with results at report@fotonower.com args[1372975664] : ('0.04563874605983177',) no score found for photo 1372975664 We are sending mail with results at report@fotonower.com args[1372975663] : ('0.04563874605983177',) no score found for photo 1372975663 We are sending mail with results at report@fotonower.com refus_total : 0.04563874605983177 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=25123001 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_P25123001_21-07-2025_08_30_59.pdf results_Auto_P25123001_21-07-2025_08_30_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25123001_21-07-2025_08_30_59.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','25123001','results_Auto_P25123001_21-07-2025_08_30_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25123001_21-07-2025_08_30_59.pdf','pdf','','0.24','0.04563874605983177') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25123001]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1372975741, 1372975739, 1372975736, 1372975734, 1372975731, 1372975729, 1372975708, 1372975706, 1372975704, 1372975702, 1372975701, 1372975699, 1372975672, 1372975670, 1372975668, 1372975666, 1372975664, 1372975663] map_info['map_portfolio_photo'] : {25123001: [1372975741, 1372975739, 1372975736, 1372975734, 1372975731, 1372975729, 1372975708, 1372975706, 1372975704, 1372975702, 1372975701, 1372975699, 1372975672, 1372975670, 1372975668, 1372975666, 1372975664, 1372975663, 1372975639, 1372975637, 1372975635, 1372975633, 1372975631, 1372975630, 1372975606, 1372975604, 1372975601, 1372975598, 1372975595, 1372975594, 1372975568, 1372975565, 1372975562, 1372975559, 1372975558, 1372975556, 1372975524, 1372975521, 1372975519, 1372975517, 1372975516, 1372975506, 1372975489, 1372975486, 1372975483, 1372975480, 1372975478, 1372975477, 1372975445, 1372975417, 1372975415, 1372975413, 1372975412, 1372975410, 1372975408, 1372975385, 1372975382, 1372975379, 1372975376, 1372975370, 1372975356, 1372975336, 1372975334, 1372975332, 1372975331, 1372975327, 1372975323, 1372975297, 1372975295, 1372975292, 1372975290, 1372975287, 1372975283, 1372975261, 1372975259, 1372975257, 1372975255, 1372975254, 1372975252, 1372975227, 1372975225, 1372975223, 1372975222, 1372975221, 1372975220]} final : False mtd_id 4302 list_pids : [1372975741, 1372975739, 1372975736, 1372975734, 1372975731, 1372975729, 1372975708, 1372975706, 1372975704, 1372975702, 1372975701, 1372975699, 1372975672, 1372975670, 1372975668, 1372975666, 1372975664, 1372975663] 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, '3313061') ('4302', '25123001', '1372975741', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975739', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975736', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975734', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975731', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975729', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975708', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975706', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975704', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975702', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975701', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975699', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975672', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975670', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975668', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975666', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975664', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975663', None, None, None, None, None, '3313061') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 18 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', '25123001', '1372975741', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975739', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975736', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975734', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975731', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975729', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975708', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975706', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975704', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975702', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975701', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975699', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975672', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975670', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975668', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975666', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975664', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975663', None, None, None, None, None, '3313061')] time used for this insertion : 0.04449820518493652 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.2519309520721436 time spend to save output : 0.04487419128417969 total time spend for step 4 : 4.296805143356323 step5:split_time_score Mon Jul 21 08:31:03 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['25123001'] 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 : [('25123001',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25123001) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1372975739: {'path': 'temp/1753079459_1794463_1372975739_ad1a767298d7d083c59ce3f0c6d50d1f.jpg', 'extension': 'jpg'}, 1372975741: {'path': 'temp/1753079459_1794463_1372975741_9912253198d9e624c062cf69f3be40a5.jpg', 'extension': 'jpg'}, 1372975663: {'path': 'temp/1753079459_1794463_1372975663_583e738f4fe37d15c74d7d0e5840fb78.jpg', 'extension': 'jpg'}, 1372975664: {'path': 'temp/1753079459_1794463_1372975664_2834c8d7eec1b79557336da1842eb436.jpg', 'extension': 'jpg'}, 1372975666: {'path': 'temp/1753079459_1794463_1372975666_f62423fe2527273f942a6165bd413b3e.jpg', 'extension': 'jpg'}, 1372975668: {'path': 'temp/1753079459_1794463_1372975668_2534907e7b0ca69cbf436b53e9964362.jpg', 'extension': 'jpg'}, 1372975702: {'path': 'temp/1753079459_1794463_1372975702_345146f82179f89b672f03d8c8096ca1.jpg', 'extension': 'jpg'}, 1372975704: {'path': 'temp/1753079459_1794463_1372975704_678bcbeb132967b07547598d1076b652.jpg', 'extension': 'jpg'}, 1372975706: {'path': 'temp/1753079459_1794463_1372975706_0a02077dfcdd6cc3cac640a8bf043e7d.jpg', 'extension': 'jpg'}, 1372975708: {'path': 'temp/1753079459_1794463_1372975708_1c34fcaa3e79a7dfd8bdf327eb277368.jpg', 'extension': 'jpg'}, 1372975729: {'path': 'temp/1753079459_1794463_1372975729_0a6643ac176d036dc868ed778825bddf.jpg', 'extension': 'jpg'}, 1372975731: {'path': 'temp/1753079459_1794463_1372975731_b9122778a7f214a9e5d2f1106cd767c9.jpg', 'extension': 'jpg'}, 1372975734: {'path': 'temp/1753079459_1794463_1372975734_ea30a2aac4ea00dac81e43303ab48fe0.jpg', 'extension': 'jpg'}, 1372975736: {'path': 'temp/1753079459_1794463_1372975736_2a8dacc4186d9a6161dd4d64095e4ca4.jpg', 'extension': 'jpg'}, 1372975670: {'path': 'temp/1753079459_1794463_1372975670_757437f0828996164f8379e92d31fd46.jpg', 'extension': 'jpg'}, 1372975672: {'path': 'temp/1753079459_1794463_1372975672_dca0b17dc71971bdc4d24b9d30f51125.jpg', 'extension': 'jpg'}, 1372975699: {'path': 'temp/1753079459_1794463_1372975699_d02828989f439fc816d52175312a8825.jpg', 'extension': 'jpg'}, 1372975701: {'path': 'temp/1753079459_1794463_1372975701_9858c8e44d43bb48333f1ec5fa83c960.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 = 25123001; (('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 = 25123001 group by h (('08', 85),) 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=25123001 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 (25123001) 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 (25123001) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 21072025 25123001 Nombre de photos uploadées : 85 / 23040 (0%) 21072025 25123001 Nombre de photos taguées (types de déchets): 0 / 85 (0%) 21072025 25123001 Nombre de photos taguées (volume) : 0 / 85 (0%) [{'photo_id': 1372975227, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/6967f5eb4aa417905f4cec2114f56261.jpg', 'username': None, 'uploaded_at': 1753078562, 'text': 'image_21072025_08_15_04_010137m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1372975225, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/f03c1e837cb360cbe5c7214f75b27cf3.jpg', 'username': None, 'uploaded_at': 1753078562, 'text': 'image_21072025_08_15_14_010134m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1372975223, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/daec0fb2b886aad2986c2daa5972ccf8.jpg', 'username': None, 'uploaded_at': 1753078562, 'text': 'image_21072025_08_15_25_010134m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1372975222, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/5641a9c57f5e8e3d58975d0eff1f3d68.jpg', 'username': None, 'uploaded_at': 1753078562, 'text': 'image_21072025_08_15_35_010136m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 2.86102294921875e-06 elapsed_time : order_list_meta_photo_and_scores 9.298324584960938e-06 ????????????????????????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0034418106079101562 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 25123001, '2025-07-21' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1992378,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02358865737915039 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= 1992378 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1992378, 'dashboard_run_id': 2000230, 'mtr_portfolio_id': 25117802, 'dashboard_result_id': 12782607, '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_P25117802_21-07-2025_07_00_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25117803, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25117804, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25117805, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25117806, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25117807, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25117808, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25117809, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25117810, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25117811, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25117812, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25117813, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25117814, 'pht': 3726}}"}, {'dashboat_entry_day': 1992378, 'dashboard_run_id': 2000230, 'mtr_portfolio_id': 25118162, 'dashboard_result_id': 12782608, '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_P25118162_21-07-2025_05_32_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25118177, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25118178, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25118179, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25118180, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25118181, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25118182, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25118183, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25118184, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25118185, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25118186, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25118187, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25118188, 'pht': 3726}}"}, {'dashboat_entry_day': 1992378, 'dashboard_run_id': 2000230, 'mtr_portfolio_id': 25118583, 'dashboard_result_id': 12782609, '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_P25118583_21-07-2025_05_46_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25118610, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25118611, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25118612, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25118613, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25118614, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25118615, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25118616, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25118617, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25118618, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25118619, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25118620, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25118621, 'pht': 3726}}"}, {'dashboat_entry_day': 1992378, 'dashboard_run_id': 2000230, 'mtr_portfolio_id': 25118867, 'dashboard_result_id': 12782610, '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_P25118867_21-07-2025_06_00_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25118870, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25118871, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25118872, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25118873, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25118874, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25118875, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25118876, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25118877, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25118878, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25118879, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25118880, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25118881, 'pht': 3726}}"}, {'dashboat_entry_day': 1992378, 'dashboard_run_id': 2000230, 'mtr_portfolio_id': 25119309, 'dashboard_result_id': 12782611, '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_P25119309_21-07-2025_06_16_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25119362, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25119364, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25119365, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25119366, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25119368, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25119369, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25119370, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25119372, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25119373, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25119374, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25119376, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25119377, 'pht': 3726}}"}, {'dashboat_entry_day': 1992378, 'dashboard_run_id': 2000230, 'mtr_portfolio_id': 25119655, 'dashboard_result_id': 12782612, '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_P25119655_21-07-2025_06_33_03.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25119661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25119662, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25119663, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25119664, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25119665, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25119666, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25119667, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25119668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25119669, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25119670, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25119671, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25119672, 'pht': 3726}}"}, {'dashboat_entry_day': 1992378, 'dashboard_run_id': 2000230, 'mtr_portfolio_id': 25120043, 'dashboard_result_id': 12782613, '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_P25120043_21-07-2025_06_46_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25120070, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25120071, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25120072, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25120073, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25120074, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25120075, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25120076, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25120077, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25120078, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25120079, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25120080, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25120081, 'pht': 3726}}"}, {'dashboat_entry_day': 1992378, 'dashboard_run_id': 2000230, 'mtr_portfolio_id': 25120433, 'dashboard_result_id': 12782614, '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_P25120433_21-07-2025_07_02_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25120459, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25120460, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25120461, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25120462, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25120463, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25120464, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25120465, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25120466, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25120467, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25120468, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25120469, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25120470, 'pht': 3726}}"}, {'dashboat_entry_day': 1992378, 'dashboard_run_id': 2000230, 'mtr_portfolio_id': 25120849, 'dashboard_result_id': 12782615, '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_P25120849_21-07-2025_07_16_57.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25120858, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25120859, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25120860, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25120861, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25120862, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25120863, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25120864, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25120865, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25120866, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25120867, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25120868, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25120869, 'pht': 3726}}"}, {'dashboat_entry_day': 1992378, 'dashboard_run_id': 2000230, 'mtr_portfolio_id': 25121295, 'dashboard_result_id': 12782616, '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_P25121295_21-07-2025_07_30_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25121311, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25121312, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25121313, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25121314, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25121315, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25121316, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25121317, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25121318, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25121319, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25121320, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25121321, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25121322, 'pht': 3726}}"}, {'dashboat_entry_day': 1992378, 'dashboard_run_id': 2000230, 'mtr_portfolio_id': 25121721, 'dashboard_result_id': 12782617, '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_P25121721_21-07-2025_07_46_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25121736, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25121737, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25121738, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25121739, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25121740, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25121741, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25121742, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25121743, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25121744, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25121745, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25121746, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25121747, 'pht': 3726}}"}, {'dashboat_entry_day': 1992378, 'dashboard_run_id': 2000230, 'mtr_portfolio_id': 25122196, 'dashboard_result_id': 12782618, '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_P25122196_21-07-2025_08_00_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25122199, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25122200, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25122201, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25122202, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25122203, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25122204, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25122205, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25122206, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25122207, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25122208, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25122209, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25122210, 'pht': 3726}}"}, {'dashboat_entry_day': 1992378, 'dashboard_run_id': 2000230, 'mtr_portfolio_id': 25122572, 'dashboard_result_id': 12782619, '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_P25122572_21-07-2025_08_17_28.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25122611, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25122612, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25122613, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25122614, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25122615, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25122616, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25122617, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25122618, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25122619, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25122620, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25122621, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25122622, 'pht': 3726}}"}, {'dashboat_entry_day': 1992378, 'dashboard_run_id': 2000230, 'mtr_portfolio_id': 25123001, 'dashboard_result_id': 12782620, '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_P25123001_21-07-2025_08_28_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25123005, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25123006, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25123007, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25123008, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25123009, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25123010, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25123011, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25123012, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25123013, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25123014, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25123015, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25123016, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25117802 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': 3312464, 'mtr_portfolio_id': 25117802, 'created_at': datetime.datetime(2025, 7, 21, 7, 0, 59), 'result': '0.03440997870746703', 'result_long': None, 'result_double': None}] Qualite : 0.03440997870746703 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25117802 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25117802_21-07-2025_07_00_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25117802 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_P25117802_21-07-2025_07_00_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25117803, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25117804, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25117805, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25117806, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25117807, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25117808, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25117809, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25117810, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25117811, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25117812, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25117813, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25117814, 'pht': 3726}}" where mtr_portfolio_id = 25117802 and dashboard_run_id = 2000230 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`=25117802 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12782607, 0.03440997870746703, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25117802_21-07-2025_07_00_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25117803, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25117804, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25117805, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25117806, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25117807, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25117808, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25117809, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25117810, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25117811, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25117812, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25117813, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25117814, '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 = 25118162 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': 3312503, 'mtr_portfolio_id': 25118162, 'created_at': datetime.datetime(2025, 7, 21, 5, 32, 58), 'result': '0.032502647683057155', 'result_long': None, 'result_double': None}] Qualite : 0.032502647683057155 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25118162 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25118162_21-07-2025_05_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25118162 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_P25118162_21-07-2025_05_32_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25118177, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25118178, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25118179, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25118180, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25118181, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25118182, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25118183, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25118184, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25118185, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25118186, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25118187, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25118188, 'pht': 3726}}" where mtr_portfolio_id = 25118162 and dashboard_run_id = 2000230 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`=25118162 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12782608, 0.032502647683057155, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25118162_21-07-2025_05_32_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25118177, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25118178, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25118179, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25118180, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25118181, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25118182, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25118183, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25118184, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25118185, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25118186, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25118187, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25118188, '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 = 25118583 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': 3312548, 'mtr_portfolio_id': 25118583, 'created_at': datetime.datetime(2025, 7, 21, 5, 46, 57), 'result': '0.03308538033732772', 'result_long': None, 'result_double': None}] Qualite : 0.03308538033732772 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25118583 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25118583_21-07-2025_05_46_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25118583 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_P25118583_21-07-2025_05_46_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25118610, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25118611, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25118612, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25118613, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25118614, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25118615, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25118616, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25118617, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25118618, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25118619, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25118620, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25118621, 'pht': 3726}}" where mtr_portfolio_id = 25118583 and dashboard_run_id = 2000230 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`=25118583 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12782609, 0.03308538033732772, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25118583_21-07-2025_05_46_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25118610, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25118611, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25118612, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25118613, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25118614, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25118615, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25118616, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25118617, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25118618, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25118619, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25118620, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25118621, '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 = 25118867 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': 3312576, 'mtr_portfolio_id': 25118867, 'created_at': datetime.datetime(2025, 7, 21, 6, 0, 30), 'result': '0.037794704530617076', 'result_long': None, 'result_double': None}] Qualite : 0.037794704530617076 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25118867 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25118867_21-07-2025_06_00_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25118867 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_P25118867_21-07-2025_06_00_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25118870, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25118871, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25118872, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25118873, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25118874, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25118875, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25118876, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25118877, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25118878, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25118879, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25118880, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25118881, 'pht': 3726}}" where mtr_portfolio_id = 25118867 and dashboard_run_id = 2000230 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`=25118867 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12782610, 0.037794704530617076, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25118867_21-07-2025_06_00_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25118870, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25118871, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25118872, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25118873, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25118874, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25118875, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25118876, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25118877, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25118878, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25118879, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25118880, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25118881, '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 = 25119309 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': 3312628, 'mtr_portfolio_id': 25119309, 'created_at': datetime.datetime(2025, 7, 21, 6, 16, 58), 'result': '0.027272049655271604', 'result_long': None, 'result_double': None}] Qualite : 0.027272049655271604 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25119309 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25119309_21-07-2025_06_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25119309 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_P25119309_21-07-2025_06_16_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25119362, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25119364, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25119365, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25119366, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25119368, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25119369, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25119370, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25119372, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25119373, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25119374, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25119376, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25119377, 'pht': 3726}}" where mtr_portfolio_id = 25119309 and dashboard_run_id = 2000230 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`=25119309 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12782611, 0.027272049655271604, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25119309_21-07-2025_06_16_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25119362, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25119364, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25119365, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25119366, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25119368, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25119369, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25119370, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25119372, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25119373, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25119374, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25119376, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25119377, '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 = 25119655 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': 3312661, 'mtr_portfolio_id': 25119655, 'created_at': datetime.datetime(2025, 7, 21, 6, 33, 2), 'result': '0.0418259510549791', 'result_long': None, 'result_double': None}] Qualite : 0.0418259510549791 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25119655 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25119655_21-07-2025_06_33_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25119655 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_P25119655_21-07-2025_06_33_03.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25119661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25119662, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25119663, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25119664, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25119665, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25119666, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25119667, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25119668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25119669, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25119670, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25119671, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25119672, 'pht': 3726}}" where mtr_portfolio_id = 25119655 and dashboard_run_id = 2000230 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`=25119655 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12782612, 0.0418259510549791, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25119655_21-07-2025_06_33_03.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25119661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25119662, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25119663, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25119664, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25119665, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25119666, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25119667, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25119668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25119669, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25119670, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25119671, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25119672, '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 = 25120043 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': 3312702, 'mtr_portfolio_id': 25120043, 'created_at': datetime.datetime(2025, 7, 21, 6, 46, 58), 'result': '0.03280485849518129', 'result_long': None, 'result_double': None}] Qualite : 0.03280485849518129 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25120043 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25120043_21-07-2025_06_46_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25120043 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_P25120043_21-07-2025_06_46_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25120070, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25120071, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25120072, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25120073, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25120074, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25120075, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25120076, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25120077, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25120078, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25120079, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25120080, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25120081, 'pht': 3726}}" where mtr_portfolio_id = 25120043 and dashboard_run_id = 2000230 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`=25120043 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12782613, 0.03280485849518129, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25120043_21-07-2025_06_46_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25120070, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25120071, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25120072, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25120073, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25120074, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25120075, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25120076, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25120077, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25120078, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25120079, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25120080, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25120081, '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 = 25120433 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': 3312741, 'mtr_portfolio_id': 25120433, 'created_at': datetime.datetime(2025, 7, 21, 7, 2, 58), 'result': '0.028303493940871647', 'result_long': None, 'result_double': None}] Qualite : 0.028303493940871647 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25120433 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25120433_21-07-2025_07_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25120433 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_P25120433_21-07-2025_07_02_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25120459, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25120460, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25120461, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25120462, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25120463, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25120464, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25120465, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25120466, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25120467, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25120468, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25120469, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25120470, 'pht': 3726}}" where mtr_portfolio_id = 25120433 and dashboard_run_id = 2000230 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`=25120433 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12782614, 0.028303493940871647, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25120433_21-07-2025_07_02_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25120459, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25120460, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25120461, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25120462, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25120463, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25120464, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25120465, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25120466, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25120467, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25120468, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25120469, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25120470, '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 = 25120849 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': 3312791, 'mtr_portfolio_id': 25120849, 'created_at': datetime.datetime(2025, 7, 21, 7, 16, 57), 'result': '0.03741647880597789', 'result_long': None, 'result_double': None}] Qualite : 0.03741647880597789 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25120849 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25120849_21-07-2025_07_16_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25120849 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_P25120849_21-07-2025_07_16_57.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25120858, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25120859, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25120860, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25120861, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25120862, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25120863, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25120864, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25120865, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25120866, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25120867, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25120868, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25120869, 'pht': 3726}}" where mtr_portfolio_id = 25120849 and dashboard_run_id = 2000230 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`=25120849 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12782615, 0.03741647880597789, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25120849_21-07-2025_07_16_57.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25120858, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25120859, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25120860, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25120861, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25120862, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25120863, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25120864, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25120865, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25120866, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25120867, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25120868, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25120869, '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 = 25121295 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': 3312846, 'mtr_portfolio_id': 25121295, 'created_at': datetime.datetime(2025, 7, 21, 7, 30, 31), 'result': '0.057913604656304775', 'result_long': None, 'result_double': None}] Qualite : 0.057913604656304775 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25121295 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25121295_21-07-2025_07_30_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25121295 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_P25121295_21-07-2025_07_30_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25121311, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25121312, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25121313, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25121314, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25121315, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25121316, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25121317, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25121318, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25121319, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25121320, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25121321, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25121322, 'pht': 3726}}" where mtr_portfolio_id = 25121295 and dashboard_run_id = 2000230 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`=25121295 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12782616, 0.057913604656304775, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25121295_21-07-2025_07_30_31.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25121311, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25121312, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25121313, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25121314, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25121315, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25121316, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25121317, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25121318, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25121319, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25121320, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25121321, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25121322, '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 = 25121721 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': 3312901, 'mtr_portfolio_id': 25121721, 'created_at': datetime.datetime(2025, 7, 21, 7, 46, 57), 'result': '0.04469200651161689', 'result_long': None, 'result_double': None}] Qualite : 0.04469200651161689 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25121721 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25121721_21-07-2025_07_46_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25121721 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_P25121721_21-07-2025_07_46_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25121736, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25121737, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25121738, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25121739, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25121740, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25121741, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25121742, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25121743, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25121744, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25121745, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25121746, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25121747, 'pht': 3726}}" where mtr_portfolio_id = 25121721 and dashboard_run_id = 2000230 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`=25121721 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12782617, 0.04469200651161689, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25121721_21-07-2025_07_46_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25121736, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25121737, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25121738, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25121739, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25121740, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25121741, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25121742, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25121743, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25121744, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25121745, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25121746, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25121747, '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 = 25122196 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': 3312950, 'mtr_portfolio_id': 25122196, 'created_at': datetime.datetime(2025, 7, 21, 8, 0, 58), 'result': '0.05153012025318089', 'result_long': None, 'result_double': None}] Qualite : 0.05153012025318089 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25122196 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25122196_21-07-2025_08_00_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25122196 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_P25122196_21-07-2025_08_00_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25122199, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25122200, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25122201, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25122202, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25122203, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25122204, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25122205, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25122206, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25122207, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25122208, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25122209, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25122210, 'pht': 3726}}" where mtr_portfolio_id = 25122196 and dashboard_run_id = 2000230 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`=25122196 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12782618, 0.05153012025318089, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25122196_21-07-2025_08_00_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25122199, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25122200, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25122201, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25122202, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25122203, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25122204, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25122205, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25122206, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25122207, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25122208, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25122209, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25122210, '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 = 25122572 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': 3313014, 'mtr_portfolio_id': 25122572, 'created_at': datetime.datetime(2025, 7, 21, 8, 17, 27), 'result': '0.04399297328570406', 'result_long': None, 'result_double': None}] Qualite : 0.04399297328570406 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25122572 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25122572_21-07-2025_08_17_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25122572 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_P25122572_21-07-2025_08_17_28.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25122611, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25122612, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25122613, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25122614, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25122615, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25122616, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25122617, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25122618, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25122619, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25122620, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25122621, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25122622, 'pht': 3726}}" where mtr_portfolio_id = 25122572 and dashboard_run_id = 2000230 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`=25122572 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12782619, 0.04399297328570406, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25122572_21-07-2025_08_17_28.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25122611, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25122612, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25122613, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25122614, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25122615, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25122616, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25122617, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25122618, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25122619, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25122620, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25122621, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25122622, '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 = 25123001 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': 3313061, 'mtr_portfolio_id': 25123001, 'created_at': datetime.datetime(2025, 7, 21, 8, 30, 58), 'result': '0.04563874605983177', 'result_long': None, 'result_double': None}] Qualite : 0.04563874605983177 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25123001 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25123001_21-07-2025_08_30_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25123001 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_P25123001_21-07-2025_08_30_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25123005, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25123006, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25123007, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25123008, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25123009, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25123010, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25123011, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25123012, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25123013, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25123014, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25123015, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25123016, 'pht': 3726}}" where mtr_portfolio_id = 25123001 and dashboard_run_id = 2000230 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`=25123001 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12782620, 0.04563874605983177, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25123001_21-07-2025_08_30_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25123005, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25123006, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25123007, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25123008, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25123009, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25123010, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25123011, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25123012, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25123013, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25123014, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25123015, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25123016, '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 (25117802,25118162,25118583,25118867,25119309,25119655,25120043,25120433,25120849,25121295,25121721,25122196,25122572,25123001) result : ((1372964074,), (1372964101,), (1372964128,), (1372964152,), (1372964177,), (1372964403,), (1372964596,), (1372964606,), (1372964608,), (1372964610,), (1372964612,), (1372964614,), (1372964631,), (1372964635,), (1372964637,), (1372964641,), (1372964645,), (1372964648,), (1372964668,), (1372964691,), (1372964692,), (1372964693,), (1372964694,), (1372964695,), (1372964696,), (1372964720,), (1372964722,), (1372964723,), (1372964724,), (1372964725,), (1372964726,), (1372964739,), (1372964741,), (1372964742,), (1372964743,), (1372964744,), (1372964745,), (1372964758,), (1372964760,), (1372964761,), (1372964762,), (1372964764,), (1372964766,), (1372964792,), (1372964795,), (1372964798,), (1372964800,), (1372964802,), (1372964803,), (1372964831,), (1372964855,), (1372964857,), (1372964858,), (1372964860,), (1372964861,), (1372964862,), (1372964878,), (1372964880,), (1372964881,), (1372964883,), (1372964884,), (1372964885,), (1372964898,), (1372964900,), (1372964902,), (1372964904,), (1372964905,), (1372964906,), (1372964930,), (1372964933,), (1372964935,), (1372964936,), (1372964937,), (1372964938,), (1372967634,), (1372964945,), (1372964946,), (1372964947,), (1372964948,), (1372964949,), (1372964951,), (1372964959,), (1372964960,), (1372964962,), (1372964964,), (1372964966,), (1372964968,), (1372964981,), (1372964983,), (1372964984,), (1372964985,), (1372964986,), (1372964987,), (1372965001,), (1372965003,), (1372965005,), (1372965006,), (1372965007,), (1372965008,), (1372965018,), (1372965021,), (1372965023,), (1372965024,), (1372965025,), (1372965026,), (1372965046,), (1372965063,), (1372965083,), (1372965088,), (1372965091,), (1372965092,), (1372965093,), (1372965095,), (1372965142,), (1372965147,), (1372965151,), (1372965153,), (1372965154,), (1372965155,), (1372965171,), (1372965173,), (1372965176,), (1372965179,), (1372965180,), (1372965181,), (1372965193,), (1372965195,), (1372965196,), (1372965197,), (1372965198,), (1372965199,), (1372965212,), (1372965213,), (1372965214,), (1372965219,), (1372965220,), (1372965221,), (1372965262,), (1372965264,), (1372965265,), (1372965266,), (1372965267,), (1372965269,), (1372965296,), (1372965297,), (1372965298,), (1372965299,), (1372965300,), (1372965301,), (1372965318,), (1372965322,), (1372965326,), (1372965327,), (1372965329,), (1372965331,), (1372965381,), (1372965402,), (1372965404,), (1372965405,), (1372965408,), (1372965410,), (1372965412,), (1372965425,), (1372965426,), (1372965428,), (1372965430,), (1372965431,), (1372965432,), (1372965444,), (1372965448,), (1372965452,), (1372965454,), (1372965455,), (1372965456,), (1372965469,), (1372965471,), (1372965472,), (1372965474,), (1372965475,), (1372965476,), (1372965484,), (1372965486,), (1372965489,), (1372965491,), (1372965493,), (1372965494,), (1372965509,), (1372965530,), (1372965536,), (1372965539,), (1372965540,), (1372965541,), (1372965542,), (1372965552,), (1372965554,), (1372965555,), (1372965556,), (1372965557,), (1372965558,), (1372965568,), (1372965577,), (1372965581,), (1372965582,), (1372965583,), (1372965584,), (1372965601,), (1372965602,), (1372965603,), (1372965604,), (1372965606,), (1372965607,), (1372965629,), (1372965645,), (1372965650,), (1372965652,), (1372965656,), (1372965658,), (1372965660,), (1372965672,), (1372965678,), (1372965679,), (1372965681,), (1372965682,), (1372965683,), (1372965693,), (1372965696,), (1372965697,), (1372965699,), (1372965700,), (1372965701,), (1372965706,), (1372965709,), (1372965711,), (1372965713,), (1372965715,), (1372965718,), (1372965732,), (1372965733,), (1372965734,), (1372965735,), (1372965736,), (1372965738,), (1372965752,), (1372965753,), (1372965754,), (1372965755,), (1372965756,), (1372965757,), (1372965772,), (1372965774,), (1372965776,), (1372965778,), (1372965779,), (1372965781,), (1372965805,), (1372965808,), (1372965810,), (1372965811,), (1372965812,), (1372965813,), (1372965839,), (1372965842,), (1372965845,), (1372965847,), (1372965849,), (1372965850,), (1372965861,), (1372965882,), (1372965884,), (1372965886,), (1372965887,), (1372965888,), (1372965889,), (1372965907,), (1372965909,), (1372965910,), (1372965913,), (1372965914,), (1372965916,), (1372965928,), (1372965931,), (1372965933,), (1372965935,), (1372965936,), (1372965937,), (1372965942,), (1372965944,), (1372965946,), (1372965948,), (1372965949,), (1372965950,), (1372965968,), (1372966179,), (1372966220,), (1372966267,), (1372966312,), (1372966357,), (1372966434,), (1372967508,), (1372967622,), (1372967625,), (1372967628,), (1372967630,), (1372967633,), (1372967641,), (1372967659,), (1372967686,), (1372967690,), (1372967693,), (1372967695,), (1372967696,), (1372967697,), (1372967710,), (1372967711,), (1372967713,), (1372967715,), (1372967716,), (1372967717,), (1372967722,), (1372967724,), (1372967726,), (1372967727,), (1372967728,), (1372967729,), (1372967740,), (1372967764,), (1372967766,), (1372967767,), (1372967768,), (1372967769,), (1372967770,), (1372967780,), (1372967784,), (1372967788,), (1372967791,), (1372967793,), (1372967794,), (1372967802,), (1372967803,), (1372967805,), (1372967808,), (1372967810,), (1372967812,), (1372967836,), (1372967838,), (1372967839,), (1372967841,), (1372967842,), (1372967843,), (1372967871,), (1372967886,), (1372967888,), (1372967890,), (1372967891,), (1372967892,), (1372967893,), (1372967909,), (1372967911,), (1372967913,), (1372967914,), (1372967915,), (1372967916,), (1372967934,), (1372967936,), (1372967939,), (1372967940,), (1372967941,), (1372967942,), (1372967948,), (1372967954,), (1372967956,), (1372967957,), (1372967958,), (1372967959,), (1372967969,), (1372968001,), (1372968007,), (1372968009,), (1372968010,), (1372968011,), (1372968012,), (1372968035,), (1372968037,), (1372968039,), (1372968040,), (1372968041,), (1372968042,), (1372968062,), (1372968064,), (1372968066,), (1372968068,), (1372968070,), (1372968072,), (1372968094,), (1372968111,), (1372968112,), (1372968113,), (1372968114,), (1372968115,), (1372968116,), (1372968131,), (1372968133,), (1372968135,), (1372968136,), (1372968138,), (1372968140,), (1372968149,), (1372968154,), (1372968158,), (1372968163,), (1372968166,), (1372968168,), (1372968177,), (1372968180,), (1372968182,), (1372968184,), (1372968187,), (1372968189,), (1372968206,), (1372968207,), (1372968208,), (1372968210,), (1372968212,), (1372968216,), (1372968236,), (1372968237,), (1372968238,), (1372968239,), (1372968240,), (1372968242,), (1372968261,), (1372968263,), (1372968264,), (1372968266,), (1372968267,), (1372968268,), (1372968289,), (1372968290,), (1372968292,), (1372968294,), (1372968295,), (1372968296,), (1372968309,), (1372968314,), (1372968323,), (1372968334,), (1372968337,), (1372968341,), (1372968367,), (1372968369,), (1372968371,), (1372968372,), (1372968379,), (1372968383,), (1372968403,), (1372968423,), (1372968425,), (1372968426,), (1372968428,), (1372968431,), (1372968434,), (1372968446,), (1372968452,), (1372968458,), (1372968460,), (1372968461,), (1372968463,), (1372968496,), (1372968510,), (1372968519,), (1372968524,), (1372968525,), (1372968526,), (1372968527,), (1372968547,), (1372968548,), (1372968550,), (1372968552,), (1372968554,), (1372968555,), (1372968574,), (1372968575,), (1372968576,), (1372968577,), (1372968578,), (1372968579,), (1372968593,), (1372968595,), (1372968596,), (1372968597,), (1372968599,), (1372968600,), (1372968618,), (1372968620,), (1372968622,), (1372968623,), (1372968624,), (1372968625,), (1372968672,), (1372968673,), (1372968674,), (1372968675,), (1372968677,), (1372968678,), (1372968709,), (1372968733,), (1372968738,), (1372968740,), (1372968743,), (1372968746,), (1372968749,), (1372968765,), (1372968768,), (1372968770,), (1372968772,), (1372968776,), (1372968779,), (1372968792,), (1372968794,), (1372968796,), (1372968798,), (1372968799,), (1372968800,), (1372968812,), (1372968813,), (1372968818,), (1372968819,), (1372968820,), (1372968821,), (1372968838,), (1372968840,), (1372968841,), (1372968843,), (1372968844,), (1372968845,), (1372968858,), (1372968862,), (1372968866,), (1372968868,), (1372968870,), (1372968871,), (1372968900,), (1372968903,), (1372968906,), (1372968907,), (1372968908,), (1372968909,), (1372968931,), (1372968933,), (1372968936,), (1372968938,), (1372968939,), (1372968941,), (1372968968,), (1372968971,), (1372968974,), (1372968975,), (1372968977,), (1372968979,), (1372968998,), (1372969023,), (1372969025,), (1372969026,), (1372969028,), (1372969029,), (1372969030,), (1372969040,), (1372969043,), (1372969044,), (1372969047,), (1372969049,), (1372969050,), (1372969068,), (1372969071,), (1372969073,), (1372969075,), (1372969077,), (1372969079,), (1372969087,), (1372969091,), (1372969093,), (1372969094,), (1372969096,), (1372969099,), (1372969120,), (1372969122,), (1372969124,), (1372969125,), (1372969128,), (1372969132,), (1372969319,), (1372969372,), (1372969428,), (1372969477,), (1372969530,), (1372969570,), (1372970012,), (1372970455,), (1372970336,), (1372970360,), (1372970382,), (1372970406,), (1372970430,), (1372970561,), (1372970587,), (1372970608,), (1372970610,), (1372970632,), (1372970638,), (1372970657,), (1372970660,), (1372970663,), (1372970664,), (1372970665,), (1372970666,), (1372970686,), (1372970692,), (1372970698,), (1372970700,), (1372970702,), (1372970704,), (1372970736,), (1372970738,), (1372970741,), (1372970742,), (1372970744,), (1372970746,), (1372970757,), (1372970759,), (1372970766,), (1372970772,), (1372970774,), (1372970777,), (1372970805,), (1372970833,), (1372970840,), (1372970844,), (1372970846,), (1372970848,), (1372970851,), (1372970878,), (1372970880,), (1372970881,), (1372970883,), (1372970885,), (1372970889,), (1372970909,), (1372970916,), (1372970920,), (1372970921,), (1372970924,), (1372970926,), (1372970956,), (1372970959,), (1372970961,), (1372970962,), (1372970964,), (1372970966,), (1372970989,), (1372971018,), (1372971021,), (1372971023,), (1372971026,), (1372971028,), (1372971032,), (1372971049,), (1372971052,), (1372971054,), (1372971060,), (1372971063,), (1372971066,), (1372971103,), (1372971106,), (1372971107,), (1372971111,), (1372971114,), (1372971116,), (1372971136,), (1372971143,), (1372971147,), (1372971148,), (1372971150,), (1372971154,), (1372971189,), (1372971190,), (1372971191,), (1372971192,), (1372971194,), (1372971196,), (1372971221,), (1372971224,), (1372971228,), (1372971231,), (1372971235,), (1372971239,), (1372971270,), (1372971272,), (1372971274,), (1372971275,), (1372971279,), (1372971282,), (1372971305,), (1372971308,), (1372971313,), (1372971315,), (1372971317,), (1372971319,), (1372971343,), (1372971345,), (1372971347,), (1372971349,), (1372971352,), (1372971354,), (1372971388,), (1372971390,), (1372971392,), (1372971395,), (1372971398,), (1372971401,), (1372971435,), (1372971439,), (1372971441,), (1372971444,), (1372971446,), (1372971448,), (1372971466,), (1372971468,), (1372971472,), (1372971477,), (1372971479,), (1372971481,), (1372971501,), (1372971502,), (1372971505,), (1372971508,), (1372971510,), (1372971512,), (1372971527,), (1372971535,), (1372971542,), (1372971544,), (1372971546,), (1372971548,), (1372971576,), (1372971578,), (1372971581,), (1372971583,), (1372971584,), (1372971585,), (1372971609,), (1372971613,), (1372971616,), (1372971618,), (1372971621,), (1372971623,), (1372971647,), (1372971649,), (1372971650,), (1372971652,), (1372971655,), (1372971658,), (1372971677,), (1372971680,), (1372971683,), (1372971684,), (1372971687,), (1372971689,), (1372971727,), (1372971730,), (1372971737,), (1372971747,), (1372971751,), (1372971757,), (1372971785,), (1372971817,), (1372971820,), (1372971823,), (1372971824,), (1372971827,), (1372971831,), (1372971852,), (1372971854,), (1372971856,), (1372971863,), (1372971874,), (1372971880,), (1372971895,), (1372971899,), (1372971902,), (1372971903,), (1372971907,), (1372971910,), (1372971928,), (1372971933,), (1372971935,), (1372971937,), (1372971939,), (1372971942,), (1372971963,), (1372971964,), (1372971967,), (1372971970,), (1372971973,), (1372971976,), (1372971995,), (1372972000,), (1372972003,), (1372972011,), (1372972019,), (1372972027,), (1372972048,), (1372972050,), (1372972053,), (1372972054,), (1372972057,), (1372972060,), (1372972085,), (1372972087,), (1372972090,), (1372972092,), (1372972095,), (1372972098,), (1372972130,), (1372972131,), (1372972132,), (1372972134,), (1372972136,), (1372972139,), (1372972182,), (1372972222,), (1372972225,), (1372972228,), (1372972230,), (1372972231,), (1372972233,), (1372972261,), (1372972263,), (1372972265,), (1372972266,), (1372972268,), (1372972270,), (1372972299,), (1372972302,), (1372972305,), (1372972306,), (1372972308,), (1372972310,), (1372972330,), (1372972339,), (1372972345,), (1372972347,), (1372972349,), (1372972351,), (1372972375,), (1372972377,), (1372972379,), (1372972382,), (1372972385,), (1372972388,), (1372972409,), (1372972416,), (1372972421,), (1372972424,), (1372972425,), (1372972428,), (1372972449,), (1372972453,), (1372972457,), (1372972462,), (1372972465,), (1372972468,), (1372972489,), (1372972493,), (1372972496,), (1372972498,), (1372972501,), (1372972505,), (1372972550,), (1372972553,), (1372972555,), (1372972558,), (1372972559,), (1372972563,), (1372972595,), (1372972631,), (1372972635,), (1372972638,), (1372972641,), (1372972643,), (1372972646,), (1372972668,), (1372972674,), (1372972676,), (1372972678,), (1372972681,), (1372972684,), (1372972707,), (1372972740,), (1372972782,), (1372972783,), (1372972784,), (1372972785,), (1372972786,), (1372972789,), (1372973036,), (1372973071,), (1372973104,), (1372973131,), (1372973163,), (1372973214,), (1372974567,), (1372974568,), (1372974675,), (1372974686,), (1372974688,), (1372974690,), (1372974692,), (1372974707,), (1372974708,), (1372974710,), (1372974713,), (1372974716,), (1372974720,), (1372974736,), (1372974738,), (1372974739,), (1372974741,), (1372974743,), (1372974745,), (1372974776,), (1372974778,), (1372974782,), (1372974785,), (1372974789,), (1372974793,), (1372974816,), (1372974818,), (1372974821,), (1372974823,), (1372974825,), (1372974828,), (1372974844,), (1372974845,), (1372974847,), (1372974849,), (1372974851,), (1372974854,), (1372974875,), (1372974877,), (1372974878,), (1372974880,), (1372974882,), (1372974884,), (1372974922,), (1372974925,), (1372974927,), (1372974929,), (1372974931,), (1372974933,), (1372974962,), (1372974963,), (1372974965,), (1372974967,), (1372974969,), (1372974971,), (1372975001,), (1372975010,), (1372975014,), (1372975016,), (1372975018,), (1372975020,), (1372975043,), (1372975048,), (1372975052,), (1372975054,), (1372975057,), (1372975059,), (1372975083,), (1372975125,), (1372975156,), (1372975159,), (1372975161,), (1372975163,), (1372975166,), (1372975169,), (1372975198,), (1372975200,), (1372975202,), (1372975204,), (1372975205,), (1372975207,), (1372975220,), (1372975221,), (1372975222,), (1372975223,), (1372975225,), (1372975227,), (1372975252,), (1372975254,), (1372975255,), (1372975257,), (1372975259,), (1372975261,), (1372975283,), (1372975287,), (1372975290,), (1372975292,), (1372975295,), (1372975297,), (1372975323,), (1372975327,), (1372975331,), (1372975332,), (1372975334,), (1372975336,), (1372975356,), (1372975370,), (1372975376,), (1372975379,), (1372975382,), (1372975385,), (1372975408,), (1372975410,), (1372975412,), (1372975413,), (1372975415,), (1372975417,), (1372975445,), (1372975477,), (1372975478,), (1372975480,), (1372975483,), (1372975486,), (1372975489,), (1372975506,), (1372975516,), (1372975517,), (1372975519,), (1372975521,), (1372975524,), (1372975556,), (1372975558,), (1372975559,), (1372975562,), (1372975565,), (1372975568,), (1372975594,), (1372975595,), (1372975598,), (1372975601,), (1372975604,), (1372975606,), (1372975630,), (1372975631,), (1372975633,), (1372975635,), (1372975637,), (1372975639,), (1372975663,), (1372975664,), (1372975666,), (1372975668,), (1372975670,), (1372975672,), (1372975699,), (1372975701,), (1372975702,), (1372975704,), (1372975706,), (1372975708,), (1372975729,), (1372975731,), (1372975734,), (1372975736,), (1372975739,), (1372975741,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'21072025': {'nb_upload': 85, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25123001]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1372975741, 1372975739, 1372975736, 1372975734, 1372975731, 1372975729, 1372975708, 1372975706, 1372975704, 1372975702, 1372975701, 1372975699, 1372975672, 1372975670, 1372975668, 1372975666, 1372975664, 1372975663] map_info['map_portfolio_photo'] : {25123001: [1372975741, 1372975739, 1372975736, 1372975734, 1372975731, 1372975729, 1372975708, 1372975706, 1372975704, 1372975702, 1372975701, 1372975699, 1372975672, 1372975670, 1372975668, 1372975666, 1372975664, 1372975663, 1372975639, 1372975637, 1372975635, 1372975633, 1372975631, 1372975630, 1372975606, 1372975604, 1372975601, 1372975598, 1372975595, 1372975594, 1372975568, 1372975565, 1372975562, 1372975559, 1372975558, 1372975556, 1372975524, 1372975521, 1372975519, 1372975517, 1372975516, 1372975506, 1372975489, 1372975486, 1372975483, 1372975480, 1372975478, 1372975477, 1372975445, 1372975417, 1372975415, 1372975413, 1372975412, 1372975410, 1372975408, 1372975385, 1372975382, 1372975379, 1372975376, 1372975370, 1372975356, 1372975336, 1372975334, 1372975332, 1372975331, 1372975327, 1372975323, 1372975297, 1372975295, 1372975292, 1372975290, 1372975287, 1372975283, 1372975261, 1372975259, 1372975257, 1372975255, 1372975254, 1372975252, 1372975227, 1372975225, 1372975223, 1372975222, 1372975221, 1372975220]} final : True mtd_id 4302 list_pids : [1372975741, 1372975739, 1372975736, 1372975734, 1372975731, 1372975729, 1372975708, 1372975706, 1372975704, 1372975702, 1372975701, 1372975699, 1372975672, 1372975670, 1372975668, 1372975666, 1372975664, 1372975663] Looping around the photos to save general results len do output : 1 /25123001Didn'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, '3313061') ('4302', '25123001', '1372975741', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975739', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975736', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975734', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975731', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975729', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975708', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975706', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975704', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975702', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975701', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975699', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975672', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975670', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975668', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975666', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975664', None, None, None, None, None, '3313061') ('4302', None, None, None, None, None, None, None, '3313061') ('4302', '25123001', '1372975663', None, None, None, None, None, '3313061') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 19 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, '25123001', 'None', None, None, None, None, '3313061'), ('4302', '25123001', '1372975741', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975739', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975736', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975734', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975731', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975729', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975708', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975706', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975704', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975702', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975701', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975699', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975672', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975670', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975668', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975666', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975664', None, None, None, None, None, '3313061'), ('4302', '25123001', '1372975663', None, None, None, None, None, '3313061')] time used for this insertion : 0.0369257926940918 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.0078580379486084 time spend to save output : 0.03718090057373047 total time spend for step 5 : 1.0450389385223389 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 (3313061) 2.27user 2.51system 0:10.32elapsed 46%CPU (0avgtext+0avgdata 162024maxresident)k 2128inputs+15168outputs (2major+75971minor)pagefaults 0swaps