Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for SUBMIT_SLEEP #6611

Merged
merged 1 commit into from
Nov 21, 2023
Merged

Conversation

berland
Copy link
Contributor

@berland berland commented Nov 20, 2023

Written assuming there will be a global option to set SUBMIT_SLEEP, but will currently pick from the selected queue system.

@berland berland self-assigned this Nov 20, 2023
@@ -159,6 +159,12 @@ def count_running(self) -> int:
for real in self._realizations
)

def count_submitted(self) -> int:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now you can do self.count_realization_state(RealizationState.SUBMITTED)

@xjules
Copy link
Contributor

xjules commented Nov 20, 2023

I think you need to rebase

@berland berland force-pushed the submit_sleep branch 2 times, most recently from 8eaea34 to ce7c01a Compare November 21, 2023 06:05
@berland
Copy link
Contributor Author

berland commented Nov 21, 2023

Should be ready now, with tests

+ self.count_realization_state(RealizationState.SUBMITTED)
< self.max_running()
):
if datetime.datetime.now() - time_of_last_submission >= submit_delta:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that this check is not required if we do await asyncio.sleep(self._queue_config.submit_sleep) or?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed now

Written assuming there will be a global option to set SUBMIT_SLEEP,
but will currently pick from the selected queue system.
@berland berland merged commit e9f0149 into equinor:python_jobqueue Nov 21, 2023
@xjules xjules deleted the submit_sleep branch November 21, 2023 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants