SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 680e21a8 authored by George Katsikas's avatar George Katsikas :goat:
Browse files

change git repo creation running to hourly cronjob

parent a27e9df5
No related branches found
No related tags found
1 merge request!43Polish up new production page
#!/bin/bash #!/bin/bash
# Per minute cronjobs for production area # Per hour cronjobs for production area
cd /home/scipost/SciPost/scipost_django cd /home/scipost/SciPost/scipost_django
source ../venv-3.8.5/bin/activate source ../venv-3.8.5/bin/activate
...@@ -8,6 +8,7 @@ source ../venv-3.8.5/bin/activate ...@@ -8,6 +8,7 @@ source ../venv-3.8.5/bin/activate
# Do tasks # Do tasks
python manage.py check_celery --settings=SciPost_v1.settings.production_do1 python manage.py check_celery --settings=SciPost_v1.settings.production_do1
python manage.py update_coi_via_arxiv --settings=SciPost_v1.settings.production_do1 python manage.py update_coi_via_arxiv --settings=SciPost_v1.settings.production_do1
python manage.py advance_git_repos --settings=SciPost_v1.settings.production_do1
# Do a update_index of the last hour # Do a update_index of the last hour
python manage.py update_index -r -v 0 -a 1 --settings=SciPost_v1.settings.production_do1 python manage.py update_index -r -v 0 -a 1 --settings=SciPost_v1.settings.production_do1
...@@ -88,3 +88,8 @@ CSP_REPORT_ONLY = False ...@@ -88,3 +88,8 @@ CSP_REPORT_ONLY = False
CORS_ALLOWED_ORIGINS = [ CORS_ALLOWED_ORIGINS = [
"https://git.scipost.org", "https://git.scipost.org",
] ]
# GitLab API
GITLAB_ROOT = "SciPost"
GITLAB_URL = "git.scipost.org"
GITLAB_KEY = get_secret("GITLAB_KEY")
...@@ -376,20 +376,3 @@ def production_stream_create_proofs_repo(sender, instance, created, **kwargs): ...@@ -376,20 +376,3 @@ def production_stream_create_proofs_repo(sender, instance, created, **kwargs):
post_save.connect(production_stream_create_proofs_repo, sender=ProductionStream) post_save.connect(production_stream_create_proofs_repo, sender=ProductionStream)
@receiver(post_save, sender=ProofsRepository)
def advance_repo_on_gitlab(sender, instance, created, **kwargs):
"""
When a ProofsRepository instance is created, run the advance_git_repos command on it.
"""
if created:
from django.core import management
management.call_command(
"advance_git_repos",
id=instance.stream.submission.preprint.identifier_w_vn_nr,
)
post_save.connect(advance_repo_on_gitlab, sender=ProofsRepository)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment