Skip to content
Snippets Groups Projects

double timeout each try

Merged Karim Ahmed requested to merge feat/double_timeout_caltools into master
2 unresolved threads

@karnem this feature doubles the timeout each try while trying to send or retrieve a constant from database

Merge request reports

Approval is optional

Merged by Karim AhmedKarim Ahmed 5 years ago (Jan 16, 2020 12:51pm UTC)

Merge details

  • Changes merged into master with 6dbcd61b.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
354 355 break
355 356 except zmq.error.Again:
356 357 ntries -= 1
358 timeout *= 2
357 359 sleep(np.random.randint(30))
358 360 if ntries == 0 and doraise:
  • Karim Ahmed added 1 commit

    added 1 commit

    • 619774eb - decrease number of tries to 7

    Compare with previous version

  • Karim Ahmed
  • 237 237
    238 238 def get_from_db(device, constant, condition, empty_constant,
    239 239 cal_db_interface, creation_time=None,
    240 verbosity=1, timeout=30000, ntries=120, meta_only=True,
    240 verbosity=1, timeout=30000, ntries=7, meta_only=True,
  • Thank you for the review

  • merged

  • Karim Ahmed mentioned in commit 6dbcd61b

    mentioned in commit 6dbcd61b

  • Please register or sign in to reply
    Loading