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 : 3241999 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 (3243347) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3243347) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24662593 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3243347'] with mtr_portfolio_ids : ['24662593'] and first list_photo_ids : [] new path : /proc/3241999/ Name: python3 Umask: 0002 State: R (running) Tgid: 3241999 Ngid: 0 Pid: 3241999 PPid: 3241998 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3241999 NSpid: 3241999 NSpgid: 3236312 NSsid: 3236312 VmPeak: 1106960 kB VmSize: 1106960 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98480 kB VmRSS: 98480 kB RssAnon: 59800 kB RssFile: 38680 kB RssShmem: 0 kB VmData: 865712 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 596 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 6/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 51 nonvoluntary_ctxt_switches: 84 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3241999', 'Ngid': '0', 'Pid': '3241999', 'PPid': '3241998', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3241999', 'NSpid': '3241999', 'NSpgid': '3236312', 'NSsid': '3236312', 'VmPeak': '1106960 kB', 'VmSize': '1106960 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98480 kB', 'VmRSS': '98480 kB', 'RssAnon': '59800 kB', 'RssFile': '38680 kB', 'RssShmem': '0 kB', 'VmData': '865712 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '596 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '6/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '51', 'nonvoluntary_ctxt_switches': '84'} ('datou_batch_current', '3241999', '1106960', '0', '1106960', '865712', '98480', b'', 'marlene', '3243347') 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 (24662593) 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 (3243347 ) ) 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 (24662593) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1370984667, 'portfolio_id': 24662593}, {'photo_id': 1370984606, 'portfolio_id': 24662593}, {'photo_id': 1370984541, 'portfolio_id': 24662593}, {'photo_id': 1370984478, 'portfolio_id': 24662593}, {'photo_id': 1370984387, 'portfolio_id': 24662593}, {'photo_id': 1370984327, 'portfolio_id': 24662593}, {'photo_id': 1370983429, 'portfolio_id': 24662593}, {'photo_id': 1370983426, 'portfolio_id': 24662593}, {'photo_id': 1370983422, 'portfolio_id': 24662593}, {'photo_id': 1370983417, 'portfolio_id': 24662593}, {'photo_id': 1370983412, 'portfolio_id': 24662593}, {'photo_id': 1370983407, 'portfolio_id': 24662593}, {'photo_id': 1370983404, 'portfolio_id': 24662593}, {'photo_id': 1370983401, 'portfolio_id': 24662593}, {'photo_id': 1370983399, 'portfolio_id': 24662593}, {'photo_id': 1370983397, 'portfolio_id': 24662593}, {'photo_id': 1370983393, 'portfolio_id': 24662593}, {'photo_id': 1370983390, 'portfolio_id': 24662593}, {'photo_id': 1370983380, 'portfolio_id': 24662593}, {'photo_id': 1370983376, 'portfolio_id': 24662593}, {'photo_id': 1370983374, 'portfolio_id': 24662593}, {'photo_id': 1370983373, 'portfolio_id': 24662593}, {'photo_id': 1370983372, 'portfolio_id': 24662593}, {'photo_id': 1370983370, 'portfolio_id': 24662593}, {'photo_id': 1370983358, 'portfolio_id': 24662593}, {'photo_id': 1370983356, 'portfolio_id': 24662593}, {'photo_id': 1370983354, 'portfolio_id': 24662593}, {'photo_id': 1370983351, 'portfolio_id': 24662593}, {'photo_id': 1370983349, 'portfolio_id': 24662593}, {'photo_id': 1370983345, 'portfolio_id': 24662593}, {'photo_id': 1370983340, 'portfolio_id': 24662593}, {'photo_id': 1370983337, 'portfolio_id': 24662593}, {'photo_id': 1370983335, 'portfolio_id': 24662593}, {'photo_id': 1370983332, 'portfolio_id': 24662593}, {'photo_id': 1370983328, 'portfolio_id': 24662593}, {'photo_id': 1370983324, 'portfolio_id': 24662593}, {'photo_id': 1370983315, 'portfolio_id': 24662593}, {'photo_id': 1370983313, 'portfolio_id': 24662593}, {'photo_id': 1370983311, 'portfolio_id': 24662593}, {'photo_id': 1370983308, 'portfolio_id': 24662593}, {'photo_id': 1370983306, 'portfolio_id': 24662593}, {'photo_id': 1370983301, 'portfolio_id': 24662593}, {'photo_id': 1370983289, 'portfolio_id': 24662593}, {'photo_id': 1370983287, 'portfolio_id': 24662593}, {'photo_id': 1370983284, 'portfolio_id': 24662593}, {'photo_id': 1370983282, 'portfolio_id': 24662593}, {'photo_id': 1370983278, 'portfolio_id': 24662593}, {'photo_id': 1370983273, 'portfolio_id': 24662593}, {'photo_id': 1370983264, 'portfolio_id': 24662593}, {'photo_id': 1370983262, 'portfolio_id': 24662593}, {'photo_id': 1370983260, 'portfolio_id': 24662593}, {'photo_id': 1370983258, 'portfolio_id': 24662593}, {'photo_id': 1370983256, 'portfolio_id': 24662593}, {'photo_id': 1370983253, 'portfolio_id': 24662593}, {'photo_id': 1370983238, 'portfolio_id': 24662593}, {'photo_id': 1370983237, 'portfolio_id': 24662593}, {'photo_id': 1370983236, 'portfolio_id': 24662593}, {'photo_id': 1370983235, 'portfolio_id': 24662593}, {'photo_id': 1370983230, 'portfolio_id': 24662593}, {'photo_id': 1370983227, 'portfolio_id': 24662593}, {'photo_id': 1370983213, 'portfolio_id': 24662593}, {'photo_id': 1370983210, 'portfolio_id': 24662593}, {'photo_id': 1370983207, 'portfolio_id': 24662593}, {'photo_id': 1370983205, 'portfolio_id': 24662593}, {'photo_id': 1370983202, 'portfolio_id': 24662593}, {'photo_id': 1370983200, 'portfolio_id': 24662593}, {'photo_id': 1370983187, 'portfolio_id': 24662593}, {'photo_id': 1370983183, 'portfolio_id': 24662593}, {'photo_id': 1370983181, 'portfolio_id': 24662593}, {'photo_id': 1370983180, 'portfolio_id': 24662593}, {'photo_id': 1370983179, 'portfolio_id': 24662593}, {'photo_id': 1370983177, 'portfolio_id': 24662593}, {'photo_id': 1370983165, 'portfolio_id': 24662593}, {'photo_id': 1370983163, 'portfolio_id': 24662593}, {'photo_id': 1370983161, 'portfolio_id': 24662593}, {'photo_id': 1370983160, 'portfolio_id': 24662593}, {'photo_id': 1370983158, 'portfolio_id': 24662593}, {'photo_id': 1370983156, 'portfolio_id': 24662593}, {'photo_id': 1370983144, 'portfolio_id': 24662593}, {'photo_id': 1370983143, 'portfolio_id': 24662593}, {'photo_id': 1370983142, 'portfolio_id': 24662593}, {'photo_id': 1370983133, 'portfolio_id': 24662593}, {'photo_id': 1370983126, 'portfolio_id': 24662593}, {'photo_id': 1370983122, 'portfolio_id': 24662593}] map_portfolio_id_photo_id: {24662593: [1370984667, 1370984606, 1370984541, 1370984478, 1370984387, 1370984327, 1370983429, 1370983426, 1370983422, 1370983417, 1370983412, 1370983407, 1370983404, 1370983401, 1370983399, 1370983397, 1370983393, 1370983390, 1370983380, 1370983376, 1370983374, 1370983373, 1370983372, 1370983370, 1370983358, 1370983356, 1370983354, 1370983351, 1370983349, 1370983345, 1370983340, 1370983337, 1370983335, 1370983332, 1370983328, 1370983324, 1370983315, 1370983313, 1370983311, 1370983308, 1370983306, 1370983301, 1370983289, 1370983287, 1370983284, 1370983282, 1370983278, 1370983273, 1370983264, 1370983262, 1370983260, 1370983258, 1370983256, 1370983253, 1370983238, 1370983237, 1370983236, 1370983235, 1370983230, 1370983227, 1370983213, 1370983210, 1370983207, 1370983205, 1370983202, 1370983200, 1370983187, 1370983183, 1370983181, 1370983180, 1370983179, 1370983177, 1370983165, 1370983163, 1370983161, 1370983160, 1370983158, 1370983156, 1370983144, 1370983143, 1370983142, 1370983133, 1370983126, 1370983122]} ##### 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.015542984008789062 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Mon Jul 7 06:00:56 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 (24662593) 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 : 24662593 get user id for portfolio 24662593 get sub ptf for main ptf 24662593, type 3726 and hashtags ['kraft', 'papier', 'mal_croppe', 'Carton_gris', 'metal', 'Carton_brun', 'plastique', 'flou', 'cartonnette', 'Teint_Dans_La_Masse', 'environnement', 'autre_refus'] 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`=24662593 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','papier','mal_croppe','Carton_gris','metal','Carton_brun','plastique','flou','cartonnette','Teint_Dans_La_Masse','environnement','autre_refus')) 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`=24662593 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','papier','mal_croppe','Carton_gris','metal','Carton_brun','plastique','flou','cartonnette','Teint_Dans_La_Masse','environnement','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 24662593, 'sub_port_id': 24662613, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575650, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 58)}, 'Carton_brun': {'main_port_id': 24662593, 'sub_port_id': 24662614, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575651, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 24662593, 'sub_port_id': 24662615, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575652, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 58)}, 'plastique': {'main_port_id': 24662593, 'sub_port_id': 24662617, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575653, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 58)}, 'flou': {'main_port_id': 24662593, 'sub_port_id': 24662618, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575654, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 58)}, 'cartonnette': {'main_port_id': 24662593, 'sub_port_id': 24662619, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575655, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 58)}, 'environnement': {'main_port_id': 24662593, 'sub_port_id': 24662621, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575656, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 58)}, 'metal': {'main_port_id': 24662593, 'sub_port_id': 24662622, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575657, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 58)}, 'papier': {'main_port_id': 24662593, 'sub_port_id': 24662623, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575658, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 58)}, 'autre_refus': {'main_port_id': 24662593, 'sub_port_id': 24662624, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575659, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 58)}, 'mal_croppe': {'main_port_id': 24662593, 'sub_port_id': 24662626, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575660, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 58)}, 'kraft': {'main_port_id': 24662593, 'sub_port_id': 24662627, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575661, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 58)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24662613 , 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=24662593 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 (24662613) result : ((1370983274,), (1370983327,), (1370983409,), (1370983478,), (1370984288,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24662593) result : ((1370983122,), (1370983126,), (1370983133,), (1370983142,), (1370983143,), (1370983144,), (1370983156,), (1370983158,), (1370983160,), (1370983161,), (1370983163,), (1370983165,), (1370983177,), (1370983179,), (1370983180,), (1370983181,), (1370983183,), (1370983187,), (1370983200,), (1370983202,), (1370983205,), (1370983207,), (1370983210,), (1370983213,), (1370983227,), (1370983230,), (1370983235,), (1370983236,), (1370983237,), (1370983238,), (1370983253,), (1370983256,), (1370983258,), (1370983260,), (1370983262,), (1370983264,), (1370983273,), (1370983278,), (1370983282,), (1370983284,), (1370983287,), (1370983289,), (1370983301,), (1370983306,), (1370983308,), (1370983311,), (1370983313,), (1370983315,), (1370983324,), (1370983328,), (1370983332,), (1370983335,), (1370983337,), (1370983340,), (1370983345,), (1370983349,), (1370983351,), (1370983354,), (1370983356,), (1370983358,), (1370983370,), (1370983372,), (1370983373,), (1370983374,), (1370983376,), (1370983380,), (1370983390,), (1370983393,), (1370983397,), (1370983399,), (1370983401,), (1370983404,), (1370983407,), (1370983412,), (1370983417,), (1370983422,), (1370983426,), (1370983429,), (1370984327,), (1370984387,), (1370984478,), (1370984541,), (1370984606,), (1370984667,)) 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 (1370983200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24662614 , 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=24662593 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 (24662614) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24662593) result : ((1370983122,), (1370983126,), (1370983133,), (1370983142,), (1370983143,), (1370983144,), (1370983156,), (1370983158,), (1370983160,), (1370983161,), (1370983163,), (1370983165,), (1370983177,), (1370983179,), (1370983180,), (1370983181,), (1370983183,), (1370983187,), (1370983200,), (1370983202,), (1370983205,), (1370983207,), (1370983210,), (1370983213,), (1370983227,), (1370983230,), (1370983235,), (1370983236,), (1370983237,), (1370983238,), (1370983253,), (1370983256,), (1370983258,), (1370983260,), (1370983262,), (1370983264,), (1370983273,), (1370983278,), (1370983282,), (1370983284,), (1370983287,), (1370983289,), (1370983301,), (1370983306,), (1370983308,), (1370983311,), (1370983313,), (1370983315,), (1370983324,), (1370983328,), (1370983332,), (1370983335,), (1370983337,), (1370983340,), (1370983345,), (1370983349,), (1370983351,), (1370983354,), (1370983356,), (1370983358,), (1370983370,), (1370983372,), (1370983373,), (1370983374,), (1370983376,), (1370983380,), (1370983390,), (1370983393,), (1370983397,), (1370983399,), (1370983401,), (1370983404,), (1370983407,), (1370983412,), (1370983417,), (1370983422,), (1370983426,), (1370983429,), (1370984327,), (1370984387,), (1370984478,), (1370984541,), (1370984606,), (1370984667,)) 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 (1370983200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24662615 , 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=24662593 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 (24662615) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24662593) result : ((1370983122,), (1370983126,), (1370983133,), (1370983142,), (1370983143,), (1370983144,), (1370983156,), (1370983158,), (1370983160,), (1370983161,), (1370983163,), (1370983165,), (1370983177,), (1370983179,), (1370983180,), (1370983181,), (1370983183,), (1370983187,), (1370983200,), (1370983202,), (1370983205,), (1370983207,), (1370983210,), (1370983213,), (1370983227,), (1370983230,), (1370983235,), (1370983236,), (1370983237,), (1370983238,), (1370983253,), (1370983256,), (1370983258,), (1370983260,), (1370983262,), (1370983264,), (1370983273,), (1370983278,), (1370983282,), (1370983284,), (1370983287,), (1370983289,), (1370983301,), (1370983306,), (1370983308,), (1370983311,), (1370983313,), (1370983315,), (1370983324,), (1370983328,), (1370983332,), (1370983335,), (1370983337,), (1370983340,), (1370983345,), (1370983349,), (1370983351,), (1370983354,), (1370983356,), (1370983358,), (1370983370,), (1370983372,), (1370983373,), (1370983374,), (1370983376,), (1370983380,), (1370983390,), (1370983393,), (1370983397,), (1370983399,), (1370983401,), (1370983404,), (1370983407,), (1370983412,), (1370983417,), (1370983422,), (1370983426,), (1370983429,), (1370984327,), (1370984387,), (1370984478,), (1370984541,), (1370984606,), (1370984667,)) 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 (1370983200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24662617 , 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=24662593 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 (24662617) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24662593) result : ((1370983122,), (1370983126,), (1370983133,), (1370983142,), (1370983143,), (1370983144,), (1370983156,), (1370983158,), (1370983160,), (1370983161,), (1370983163,), (1370983165,), (1370983177,), (1370983179,), (1370983180,), (1370983181,), (1370983183,), (1370983187,), (1370983200,), (1370983202,), (1370983205,), (1370983207,), (1370983210,), (1370983213,), (1370983227,), (1370983230,), (1370983235,), (1370983236,), (1370983237,), (1370983238,), (1370983253,), (1370983256,), (1370983258,), (1370983260,), (1370983262,), (1370983264,), (1370983273,), (1370983278,), (1370983282,), (1370983284,), (1370983287,), (1370983289,), (1370983301,), (1370983306,), (1370983308,), (1370983311,), (1370983313,), (1370983315,), (1370983324,), (1370983328,), (1370983332,), (1370983335,), (1370983337,), (1370983340,), (1370983345,), (1370983349,), (1370983351,), (1370983354,), (1370983356,), (1370983358,), (1370983370,), (1370983372,), (1370983373,), (1370983374,), (1370983376,), (1370983380,), (1370983390,), (1370983393,), (1370983397,), (1370983399,), (1370983401,), (1370983404,), (1370983407,), (1370983412,), (1370983417,), (1370983422,), (1370983426,), (1370983429,), (1370984327,), (1370984387,), (1370984478,), (1370984541,), (1370984606,), (1370984667,)) 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 (1370983200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24662618 , 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=24662593 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 (24662618) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24662593) result : ((1370983122,), (1370983126,), (1370983133,), (1370983142,), (1370983143,), (1370983144,), (1370983156,), (1370983158,), (1370983160,), (1370983161,), (1370983163,), (1370983165,), (1370983177,), (1370983179,), (1370983180,), (1370983181,), (1370983183,), (1370983187,), (1370983200,), (1370983202,), (1370983205,), (1370983207,), (1370983210,), (1370983213,), (1370983227,), (1370983230,), (1370983235,), (1370983236,), (1370983237,), (1370983238,), (1370983253,), (1370983256,), (1370983258,), (1370983260,), (1370983262,), (1370983264,), (1370983273,), (1370983278,), (1370983282,), (1370983284,), (1370983287,), (1370983289,), (1370983301,), (1370983306,), (1370983308,), (1370983311,), (1370983313,), (1370983315,), (1370983324,), (1370983328,), (1370983332,), (1370983335,), (1370983337,), (1370983340,), (1370983345,), (1370983349,), (1370983351,), (1370983354,), (1370983356,), (1370983358,), (1370983370,), (1370983372,), (1370983373,), (1370983374,), (1370983376,), (1370983380,), (1370983390,), (1370983393,), (1370983397,), (1370983399,), (1370983401,), (1370983404,), (1370983407,), (1370983412,), (1370983417,), (1370983422,), (1370983426,), (1370983429,), (1370984327,), (1370984387,), (1370984478,), (1370984541,), (1370984606,), (1370984667,)) 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 (1370983200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24662619 , 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=24662593 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 (24662619) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24662593) result : ((1370983122,), (1370983126,), (1370983133,), (1370983142,), (1370983143,), (1370983144,), (1370983156,), (1370983158,), (1370983160,), (1370983161,), (1370983163,), (1370983165,), (1370983177,), (1370983179,), (1370983180,), (1370983181,), (1370983183,), (1370983187,), (1370983200,), (1370983202,), (1370983205,), (1370983207,), (1370983210,), (1370983213,), (1370983227,), (1370983230,), (1370983235,), (1370983236,), (1370983237,), (1370983238,), (1370983253,), (1370983256,), (1370983258,), (1370983260,), (1370983262,), (1370983264,), (1370983273,), (1370983278,), (1370983282,), (1370983284,), (1370983287,), (1370983289,), (1370983301,), (1370983306,), (1370983308,), (1370983311,), (1370983313,), (1370983315,), (1370983324,), (1370983328,), (1370983332,), (1370983335,), (1370983337,), (1370983340,), (1370983345,), (1370983349,), (1370983351,), (1370983354,), (1370983356,), (1370983358,), (1370983370,), (1370983372,), (1370983373,), (1370983374,), (1370983376,), (1370983380,), (1370983390,), (1370983393,), (1370983397,), (1370983399,), (1370983401,), (1370983404,), (1370983407,), (1370983412,), (1370983417,), (1370983422,), (1370983426,), (1370983429,), (1370984327,), (1370984387,), (1370984478,), (1370984541,), (1370984606,), (1370984667,)) 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 (1370983200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24662621 , 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=24662593 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 (24662621) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24662593) result : ((1370983122,), (1370983126,), (1370983133,), (1370983142,), (1370983143,), (1370983144,), (1370983156,), (1370983158,), (1370983160,), (1370983161,), (1370983163,), (1370983165,), (1370983177,), (1370983179,), (1370983180,), (1370983181,), (1370983183,), (1370983187,), (1370983200,), (1370983202,), (1370983205,), (1370983207,), (1370983210,), (1370983213,), (1370983227,), (1370983230,), (1370983235,), (1370983236,), (1370983237,), (1370983238,), (1370983253,), (1370983256,), (1370983258,), (1370983260,), (1370983262,), (1370983264,), (1370983273,), (1370983278,), (1370983282,), (1370983284,), (1370983287,), (1370983289,), (1370983301,), (1370983306,), (1370983308,), (1370983311,), (1370983313,), (1370983315,), (1370983324,), (1370983328,), (1370983332,), (1370983335,), (1370983337,), (1370983340,), (1370983345,), (1370983349,), (1370983351,), (1370983354,), (1370983356,), (1370983358,), (1370983370,), (1370983372,), (1370983373,), (1370983374,), (1370983376,), (1370983380,), (1370983390,), (1370983393,), (1370983397,), (1370983399,), (1370983401,), (1370983404,), (1370983407,), (1370983412,), (1370983417,), (1370983422,), (1370983426,), (1370983429,), (1370984327,), (1370984387,), (1370984478,), (1370984541,), (1370984606,), (1370984667,)) 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 (1370983200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24662622 , 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=24662593 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 (24662622) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24662593) result : ((1370983122,), (1370983126,), (1370983133,), (1370983142,), (1370983143,), (1370983144,), (1370983156,), (1370983158,), (1370983160,), (1370983161,), (1370983163,), (1370983165,), (1370983177,), (1370983179,), (1370983180,), (1370983181,), (1370983183,), (1370983187,), (1370983200,), (1370983202,), (1370983205,), (1370983207,), (1370983210,), (1370983213,), (1370983227,), (1370983230,), (1370983235,), (1370983236,), (1370983237,), (1370983238,), (1370983253,), (1370983256,), (1370983258,), (1370983260,), (1370983262,), (1370983264,), (1370983273,), (1370983278,), (1370983282,), (1370983284,), (1370983287,), (1370983289,), (1370983301,), (1370983306,), (1370983308,), (1370983311,), (1370983313,), (1370983315,), (1370983324,), (1370983328,), (1370983332,), (1370983335,), (1370983337,), (1370983340,), (1370983345,), (1370983349,), (1370983351,), (1370983354,), (1370983356,), (1370983358,), (1370983370,), (1370983372,), (1370983373,), (1370983374,), (1370983376,), (1370983380,), (1370983390,), (1370983393,), (1370983397,), (1370983399,), (1370983401,), (1370983404,), (1370983407,), (1370983412,), (1370983417,), (1370983422,), (1370983426,), (1370983429,), (1370984327,), (1370984387,), (1370984478,), (1370984541,), (1370984606,), (1370984667,)) 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 (1370983200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24662623 , 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=24662593 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 (24662623) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24662593) result : ((1370983122,), (1370983126,), (1370983133,), (1370983142,), (1370983143,), (1370983144,), (1370983156,), (1370983158,), (1370983160,), (1370983161,), (1370983163,), (1370983165,), (1370983177,), (1370983179,), (1370983180,), (1370983181,), (1370983183,), (1370983187,), (1370983200,), (1370983202,), (1370983205,), (1370983207,), (1370983210,), (1370983213,), (1370983227,), (1370983230,), (1370983235,), (1370983236,), (1370983237,), (1370983238,), (1370983253,), (1370983256,), (1370983258,), (1370983260,), (1370983262,), (1370983264,), (1370983273,), (1370983278,), (1370983282,), (1370983284,), (1370983287,), (1370983289,), (1370983301,), (1370983306,), (1370983308,), (1370983311,), (1370983313,), (1370983315,), (1370983324,), (1370983328,), (1370983332,), (1370983335,), (1370983337,), (1370983340,), (1370983345,), (1370983349,), (1370983351,), (1370983354,), (1370983356,), (1370983358,), (1370983370,), (1370983372,), (1370983373,), (1370983374,), (1370983376,), (1370983380,), (1370983390,), (1370983393,), (1370983397,), (1370983399,), (1370983401,), (1370983404,), (1370983407,), (1370983412,), (1370983417,), (1370983422,), (1370983426,), (1370983429,), (1370984327,), (1370984387,), (1370984478,), (1370984541,), (1370984606,), (1370984667,)) 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 (1370983200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24662624 , 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=24662593 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 (24662624) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24662593) result : ((1370983122,), (1370983126,), (1370983133,), (1370983142,), (1370983143,), (1370983144,), (1370983156,), (1370983158,), (1370983160,), (1370983161,), (1370983163,), (1370983165,), (1370983177,), (1370983179,), (1370983180,), (1370983181,), (1370983183,), (1370983187,), (1370983200,), (1370983202,), (1370983205,), (1370983207,), (1370983210,), (1370983213,), (1370983227,), (1370983230,), (1370983235,), (1370983236,), (1370983237,), (1370983238,), (1370983253,), (1370983256,), (1370983258,), (1370983260,), (1370983262,), (1370983264,), (1370983273,), (1370983278,), (1370983282,), (1370983284,), (1370983287,), (1370983289,), (1370983301,), (1370983306,), (1370983308,), (1370983311,), (1370983313,), (1370983315,), (1370983324,), (1370983328,), (1370983332,), (1370983335,), (1370983337,), (1370983340,), (1370983345,), (1370983349,), (1370983351,), (1370983354,), (1370983356,), (1370983358,), (1370983370,), (1370983372,), (1370983373,), (1370983374,), (1370983376,), (1370983380,), (1370983390,), (1370983393,), (1370983397,), (1370983399,), (1370983401,), (1370983404,), (1370983407,), (1370983412,), (1370983417,), (1370983422,), (1370983426,), (1370983429,), (1370984327,), (1370984387,), (1370984478,), (1370984541,), (1370984606,), (1370984667,)) 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 (1370983200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24662626 , 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=24662593 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 (24662626) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24662593) result : ((1370983122,), (1370983126,), (1370983133,), (1370983142,), (1370983143,), (1370983144,), (1370983156,), (1370983158,), (1370983160,), (1370983161,), (1370983163,), (1370983165,), (1370983177,), (1370983179,), (1370983180,), (1370983181,), (1370983183,), (1370983187,), (1370983200,), (1370983202,), (1370983205,), (1370983207,), (1370983210,), (1370983213,), (1370983227,), (1370983230,), (1370983235,), (1370983236,), (1370983237,), (1370983238,), (1370983253,), (1370983256,), (1370983258,), (1370983260,), (1370983262,), (1370983264,), (1370983273,), (1370983278,), (1370983282,), (1370983284,), (1370983287,), (1370983289,), (1370983301,), (1370983306,), (1370983308,), (1370983311,), (1370983313,), (1370983315,), (1370983324,), (1370983328,), (1370983332,), (1370983335,), (1370983337,), (1370983340,), (1370983345,), (1370983349,), (1370983351,), (1370983354,), (1370983356,), (1370983358,), (1370983370,), (1370983372,), (1370983373,), (1370983374,), (1370983376,), (1370983380,), (1370983390,), (1370983393,), (1370983397,), (1370983399,), (1370983401,), (1370983404,), (1370983407,), (1370983412,), (1370983417,), (1370983422,), (1370983426,), (1370983429,), (1370984327,), (1370984387,), (1370984478,), (1370984541,), (1370984606,), (1370984667,)) 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 (1370983200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24662627 , 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=24662593 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 (24662627) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24662593) result : ((1370983122,), (1370983126,), (1370983133,), (1370983142,), (1370983143,), (1370983144,), (1370983156,), (1370983158,), (1370983160,), (1370983161,), (1370983163,), (1370983165,), (1370983177,), (1370983179,), (1370983180,), (1370983181,), (1370983183,), (1370983187,), (1370983200,), (1370983202,), (1370983205,), (1370983207,), (1370983210,), (1370983213,), (1370983227,), (1370983230,), (1370983235,), (1370983236,), (1370983237,), (1370983238,), (1370983253,), (1370983256,), (1370983258,), (1370983260,), (1370983262,), (1370983264,), (1370983273,), (1370983278,), (1370983282,), (1370983284,), (1370983287,), (1370983289,), (1370983301,), (1370983306,), (1370983308,), (1370983311,), (1370983313,), (1370983315,), (1370983324,), (1370983328,), (1370983332,), (1370983335,), (1370983337,), (1370983340,), (1370983345,), (1370983349,), (1370983351,), (1370983354,), (1370983356,), (1370983358,), (1370983370,), (1370983372,), (1370983373,), (1370983374,), (1370983376,), (1370983380,), (1370983390,), (1370983393,), (1370983397,), (1370983399,), (1370983401,), (1370983404,), (1370983407,), (1370983412,), (1370983417,), (1370983422,), (1370983426,), (1370983429,), (1370984327,), (1370984387,), (1370984478,), (1370984541,), (1370984606,), (1370984667,)) 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 (1370983200) and cspi.crop_hashtag_id = chi.id; To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24662593 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','papier','mal_croppe','Carton_gris','metal','Carton_brun','plastique','flou','cartonnette','Teint_Dans_La_Masse','environnement','autre_refus')) 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`=24662593 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','papier','mal_croppe','Carton_gris','metal','Carton_brun','plastique','flou','cartonnette','Teint_Dans_La_Masse','environnement','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 24662593, 'sub_port_id': 24662631, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575674, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 59)}, 'Carton_brun': {'main_port_id': 24662593, 'sub_port_id': 24662632, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575675, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 24662593, 'sub_port_id': 24662633, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575676, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 59)}, 'plastique': {'main_port_id': 24662593, 'sub_port_id': 24662634, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575677, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 59)}, 'flou': {'main_port_id': 24662593, 'sub_port_id': 24662635, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575678, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 59)}, 'cartonnette': {'main_port_id': 24662593, 'sub_port_id': 24662636, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575679, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 59)}, 'environnement': {'main_port_id': 24662593, 'sub_port_id': 24662637, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575680, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 59)}, 'metal': {'main_port_id': 24662593, 'sub_port_id': 24662638, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575681, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 59)}, 'papier': {'main_port_id': 24662593, 'sub_port_id': 24662639, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575682, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 59)}, 'autre_refus': {'main_port_id': 24662593, 'sub_port_id': 24662640, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575683, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 59)}, 'mal_croppe': {'main_port_id': 24662593, 'sub_port_id': 24662641, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575684, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 48, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 59)}, 'kraft': {'main_port_id': 24662593, 'sub_port_id': 24662642, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16575685, 'last_updated_at': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 5, 48, 59)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24662631,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24662613 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24662632,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24662614 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24662633,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24662615 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24662634,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24662617 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24662635,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24662618 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24662636,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24662619 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24662637,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24662621 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24662638,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24662622 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24662639,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24662623 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24662640,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24662624 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24662641,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24662626 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24662642,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24662627 lien utilise dans velours : https://www.fotonower.com/velours/24662631,24662632,24662633,24662634,24662635,24662636,24662637,24662638,24662639,24662640,24662641,24662642?tags=Carton_gris,Carton_brun,Teint_Dans_La_Masse,plastique,flou,cartonnette,environnement,metal,papier,autre_refus,mal_croppe,kraft After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24662593]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1370984667, 1370984606, 1370984541, 1370984478, 1370984387, 1370984327, 1370983429, 1370983426, 1370983422, 1370983417, 1370983412, 1370983407] map_info['map_portfolio_photo'] : {24662593: [1370984667, 1370984606, 1370984541, 1370984478, 1370984387, 1370984327, 1370983429, 1370983426, 1370983422, 1370983417, 1370983412, 1370983407, 1370983404, 1370983401, 1370983399, 1370983397, 1370983393, 1370983390, 1370983380, 1370983376, 1370983374, 1370983373, 1370983372, 1370983370, 1370983358, 1370983356, 1370983354, 1370983351, 1370983349, 1370983345, 1370983340, 1370983337, 1370983335, 1370983332, 1370983328, 1370983324, 1370983315, 1370983313, 1370983311, 1370983308, 1370983306, 1370983301, 1370983289, 1370983287, 1370983284, 1370983282, 1370983278, 1370983273, 1370983264, 1370983262, 1370983260, 1370983258, 1370983256, 1370983253, 1370983238, 1370983237, 1370983236, 1370983235, 1370983230, 1370983227, 1370983213, 1370983210, 1370983207, 1370983205, 1370983202, 1370983200, 1370983187, 1370983183, 1370983181, 1370983180, 1370983179, 1370983177, 1370983165, 1370983163, 1370983161, 1370983160, 1370983158, 1370983156, 1370983144, 1370983143, 1370983142, 1370983133, 1370983126, 1370983122]} final : False mtd_id 4302 list_pids : [1370984667, 1370984606, 1370984541, 1370984478, 1370984387, 1370984327, 1370983429, 1370983426, 1370983422, 1370983417, 1370983412, 1370983407] Looping around the photos to save general results len do output : 1 /24662593. 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, '3243347') ('4302', '24662593', '1370984667', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370984606', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370984541', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370984478', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370984387', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370984327', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370983429', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370983426', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370983422', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370983417', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370983412', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370983407', None, None, None, None, None, '3243347') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '24662593', "{'Carton_gris': 24662613, 'Carton_brun': 24662614, 'Teint_Dans_La_Masse': 24662615, 'plastique': 24662617, 'flou': 24662618, 'cartonnette': 24662619, 'environnement': 24662621, 'metal': 24662622, 'papier': 24662623, 'autre_refus': 24662624, 'mal_croppe': 24662626, 'kraft': 24662627}", None, None, None, None, '3243347'), ('4302', '24662593', '1370984667', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370984606', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370984541', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370984478', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370984387', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370984327', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370983429', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370983426', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370983422', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370983417', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370983412', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370983407', None, None, None, None, None, '3243347')] time used for this insertion : 0.1287059783935547 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.44393134117126465 time spend to save output : 0.1290140151977539 total time spend for step 1 : 0.5729453563690186 step2:final Mon Jul 7 06:00:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24662593) 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 24662593 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1370983144,1370983143,1370983142,1370983133,1370983126,1370983122,1370983165,1370983163,1370983161,1370983160,1370983158,1370983156,1370983187,1370983183,1370983181,1370983180,1370983179,1370983177,1370983213,1370983210,1370983207,1370983205,1370983202,1370983200,1370983238,1370983237,1370983236,1370983235,1370983230,1370983227,1370983264,1370983262,1370983260,1370983258,1370983256,1370983253,1370983289,1370983287,1370983284,1370983282,1370983278,1370983273,1370983315,1370983313,1370983311,1370983308,1370983306,1370983301,1370983340,1370983337,1370983335,1370983332,1370983328,1370983324,1370983358,1370983356,1370983354,1370983351,1370983349,1370983345,1370983380,1370983376,1370983374,1370983373,1370983372,1370983370,1370983404,1370983401,1370983399,1370983397,1370983393,1370983390,1370983429,1370983426,1370983422,1370983417,1370983412,1370983407,1370984667,1370984606,1370984541,1370984478,1370984387,1370984327); 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([24662593]) Inside saveOutput : final : False verbose : True original output for save of step final : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ('0.012108135590933933',), 1370983417: ('0.012108135590933933',), 1370983412: ('0.012108135590933933',), 1370983407: ('0.012108135590933933',)} new output for save of step final : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ('0.012108135590933933',), 1370983417: ('0.012108135590933933',), 1370983412: ('0.012108135590933933',), 1370983407: ('0.012108135590933933',)} [1370984667, 1370984606, 1370984541, 1370984478, 1370984387, 1370984327, 1370983429, 1370983426, 1370983422, 1370983417, 1370983412, 1370983407] map_info['map_portfolio_photo'] : {24662593: [1370984667, 1370984606, 1370984541, 1370984478, 1370984387, 1370984327, 1370983429, 1370983426, 1370983422, 1370983417, 1370983412, 1370983407, 1370983404, 1370983401, 1370983399, 1370983397, 1370983393, 1370983390, 1370983380, 1370983376, 1370983374, 1370983373, 1370983372, 1370983370, 1370983358, 1370983356, 1370983354, 1370983351, 1370983349, 1370983345, 1370983340, 1370983337, 1370983335, 1370983332, 1370983328, 1370983324, 1370983315, 1370983313, 1370983311, 1370983308, 1370983306, 1370983301, 1370983289, 1370983287, 1370983284, 1370983282, 1370983278, 1370983273, 1370983264, 1370983262, 1370983260, 1370983258, 1370983256, 1370983253, 1370983238, 1370983237, 1370983236, 1370983235, 1370983230, 1370983227, 1370983213, 1370983210, 1370983207, 1370983205, 1370983202, 1370983200, 1370983187, 1370983183, 1370983181, 1370983180, 1370983179, 1370983177, 1370983165, 1370983163, 1370983161, 1370983160, 1370983158, 1370983156, 1370983144, 1370983143, 1370983142, 1370983133, 1370983126, 1370983122]} final : False mtd_id 4302 list_pids : [1370984667, 1370984606, 1370984541, 1370984478, 1370984387, 1370984327, 1370983429, 1370983426, 1370983422, 1370983417, 1370983412, 1370983407] Looping around the photos to save general results len do output : 12 /1370984667.Didn't retrieve data . /1370984606.Didn't retrieve data . /1370984541.Didn't retrieve data . /1370984478.Didn't retrieve data . /1370984387.Didn't retrieve data . /1370984327.Didn't retrieve data . /1370983429.Didn't retrieve data . /1370983426.Didn't retrieve data . /1370983422.Didn't retrieve data . /1370983417.Didn't retrieve data . /1370983412.Didn't retrieve data . /1370983407.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, '3243347') ('4302', '24662593', '1370984667', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370984606', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370984541', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370984478', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370984387', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370984327', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370983429', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370983426', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370983422', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370983417', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370983412', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370983407', None, None, None, None, None, '3243347') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 36 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '24662593', '1370984667', '0.012108135590933933', None, None, None, None, '3243347'), ('4302', '24662593', '1370984606', '0.012108135590933933', None, None, None, None, '3243347'), ('4302', '24662593', '1370984541', '0.012108135590933933', None, None, None, None, '3243347'), ('4302', '24662593', '1370984478', '0.012108135590933933', None, None, None, None, '3243347'), ('4302', '24662593', '1370984387', '0.012108135590933933', None, None, None, None, '3243347'), ('4302', '24662593', '1370984327', '0.012108135590933933', None, None, None, None, '3243347'), ('4302', '24662593', '1370983429', '0.012108135590933933', None, None, None, None, '3243347'), ('4302', '24662593', '1370983426', '0.012108135590933933', None, None, None, None, '3243347'), ('4302', '24662593', '1370983422', '0.012108135590933933', None, None, None, None, '3243347'), ('4302', '24662593', '1370983417', '0.012108135590933933', None, None, None, None, '3243347'), ('4302', '24662593', '1370983412', '0.012108135590933933', None, None, None, None, '3243347'), ('4302', '24662593', '1370983407', '0.012108135590933933', None, None, None, None, '3243347')] time used for this insertion : 0.01757049560546875 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.0761864185333252 time spend to save output : 0.018134355545043945 total time spend for step 2 : 0.09432077407836914 step3:velours_tree Mon Jul 7 06:00:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {24662593: [{'Carton_gris': 24662613, 'Carton_brun': 24662614, 'Teint_Dans_La_Masse': 24662615, 'plastique': 24662617, 'flou': 24662618, 'cartonnette': 24662619, 'environnement': 24662621, 'metal': 24662622, 'papier': 24662623, 'autre_refus': 24662624, 'mal_croppe': 24662626, 'kraft': 24662627}]} input_args_next_step : {24662593: ()} output_args : {24662593: [{'Carton_gris': 24662613, 'Carton_brun': 24662614, 'Teint_Dans_La_Masse': 24662615, 'plastique': 24662617, 'flou': 24662618, 'cartonnette': 24662619, 'environnement': 24662621, 'metal': 24662622, 'papier': 24662623, 'autre_refus': 24662624, 'mal_croppe': 24662626, 'kraft': 24662627}]} args : 24662593 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 : ({'Carton_gris': 24662613, 'Carton_brun': 24662614, 'Teint_Dans_La_Masse': 24662615, 'plastique': 24662617, 'flou': 24662618, 'cartonnette': 24662619, 'environnement': 24662621, 'metal': 24662622, 'papier': 24662623, 'autre_refus': 24662624, 'mal_croppe': 24662626, 'kraft': 24662627},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24662593) 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([24662593]) 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.2644639015197754 time spend to save output : 4.172325134277344e-05 total time spend for step 3 : 0.26450562477111816 step4:send_mail_cod Mon Jul 7 06:00:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ('0.012108135590933933',), 1370983417: ('0.012108135590933933',), 1370983412: ('0.012108135590933933',), 1370983407: ('0.012108135590933933',)} input_args_next_step : {1370984667: ()} output_args : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ('0.012108135590933933',), 1370983417: ('0.012108135590933933',), 1370983412: ('0.012108135590933933',), 1370983407: ('0.012108135590933933',)} args : 1370984667 depend.output_id : 0 input_args_next_step : {1370984667: ('0.012108135590933933',), 1370984606: ()} output_args : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ('0.012108135590933933',), 1370983417: ('0.012108135590933933',), 1370983412: ('0.012108135590933933',), 1370983407: ('0.012108135590933933',)} args : 1370984606 depend.output_id : 0 input_args_next_step : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ()} output_args : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ('0.012108135590933933',), 1370983417: ('0.012108135590933933',), 1370983412: ('0.012108135590933933',), 1370983407: ('0.012108135590933933',)} args : 1370984541 depend.output_id : 0 input_args_next_step : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ()} output_args : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ('0.012108135590933933',), 1370983417: ('0.012108135590933933',), 1370983412: ('0.012108135590933933',), 1370983407: ('0.012108135590933933',)} args : 1370984478 depend.output_id : 0 input_args_next_step : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ()} output_args : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ('0.012108135590933933',), 1370983417: ('0.012108135590933933',), 1370983412: ('0.012108135590933933',), 1370983407: ('0.012108135590933933',)} args : 1370984387 depend.output_id : 0 input_args_next_step : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ()} output_args : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ('0.012108135590933933',), 1370983417: ('0.012108135590933933',), 1370983412: ('0.012108135590933933',), 1370983407: ('0.012108135590933933',)} args : 1370984327 depend.output_id : 0 input_args_next_step : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ()} output_args : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ('0.012108135590933933',), 1370983417: ('0.012108135590933933',), 1370983412: ('0.012108135590933933',), 1370983407: ('0.012108135590933933',)} args : 1370983429 depend.output_id : 0 input_args_next_step : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ()} output_args : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ('0.012108135590933933',), 1370983417: ('0.012108135590933933',), 1370983412: ('0.012108135590933933',), 1370983407: ('0.012108135590933933',)} args : 1370983426 depend.output_id : 0 input_args_next_step : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ()} output_args : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ('0.012108135590933933',), 1370983417: ('0.012108135590933933',), 1370983412: ('0.012108135590933933',), 1370983407: ('0.012108135590933933',)} args : 1370983422 depend.output_id : 0 input_args_next_step : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ('0.012108135590933933',), 1370983417: ()} output_args : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ('0.012108135590933933',), 1370983417: ('0.012108135590933933',), 1370983412: ('0.012108135590933933',), 1370983407: ('0.012108135590933933',)} args : 1370983417 depend.output_id : 0 input_args_next_step : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ('0.012108135590933933',), 1370983417: ('0.012108135590933933',), 1370983412: ()} output_args : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ('0.012108135590933933',), 1370983417: ('0.012108135590933933',), 1370983412: ('0.012108135590933933',), 1370983407: ('0.012108135590933933',)} args : 1370983412 depend.output_id : 0 input_args_next_step : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ('0.012108135590933933',), 1370983417: ('0.012108135590933933',), 1370983412: ('0.012108135590933933',), 1370983407: ()} output_args : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ('0.012108135590933933',), 1370983417: ('0.012108135590933933',), 1370983412: ('0.012108135590933933',), 1370983407: ('0.012108135590933933',)} args : 1370983407 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 : {24662593: [{'Carton_gris': 24662613, 'Carton_brun': 24662614, 'Teint_Dans_La_Masse': 24662615, 'plastique': 24662617, 'flou': 24662618, 'cartonnette': 24662619, 'environnement': 24662621, 'metal': 24662622, 'papier': 24662623, 'autre_refus': 24662624, 'mal_croppe': 24662626, 'kraft': 24662627}]} input_args_next_step : {1370984667: ('0.012108135590933933',), 1370984606: ('0.012108135590933933',), 1370984541: ('0.012108135590933933',), 1370984478: ('0.012108135590933933',), 1370984387: ('0.012108135590933933',), 1370984327: ('0.012108135590933933',), 1370983429: ('0.012108135590933933',), 1370983426: ('0.012108135590933933',), 1370983422: ('0.012108135590933933',), 1370983417: ('0.012108135590933933',), 1370983412: ('0.012108135590933933',), 1370983407: ('0.012108135590933933',), 24662593: ()} output_args : {24662593: [{'Carton_gris': 24662613, 'Carton_brun': 24662614, 'Teint_Dans_La_Masse': 24662615, 'plastique': 24662617, 'flou': 24662618, 'cartonnette': 24662619, 'environnement': 24662621, 'metal': 24662622, 'papier': 24662623, 'autre_refus': 24662624, 'mal_croppe': 24662626, 'kraft': 24662627}]} args : 24662593 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :13, first value : ('0.012108135590933933',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24662593) 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 (1370984667,1370984606,1370984541,1370984478,1370984387,1370984327,1370983429,1370983426,1370983422,1370983417,1370983412,1370983407) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1370983407 begin to download photo : 1370983422 begin to download photo : 1370984327 begin to download photo : 1370984541 download finish for photo 1370983407 begin to download photo : 1370983412 download finish for photo 1370983422 begin to download photo : 1370983426 download finish for photo 1370984327 begin to download photo : 1370984387 download finish for photo 1370984541 begin to download photo : 1370984606 download finish for photo 1370983412 begin to download photo : 1370983417 download finish for photo 1370983426 begin to download photo : 1370983429 download finish for photo 1370984387 begin to download photo : 1370984478 download finish for photo 1370984606 begin to download photo : 1370984667 download finish for photo 1370983417 download finish for photo 1370983429 download finish for photo 1370984478 download finish for photo 1370984667 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette246626171751860857/ imagette246626181751860857/ imagette246626191751860857/ imagette246626221751860857/ imagette246626241751860857/ imagette246626261751860857/ imagette246626271751860857/ length of list_filenames : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P24662593_07-07-2025_06_00_57.pdf 24662617 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=24662617 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246626171751860857 24662618 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=24662618 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246626181751860857 24662619 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=24662619 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246626191751860857 24662622 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=24662622 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246626221751860857 24662624 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=24662624 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246626241751860857 24662626 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=24662626 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246626261751860857 24662627 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=24662627 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246626271751860857 24662613 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=24662613 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1370983274: '1751860285_1444086_1370983213_53c5c42aa3f3e174b4b59ed742ebdd7a_rle_crop_3874561720_0.png', 1370983327: '1751860405_1447839_1370983253_192b16e61d8a5beaebe923b8631cdf04_rle_crop_3874562000_0.png', 1370983409: '1751860645_1452067_1370983324_6c4ea2ab2217c65e0752b6f38bddf281_rle_crop_3874568374_0.png', 1370983478: '1751860684_3251264_1370983356_bec7d824b154c6ae71f40f42a57d1ae3_rle_crop_3874569478_0.png', 1370984288: '1751860765_1455087_1370983142_9f1f36f3be8acd28ce0e2a6812e32c19_rle_crop_3874570709_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/7/6f7960260d9da348613dbf068b72f1ca_64954584.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/7/b1f9bf8d65578d8353b6c455d2c5f99c_50494995.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/7/7634a789ae4994f54d2b1ee440ab7143_33638484.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/7/234226e61d46d5f7e1449aa293cbfd20_47872802.png change filename to text .imagette246626131751860857/ imagette246626131751860857/1751860405_1447839_1370983253_192b16e61d8a5beaebe923b8631cdf04_rle_crop_3874562000_0.png.png imagette246626131751860857/1751860285_1444086_1370983213_53c5c42aa3f3e174b4b59ed742ebdd7a_rle_crop_3874561720_0.png.png imagette246626131751860857/1751860684_3251264_1370983356_bec7d824b154c6ae71f40f42a57d1ae3_rle_crop_3874569478_0.png.png imagette246626131751860857/1751860645_1452067_1370983324_6c4ea2ab2217c65e0752b6f38bddf281_rle_crop_3874568374_0.png.png imagette246626131751860857/1751860765_1455087_1370983142_9f1f36f3be8acd28ce0e2a6812e32c19_rle_crop_3874570709_0.png.png imagette246626141751860858/ imagette246626151751860858/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/7/5ec52eef4e65d8602b9b93d404685638_97015816.png imagette246626131751860857 24662614 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=24662614 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246626141751860858 24662615 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=24662615 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246626151751860858 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=24662593 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/24662631,24662632,24662633,24662634,24662635,24662636,24662637,24662638,24662639,24662640,24662641,24662642?tags=Carton_gris,Carton_brun,Teint_Dans_La_Masse,plastique,flou,cartonnette,environnement,metal,papier,autre_refus,mal_croppe,kraft your option no_mail is active, we will not send the real mail to your client args[1370984667] : ('0.012108135590933933',) no score found for photo 1370984667 We are sending mail with results at report@fotonower.com args[1370984606] : ('0.012108135590933933',) no score found for photo 1370984606 We are sending mail with results at report@fotonower.com args[1370984541] : ('0.012108135590933933',) no score found for photo 1370984541 We are sending mail with results at report@fotonower.com args[1370984478] : ('0.012108135590933933',) no score found for photo 1370984478 We are sending mail with results at report@fotonower.com args[1370984387] : ('0.012108135590933933',) no score found for photo 1370984387 We are sending mail with results at report@fotonower.com args[1370984327] : ('0.012108135590933933',) no score found for photo 1370984327 We are sending mail with results at report@fotonower.com args[1370983429] : ('0.012108135590933933',) no score found for photo 1370983429 We are sending mail with results at report@fotonower.com args[1370983426] : ('0.012108135590933933',) no score found for photo 1370983426 We are sending mail with results at report@fotonower.com args[1370983422] : ('0.012108135590933933',) no score found for photo 1370983422 We are sending mail with results at report@fotonower.com args[1370983417] : ('0.012108135590933933',) no score found for photo 1370983417 We are sending mail with results at report@fotonower.com args[1370983412] : ('0.012108135590933933',) no score found for photo 1370983412 We are sending mail with results at report@fotonower.com args[1370983407] : ('0.012108135590933933',) no score found for photo 1370983407 We are sending mail with results at report@fotonower.com refus_total : 0.012108135590933933 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=24662593 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_P24662593_07-07-2025_06_00_57.pdf results_Auto_P24662593_07-07-2025_06_00_57.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24662593_07-07-2025_06_00_57.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','24662593','results_Auto_P24662593_07-07-2025_06_00_57.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24662593_07-07-2025_06_00_57.pdf','pdf','','0.11','0.012108135590933933') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24662593]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1370984667, 1370984606, 1370984541, 1370984478, 1370984387, 1370984327, 1370983429, 1370983426, 1370983422, 1370983417, 1370983412, 1370983407] map_info['map_portfolio_photo'] : {24662593: [1370984667, 1370984606, 1370984541, 1370984478, 1370984387, 1370984327, 1370983429, 1370983426, 1370983422, 1370983417, 1370983412, 1370983407, 1370983404, 1370983401, 1370983399, 1370983397, 1370983393, 1370983390, 1370983380, 1370983376, 1370983374, 1370983373, 1370983372, 1370983370, 1370983358, 1370983356, 1370983354, 1370983351, 1370983349, 1370983345, 1370983340, 1370983337, 1370983335, 1370983332, 1370983328, 1370983324, 1370983315, 1370983313, 1370983311, 1370983308, 1370983306, 1370983301, 1370983289, 1370983287, 1370983284, 1370983282, 1370983278, 1370983273, 1370983264, 1370983262, 1370983260, 1370983258, 1370983256, 1370983253, 1370983238, 1370983237, 1370983236, 1370983235, 1370983230, 1370983227, 1370983213, 1370983210, 1370983207, 1370983205, 1370983202, 1370983200, 1370983187, 1370983183, 1370983181, 1370983180, 1370983179, 1370983177, 1370983165, 1370983163, 1370983161, 1370983160, 1370983158, 1370983156, 1370983144, 1370983143, 1370983142, 1370983133, 1370983126, 1370983122]} final : False mtd_id 4302 list_pids : [1370984667, 1370984606, 1370984541, 1370984478, 1370984387, 1370984327, 1370983429, 1370983426, 1370983422, 1370983417, 1370983412, 1370983407] 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, '3243347') ('4302', '24662593', '1370984667', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370984606', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370984541', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370984478', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370984387', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370984327', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370983429', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370983426', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370983422', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370983417', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370983412', None, None, None, None, None, '3243347') ('4302', None, None, None, None, None, None, None, '3243347') ('4302', '24662593', '1370983407', None, None, None, None, None, '3243347') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '24662593', '1370984667', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370984606', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370984541', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370984478', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370984387', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370984327', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370983429', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370983426', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370983422', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370983417', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370983412', None, None, None, None, None, '3243347'), ('4302', '24662593', '1370983407', None, None, None, None, None, '3243347')] time used for this insertion : 0.015758275985717773 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.9751253128051758 time spend to save output : 0.016016721725463867 total time spend for step 4 : 1.9911420345306396 step5:split_time_score Mon Jul 7 06:00:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['24662593'] 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 : [('24662593',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24662593) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1370983407: {'path': 'temp/1751860857_3241999_1370983407_25851f987252720014e3ec0844b305f7.jpg', 'extension': 'jpg'}, 1370983412: {'path': 'temp/1751860857_3241999_1370983412_6d714488299ab3a870873b6a3359ebb7.jpg', 'extension': 'jpg'}, 1370983417: {'path': 'temp/1751860857_3241999_1370983417_3670391884e5faceb317eebc78df1f71.jpg', 'extension': 'jpg'}, 1370983422: {'path': 'temp/1751860857_3241999_1370983422_53b9e813277fb8a0f8e715c36ae09fe7.jpg', 'extension': 'jpg'}, 1370983426: {'path': 'temp/1751860857_3241999_1370983426_b67bc3586f3c8775204177f5ced4397f.jpg', 'extension': 'jpg'}, 1370983429: {'path': 'temp/1751860857_3241999_1370983429_7502f477a51b2e11878cee431faadcd5.jpg', 'extension': 'jpg'}, 1370984327: {'path': 'temp/1751860857_3241999_1370984327_6e45551dfd82f121b6a649f2e1eaf9a6.jpg', 'extension': 'jpg'}, 1370984387: {'path': 'temp/1751860857_3241999_1370984387_2d1f2dcc3c7b0c937ab0e985f51085bd.jpg', 'extension': 'jpg'}, 1370984478: {'path': 'temp/1751860857_3241999_1370984478_1cbbd0117c682d450c51ca3e4dcd4134.jpg', 'extension': 'jpg'}, 1370984541: {'path': 'temp/1751860857_3241999_1370984541_d761bfbc7b8d021d88a214c30d41b996.jpg', 'extension': 'jpg'}, 1370984606: {'path': 'temp/1751860857_3241999_1370984606_618e168ec3f52aaac9fd2c314ea341e3.jpg', 'extension': 'jpg'}, 1370984667: {'path': 'temp/1751860857_3241999_1370984667_3df4cfce4f42bfcd15049a32ef4d1304.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 = 24662593; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm_bis',)) dashboard list : (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm_bis',)) can't retrive data from the dashboard with the suffix, please check suffix After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24662593]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1370984667, 1370984606, 1370984541, 1370984478, 1370984387, 1370984327, 1370983429, 1370983426, 1370983422, 1370983417, 1370983412, 1370983407] map_info['map_portfolio_photo'] : {24662593: [1370984667, 1370984606, 1370984541, 1370984478, 1370984387, 1370984327, 1370983429, 1370983426, 1370983422, 1370983417, 1370983412, 1370983407, 1370983404, 1370983401, 1370983399, 1370983397, 1370983393, 1370983390, 1370983380, 1370983376, 1370983374, 1370983373, 1370983372, 1370983370, 1370983358, 1370983356, 1370983354, 1370983351, 1370983349, 1370983345, 1370983340, 1370983337, 1370983335, 1370983332, 1370983328, 1370983324, 1370983315, 1370983313, 1370983311, 1370983308, 1370983306, 1370983301, 1370983289, 1370983287, 1370983284, 1370983282, 1370983278, 1370983273, 1370983264, 1370983262, 1370983260, 1370983258, 1370983256, 1370983253, 1370983238, 1370983237, 1370983236, 1370983235, 1370983230, 1370983227, 1370983213, 1370983210, 1370983207, 1370983205, 1370983202, 1370983200, 1370983187, 1370983183, 1370983181, 1370983180, 1370983179, 1370983177, 1370983165, 1370983163, 1370983161, 1370983160, 1370983158, 1370983156, 1370983144, 1370983143, 1370983142, 1370983133, 1370983126, 1370983122]} final : True mtd_id 4302 list_pids : [1370984667, 1370984606, 1370984541, 1370984478, 1370984387, 1370984327, 1370983429, 1370983426, 1370983422, 1370983417, 1370983412, 1370983407] Looping around the photos to save general results object of type 'int' has no len() begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '24662593', '1370984667', '0', '0', '-1.0', '501120777', '1.0', '3243347'), ('4302', '24662593', '1370984606', '0', '0', '-1.0', '501120777', '1.0', '3243347'), ('4302', '24662593', '1370984541', '0', '0', '-1.0', '501120777', '1.0', '3243347'), ('4302', '24662593', '1370984478', '0', '0', '-1.0', '501120777', '1.0', '3243347'), ('4302', '24662593', '1370984387', '0', '0', '-1.0', '501120777', '1.0', '3243347'), ('4302', '24662593', '1370984327', '0', '0', '-1.0', '501120777', '1.0', '3243347'), ('4302', '24662593', '1370983429', '0', '0', '-1.0', '501120777', '1.0', '3243347'), ('4302', '24662593', '1370983426', '0', '0', '-1.0', '501120777', '1.0', '3243347'), ('4302', '24662593', '1370983422', '0', '0', '-1.0', '501120777', '1.0', '3243347'), ('4302', '24662593', '1370983417', '0', '0', '-1.0', '501120777', '1.0', '3243347'), ('4302', '24662593', '1370983412', '0', '0', '-1.0', '501120777', '1.0', '3243347'), ('4302', '24662593', '1370983407', '0', '0', '-1.0', '501120777', '1.0', '3243347')] time used for this insertion : 0.017397642135620117 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.02344989776611328 time spend to save output : 0.017571687698364258 total time spend for step 5 : 0.04102158546447754 UPDATE MTRPhoto.mtr_datou_current SET state=-11, hostname='marlene' WHERE id in (3243347) 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 (3243347) 2.02user 2.44system 0:04.58elapsed 97%CPU (0avgtext+0avgdata 158956maxresident)k 72inputs+5616outputs (1major+64039minor)pagefaults 0swaps