Skip to content

Commit

Permalink
Drop explict 3 seconds pause between two object updates/deletes. (son…
Browse files Browse the repository at this point in the history
…ic-net#1359)

- What I did
Drop explicitly introduced 3 seconds pause between object updates using configlet.

- How I did it
Remove the added time.sleep(3)

- How to verify it
Add 10 objects using old code and see it takes 30+ seconds. Repeat the same with this updated code which would complete in small fraction of a second.

Verified ASIC-DB contents to the extent possible in both scenarios of applying objects using old code with 3 seconds pause and new code w/o any explicit pause, to be the same.
  • Loading branch information
renukamanavalan authored and anand-kumar-subramanian committed Mar 2, 2021
1 parent d98f4a5 commit cc2f788
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions scripts/configlet
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ A sample for update:

import argparse
import json
import time

from swsssdk import ConfigDBConnector

Expand Down Expand Up @@ -204,11 +203,6 @@ def main():
if parse_only == False:
for i in data:
process_entry (do_update, i)
# Artificial sleep to give a pause between two entries
# so as to ensure that all internal daemons have digested the
# previous update, before the next one arrives.
#
time.sleep(3)
else:
print("Parsed:")
print(data)
Expand Down

0 comments on commit cc2f788

Please sign in to comment.