Improve Ad Manager's WaitForReport polling mechanism
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 42/100
Hướng nghiên cứu
Bắt đầu trong googleads/ad_manager.py tại phương thức WaitForReport của AdManager, đặc biệt là lệnh gọi time.sleep(30) và các kiểm tra trạng thái dành riêng cho từng phiên bản. Xem xét luồng polling hiện có và xác định hành vi backoff dự kiến; hoàn tất có nghĩa là polling báo cáo vẫn đạt đến trạng thái COMPLETED hoặc FAILED trong khi sử dụng các khoảng trễ tăng dần.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Right now AdManager's WaitForReport waits for 30 seconds (via time.sleep(30)) if the report status is not COMPLETED or FAILED before checking the report status again.
Would it be reasonable to implement an exponential backoff strategy instead where we poll for the status of the report with an exponentially increasing delay? Something like the below seems to work:
wait_time_in_seconds = 1
exponential_backoff_multiplier = 2
...
while status != 'COMPLETED' and status != 'FAILED':
_data_downloader_logger.debug('Report job status: %s', status)
time.sleep(wait_time_in_seconds)
if report_downloader._version > 'v201502':
status = service.getReportJobStatus(report_job_id)
else:
status = service.getReportJob(report_job_id)['reportJobStatus']
# Wait longer if we have to poll the report status again.
wait_time_in_seconds *= exponential_backoff_multiplier
I will be happy to submit a PR if it makes sense to do the above change.
- Ngôn ngữ chính
- Python
- Star
- 749
- Fork
- 967
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của googleads/googleads-python-lib
-
[Bug] Potential Billion Laughs Attack Vector via Unrestricted XML Parsing in `ZeepSchemaHelper` Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
Create Native Creative - Issue Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
image-package Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 1/100
Tất cả issue của googleads/googleads-python-lib
Issue tương tự
-
[Bug] reef-hermes tells me to resume with hermes --resume, which does not work from my shell Đang mởarea: harness bug status: needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Human-Agent-Society/reef#625 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
learningequality/kolibri#15351 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Name consistency Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
eellak/triplestore#65 · 1 bình luận ·