Skip to content

Change Wait time from 60 seconds to something more dynamic #10

Closed
cho00013 opened this issue Feb 7, 2022 · 3 comments
Closed

Change Wait time from 60 seconds to something more dynamic #10

cho00013 opened this issue Feb 7, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@cho00013
Copy link
Contributor

cho00013 commented Feb 7, 2022

Currently the code waits for 60 seconds (defined in ENV Variable). This appears to be random and not necessarily best use of the time/resource. Determine a way to shorten the wait period while confirming certain resources are available.

` # Only doing something if the state is running
if state == 'running':
LOGGER.debug("sleeping for {} seconds {}".format(SLEEPTIME, lineno()))

    if "pytest" in sys.modules:
        # called from within a test run
        time.sleep(1)
    else:
        # called "normally"
        time.sleep(SLEEPTIME)`

The approach will be the reduce the time of wait but perform some DESCRIBE EC2 API calls and validate that the information is there and loop wait if needed until the max time (60).

@cho00013 cho00013 added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Feb 7, 2022
@cho00013
Copy link
Contributor Author

Looking to change in the next round.

@cho00013
Copy link
Contributor Author

Submitted pull request
#11

@cho00013 cho00013 self-assigned this Feb 22, 2022
@cho00013
Copy link
Contributor Author

Closing this out as the code is updated

Sign in to join this conversation on GitHub.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant