)]}'
{"karbor/services/operationengine/engine/triggers/timetrigger/time_trigger.py":[{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"f4f522d08ac25e48e84a9a74ff8f595f4966a1eb","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            # during the green thread is switched out, copy self._operation_ids"},{"line_number":223,"context_line":"            # as the iterative object."},{"line_number":224,"context_line":"            operation_ids \u003d self._operation_ids.copy()"},{"line_number":225,"context_line":"            sended_ops \u003d set()"},{"line_number":226,"context_line":"            for operation_id in operation_ids:"},{"line_number":227,"context_line":"                if operation_id not in self._operation_ids:"},{"line_number":228,"context_line":"                    # Maybe, when traversing this operation_id, it has been"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_d38fdc72","line":225,"range":{"start_line":225,"start_character":12,"end_line":225,"end_character":22},"updated":"2016-12-06 16:22:57.000000000","message":"sent_ops","commit_id":"abd1c25546162af915047ffe57cc0d13b2b5fd8b"},{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"1b08e3ab538285b1ee988b0c81684989777c2c96","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            # during the green thread is switched out, copy self._operation_ids"},{"line_number":223,"context_line":"            # as the iterative object."},{"line_number":224,"context_line":"            operation_ids \u003d self._operation_ids.copy()"},{"line_number":225,"context_line":"            sended_ops \u003d set()"},{"line_number":226,"context_line":"            for operation_id in operation_ids:"},{"line_number":227,"context_line":"                if operation_id not in self._operation_ids:"},{"line_number":228,"context_line":"                    # Maybe, when traversing this operation_id, it has been"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_5f6c6008","line":225,"range":{"start_line":225,"start_character":12,"end_line":225,"end_character":22},"in_reply_to":"3a71b18c_d38fdc72","updated":"2016-12-08 07:12:23.000000000","message":"Done","commit_id":"abd1c25546162af915047ffe57cc0d13b2b5fd8b"},{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"f4f522d08ac25e48e84a9a74ff8f595f4966a1eb","unresolved":false,"context_lines":[{"line_number":224,"context_line":"            operation_ids \u003d self._operation_ids.copy()"},{"line_number":225,"context_line":"            sended_ops \u003d set()"},{"line_number":226,"context_line":"            for operation_id in operation_ids:"},{"line_number":227,"context_line":"                if operation_id not in self._operation_ids:"},{"line_number":228,"context_line":"                    # Maybe, when traversing this operation_id, it has been"},{"line_number":229,"context_line":"                    # removed by self.unregister_operation"},{"line_number":230,"context_line":"                    LOG.warn(_LW(\"Execuete operation %s which is not exist, \""},{"line_number":231,"context_line":"                                 \"ignore it\"), operation_id)"},{"line_number":232,"context_line":"                    continue"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"                now \u003d datetime.utcnow()"},{"line_number":235,"context_line":"                if now \u003e\u003d end_time:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_537bcc7a","line":232,"range":{"start_line":227,"start_character":16,"end_line":232,"end_character":28},"updated":"2016-12-06 16:22:57.000000000","message":"I don\u0027t understand why this is even an issue. The list was copied 3 lines ago. This is such a close time frame that it doesn\u0027t matter if it was cancelled or not.\n\nIf you actually want to check at the last moment this needs to be done when the executor actually executes the callback.","commit_id":"abd1c25546162af915047ffe57cc0d13b2b5fd8b"},{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"1b08e3ab538285b1ee988b0c81684989777c2c96","unresolved":false,"context_lines":[{"line_number":224,"context_line":"            operation_ids \u003d self._operation_ids.copy()"},{"line_number":225,"context_line":"            sended_ops \u003d set()"},{"line_number":226,"context_line":"            for operation_id in operation_ids:"},{"line_number":227,"context_line":"                if operation_id not in self._operation_ids:"},{"line_number":228,"context_line":"                    # Maybe, when traversing this operation_id, it has been"},{"line_number":229,"context_line":"                    # removed by self.unregister_operation"},{"line_number":230,"context_line":"                    LOG.warn(_LW(\"Execuete operation %s which is not exist, \""},{"line_number":231,"context_line":"                                 \"ignore it\"), operation_id)"},{"line_number":232,"context_line":"                    continue"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"                now \u003d datetime.utcnow()"},{"line_number":235,"context_line":"                if now \u003e\u003d end_time:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_a2c39b89","line":232,"range":{"start_line":227,"start_character":16,"end_line":232,"end_character":28},"in_reply_to":"3a71b18c_537bcc7a","updated":"2016-12-08 07:12:23.000000000","message":"Here, it involves the interface of \u0027delete_scheduled_operation\u0027 at operationengine/manager.py. When it is invoked, it will notify the trigger to unregister the operation and the executor to cancel it. So, trigger should not send canceled operation to executor.","commit_id":"abd1c25546162af915047ffe57cc0d13b2b5fd8b"},{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"f4f522d08ac25e48e84a9a74ff8f595f4966a1eb","unresolved":false,"context_lines":[{"line_number":231,"context_line":"                                 \"ignore it\"), operation_id)"},{"line_number":232,"context_line":"                    continue"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"                now \u003d datetime.utcnow()"},{"line_number":235,"context_line":"                if now \u003e\u003d end_time:"},{"line_number":236,"context_line":"                    LOG.error(_LE(\"Can not trigger operations to run. \""},{"line_number":237,"context_line":"                                  \"Because it is out of window time. \""},{"line_number":238,"context_line":"                                  \"now\u003d%(now)s, end time\u003d%(end_time)s, \""},{"line_number":239,"context_line":"                                  \"expect run time\u003d%(expect)s, \""},{"line_number":240,"context_line":"                                  \"wating operations\u003d%(ops)s\"),"},{"line_number":241,"context_line":"                              {\u0027now\u0027: now, \u0027end_time\u0027: end_time,"},{"line_number":242,"context_line":"                               \u0027expect\u0027: expect_run_time,"},{"line_number":243,"context_line":"                               \u0027ops\u0027: operation_ids - sended_ops})"},{"line_number":244,"context_line":"                    break"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"                try:"},{"line_number":247,"context_line":"                    self._executor.execute_operation("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_936ba4b6","line":244,"range":{"start_line":234,"start_character":16,"end_line":244,"end_character":25},"updated":"2016-12-06 16:22:57.000000000","message":"This can be checked outside of the for loop. Can even be checked between 210-211","commit_id":"abd1c25546162af915047ffe57cc0d13b2b5fd8b"},{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"1b08e3ab538285b1ee988b0c81684989777c2c96","unresolved":false,"context_lines":[{"line_number":231,"context_line":"                                 \"ignore it\"), operation_id)"},{"line_number":232,"context_line":"                    continue"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"                now \u003d datetime.utcnow()"},{"line_number":235,"context_line":"                if now \u003e\u003d end_time:"},{"line_number":236,"context_line":"                    LOG.error(_LE(\"Can not trigger operations to run. \""},{"line_number":237,"context_line":"                                  \"Because it is out of window time. \""},{"line_number":238,"context_line":"                                  \"now\u003d%(now)s, end time\u003d%(end_time)s, \""},{"line_number":239,"context_line":"                                  \"expect run time\u003d%(expect)s, \""},{"line_number":240,"context_line":"                                  \"wating operations\u003d%(ops)s\"),"},{"line_number":241,"context_line":"                              {\u0027now\u0027: now, \u0027end_time\u0027: end_time,"},{"line_number":242,"context_line":"                               \u0027expect\u0027: expect_run_time,"},{"line_number":243,"context_line":"                               \u0027ops\u0027: operation_ids - sended_ops})"},{"line_number":244,"context_line":"                    break"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"                try:"},{"line_number":247,"context_line":"                    self._executor.execute_operation("}],"source_content_type":"text/x-python","patch_set":2,"id":"3a71b18c_f59b8b70","line":244,"range":{"start_line":234,"start_character":16,"end_line":244,"end_character":25},"in_reply_to":"3a71b18c_936ba4b6","updated":"2016-12-08 07:12:23.000000000","message":"It is different from 210-211. At 210-211, if entry_time \u003e\u003d end_time, it will not send any operation. Here, there is no need to send operation to executor when now \u003e\u003d end_time. Because it is out of window time set in trigger property.\nBut, I think the codes at 210-211 can be deleted. Because its logic is involved here.","commit_id":"abd1c25546162af915047ffe57cc0d13b2b5fd8b"}]}
