Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

is it better to create new DAVClients or reuse one DAVClient for long-term repeated syncing tasks?

Đã đóng
#612 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
30/100
Loại issue
Tài liệu
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
documentation

Hướng nghiên cứu

Start by reading the DAVClient usage guidance and the two lifecycle examples in the issue. Determine whether clients are intended to be reused or recreated for repeated syncs, then provide clear guidance or an example; done means the long-term usage question is answered.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

hi,
thanks for this package. i am working on a calendar syncing app using the DAVClient. as i did not find an example on that topic, how is it supposed to be used for long-term usage with repeated syncing tasks? either closing and creating a new DAVClient for every syncing run or should it be only one DAVClient being used all the time?

e.g. pseudo code

cal_primary = "..."

while True:
    client = caldav.DAVClient(cal_primary, username="...", password="...")
    principal = client.principal()
    calendars = self.principal.calendars()
    # do something with the calendars
    client.close()
   time.sleep(60)

or

cal_primary = "..."
client = caldav.DAVClient(cal_primary, username="...", password="...")
principal = client.principal()

while True:
    calendars = self.principal.calendars()
    # do something with the calendars
   time.sleep(60)

in my use case i use the APScheduler package [1]

[1] https://github.com/agronholm/apscheduler

Ngôn ngữ chính
Python
Star
412
Fork
113
Merge trung bình
10 giờ 29 phút
Pull request đã merge (30 ngày)
57

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của python-caldav/caldav

Tất cả issue của python-caldav/caldav

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.