)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"a0c87b0761979a5062e65df0bf1ed6e599b8083c","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2017-10-18 08:44:24 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add more backoff functions"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I0bffd9249f8a0d466ecea1ac36d8adc37b742238"},{"line_number":10,"context_line":"Implement: blueprint support-more-backoff-functions"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"3f4b6375_3da9df7a","line":8,"updated":"2017-10-19 09:25:09.000000000","message":"And the commit message Please","commit_id":"9dbb571c20b4b961027f1717ab0e69977d921215"}],"doc/source/user/index.rst":[{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"ee1bf4e278da2095595d8fa23e7ad9a110c2f27d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"3f4b6375_5d35bbd9","line":14,"updated":"2017-10-19 09:24:04.000000000","message":"I think \"retry_backoff_function\" is a part of \"notification_delivery_policy\". There is no need to create a need page. Thought?","commit_id":"9dbb571c20b4b961027f1717ab0e69977d921215"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"a86046e826f1b107c0afa32fbe7b313f83acecd9","unresolved":false,"context_lines":[{"line_number":10,"context_line":"   authentication_tokens"},{"line_number":11,"context_line":"   headers_queue_api_working"},{"line_number":12,"context_line":"   notification_delivery_policy"},{"line_number":13,"context_line":"   retry_backoff_function"}],"source_content_type":"text/x-rst","patch_set":15,"id":"3f4b6375_a52fb89f","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":25},"updated":"2017-10-23 01:09:24.000000000","message":"as I said before, I don\u0027t think we should create a new page here. The \"retry_backoff_function\" belongs to \"notification_delivery_policy\" IMO","commit_id":"03643988b0f64dd8ce02c1433d87342868da149c"},{"author":{"_account_id":21387,"name":"gecong","email":"ge.cong@zte.com.cn","username":"gecong"},"change_message_id":"0f8ce84132e55b8792f37f5422d87ec41bc1a683","unresolved":false,"context_lines":[{"line_number":10,"context_line":"   authentication_tokens"},{"line_number":11,"context_line":"   headers_queue_api_working"},{"line_number":12,"context_line":"   notification_delivery_policy"},{"line_number":13,"context_line":"   retry_backoff_function"}],"source_content_type":"text/x-rst","patch_set":15,"id":"3f4b6375_49c36139","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":25},"in_reply_to":"3f4b6375_a52fb89f","updated":"2017-10-24 00:38:40.000000000","message":"Done","commit_id":"03643988b0f64dd8ce02c1433d87342868da149c"}],"doc/source/user/retry_backoff_function.rst":[{"author":{"_account_id":22484,"name":"gengchc2","email":"geng.changcai2@zte.com.cn","username":"gengchc2"},"change_message_id":"a4b9229fa9155b59c3ed746b3ee8aca4ad2e220f","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"2. Create a subscription with options like queue\u0027s metadata above. If user"},{"line_number":61,"context_line":"   don\u0027t set the options, Zaqar will use the retry policy in queue\u0027s metadata."},{"line_number":62,"context_line":"   If user do it, Zaqar will use the retry policy in options by default"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"3f4b6375_87a78850","line":62,"range":{"start_line":62,"start_character":3,"end_line":62,"end_character":71},"updated":"2017-10-18 07:04:32.000000000","message":"\"the retry policy in options by default\" should be subscription\u0027s option, the description here is not clear.","commit_id":"ce735271ff3b707e38257c89bcbe6b77ad654fae"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"b367b7ee6d9c1e75ed77a904c6e4e369bb6bbf4f","unresolved":false,"context_lines":[{"line_number":1,"context_line":".."},{"line_number":2,"context_line":"      Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":3,"context_line":"      not use this file except in compliance with the License. You may obtain"},{"line_number":4,"context_line":"      a copy of the License at"}],"source_content_type":"text/x-rst","patch_set":17,"id":"3f4b6375_29f82547","line":1,"updated":"2017-10-24 00:59:12.000000000","message":"You should move this page to \"notification_delivery_policy\" as well.","commit_id":"63d95b4efe8d811ce0440c1443d2f83eba2d82a3"},{"author":{"_account_id":21387,"name":"gecong","email":"ge.cong@zte.com.cn","username":"gecong"},"change_message_id":"b0325cdb66b9f59d4f080c0bb96991ca73d3d292","unresolved":false,"context_lines":[{"line_number":1,"context_line":".."},{"line_number":2,"context_line":"      Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":3,"context_line":"      not use this file except in compliance with the License. You may obtain"},{"line_number":4,"context_line":"      a copy of the License at"}],"source_content_type":"text/x-rst","patch_set":17,"id":"3f4b6375_695e1d45","line":1,"in_reply_to":"3f4b6375_29f82547","updated":"2017-10-24 01:08:22.000000000","message":"Done","commit_id":"63d95b4efe8d811ce0440c1443d2f83eba2d82a3"}],"releasenotes/notes/support-more-backoff-functions-41e02a5977341576.yaml":[{"author":{"_account_id":22484,"name":"gengchc2","email":"geng.changcai2@zte.com.cn","username":"gengchc2"},"change_message_id":"a4b9229fa9155b59c3ed746b3ee8aca4ad2e220f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    the notification is sent from Zaqar to the subscriber failed."},{"line_number":5,"context_line":"    User can define the retry backoff function in metadata of queue."},{"line_number":6,"context_line":"    there are four retry backoff function as follows:  \u0027linear\u0027,"},{"line_number":7,"context_line":"    \u0027arithmetic\u0027, \u0027geometric\u0027 and \t\u0027exponential\u0027."}],"source_content_type":"text/x-yaml","patch_set":12,"id":"3f4b6375_e75e3c44","line":7,"range":{"start_line":7,"start_character":34,"end_line":7,"end_character":35},"updated":"2017-10-18 07:04:32.000000000","message":"Extra characters","commit_id":"ce735271ff3b707e38257c89bcbe6b77ad654fae"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"ee1bf4e278da2095595d8fa23e7ad9a110c2f27d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Support retry backoff function in webhook type. It will work when"},{"line_number":4,"context_line":"    the notification is sent from Zaqar to the subscriber failed."},{"line_number":5,"context_line":"    User can define the retry backoff function in metadata of queue,"},{"line_number":6,"context_line":"    there are four retry backoff function including  \u0027linear\u0027,"}],"source_content_type":"text/x-yaml","patch_set":14,"id":"3f4b6375_9de69316","line":3,"range":{"start_line":3,"start_character":4,"end_line":3,"end_character":11},"updated":"2017-10-19 09:24:04.000000000","message":"Support more","commit_id":"9dbb571c20b4b961027f1717ab0e69977d921215"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"ee1bf4e278da2095595d8fa23e7ad9a110c2f27d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Support retry backoff function in webhook type. It will work when"},{"line_number":4,"context_line":"    the notification is sent from Zaqar to the subscriber failed."},{"line_number":5,"context_line":"    User can define the retry backoff function in metadata of queue,"},{"line_number":6,"context_line":"    there are four retry backoff function including  \u0027linear\u0027,"},{"line_number":7,"context_line":"    \u0027arithmetic\u0027, \u0027geometric\u0027 and \u0027exponential\u0027."}],"source_content_type":"text/x-yaml","patch_set":14,"id":"3f4b6375_fd93474e","line":4,"range":{"start_line":3,"start_character":52,"end_line":4,"end_character":65},"updated":"2017-10-19 09:24:04.000000000","message":"It will work when Zaqar failed to send the notification to the subscriber.","commit_id":"9dbb571c20b4b961027f1717ab0e69977d921215"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"ee1bf4e278da2095595d8fa23e7ad9a110c2f27d","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Support retry backoff function in webhook type. It will work when"},{"line_number":4,"context_line":"    the notification is sent from Zaqar to the subscriber failed."},{"line_number":5,"context_line":"    User can define the retry backoff function in metadata of queue,"},{"line_number":6,"context_line":"    there are four retry backoff function including  \u0027linear\u0027,"},{"line_number":7,"context_line":"    \u0027arithmetic\u0027, \u0027geometric\u0027 and \u0027exponential\u0027."}],"source_content_type":"text/x-yaml","patch_set":14,"id":"3f4b6375_fdd6a74f","line":5,"range":{"start_line":5,"start_character":67,"end_line":5,"end_character":68},"updated":"2017-10-19 09:24:04.000000000","message":".","commit_id":"9dbb571c20b4b961027f1717ab0e69977d921215"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"ee1bf4e278da2095595d8fa23e7ad9a110c2f27d","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Support retry backoff function in webhook type. It will work when"},{"line_number":4,"context_line":"    the notification is sent from Zaqar to the subscriber failed."},{"line_number":5,"context_line":"    User can define the retry backoff function in metadata of queue,"},{"line_number":6,"context_line":"    there are four retry backoff function including  \u0027linear\u0027,"},{"line_number":7,"context_line":"    \u0027arithmetic\u0027, \u0027geometric\u0027 and \u0027exponential\u0027."}],"source_content_type":"text/x-yaml","patch_set":14,"id":"3f4b6375_9d97b391","line":5,"range":{"start_line":5,"start_character":4,"end_line":5,"end_character":8},"updated":"2017-10-19 09:24:04.000000000","message":"Users","commit_id":"9dbb571c20b4b961027f1717ab0e69977d921215"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"ee1bf4e278da2095595d8fa23e7ad9a110c2f27d","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Support retry backoff function in webhook type. It will work when"},{"line_number":4,"context_line":"    the notification is sent from Zaqar to the subscriber failed."},{"line_number":5,"context_line":"    User can define the retry backoff function in metadata of queue,"},{"line_number":6,"context_line":"    there are four retry backoff function including  \u0027linear\u0027,"},{"line_number":7,"context_line":"    \u0027arithmetic\u0027, \u0027geometric\u0027 and \u0027exponential\u0027."}],"source_content_type":"text/x-yaml","patch_set":14,"id":"3f4b6375_7dc2b787","line":6,"range":{"start_line":6,"start_character":4,"end_line":6,"end_character":9},"updated":"2017-10-19 09:24:04.000000000","message":"There","commit_id":"9dbb571c20b4b961027f1717ab0e69977d921215"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"ee1bf4e278da2095595d8fa23e7ad9a110c2f27d","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Support retry backoff function in webhook type. It will work when"},{"line_number":4,"context_line":"    the notification is sent from Zaqar to the subscriber failed."},{"line_number":5,"context_line":"    User can define the retry backoff function in metadata of queue,"},{"line_number":6,"context_line":"    there are four retry backoff function including  \u0027linear\u0027,"},{"line_number":7,"context_line":"    \u0027arithmetic\u0027, \u0027geometric\u0027 and \u0027exponential\u0027."}],"source_content_type":"text/x-yaml","patch_set":14,"id":"3f4b6375_dd408b0a","line":6,"range":{"start_line":6,"start_character":33,"end_line":6,"end_character":41},"updated":"2017-10-19 09:24:04.000000000","message":"functions","commit_id":"9dbb571c20b4b961027f1717ab0e69977d921215"}],"zaqar/notification/tasks/webhook.py":[{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"ee1bf4e278da2095595d8fa23e7ad9a110c2f27d","unresolved":false,"context_lines":[{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def _Linear_function(minimum_delay, maximum_delay, times):"},{"line_number":29,"context_line":"    return range(minimum_delay, maximum_delay, times)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def _Geometric_function(minimum_delay, maximum_delay, times):"},{"line_number":33,"context_line":"    x_max \u003d int((maximum_delay - minimum_delay) / times)"},{"line_number":34,"context_line":"    k \u003d math.pow(10, math.log10(maximum_delay/minimum_delay)/(x_max-1))"},{"line_number":35,"context_line":"    xarray \u003d range(1, x_max+1)"},{"line_number":36,"context_line":"    return [int(minimum_delay*math.pow(k, a-1)) for a in xarray]"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def _Exponential_function(minimum_delay, maximum_delay, times):"},{"line_number":40,"context_line":"    x_max \u003d int((maximum_delay - minimum_delay) / times)"},{"line_number":41,"context_line":"    k \u003d math.pow(10, math.log10(maximum_delay/minimum_delay)/(x_max-1))"},{"line_number":42,"context_line":"    p \u003d minimum_delay/k"},{"line_number":43,"context_line":"    xarray \u003d range(1, x_max+1)"},{"line_number":44,"context_line":"    return [int(p*math.pow(k, a)) for a in xarray]"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def _Arithmetic_function(minimum_delay, maximum_delay, times):"},{"line_number":48,"context_line":"    x_max \u003d int((maximum_delay - minimum_delay) / times)"},{"line_number":49,"context_line":"    d \u003d 2.0 * (maximum_delay - minimum_delay) / (x_max * (x_max - 1))"},{"line_number":50,"context_line":"    xarray \u003d range(1, x_max+1)"},{"line_number":51,"context_line":"    return [int(minimum_delay+(a-1)*a*d/2) for a in xarray]"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"RETRY_BACKOFF_FUNCTION_MAP \u003d {\u0027linear\u0027: _Linear_function,"},{"line_number":55,"context_line":"                              \u0027arithmetic\u0027: _Arithmetic_function,"},{"line_number":56,"context_line":"                              \u0027geometric\u0027: _Geometric_function,"},{"line_number":57,"context_line":"                              \u0027exponential\u0027: _Exponential_function}"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"class WebhookTask(object):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f4b6375_dd83eb03","line":57,"range":{"start_line":28,"start_character":0,"end_line":57,"end_character":67},"updated":"2017-10-19 09:24:04.000000000","message":"IMO, use Base/Sub Class way is more pythonic. :).\nAny way, it\u0027s OK here.","commit_id":"9dbb571c20b4b961027f1717ab0e69977d921215"}],"zaqar/transport/validation.py":[{"author":{"_account_id":22484,"name":"gengchc2","email":"geng.changcai2@zte.com.cn","username":"gengchc2"},"change_message_id":"a4b9229fa9155b59c3ed746b3ee8aca4ad2e220f","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                    if retry_value and not isinstance(retry_value, str):"},{"line_number":252,"context_line":"                        msg \u003d _(\u0027retry_backoff_function must be a string.\u0027)"},{"line_number":253,"context_line":"                        raise ValidationFailed(msg)"},{"line_number":254,"context_line":"                    # Now we support linear,arithmetic,"},{"line_number":255,"context_line":"                    # exponential and geometric retry backoff function."},{"line_number":256,"context_line":"                    fun \u003d {\u0027linear\u0027, \u0027arithmetic\u0027, \u0027exponential\u0027, \u0027geometric\u0027}"},{"line_number":257,"context_line":"                    if retry_value and retry_value not in fun:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f4b6375_0a883f1d","line":254,"range":{"start_line":254,"start_character":43,"end_line":254,"end_character":54},"updated":"2017-10-18 07:04:32.000000000","message":"Missing space","commit_id":"ce735271ff3b707e38257c89bcbe6b77ad654fae"}]}
