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 scheduled task to publish homeworks #64

Closed
vityaman opened this issue Apr 20, 2024 · 4 comments · Fixed by #114
Closed

Add scheduled task to publish homeworks #64

vityaman opened this issue Apr 20, 2024 · 4 comments · Fixed by #114
Labels
enhancement New feature or request

Comments

@vityaman
Copy link
Member

  • Write to console log as prototype
  • Restrict activity on unpublished homework
@vityaman vityaman added the enhancement New feature or request label Apr 20, 2024
@vityaman
Copy link
Member Author

Use quarz

@vityaman
Copy link
Member Author

vityaman commented May 17, 2024

auto howework_ids = SelectPublishableHomeworks().Shuffled();
for (auto howework_id : howework_ids) {
  transactionally(SERIALIZABLE, [&] {
    auto homework = SelectForUpdate(howework_id);
    if (homework.isPublishable) {
      markAsPublished(homework);
      publish(homework);
    }
  });
}

@vityaman vityaman linked a pull request May 17, 2024 that will close this issue
@vityaman
Copy link
Member Author

Need to add a message broker

@vityaman vityaman reopened this May 17, 2024
@vityaman
Copy link
Member Author

This will be done at #72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant