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 : 2458314 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 (3425048) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3425048) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25597981 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3425048'] with mtr_portfolio_ids : ['25597981'] and first list_photo_ids : [] new path : /proc/2458314/ Name: python3 Umask: 0002 State: R (running) Tgid: 2458314 Ngid: 0 Pid: 2458314 PPid: 2458313 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2458314 NSpid: 2458314 NSpgid: 2456637 NSsid: 2456637 VmPeak: 1106860 kB VmSize: 1106860 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97908 kB VmRSS: 97908 kB RssAnon: 59820 kB RssFile: 38088 kB RssShmem: 0 kB VmData: 865612 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 592 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: 45 nonvoluntary_ctxt_switches: 95 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2458314', 'Ngid': '0', 'Pid': '2458314', 'PPid': '2458313', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2458314', 'NSpid': '2458314', 'NSpgid': '2456637', 'NSsid': '2456637', 'VmPeak': '1106860 kB', 'VmSize': '1106860 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97908 kB', 'VmRSS': '97908 kB', 'RssAnon': '59820 kB', 'RssFile': '38088 kB', 'RssShmem': '0 kB', 'VmData': '865612 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '592 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': '45', 'nonvoluntary_ctxt_switches': '95'} ('datou_batch_current', '2458314', '1106860', '0', '1106860', '865612', '97908', b'', 'marlene', '3425048') 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 (25597981) 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 (3425048 ) ) 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 (25597981) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1374850251, 'portfolio_id': 25597981}, {'photo_id': 1374850249, 'portfolio_id': 25597981}, {'photo_id': 1374850234, 'portfolio_id': 25597981}, {'photo_id': 1374850231, 'portfolio_id': 25597981}, {'photo_id': 1374850228, 'portfolio_id': 25597981}, {'photo_id': 1374850224, 'portfolio_id': 25597981}, {'photo_id': 1374850221, 'portfolio_id': 25597981}, {'photo_id': 1374850219, 'portfolio_id': 25597981}, {'photo_id': 1374850207, 'portfolio_id': 25597981}, {'photo_id': 1374850204, 'portfolio_id': 25597981}, {'photo_id': 1374850201, 'portfolio_id': 25597981}, {'photo_id': 1374850199, 'portfolio_id': 25597981}, {'photo_id': 1374850198, 'portfolio_id': 25597981}, {'photo_id': 1374850197, 'portfolio_id': 25597981}, {'photo_id': 1374850181, 'portfolio_id': 25597981}, {'photo_id': 1374850179, 'portfolio_id': 25597981}, {'photo_id': 1374850176, 'portfolio_id': 25597981}, {'photo_id': 1374850175, 'portfolio_id': 25597981}, {'photo_id': 1374850173, 'portfolio_id': 25597981}, {'photo_id': 1374850159, 'portfolio_id': 25597981}, {'photo_id': 1374850156, 'portfolio_id': 25597981}, {'photo_id': 1374850154, 'portfolio_id': 25597981}, {'photo_id': 1374850152, 'portfolio_id': 25597981}, {'photo_id': 1374850150, 'portfolio_id': 25597981}, {'photo_id': 1374850147, 'portfolio_id': 25597981}, {'photo_id': 1374850134, 'portfolio_id': 25597981}, {'photo_id': 1374850131, 'portfolio_id': 25597981}, {'photo_id': 1374850130, 'portfolio_id': 25597981}, {'photo_id': 1374850128, 'portfolio_id': 25597981}, {'photo_id': 1374850127, 'portfolio_id': 25597981}, {'photo_id': 1374850126, 'portfolio_id': 25597981}, {'photo_id': 1374850108, 'portfolio_id': 25597981}, {'photo_id': 1374850107, 'portfolio_id': 25597981}, {'photo_id': 1374850106, 'portfolio_id': 25597981}, {'photo_id': 1374850086, 'portfolio_id': 25597981}, {'photo_id': 1374850084, 'portfolio_id': 25597981}, {'photo_id': 1374850083, 'portfolio_id': 25597981}, {'photo_id': 1374850082, 'portfolio_id': 25597981}, {'photo_id': 1374850080, 'portfolio_id': 25597981}, {'photo_id': 1374850068, 'portfolio_id': 25597981}, {'photo_id': 1374850063, 'portfolio_id': 25597981}, {'photo_id': 1374850061, 'portfolio_id': 25597981}, {'photo_id': 1374850059, 'portfolio_id': 25597981}, {'photo_id': 1374850057, 'portfolio_id': 25597981}, {'photo_id': 1374850026, 'portfolio_id': 25597981}, {'photo_id': 1374850025, 'portfolio_id': 25597981}, {'photo_id': 1374850023, 'portfolio_id': 25597981}, {'photo_id': 1374850021, 'portfolio_id': 25597981}, {'photo_id': 1374850019, 'portfolio_id': 25597981}, {'photo_id': 1374850013, 'portfolio_id': 25597981}, {'photo_id': 1374850010, 'portfolio_id': 25597981}, {'photo_id': 1374850002, 'portfolio_id': 25597981}, {'photo_id': 1374849993, 'portfolio_id': 25597981}, {'photo_id': 1374849977, 'portfolio_id': 25597981}, {'photo_id': 1374849955, 'portfolio_id': 25597981}, {'photo_id': 1374849787, 'portfolio_id': 25597981}, {'photo_id': 1374849784, 'portfolio_id': 25597981}, {'photo_id': 1374849782, 'portfolio_id': 25597981}, {'photo_id': 1374849780, 'portfolio_id': 25597981}, {'photo_id': 1374849778, 'portfolio_id': 25597981}, {'photo_id': 1374849561, 'portfolio_id': 25597981}, {'photo_id': 1374849534, 'portfolio_id': 25597981}, {'photo_id': 1374849511, 'portfolio_id': 25597981}, {'photo_id': 1374849487, 'portfolio_id': 25597981}, {'photo_id': 1374849463, 'portfolio_id': 25597981}, {'photo_id': 1374849439, 'portfolio_id': 25597981}, {'photo_id': 1374849310, 'portfolio_id': 25597981}, {'photo_id': 1374849309, 'portfolio_id': 25597981}, {'photo_id': 1374849308, 'portfolio_id': 25597981}, {'photo_id': 1374849306, 'portfolio_id': 25597981}] map_portfolio_id_photo_id: {25597981: [1374850251, 1374850249, 1374850234, 1374850231, 1374850228, 1374850224, 1374850221, 1374850219, 1374850207, 1374850204, 1374850201, 1374850199, 1374850198, 1374850197, 1374850181, 1374850179, 1374850176, 1374850175, 1374850173, 1374850159, 1374850156, 1374850154, 1374850152, 1374850150, 1374850147, 1374850134, 1374850131, 1374850130, 1374850128, 1374850127, 1374850126, 1374850108, 1374850107, 1374850106, 1374850086, 1374850084, 1374850083, 1374850082, 1374850080, 1374850068, 1374850063, 1374850061, 1374850059, 1374850057, 1374850026, 1374850025, 1374850023, 1374850021, 1374850019, 1374850013, 1374850010, 1374850002, 1374849993, 1374849977, 1374849955, 1374849787, 1374849784, 1374849782, 1374849780, 1374849778, 1374849561, 1374849534, 1374849511, 1374849487, 1374849463, 1374849439, 1374849310, 1374849309, 1374849308, 1374849306]} ##### 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.018390655517578125 #### 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 Sat Aug 2 02:14:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25597981) 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 : 25597981 get user id for portfolio 25597981 get sub ptf for main ptf 25597981, type 3726 and hashtags ['Carton_brun', 'kraft', 'papier', 'Teint_Dans_La_Masse', 'mal_croppe', 'autre_refus', 'flou', 'Carton_gris', 'plastique', 'environnement', 'metal', 'cartonnette'] 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`=25597981 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','kraft','papier','Teint_Dans_La_Masse','mal_croppe','autre_refus','flou','Carton_gris','plastique','environnement','metal','cartonnette')) 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`=25597981 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','kraft','papier','Teint_Dans_La_Masse','mal_croppe','autre_refus','flou','Carton_gris','plastique','environnement','metal','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 25597981, 'sub_port_id': 25598002, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259681, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 27)}, 'Carton_brun': {'main_port_id': 25597981, 'sub_port_id': 25598003, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259682, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 27)}, 'metal': {'main_port_id': 25597981, 'sub_port_id': 25598004, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259683, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 27)}, 'kraft': {'main_port_id': 25597981, 'sub_port_id': 25598005, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259684, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 27)}, 'papier': {'main_port_id': 25597981, 'sub_port_id': 25598006, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259685, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 27)}, 'cartonnette': {'main_port_id': 25597981, 'sub_port_id': 25598007, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259686, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 27)}, 'Carton_gris': {'main_port_id': 25597981, 'sub_port_id': 25598008, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259687, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 27)}, 'flou': {'main_port_id': 25597981, 'sub_port_id': 25598009, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259688, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 27)}, 'plastique': {'main_port_id': 25597981, 'sub_port_id': 25598010, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259689, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 27)}, 'autre_refus': {'main_port_id': 25597981, 'sub_port_id': 25598011, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259690, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 25597981, 'sub_port_id': 25598012, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259691, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 27)}, 'environnement': {'main_port_id': 25597981, 'sub_port_id': 25598013, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259692, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25598002 , 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=25597981 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 (25598002) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25597981) result : ((1374849306,), (1374849308,), (1374849309,), (1374849310,), (1374849439,), (1374849463,), (1374849487,), (1374849511,), (1374849534,), (1374849561,), (1374849778,), (1374849780,), (1374849782,), (1374849784,), (1374849787,), (1374849955,), (1374849977,), (1374849993,), (1374850002,), (1374850010,), (1374850013,), (1374850019,), (1374850021,), (1374850023,), (1374850025,), (1374850026,), (1374850057,), (1374850059,), (1374850061,), (1374850063,), (1374850068,), (1374850080,), (1374850082,), (1374850083,), (1374850084,), (1374850086,), (1374850106,), (1374850107,), (1374850108,), (1374850126,), (1374850127,), (1374850128,), (1374850130,), (1374850131,), (1374850134,), (1374850147,), (1374850150,), (1374850152,), (1374850154,), (1374850156,), (1374850159,), (1374850173,), (1374850175,), (1374850176,), (1374850179,), (1374850181,), (1374850197,), (1374850198,), (1374850199,), (1374850201,), (1374850204,), (1374850207,), (1374850219,), (1374850221,), (1374850224,), (1374850228,), (1374850231,), (1374850234,), (1374850249,), (1374850251,)) 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 25598003 , 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=25597981 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 (25598003) result : ((1374850194,), (1374850246,), (1374850247,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25597981) result : ((1374849306,), (1374849308,), (1374849309,), (1374849310,), (1374849439,), (1374849463,), (1374849487,), (1374849511,), (1374849534,), (1374849561,), (1374849778,), (1374849780,), (1374849782,), (1374849784,), (1374849787,), (1374849955,), (1374849977,), (1374849993,), (1374850002,), (1374850010,), (1374850013,), (1374850019,), (1374850021,), (1374850023,), (1374850025,), (1374850026,), (1374850057,), (1374850059,), (1374850061,), (1374850063,), (1374850068,), (1374850080,), (1374850082,), (1374850083,), (1374850084,), (1374850086,), (1374850106,), (1374850107,), (1374850108,), (1374850126,), (1374850127,), (1374850128,), (1374850130,), (1374850131,), (1374850134,), (1374850147,), (1374850150,), (1374850152,), (1374850154,), (1374850156,), (1374850159,), (1374850173,), (1374850175,), (1374850176,), (1374850179,), (1374850181,), (1374850197,), (1374850198,), (1374850199,), (1374850201,), (1374850204,), (1374850207,), (1374850219,), (1374850221,), (1374850224,), (1374850228,), (1374850231,), (1374850234,), (1374850249,), (1374850251,)) 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 25598004 , 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=25597981 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 (25598004) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25597981) result : ((1374849306,), (1374849308,), (1374849309,), (1374849310,), (1374849439,), (1374849463,), (1374849487,), (1374849511,), (1374849534,), (1374849561,), (1374849778,), (1374849780,), (1374849782,), (1374849784,), (1374849787,), (1374849955,), (1374849977,), (1374849993,), (1374850002,), (1374850010,), (1374850013,), (1374850019,), (1374850021,), (1374850023,), (1374850025,), (1374850026,), (1374850057,), (1374850059,), (1374850061,), (1374850063,), (1374850068,), (1374850080,), (1374850082,), (1374850083,), (1374850084,), (1374850086,), (1374850106,), (1374850107,), (1374850108,), (1374850126,), (1374850127,), (1374850128,), (1374850130,), (1374850131,), (1374850134,), (1374850147,), (1374850150,), (1374850152,), (1374850154,), (1374850156,), (1374850159,), (1374850173,), (1374850175,), (1374850176,), (1374850179,), (1374850181,), (1374850197,), (1374850198,), (1374850199,), (1374850201,), (1374850204,), (1374850207,), (1374850219,), (1374850221,), (1374850224,), (1374850228,), (1374850231,), (1374850234,), (1374850249,), (1374850251,)) 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 25598005 , 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=25597981 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 (25598005) result : ((1374850195,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25597981) result : ((1374849306,), (1374849308,), (1374849309,), (1374849310,), (1374849439,), (1374849463,), (1374849487,), (1374849511,), (1374849534,), (1374849561,), (1374849778,), (1374849780,), (1374849782,), (1374849784,), (1374849787,), (1374849955,), (1374849977,), (1374849993,), (1374850002,), (1374850010,), (1374850013,), (1374850019,), (1374850021,), (1374850023,), (1374850025,), (1374850026,), (1374850057,), (1374850059,), (1374850061,), (1374850063,), (1374850068,), (1374850080,), (1374850082,), (1374850083,), (1374850084,), (1374850086,), (1374850106,), (1374850107,), (1374850108,), (1374850126,), (1374850127,), (1374850128,), (1374850130,), (1374850131,), (1374850134,), (1374850147,), (1374850150,), (1374850152,), (1374850154,), (1374850156,), (1374850159,), (1374850173,), (1374850175,), (1374850176,), (1374850179,), (1374850181,), (1374850197,), (1374850198,), (1374850199,), (1374850201,), (1374850204,), (1374850207,), (1374850219,), (1374850221,), (1374850224,), (1374850228,), (1374850231,), (1374850234,), (1374850249,), (1374850251,)) 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 25598006 , 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=25597981 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 (25598006) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25597981) result : ((1374849306,), (1374849308,), (1374849309,), (1374849310,), (1374849439,), (1374849463,), (1374849487,), (1374849511,), (1374849534,), (1374849561,), (1374849778,), (1374849780,), (1374849782,), (1374849784,), (1374849787,), (1374849955,), (1374849977,), (1374849993,), (1374850002,), (1374850010,), (1374850013,), (1374850019,), (1374850021,), (1374850023,), (1374850025,), (1374850026,), (1374850057,), (1374850059,), (1374850061,), (1374850063,), (1374850068,), (1374850080,), (1374850082,), (1374850083,), (1374850084,), (1374850086,), (1374850106,), (1374850107,), (1374850108,), (1374850126,), (1374850127,), (1374850128,), (1374850130,), (1374850131,), (1374850134,), (1374850147,), (1374850150,), (1374850152,), (1374850154,), (1374850156,), (1374850159,), (1374850173,), (1374850175,), (1374850176,), (1374850179,), (1374850181,), (1374850197,), (1374850198,), (1374850199,), (1374850201,), (1374850204,), (1374850207,), (1374850219,), (1374850221,), (1374850224,), (1374850228,), (1374850231,), (1374850234,), (1374850249,), (1374850251,)) 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 25598007 , 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=25597981 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 (25598007) result : ((1374850145,), (1374850193,), (1374850244,), (1374850245,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25597981) result : ((1374849306,), (1374849308,), (1374849309,), (1374849310,), (1374849439,), (1374849463,), (1374849487,), (1374849511,), (1374849534,), (1374849561,), (1374849778,), (1374849780,), (1374849782,), (1374849784,), (1374849787,), (1374849955,), (1374849977,), (1374849993,), (1374850002,), (1374850010,), (1374850013,), (1374850019,), (1374850021,), (1374850023,), (1374850025,), (1374850026,), (1374850057,), (1374850059,), (1374850061,), (1374850063,), (1374850068,), (1374850080,), (1374850082,), (1374850083,), (1374850084,), (1374850086,), (1374850106,), (1374850107,), (1374850108,), (1374850126,), (1374850127,), (1374850128,), (1374850130,), (1374850131,), (1374850134,), (1374850147,), (1374850150,), (1374850152,), (1374850154,), (1374850156,), (1374850159,), (1374850173,), (1374850175,), (1374850176,), (1374850179,), (1374850181,), (1374850197,), (1374850198,), (1374850199,), (1374850201,), (1374850204,), (1374850207,), (1374850219,), (1374850221,), (1374850224,), (1374850228,), (1374850231,), (1374850234,), (1374850249,), (1374850251,)) 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 25598008 , 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=25597981 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 (25598008) result : ((1374850241,), (1374850242,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25597981) result : ((1374849306,), (1374849308,), (1374849309,), (1374849310,), (1374849439,), (1374849463,), (1374849487,), (1374849511,), (1374849534,), (1374849561,), (1374849778,), (1374849780,), (1374849782,), (1374849784,), (1374849787,), (1374849955,), (1374849977,), (1374849993,), (1374850002,), (1374850010,), (1374850013,), (1374850019,), (1374850021,), (1374850023,), (1374850025,), (1374850026,), (1374850057,), (1374850059,), (1374850061,), (1374850063,), (1374850068,), (1374850080,), (1374850082,), (1374850083,), (1374850084,), (1374850086,), (1374850106,), (1374850107,), (1374850108,), (1374850126,), (1374850127,), (1374850128,), (1374850130,), (1374850131,), (1374850134,), (1374850147,), (1374850150,), (1374850152,), (1374850154,), (1374850156,), (1374850159,), (1374850173,), (1374850175,), (1374850176,), (1374850179,), (1374850181,), (1374850197,), (1374850198,), (1374850199,), (1374850201,), (1374850204,), (1374850207,), (1374850219,), (1374850221,), (1374850224,), (1374850228,), (1374850231,), (1374850234,), (1374850249,), (1374850251,)) 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 25598009 , 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=25597981 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 (25598009) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25597981) result : ((1374849306,), (1374849308,), (1374849309,), (1374849310,), (1374849439,), (1374849463,), (1374849487,), (1374849511,), (1374849534,), (1374849561,), (1374849778,), (1374849780,), (1374849782,), (1374849784,), (1374849787,), (1374849955,), (1374849977,), (1374849993,), (1374850002,), (1374850010,), (1374850013,), (1374850019,), (1374850021,), (1374850023,), (1374850025,), (1374850026,), (1374850057,), (1374850059,), (1374850061,), (1374850063,), (1374850068,), (1374850080,), (1374850082,), (1374850083,), (1374850084,), (1374850086,), (1374850106,), (1374850107,), (1374850108,), (1374850126,), (1374850127,), (1374850128,), (1374850130,), (1374850131,), (1374850134,), (1374850147,), (1374850150,), (1374850152,), (1374850154,), (1374850156,), (1374850159,), (1374850173,), (1374850175,), (1374850176,), (1374850179,), (1374850181,), (1374850197,), (1374850198,), (1374850199,), (1374850201,), (1374850204,), (1374850207,), (1374850219,), (1374850221,), (1374850224,), (1374850228,), (1374850231,), (1374850234,), (1374850249,), (1374850251,)) 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 25598010 , 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=25597981 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 (25598010) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25597981) result : ((1374849306,), (1374849308,), (1374849309,), (1374849310,), (1374849439,), (1374849463,), (1374849487,), (1374849511,), (1374849534,), (1374849561,), (1374849778,), (1374849780,), (1374849782,), (1374849784,), (1374849787,), (1374849955,), (1374849977,), (1374849993,), (1374850002,), (1374850010,), (1374850013,), (1374850019,), (1374850021,), (1374850023,), (1374850025,), (1374850026,), (1374850057,), (1374850059,), (1374850061,), (1374850063,), (1374850068,), (1374850080,), (1374850082,), (1374850083,), (1374850084,), (1374850086,), (1374850106,), (1374850107,), (1374850108,), (1374850126,), (1374850127,), (1374850128,), (1374850130,), (1374850131,), (1374850134,), (1374850147,), (1374850150,), (1374850152,), (1374850154,), (1374850156,), (1374850159,), (1374850173,), (1374850175,), (1374850176,), (1374850179,), (1374850181,), (1374850197,), (1374850198,), (1374850199,), (1374850201,), (1374850204,), (1374850207,), (1374850219,), (1374850221,), (1374850224,), (1374850228,), (1374850231,), (1374850234,), (1374850249,), (1374850251,)) 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 25598011 , 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=25597981 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 (25598011) result : ((1374850052,), (1374850053,), (1374850191,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25597981) result : ((1374849306,), (1374849308,), (1374849309,), (1374849310,), (1374849439,), (1374849463,), (1374849487,), (1374849511,), (1374849534,), (1374849561,), (1374849778,), (1374849780,), (1374849782,), (1374849784,), (1374849787,), (1374849955,), (1374849977,), (1374849993,), (1374850002,), (1374850010,), (1374850013,), (1374850019,), (1374850021,), (1374850023,), (1374850025,), (1374850026,), (1374850057,), (1374850059,), (1374850061,), (1374850063,), (1374850068,), (1374850080,), (1374850082,), (1374850083,), (1374850084,), (1374850086,), (1374850106,), (1374850107,), (1374850108,), (1374850126,), (1374850127,), (1374850128,), (1374850130,), (1374850131,), (1374850134,), (1374850147,), (1374850150,), (1374850152,), (1374850154,), (1374850156,), (1374850159,), (1374850173,), (1374850175,), (1374850176,), (1374850179,), (1374850181,), (1374850197,), (1374850198,), (1374850199,), (1374850201,), (1374850204,), (1374850207,), (1374850219,), (1374850221,), (1374850224,), (1374850228,), (1374850231,), (1374850234,), (1374850249,), (1374850251,)) 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 25598012 , 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=25597981 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 (25598012) result : ((1374850049,), (1374850050,), (1374850051,), (1374850144,), (1374850239,), (1374850240,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25597981) result : ((1374849306,), (1374849308,), (1374849309,), (1374849310,), (1374849439,), (1374849463,), (1374849487,), (1374849511,), (1374849534,), (1374849561,), (1374849778,), (1374849780,), (1374849782,), (1374849784,), (1374849787,), (1374849955,), (1374849977,), (1374849993,), (1374850002,), (1374850010,), (1374850013,), (1374850019,), (1374850021,), (1374850023,), (1374850025,), (1374850026,), (1374850057,), (1374850059,), (1374850061,), (1374850063,), (1374850068,), (1374850080,), (1374850082,), (1374850083,), (1374850084,), (1374850086,), (1374850106,), (1374850107,), (1374850108,), (1374850126,), (1374850127,), (1374850128,), (1374850130,), (1374850131,), (1374850134,), (1374850147,), (1374850150,), (1374850152,), (1374850154,), (1374850156,), (1374850159,), (1374850173,), (1374850175,), (1374850176,), (1374850179,), (1374850181,), (1374850197,), (1374850198,), (1374850199,), (1374850201,), (1374850204,), (1374850207,), (1374850219,), (1374850221,), (1374850224,), (1374850228,), (1374850231,), (1374850234,), (1374850249,), (1374850251,)) 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 25598013 , 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=25597981 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 (25598013) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25597981) result : ((1374849306,), (1374849308,), (1374849309,), (1374849310,), (1374849439,), (1374849463,), (1374849487,), (1374849511,), (1374849534,), (1374849561,), (1374849778,), (1374849780,), (1374849782,), (1374849784,), (1374849787,), (1374849955,), (1374849977,), (1374849993,), (1374850002,), (1374850010,), (1374850013,), (1374850019,), (1374850021,), (1374850023,), (1374850025,), (1374850026,), (1374850057,), (1374850059,), (1374850061,), (1374850063,), (1374850068,), (1374850080,), (1374850082,), (1374850083,), (1374850084,), (1374850086,), (1374850106,), (1374850107,), (1374850108,), (1374850126,), (1374850127,), (1374850128,), (1374850130,), (1374850131,), (1374850134,), (1374850147,), (1374850150,), (1374850152,), (1374850154,), (1374850156,), (1374850159,), (1374850173,), (1374850175,), (1374850176,), (1374850179,), (1374850181,), (1374850197,), (1374850198,), (1374850199,), (1374850201,), (1374850204,), (1374850207,), (1374850219,), (1374850221,), (1374850224,), (1374850228,), (1374850231,), (1374850234,), (1374850249,), (1374850251,)) 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`=25597981 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','kraft','papier','Teint_Dans_La_Masse','mal_croppe','autre_refus','flou','Carton_gris','plastique','environnement','metal','cartonnette')) 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`=25597981 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','kraft','papier','Teint_Dans_La_Masse','mal_croppe','autre_refus','flou','Carton_gris','plastique','environnement','metal','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 25597981, 'sub_port_id': 25598014, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259693, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 28)}, 'Carton_brun': {'main_port_id': 25597981, 'sub_port_id': 25598015, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259694, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 28)}, 'metal': {'main_port_id': 25597981, 'sub_port_id': 25598016, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259695, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 28)}, 'kraft': {'main_port_id': 25597981, 'sub_port_id': 25598017, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259696, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 28)}, 'papier': {'main_port_id': 25597981, 'sub_port_id': 25598018, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259697, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 28)}, 'cartonnette': {'main_port_id': 25597981, 'sub_port_id': 25598019, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259698, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 28)}, 'Carton_gris': {'main_port_id': 25597981, 'sub_port_id': 25598020, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259699, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 28)}, 'flou': {'main_port_id': 25597981, 'sub_port_id': 25598021, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259700, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 28)}, 'plastique': {'main_port_id': 25597981, 'sub_port_id': 25598022, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259701, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 28)}, 'autre_refus': {'main_port_id': 25597981, 'sub_port_id': 25598023, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259702, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 25597981, 'sub_port_id': 25598024, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259703, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 28)}, 'environnement': {'main_port_id': 25597981, 'sub_port_id': 25598025, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17259704, 'last_updated_at': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 2, 12, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 2, 3, 28)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25598014,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25598002 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25598015,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25598003 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25598016,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25598004 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25598017,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25598005 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25598018,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25598006 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25598019,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25598007 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25598020,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25598008 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25598021,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25598009 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25598022,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25598010 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25598023,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25598011 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25598024,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25598012 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25598025,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25598013 lien utilise dans velours : https://www.fotonower.com/velours/25598014,25598015,25598016,25598017,25598018,25598019,25598020,25598021,25598022,25598023,25598024,25598025?tags=mal_croppe,Carton_brun,metal,kraft,papier,cartonnette,Carton_gris,flou,plastique,autre_refus,Teint_Dans_La_Masse,environnement After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25597981]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1374850251, 1374850249, 1374850234, 1374850231, 1374850228, 1374850224, 1374850221, 1374850219, 1374850207, 1374850204, 1374850201, 1374850199, 1374850198, 1374850197] map_info['map_portfolio_photo'] : {25597981: [1374850251, 1374850249, 1374850234, 1374850231, 1374850228, 1374850224, 1374850221, 1374850219, 1374850207, 1374850204, 1374850201, 1374850199, 1374850198, 1374850197, 1374850181, 1374850179, 1374850176, 1374850175, 1374850173, 1374850159, 1374850156, 1374850154, 1374850152, 1374850150, 1374850147, 1374850134, 1374850131, 1374850130, 1374850128, 1374850127, 1374850126, 1374850108, 1374850107, 1374850106, 1374850086, 1374850084, 1374850083, 1374850082, 1374850080, 1374850068, 1374850063, 1374850061, 1374850059, 1374850057, 1374850026, 1374850025, 1374850023, 1374850021, 1374850019, 1374850013, 1374850010, 1374850002, 1374849993, 1374849977, 1374849955, 1374849787, 1374849784, 1374849782, 1374849780, 1374849778, 1374849561, 1374849534, 1374849511, 1374849487, 1374849463, 1374849439, 1374849310, 1374849309, 1374849308, 1374849306]} final : False mtd_id 4302 list_pids : [1374850251, 1374850249, 1374850234, 1374850231, 1374850228, 1374850224, 1374850221, 1374850219, 1374850207, 1374850204, 1374850201, 1374850199, 1374850198, 1374850197] Looping around the photos to save general results len do output : 1 /25597981. 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, '3425048') ('4302', '25597981', '1374850251', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850249', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850234', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850231', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850228', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850224', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850221', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850219', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850207', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850204', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850201', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850199', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850198', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850197', None, None, None, None, None, '3425048') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25597981', "{'mal_croppe': 25598002, 'Carton_brun': 25598003, 'metal': 25598004, 'kraft': 25598005, 'papier': 25598006, 'cartonnette': 25598007, 'Carton_gris': 25598008, 'flou': 25598009, 'plastique': 25598010, 'autre_refus': 25598011, 'Teint_Dans_La_Masse': 25598012, 'environnement': 25598013}", None, None, None, None, '3425048'), ('4302', '25597981', '1374850251', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850249', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850234', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850231', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850228', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850224', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850221', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850219', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850207', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850204', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850201', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850199', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850198', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850197', None, None, None, None, None, '3425048')] time used for this insertion : 0.014874458312988281 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5427205562591553 time spend to save output : 0.015221118927001953 total time spend for step 1 : 1.5579416751861572 step2:final Sat Aug 2 02:14:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25597981) 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 25597981 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1374849310,1374849309,1374849308,1374849306,1374849561,1374849534,1374849511,1374849487,1374849463,1374849439,1374850021,1374849787,1374849784,1374850019,1374849782,1374850013,1374849780,1374850010,1374850002,1374849778,1374849993,1374849977,1374849955,1374850026,1374850025,1374850023,1374850068,1374850063,1374850061,1374850059,1374850057,1374850086,1374850084,1374850083,1374850082,1374850080,1374850108,1374850107,1374850106,1374850134,1374850131,1374850130,1374850128,1374850127,1374850126,1374850159,1374850156,1374850154,1374850152,1374850150,1374850147,1374850181,1374850179,1374850176,1374850175,1374850173,1374850207,1374850204,1374850201,1374850199,1374850198,1374850197,1374850234,1374850231,1374850228,1374850224,1374850221,1374850219,1374850251,1374850249); 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([25597981]) Inside saveOutput : final : False verbose : True original output for save of step final : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ('0.052635200168755954',), 1374850197: ('0.052635200168755954',)} new output for save of step final : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ('0.052635200168755954',), 1374850197: ('0.052635200168755954',)} [1374850251, 1374850249, 1374850234, 1374850231, 1374850228, 1374850224, 1374850221, 1374850219, 1374850207, 1374850204, 1374850201, 1374850199, 1374850198, 1374850197] map_info['map_portfolio_photo'] : {25597981: [1374850251, 1374850249, 1374850234, 1374850231, 1374850228, 1374850224, 1374850221, 1374850219, 1374850207, 1374850204, 1374850201, 1374850199, 1374850198, 1374850197, 1374850181, 1374850179, 1374850176, 1374850175, 1374850173, 1374850159, 1374850156, 1374850154, 1374850152, 1374850150, 1374850147, 1374850134, 1374850131, 1374850130, 1374850128, 1374850127, 1374850126, 1374850108, 1374850107, 1374850106, 1374850086, 1374850084, 1374850083, 1374850082, 1374850080, 1374850068, 1374850063, 1374850061, 1374850059, 1374850057, 1374850026, 1374850025, 1374850023, 1374850021, 1374850019, 1374850013, 1374850010, 1374850002, 1374849993, 1374849977, 1374849955, 1374849787, 1374849784, 1374849782, 1374849780, 1374849778, 1374849561, 1374849534, 1374849511, 1374849487, 1374849463, 1374849439, 1374849310, 1374849309, 1374849308, 1374849306]} final : False mtd_id 4302 list_pids : [1374850251, 1374850249, 1374850234, 1374850231, 1374850228, 1374850224, 1374850221, 1374850219, 1374850207, 1374850204, 1374850201, 1374850199, 1374850198, 1374850197] Looping around the photos to save general results len do output : 14 /1374850251.Didn't retrieve data . /1374850249.Didn't retrieve data . /1374850234.Didn't retrieve data . /1374850231.Didn't retrieve data . /1374850228.Didn't retrieve data . /1374850224.Didn't retrieve data . /1374850221.Didn't retrieve data . /1374850219.Didn't retrieve data . /1374850207.Didn't retrieve data . /1374850204.Didn't retrieve data . /1374850201.Didn't retrieve data . /1374850199.Didn't retrieve data . /1374850198.Didn't retrieve data . /1374850197.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, '3425048') ('4302', '25597981', '1374850251', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850249', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850234', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850231', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850228', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850224', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850221', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850219', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850207', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850204', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850201', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850199', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850198', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850197', None, None, None, None, None, '3425048') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 42 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '25597981', '1374850251', '0.052635200168755954', None, None, None, None, '3425048'), ('4302', '25597981', '1374850249', '0.052635200168755954', None, None, None, None, '3425048'), ('4302', '25597981', '1374850234', '0.052635200168755954', None, None, None, None, '3425048'), ('4302', '25597981', '1374850231', '0.052635200168755954', None, None, None, None, '3425048'), ('4302', '25597981', '1374850228', '0.052635200168755954', None, None, None, None, '3425048'), ('4302', '25597981', '1374850224', '0.052635200168755954', None, None, None, None, '3425048'), ('4302', '25597981', '1374850221', '0.052635200168755954', None, None, None, None, '3425048'), ('4302', '25597981', '1374850219', '0.052635200168755954', None, None, None, None, '3425048'), ('4302', '25597981', '1374850207', '0.052635200168755954', None, None, None, None, '3425048'), ('4302', '25597981', '1374850204', '0.052635200168755954', None, None, None, None, '3425048'), ('4302', '25597981', '1374850201', '0.052635200168755954', None, None, None, None, '3425048'), ('4302', '25597981', '1374850199', '0.052635200168755954', None, None, None, None, '3425048'), ('4302', '25597981', '1374850198', '0.052635200168755954', None, None, None, None, '3425048'), ('4302', '25597981', '1374850197', '0.052635200168755954', None, None, None, None, '3425048')] time used for this insertion : 0.016868114471435547 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06837010383605957 time spend to save output : 0.01760244369506836 total time spend for step 2 : 0.08597254753112793 step3:velours_tree Sat Aug 2 02:15:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {25597981: [{'mal_croppe': 25598002, 'Carton_brun': 25598003, 'metal': 25598004, 'kraft': 25598005, 'papier': 25598006, 'cartonnette': 25598007, 'Carton_gris': 25598008, 'flou': 25598009, 'plastique': 25598010, 'autre_refus': 25598011, 'Teint_Dans_La_Masse': 25598012, 'environnement': 25598013}]} input_args_next_step : {25597981: ()} output_args : {25597981: [{'mal_croppe': 25598002, 'Carton_brun': 25598003, 'metal': 25598004, 'kraft': 25598005, 'papier': 25598006, 'cartonnette': 25598007, 'Carton_gris': 25598008, 'flou': 25598009, 'plastique': 25598010, 'autre_refus': 25598011, 'Teint_Dans_La_Masse': 25598012, 'environnement': 25598013}]} args : 25597981 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'mal_croppe': 25598002, 'Carton_brun': 25598003, 'metal': 25598004, 'kraft': 25598005, 'papier': 25598006, 'cartonnette': 25598007, 'Carton_gris': 25598008, 'flou': 25598009, 'plastique': 25598010, 'autre_refus': 25598011, 'Teint_Dans_La_Masse': 25598012, 'environnement': 25598013},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25597981) 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([25597981]) 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.3107321262359619 time spend to save output : 5.435943603515625e-05 total time spend for step 3 : 0.31078648567199707 step4:send_mail_cod Sat Aug 2 02:15:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ('0.052635200168755954',), 1374850197: ('0.052635200168755954',)} input_args_next_step : {1374850251: ()} output_args : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ('0.052635200168755954',), 1374850197: ('0.052635200168755954',)} args : 1374850251 depend.output_id : 0 input_args_next_step : {1374850251: ('0.052635200168755954',), 1374850249: ()} output_args : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ('0.052635200168755954',), 1374850197: ('0.052635200168755954',)} args : 1374850249 depend.output_id : 0 input_args_next_step : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ()} output_args : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ('0.052635200168755954',), 1374850197: ('0.052635200168755954',)} args : 1374850234 depend.output_id : 0 input_args_next_step : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ()} output_args : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ('0.052635200168755954',), 1374850197: ('0.052635200168755954',)} args : 1374850231 depend.output_id : 0 input_args_next_step : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ()} output_args : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ('0.052635200168755954',), 1374850197: ('0.052635200168755954',)} args : 1374850228 depend.output_id : 0 input_args_next_step : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ()} output_args : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ('0.052635200168755954',), 1374850197: ('0.052635200168755954',)} args : 1374850224 depend.output_id : 0 input_args_next_step : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ()} output_args : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ('0.052635200168755954',), 1374850197: ('0.052635200168755954',)} args : 1374850221 depend.output_id : 0 input_args_next_step : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ()} output_args : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ('0.052635200168755954',), 1374850197: ('0.052635200168755954',)} args : 1374850219 depend.output_id : 0 input_args_next_step : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ()} output_args : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ('0.052635200168755954',), 1374850197: ('0.052635200168755954',)} args : 1374850207 depend.output_id : 0 input_args_next_step : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ()} output_args : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ('0.052635200168755954',), 1374850197: ('0.052635200168755954',)} args : 1374850204 depend.output_id : 0 input_args_next_step : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ()} output_args : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ('0.052635200168755954',), 1374850197: ('0.052635200168755954',)} args : 1374850201 depend.output_id : 0 input_args_next_step : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ()} output_args : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ('0.052635200168755954',), 1374850197: ('0.052635200168755954',)} args : 1374850199 depend.output_id : 0 input_args_next_step : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ()} output_args : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ('0.052635200168755954',), 1374850197: ('0.052635200168755954',)} args : 1374850198 depend.output_id : 0 input_args_next_step : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ('0.052635200168755954',), 1374850197: ()} output_args : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ('0.052635200168755954',), 1374850197: ('0.052635200168755954',)} args : 1374850197 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 : {25597981: [{'mal_croppe': 25598002, 'Carton_brun': 25598003, 'metal': 25598004, 'kraft': 25598005, 'papier': 25598006, 'cartonnette': 25598007, 'Carton_gris': 25598008, 'flou': 25598009, 'plastique': 25598010, 'autre_refus': 25598011, 'Teint_Dans_La_Masse': 25598012, 'environnement': 25598013}]} input_args_next_step : {1374850251: ('0.052635200168755954',), 1374850249: ('0.052635200168755954',), 1374850234: ('0.052635200168755954',), 1374850231: ('0.052635200168755954',), 1374850228: ('0.052635200168755954',), 1374850224: ('0.052635200168755954',), 1374850221: ('0.052635200168755954',), 1374850219: ('0.052635200168755954',), 1374850207: ('0.052635200168755954',), 1374850204: ('0.052635200168755954',), 1374850201: ('0.052635200168755954',), 1374850199: ('0.052635200168755954',), 1374850198: ('0.052635200168755954',), 1374850197: ('0.052635200168755954',), 25597981: ()} output_args : {25597981: [{'mal_croppe': 25598002, 'Carton_brun': 25598003, 'metal': 25598004, 'kraft': 25598005, 'papier': 25598006, 'cartonnette': 25598007, 'Carton_gris': 25598008, 'flou': 25598009, 'plastique': 25598010, 'autre_refus': 25598011, 'Teint_Dans_La_Masse': 25598012, 'environnement': 25598013}]} args : 25597981 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :15, first value : ('0.052635200168755954',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25597981) 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 (1374850251,1374850249,1374850234,1374850231,1374850228,1374850224,1374850221,1374850219,1374850207,1374850204,1374850201,1374850199,1374850198,1374850197) Found this number of photos: 14 ##### Call download_photos : nb_thread : 5 begin to download photo : 1374850197 begin to download photo : 1374850201 begin to download photo : 1374850219 begin to download photo : 1374850228 begin to download photo : 1374850249 download finish for photo 1374850197 begin to download photo : 1374850198 download finish for photo 1374850201 begin to download photo : 1374850204 download finish for photo 1374850228 begin to download photo : 1374850231 download finish for photo 1374850219 begin to download photo : 1374850221 download finish for photo 1374850249 begin to download photo : 1374850251 download finish for photo 1374850198 begin to download photo : 1374850199 download finish for photo 1374850221 begin to download photo : 1374850224 download finish for photo 1374850204 begin to download photo : 1374850207 download finish for photo 1374850251 download finish for photo 1374850231 begin to download photo : 1374850234 download finish for photo 1374850199 download finish for photo 1374850224 download finish for photo 1374850207 download finish for photo 1374850234 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette255980021754093700/ imagette255980041754093700/ length of list_filenames : 14 ; length of list_pids : 14 ; length of list_args : 14 results_Auto_P25597981_02-08-2025_02_15_00.pdf 25598002 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=25598002 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255980021754093700 25598004 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=25598004 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255980041754093700 25598005 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=25598005 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374850195: '1754093486_692831_1374850134_085a8bc3ea871cc10a7f0397334fa3fa_rle_crop_3901030911_0.png'} change filename to text .imagette255980051754093700/ imagette255980051754093700/1754093486_692831_1374850134_085a8bc3ea871cc10a7f0397334fa3fa_rle_crop_3901030911_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/301c6f9c2e925edd9dfa7558230b4597_37218311.png imagette255980051754093700 25598007 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=25598007 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374850145: '1754093367_689797_1374850107_5293f3f3cd5fb3b0f85919a6db931163_rle_crop_3901030675_0.png', 1374850193: '1754093486_692831_1374850134_085a8bc3ea871cc10a7f0397334fa3fa_rle_crop_3901030912_0.png', 1374850244: '1754093606_695653_1374850154_e087214e396681372736619bb58b71d5_rle_crop_3901031221_0.png', 1374850245: '1754093606_695653_1374850147_5ce9da1d0604651df15665bbcb26694b_rle_crop_3901031253_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/6b0a9a75ef26367ec55c9f37e9963287_19888162.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/96efd346b9b17e0afe4780ff212c22fe_85304567.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/85c10da99c6bfb8f62c97cab55834e23_79896067.png change filename to text .imagette255980071754093700/ imagette255980071754093700/1754093606_695653_1374850147_5ce9da1d0604651df15665bbcb26694b_rle_crop_3901031253_0.png.png imagette255980071754093700/1754093367_689797_1374850107_5293f3f3cd5fb3b0f85919a6db931163_rle_crop_3901030675_0.png.png imagette255980071754093700/1754093486_692831_1374850134_085a8bc3ea871cc10a7f0397334fa3fa_rle_crop_3901030912_0.png.png imagette255980071754093700/1754093606_695653_1374850154_e087214e396681372736619bb58b71d5_rle_crop_3901031221_0.png.png imagette255980091754093701/ imagette255980101754093701/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/883c3e0d4608d4309654a8c173016a9f_97668950.png imagette255980071754093700 25598009 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=25598009 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255980091754093701 25598010 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=25598010 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255980101754093701 25598011 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=25598011 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374850052: '1754093126_684322_1374849784_411558fd9ab3f33835a9f2f46b9cb71f_rle_crop_3901030298_0.png', 1374850053: '1754093126_684322_1374849778_13b86aef3f48cc15f927bfe3d99bf7c2_rle_crop_3901030339_0.png', 1374850191: '1754093486_692831_1374850134_085a8bc3ea871cc10a7f0397334fa3fa_rle_crop_3901030917_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/967a9d3074a795c2df1a206ee02cc8d0_1688600.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/edac4e41dd04c33b25317aaf7e81bfec_96486744.png change filename to text .imagette255980111754093701/ imagette255980111754093701/1754093126_684322_1374849784_411558fd9ab3f33835a9f2f46b9cb71f_rle_crop_3901030298_0.png.png imagette255980111754093701/1754093486_692831_1374850134_085a8bc3ea871cc10a7f0397334fa3fa_rle_crop_3901030917_0.png.png imagette255980111754093701/1754093126_684322_1374849778_13b86aef3f48cc15f927bfe3d99bf7c2_rle_crop_3901030339_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/63bd7ff97e4b7ca463fb28fbd002555f_8586580.png imagette255980111754093701 25598003 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=25598003 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374850194: '1754093486_692831_1374850134_085a8bc3ea871cc10a7f0397334fa3fa_rle_crop_3901030915_0.png', 1374850246: '1754093606_695653_1374850156_f6b9bd345ddbb01c2d2769a9021ec42c_rle_crop_3901031206_0.png', 1374850247: '1754093606_695653_1374850154_e087214e396681372736619bb58b71d5_rle_crop_3901031224_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/81b22ef7de1a04bdcced921f710eebe9_77330285.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/257ada74f73bc3d15a32e7eacf8fc8b3_13411865.png change filename to text .imagette255980031754093701/ imagette255980031754093701/1754093606_695653_1374850156_f6b9bd345ddbb01c2d2769a9021ec42c_rle_crop_3901031206_0.png.png imagette255980031754093701/1754093486_692831_1374850134_085a8bc3ea871cc10a7f0397334fa3fa_rle_crop_3901030915_0.png.png imagette255980031754093701/1754093606_695653_1374850154_e087214e396681372736619bb58b71d5_rle_crop_3901031224_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/0553495a887ce5fde0003a1ddd24ea29_42283600.png imagette255980031754093701 25598008 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=25598008 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374850241: '1754093606_695653_1374850181_d55e57d9d5d0874f33b7c37601e6dcba_rle_crop_3901031192_0.png', 1374850242: '1754093606_695653_1374850150_3e0b1d4f3430c2b5e40d7bfa39c08342_rle_crop_3901031247_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/9d5d8ca5c800c6d7c20f106e5f552d6c_21485023.png change filename to text .imagette255980081754093701/ imagette255980081754093701/1754093606_695653_1374850150_3e0b1d4f3430c2b5e40d7bfa39c08342_rle_crop_3901031247_0.png.png imagette255980081754093701/1754093606_695653_1374850181_d55e57d9d5d0874f33b7c37601e6dcba_rle_crop_3901031192_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/744ffc44618a02459522a0cd0496cdb5_69734091.png imagette255980081754093701 25598012 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=25598012 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374850049: '1754093126_684322_1374849780_4e5fcc26211b244e8c73b88f2c5b89a9_rle_crop_3901030330_0.png', 1374850050: '1754093126_684322_1374849778_13b86aef3f48cc15f927bfe3d99bf7c2_rle_crop_3901030341_0.png', 1374850051: '1754093126_684322_1374849778_13b86aef3f48cc15f927bfe3d99bf7c2_rle_crop_3901030340_0.png', 1374850144: '1754093367_689797_1374850107_5293f3f3cd5fb3b0f85919a6db931163_rle_crop_3901030678_0.png', 1374850239: '1754093606_695653_1374850181_d55e57d9d5d0874f33b7c37601e6dcba_rle_crop_3901031194_0.png', 1374850240: '1754093606_695653_1374850147_5ce9da1d0604651df15665bbcb26694b_rle_crop_3901031259_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/308fd8f59ae08440b62484299189a3dc_39112932.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/943b9982a14a6b630712de608b0301f9_87395657.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/d896353b9a85a875745f0ac5061946c9_53320637.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/1243a03470ba6d13c6fcfc91c1f9ff67_30049920.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/fc1d586ce06e652e8bc08f9ca8fdcd2c_39810937.png change filename to text .imagette255980121754093701/ imagette255980121754093701/1754093367_689797_1374850107_5293f3f3cd5fb3b0f85919a6db931163_rle_crop_3901030678_0.png.png imagette255980121754093701/1754093126_684322_1374849780_4e5fcc26211b244e8c73b88f2c5b89a9_rle_crop_3901030330_0.png.png imagette255980121754093701/1754093606_695653_1374850181_d55e57d9d5d0874f33b7c37601e6dcba_rle_crop_3901031194_0.png.png imagette255980121754093701/1754093126_684322_1374849778_13b86aef3f48cc15f927bfe3d99bf7c2_rle_crop_3901030340_0.png.png imagette255980121754093701/1754093606_695653_1374850147_5ce9da1d0604651df15665bbcb26694b_rle_crop_3901031259_0.png.png imagette255980121754093701/1754093126_684322_1374849778_13b86aef3f48cc15f927bfe3d99bf7c2_rle_crop_3901030341_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/8b1f790f0af97b83e42daeae62ab2aea_45707157.png imagette255980121754093701 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=25597981 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/25598014,25598015,25598016,25598017,25598018,25598019,25598020,25598021,25598022,25598023,25598024,25598025?tags=mal_croppe,Carton_brun,metal,kraft,papier,cartonnette,Carton_gris,flou,plastique,autre_refus,Teint_Dans_La_Masse,environnement your option no_mail is active, we will not send the real mail to your client args[1374850251] : ('0.052635200168755954',) no score found for photo 1374850251 We are sending mail with results at report@fotonower.com args[1374850249] : ('0.052635200168755954',) no score found for photo 1374850249 We are sending mail with results at report@fotonower.com args[1374850234] : ('0.052635200168755954',) no score found for photo 1374850234 We are sending mail with results at report@fotonower.com args[1374850231] : ('0.052635200168755954',) no score found for photo 1374850231 We are sending mail with results at report@fotonower.com args[1374850228] : ('0.052635200168755954',) no score found for photo 1374850228 We are sending mail with results at report@fotonower.com args[1374850224] : ('0.052635200168755954',) no score found for photo 1374850224 We are sending mail with results at report@fotonower.com args[1374850221] : ('0.052635200168755954',) no score found for photo 1374850221 We are sending mail with results at report@fotonower.com args[1374850219] : ('0.052635200168755954',) no score found for photo 1374850219 We are sending mail with results at report@fotonower.com args[1374850207] : ('0.052635200168755954',) no score found for photo 1374850207 We are sending mail with results at report@fotonower.com args[1374850204] : ('0.052635200168755954',) no score found for photo 1374850204 We are sending mail with results at report@fotonower.com args[1374850201] : ('0.052635200168755954',) no score found for photo 1374850201 We are sending mail with results at report@fotonower.com args[1374850199] : ('0.052635200168755954',) no score found for photo 1374850199 We are sending mail with results at report@fotonower.com args[1374850198] : ('0.052635200168755954',) no score found for photo 1374850198 We are sending mail with results at report@fotonower.com args[1374850197] : ('0.052635200168755954',) no score found for photo 1374850197 We are sending mail with results at report@fotonower.com refus_total : 0.052635200168755954 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=25597981 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_P25597981_02-08-2025_02_15_00.pdf results_Auto_P25597981_02-08-2025_02_15_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25597981_02-08-2025_02_15_00.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','25597981','results_Auto_P25597981_02-08-2025_02_15_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25597981_02-08-2025_02_15_00.pdf','pdf','','0.17','0.052635200168755954') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25597981]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1374850251, 1374850249, 1374850234, 1374850231, 1374850228, 1374850224, 1374850221, 1374850219, 1374850207, 1374850204, 1374850201, 1374850199, 1374850198, 1374850197] map_info['map_portfolio_photo'] : {25597981: [1374850251, 1374850249, 1374850234, 1374850231, 1374850228, 1374850224, 1374850221, 1374850219, 1374850207, 1374850204, 1374850201, 1374850199, 1374850198, 1374850197, 1374850181, 1374850179, 1374850176, 1374850175, 1374850173, 1374850159, 1374850156, 1374850154, 1374850152, 1374850150, 1374850147, 1374850134, 1374850131, 1374850130, 1374850128, 1374850127, 1374850126, 1374850108, 1374850107, 1374850106, 1374850086, 1374850084, 1374850083, 1374850082, 1374850080, 1374850068, 1374850063, 1374850061, 1374850059, 1374850057, 1374850026, 1374850025, 1374850023, 1374850021, 1374850019, 1374850013, 1374850010, 1374850002, 1374849993, 1374849977, 1374849955, 1374849787, 1374849784, 1374849782, 1374849780, 1374849778, 1374849561, 1374849534, 1374849511, 1374849487, 1374849463, 1374849439, 1374849310, 1374849309, 1374849308, 1374849306]} final : False mtd_id 4302 list_pids : [1374850251, 1374850249, 1374850234, 1374850231, 1374850228, 1374850224, 1374850221, 1374850219, 1374850207, 1374850204, 1374850201, 1374850199, 1374850198, 1374850197] 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, '3425048') ('4302', '25597981', '1374850251', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850249', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850234', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850231', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850228', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850224', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850221', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850219', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850207', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850204', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850201', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850199', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850198', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850197', None, None, None, None, None, '3425048') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '25597981', '1374850251', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850249', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850234', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850231', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850228', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850224', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850221', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850219', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850207', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850204', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850201', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850199', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850198', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850197', None, None, None, None, None, '3425048')] time used for this insertion : 0.014683723449707031 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.5933125019073486 time spend to save output : 0.014925003051757812 total time spend for step 4 : 2.6082375049591064 step5:split_time_score Sat Aug 2 02:15:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['25597981'] 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 : [('25597981',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25597981) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1374850249: {'path': 'temp/1754093700_2458314_1374850249_fe26302e6d618695ceef82b935e64dc4.jpg', 'extension': 'jpg'}, 1374850251: {'path': 'temp/1754093700_2458314_1374850251_b293ac61805b633356a75e145751c435.jpg', 'extension': 'jpg'}, 1374850197: {'path': 'temp/1754093700_2458314_1374850197_5dc4f237a8e6156ebf8f04f999729975.jpg', 'extension': 'jpg'}, 1374850198: {'path': 'temp/1754093700_2458314_1374850198_68184c97582c430f663767013cbfcec5.jpg', 'extension': 'jpg'}, 1374850199: {'path': 'temp/1754093700_2458314_1374850199_fb34be003034670aa2d0eee33f0cb65e.jpg', 'extension': 'jpg'}, 1374850219: {'path': 'temp/1754093700_2458314_1374850219_e40cf66c5f7fd1b4bb7dd9570260ef8e.jpg', 'extension': 'jpg'}, 1374850221: {'path': 'temp/1754093700_2458314_1374850221_9e7133a5b33b02e286d614e632709b39.jpg', 'extension': 'jpg'}, 1374850224: {'path': 'temp/1754093700_2458314_1374850224_79ba70cd2f25d0e22a53865849f71a26.jpg', 'extension': 'jpg'}, 1374850201: {'path': 'temp/1754093700_2458314_1374850201_4af7680256f03661dcc2fed0c6ae92d0.jpg', 'extension': 'jpg'}, 1374850204: {'path': 'temp/1754093700_2458314_1374850204_c07cc6cd15f0790813827027672b2dee.jpg', 'extension': 'jpg'}, 1374850207: {'path': 'temp/1754093700_2458314_1374850207_b6b3b49cb4773efd5a98ffba02812e13.jpg', 'extension': 'jpg'}, 1374850228: {'path': 'temp/1754093700_2458314_1374850228_0398ed526201434ebef56725abc08c56.jpg', 'extension': 'jpg'}, 1374850231: {'path': 'temp/1754093700_2458314_1374850231_484d87e928cf06b5420b4ad1aebb593a.jpg', 'extension': 'jpg'}, 1374850234: {'path': 'temp/1754093700_2458314_1374850234_f263f051ab23f54c44ec0dce5eef43fb.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 = 25597981; (('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 = 25597981 group by h (('02', 70),) 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=25597981 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 (25597981) 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 (25597981) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 02082025 25597981 Nombre de photos uploadées : 70 / 23040 (0%) 02082025 25597981 Nombre de photos taguées (types de déchets): 0 / 70 (0%) 02082025 25597981 Nombre de photos taguées (volume) : 0 / 70 (0%) [{'photo_id': 1374849310, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/b977d88e49a4e273e7609fd2f2673a3c.jpg', 'username': None, 'uploaded_at': 1754092867, 'text': 'image_02082025_02_00_03_10160.jpg'}, {'photo_id': 1374849309, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/f2606b5f158b41632641c2ddad8075e5.jpg', 'username': None, 'uploaded_at': 1754092867, 'text': 'image_02082025_02_00_14_10141.jpg'}, {'photo_id': 1374849308, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/0cb0a513628933b644a0660b7fb8b3b0.jpg', 'username': None, 'uploaded_at': 1754092867, 'text': 'image_02082025_02_00_24_10135.jpg'}, {'photo_id': 1374849306, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/4fb7a0f625e52c9937a253b5d417b56d.jpg', 'username': None, 'uploaded_at': 1754092867, 'text': 'image_02082025_02_00_33_9127.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.6689300537109375e-06 elapsed_time : order_list_meta_photo_and_scores 5.0067901611328125e-06 ?????????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0037708282470703125 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 25597981, '2025-08-02' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-08-02' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2049729,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.24018597602844238 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= 2049729 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2049729, 'dashboard_run_id': 2057479, 'mtr_portfolio_id': 25595390, 'dashboard_result_id': 13494567, '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_P25595390_02-08-2025_00_16_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25595398, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25595399, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25595400, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25595401, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25595402, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25595403, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25595404, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25595405, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25595406, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25595407, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25595408, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25595409, 'pht': 3726}}"}, {'dashboat_entry_day': 2049729, 'dashboard_run_id': 2057479, 'mtr_portfolio_id': 25595654, 'dashboard_result_id': 13494568, '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_P25595654_02-08-2025_00_33_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25595659, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25595660, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25595661, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25595662, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25595663, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25595664, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25595665, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25595666, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25595667, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25595668, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25595669, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25595670, 'pht': 3726}}"}, {'dashboat_entry_day': 2049729, 'dashboard_run_id': 2057479, 'mtr_portfolio_id': 25596080, 'dashboard_result_id': 13494569, '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_P25596080_02-08-2025_00_46_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25596101, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25596102, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25596103, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25596104, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25596105, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25596106, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25596107, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25596108, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25596109, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25596110, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25596111, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25596112, 'pht': 3726}}"}, {'dashboat_entry_day': 2049729, 'dashboard_run_id': 2057479, 'mtr_portfolio_id': 25596465, 'dashboard_result_id': 13494570, '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_P25596465_02-08-2025_01_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25596471, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25596472, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25596473, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25596474, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25596475, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25596476, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25596477, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25596478, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25596479, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25596480, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25596481, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25596482, 'pht': 3726}}"}, {'dashboat_entry_day': 2049729, 'dashboard_run_id': 2057479, 'mtr_portfolio_id': 25597354, 'dashboard_result_id': 13494571, '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_P25597354_02-08-2025_01_32_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25597355, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25597356, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25597357, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25597358, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25597359, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25597360, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25597361, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25597362, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25597363, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25597364, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25597365, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25597366, 'pht': 3726}}"}, {'dashboat_entry_day': 2049729, 'dashboard_run_id': 2057479, 'mtr_portfolio_id': 25597427, 'dashboard_result_id': 13494572, '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_P25597427_02-08-2025_01_49_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25597436, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25597437, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25597438, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25597439, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25597440, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25597441, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25597442, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25597443, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25597444, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25597445, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25597446, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25597447, 'pht': 3726}}"}, {'dashboat_entry_day': 2049729, 'dashboard_run_id': 2057479, 'mtr_portfolio_id': 25597738, 'dashboard_result_id': 13494573, '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_P25597738_02-08-2025_02_03_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25597746, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25597747, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25597748, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25597749, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25597750, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25597751, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25597752, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25597753, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25597754, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25597755, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25597756, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25597757, 'pht': 3726}}"}, {'dashboat_entry_day': 2049729, 'dashboard_run_id': 2057479, 'mtr_portfolio_id': 25597981, 'dashboard_result_id': 13494574, '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_P25597981_02-08-2025_02_10_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25598002, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25598003, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25598004, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25598005, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25598006, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25598007, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25598008, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25598009, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25598010, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25598011, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25598012, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25598013, '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 = 25595390 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': 3424620, 'mtr_portfolio_id': 25595390, 'created_at': datetime.datetime(2025, 8, 2, 0, 16, 57), 'result': '0.06380500763912292', 'result_long': None, 'result_double': None}] Qualite : 0.06380500763912292 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25595390 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25595390_02-08-2025_00_16_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25595390 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_P25595390_02-08-2025_00_16_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25595398, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25595399, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25595400, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25595401, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25595402, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25595403, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25595404, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25595405, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25595406, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25595407, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25595408, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25595409, 'pht': 3726}}" where mtr_portfolio_id = 25595390 and dashboard_run_id = 2057479 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`=25595390 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13494567, 0.06380500763912292, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25595390_02-08-2025_00_16_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25595398, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25595399, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25595400, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25595401, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25595402, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25595403, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25595404, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25595405, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25595406, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25595407, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25595408, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25595409, '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 = 25595654 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': 3424660, 'mtr_portfolio_id': 25595654, 'created_at': datetime.datetime(2025, 8, 2, 0, 32, 59), 'result': '0.052064631463634055', 'result_long': None, 'result_double': None}] Qualite : 0.052064631463634055 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25595654 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25595654_02-08-2025_00_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25595654 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_P25595654_02-08-2025_00_33_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25595659, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25595660, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25595661, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25595662, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25595663, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25595664, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25595665, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25595666, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25595667, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25595668, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25595669, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25595670, 'pht': 3726}}" where mtr_portfolio_id = 25595654 and dashboard_run_id = 2057479 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`=25595654 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13494568, 0.052064631463634055, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25595654_02-08-2025_00_33_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25595659, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25595660, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25595661, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25595662, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25595663, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25595664, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25595665, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25595666, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25595667, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25595668, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25595669, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25595670, '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 = 25596080 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': 3424708, 'mtr_portfolio_id': 25596080, 'created_at': datetime.datetime(2025, 8, 2, 0, 46, 57), 'result': '0.042643255143462885', 'result_long': None, 'result_double': None}] Qualite : 0.042643255143462885 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25596080 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25596080_02-08-2025_00_46_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25596080 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_P25596080_02-08-2025_00_46_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25596101, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25596102, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25596103, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25596104, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25596105, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25596106, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25596107, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25596108, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25596109, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25596110, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25596111, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25596112, 'pht': 3726}}" where mtr_portfolio_id = 25596080 and dashboard_run_id = 2057479 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`=25596080 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13494569, 0.042643255143462885, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25596080_02-08-2025_00_46_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25596101, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25596102, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25596103, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25596104, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25596105, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25596106, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25596107, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25596108, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25596109, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25596110, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25596111, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25596112, '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 = 25596465 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': 3424746, 'mtr_portfolio_id': 25596465, 'created_at': datetime.datetime(2025, 8, 2, 1, 17), 'result': '0.025741396202413263', 'result_long': None, 'result_double': None}] Qualite : 0.025741396202413263 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25596465 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25596465_02-08-2025_01_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25596465 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_P25596465_02-08-2025_01_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25596471, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25596472, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25596473, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25596474, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25596475, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25596476, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25596477, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25596478, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25596479, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25596480, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25596481, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25596482, 'pht': 3726}}" where mtr_portfolio_id = 25596465 and dashboard_run_id = 2057479 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`=25596465 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13494570, 0.025741396202413263, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25596465_02-08-2025_01_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25596471, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25596472, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25596473, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25596474, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25596475, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25596476, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25596477, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25596478, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25596479, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25596480, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25596481, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25596482, '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 = 25597354 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25597354 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 25597354 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25597354 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25597354 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25597354 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25597354_02-08-2025_01_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25597354 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_P25597354_02-08-2025_01_32_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25597355, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25597356, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25597357, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25597358, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25597359, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25597360, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25597361, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25597362, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25597363, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25597364, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25597365, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25597366, 'pht': 3726}}" where mtr_portfolio_id = 25597354 and dashboard_run_id = 2057481 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 = 25597427 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': 3424932, 'mtr_portfolio_id': 25597427, 'created_at': datetime.datetime(2025, 8, 2, 1, 49), 'result': '0.05328604024542941', 'result_long': None, 'result_double': None}] Qualite : 0.05328604024542941 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25597427 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25597427_02-08-2025_01_49_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25597427 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_P25597427_02-08-2025_01_49_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25597436, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25597437, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25597438, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25597439, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25597440, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25597441, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25597442, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25597443, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25597444, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25597445, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25597446, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25597447, 'pht': 3726}}" where mtr_portfolio_id = 25597427 and dashboard_run_id = 2057481 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`=25597427 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13494572, 0.05328604024542941, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25597427_02-08-2025_01_49_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25597436, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25597437, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25597438, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25597439, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25597440, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25597441, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25597442, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25597443, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25597444, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25597445, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25597446, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25597447, '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 = 25597738 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': 3424992, 'mtr_portfolio_id': 25597738, 'created_at': datetime.datetime(2025, 8, 2, 2, 2, 59), 'result': '0.11761387545980878', 'result_long': None, 'result_double': None}] Qualite : 0.11761387545980878 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25597738 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25597738_02-08-2025_02_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25597738 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_P25597738_02-08-2025_02_03_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25597746, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25597747, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25597748, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25597749, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25597750, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25597751, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25597752, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25597753, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25597754, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25597755, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25597756, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25597757, 'pht': 3726}}" where mtr_portfolio_id = 25597738 and dashboard_run_id = 2057481 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`=25597738 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13494573, 0.11761387545980878, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25597738_02-08-2025_02_03_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25597746, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25597747, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25597748, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25597749, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25597750, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25597751, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25597752, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25597753, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25597754, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25597755, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25597756, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25597757, '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 = 25597981 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': 3425048, 'mtr_portfolio_id': 25597981, 'created_at': datetime.datetime(2025, 8, 2, 2, 15), 'result': '0.052635200168755954', 'result_long': None, 'result_double': None}] Qualite : 0.052635200168755954 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25597981 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25597981_02-08-2025_02_15_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25597981 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_P25597981_02-08-2025_02_15_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25598002, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25598003, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25598004, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25598005, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25598006, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25598007, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25598008, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25598009, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25598010, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25598011, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25598012, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25598013, 'pht': 3726}}" where mtr_portfolio_id = 25597981 and dashboard_run_id = 2057481 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`=25597981 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13494574, 0.052635200168755954, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25597981_02-08-2025_02_15_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25598002, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25598003, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25598004, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25598005, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25598006, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25598007, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25598008, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25598009, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25598010, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25598011, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25598012, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25598013, '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 (25595390,25595654,25596080,25596465,25597354,25597427,25597738,25597981) result : ((1374836743,), (1374836744,), (1374836745,), (1374836750,), (1374836751,), (1374836752,), (1374836754,), (1374836756,), (1374836764,), (1374836765,), (1374836766,), (1374836767,), (1374836774,), (1374836775,), (1374836776,), (1374836777,), (1374836778,), (1374836781,), (1374836782,), (1374836783,), (1374836784,), (1374836786,), (1374836787,), (1374836795,), (1374836796,), (1374836798,), (1374836812,), (1374836813,), (1374836814,), (1374836816,), (1374836817,), (1374836820,), (1374836832,), (1374836833,), (1374836834,), (1374836835,), (1374836855,), (1374836906,), (1374836907,), (1374836908,), (1374836909,), (1374837060,), (1374837061,), (1374837075,), (1374837099,), (1374837110,), (1374837114,), (1374837159,), (1374837160,), (1374837164,), (1374837184,), (1374837209,), (1374837234,), (1374837303,), (1374837304,), (1374837305,), (1374837307,), (1374837318,), (1374837319,), (1374837320,), (1374837322,), (1374837324,), (1374837334,), (1374837335,), (1374837336,), (1374837337,), (1374837338,), (1374837340,), (1374837348,), (1374837350,), (1374837351,), (1374837352,), (1374837370,), (1374837368,), (1374837369,), (1374837388,), (1374837389,), (1374837390,), (1374837391,), (1374837394,), (1374837414,), (1374837416,), (1374837441,), (1374837463,), (1374837484,), (1374837751,), (1374837778,), (1374837802,), (1374837827,), (1374838017,), (1374838019,), (1374838020,), (1374838028,), (1374838034,), (1374838035,), (1374838036,), (1374838037,), (1374838040,), (1374838041,), (1374838042,), (1374838044,), (1374838248,), (1374838277,), (1374838300,), (1374838323,), (1374838971,), (1374839003,), (1374839030,), (1374839053,), (1374839099,), (1374839206,), (1374839247,), (1374839280,), (1374839302,), (1374839327,), (1374839502,), (1374839537,), (1374839588,), (1374839629,), (1374840397,), (1374840475,), (1374840536,), (1374840588,), (1374840631,), (1374840681,), (1374841103,), (1374841125,), (1374841148,), (1374841170,), (1374841183,), (1374841284,), (1374841327,), (1374841373,), (1374841418,), (1374841806,), (1374841807,), (1374841839,), (1374841889,), (1374841901,), (1374841907,), (1374841920,), (1374841922,), (1374841923,), (1374841924,), (1374841928,), (1374841929,), (1374841954,), (1374841952,), (1374841953,), (1374841984,), (1374841985,), (1374841986,), (1374841987,), (1374841989,), (1374841991,), (1374841995,), (1374841996,), (1374841997,), (1374842000,), (1374842003,), (1374842005,), (1374842015,), (1374842017,), (1374842019,), (1374842021,), (1374842022,), (1374842025,), (1374842028,), (1374842031,), (1374842034,), (1374842037,), (1374842038,), (1374842039,), (1374842040,), (1374842076,), (1374842099,), (1374842125,), (1374842434,), (1374842457,), (1374842683,), (1374842710,), (1374842735,), (1374842761,), (1374842942,), (1374842948,), (1374842949,), (1374842966,), (1374842967,), (1374842969,), (1374842970,), (1374842971,), (1374843009,), (1374843010,), (1374843011,), (1374843012,), (1374843014,), (1374843019,), (1374843027,), (1374843029,), (1374843031,), (1374843032,), (1374843040,), (1374843050,), (1374843051,), (1374843054,), (1374843063,), (1374843064,), (1374843065,), (1374843066,), (1374843083,), (1374843084,), (1374843085,), (1374843087,), (1374843089,), (1374843091,), (1374843099,), (1374843100,), (1374843101,), (1374843127,), (1374843122,), (1374843123,), (1374843124,), (1374843125,), (1374843137,), (1374843138,), (1374843139,), (1374843140,), (1374843142,), (1374843242,), (1374843269,), (1374843293,), (1374843502,), (1374843521,), (1374843532,), (1374843541,), (1374843542,), (1374843543,), (1374843559,), (1374843560,), (1374843561,), (1374843582,), (1374843583,), (1374843585,), (1374843586,), (1374843589,), (1374843603,), (1374843604,), (1374843605,), (1374843623,), (1374843625,), (1374843627,), (1374843629,), (1374843630,), (1374843634,), (1374843635,), (1374843636,), (1374843637,), (1374843641,), (1374843642,), (1374843643,), (1374843644,), (1374843646,), (1374843655,), (1374843656,), (1374843687,), (1374843688,), (1374843689,), (1374843690,), (1374843693,), (1374843714,), (1374843947,), (1374843948,), (1374843949,), (1374843956,), (1374843977,), (1374844001,), (1374844636,), (1374844675,), (1374844724,), (1374845663,), (1374846447,), (1374846635,), (1374846665,), (1374846659,), (1374846661,), (1374846663,), (1374846687,), (1374846688,), (1374846689,), (1374846690,), (1374846692,), (1374846693,), (1374846704,), (1374846705,), (1374846706,), (1374846738,), (1374846741,), (1374846744,), (1374846747,), (1374846749,), (1374846760,), (1374846762,), (1374846763,), (1374846764,), (1374846766,), (1374846767,), (1374846786,), (1374846788,), (1374846789,), (1374846791,), (1374846794,), (1374846807,), (1374846808,), (1374846810,), (1374846829,), (1374846833,), (1374846838,), (1374846843,), (1374846845,), (1374846846,), (1374846859,), (1374846860,), (1374846861,), (1374846863,), (1374846973,), (1374846975,), (1374847008,), (1374847000,), (1374847001,), (1374847003,), (1374847006,), (1374847023,), (1374847025,), (1374847027,), (1374847049,), (1374847052,), (1374847053,), (1374847565,), (1374847856,), (1374847857,), (1374847858,), (1374847860,), (1374847887,), (1374847889,), (1374847896,), (1374847899,), (1374847986,), (1374848390,), (1374848411,), (1374848451,), (1374849254,), (1374849257,), (1374849282,), (1374849285,), (1374849290,), (1374849291,), (1374849292,), (1374849316,), (1374849306,), (1374849308,), (1374849309,), (1374849310,), (1374849439,), (1374849463,), (1374849487,), (1374849511,), (1374849534,), (1374849561,), (1374849778,), (1374849780,), (1374849782,), (1374849784,), (1374849787,), (1374849955,), (1374849977,), (1374849993,), (1374850002,), (1374850010,), (1374850013,), (1374850019,), (1374850021,), (1374850023,), (1374850025,), (1374850026,), (1374850057,), (1374850059,), (1374850061,), (1374850063,), (1374850068,), (1374850080,), (1374850082,), (1374850083,), (1374850084,), (1374850086,), (1374850106,), (1374850107,), (1374850108,), (1374850126,), (1374850127,), (1374850128,), (1374850130,), (1374850131,), (1374850134,), (1374850147,), (1374850150,), (1374850152,), (1374850154,), (1374850156,), (1374850159,), (1374850173,), (1374850175,), (1374850176,), (1374850179,), (1374850181,), (1374850197,), (1374850198,), (1374850199,), (1374850201,), (1374850204,), (1374850207,), (1374850219,), (1374850221,), (1374850224,), (1374850228,), (1374850231,), (1374850234,), (1374850249,), (1374850251,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'02082025': {'nb_upload': 70, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25597981]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1374850251, 1374850249, 1374850234, 1374850231, 1374850228, 1374850224, 1374850221, 1374850219, 1374850207, 1374850204, 1374850201, 1374850199, 1374850198, 1374850197] map_info['map_portfolio_photo'] : {25597981: [1374850251, 1374850249, 1374850234, 1374850231, 1374850228, 1374850224, 1374850221, 1374850219, 1374850207, 1374850204, 1374850201, 1374850199, 1374850198, 1374850197, 1374850181, 1374850179, 1374850176, 1374850175, 1374850173, 1374850159, 1374850156, 1374850154, 1374850152, 1374850150, 1374850147, 1374850134, 1374850131, 1374850130, 1374850128, 1374850127, 1374850126, 1374850108, 1374850107, 1374850106, 1374850086, 1374850084, 1374850083, 1374850082, 1374850080, 1374850068, 1374850063, 1374850061, 1374850059, 1374850057, 1374850026, 1374850025, 1374850023, 1374850021, 1374850019, 1374850013, 1374850010, 1374850002, 1374849993, 1374849977, 1374849955, 1374849787, 1374849784, 1374849782, 1374849780, 1374849778, 1374849561, 1374849534, 1374849511, 1374849487, 1374849463, 1374849439, 1374849310, 1374849309, 1374849308, 1374849306]} final : True mtd_id 4302 list_pids : [1374850251, 1374850249, 1374850234, 1374850231, 1374850228, 1374850224, 1374850221, 1374850219, 1374850207, 1374850204, 1374850201, 1374850199, 1374850198, 1374850197] Looping around the photos to save general results len do output : 1 /25597981Didn'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, '3425048') ('4302', '25597981', '1374850251', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850249', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850234', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850231', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850228', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850224', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850221', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850219', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850207', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850204', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850201', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850199', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850198', None, None, None, None, None, '3425048') ('4302', None, None, None, None, None, None, None, '3425048') ('4302', '25597981', '1374850197', None, None, None, None, None, '3425048') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25597981', 'None', None, None, None, None, '3425048'), ('4302', '25597981', '1374850251', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850249', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850234', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850231', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850228', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850224', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850221', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850219', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850207', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850204', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850201', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850199', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850198', None, None, None, None, None, '3425048'), ('4302', '25597981', '1374850197', None, None, None, None, None, '3425048')] time used for this insertion : 0.01726555824279785 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.7488076686859131 time spend to save output : 0.017519235610961914 total time spend for step 5 : 0.766326904296875 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 (3425048) 2.20user 2.35system 0:08.04elapsed 56%CPU (0avgtext+0avgdata 160308maxresident)k 40inputs+10048outputs (1major+64377minor)pagefaults 0swaps