Skip to content

Commit

Permalink
Misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
agahkarakuzu committed Sep 7, 2024
1 parent 845cb77 commit bde1608
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions api/screening_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,11 @@ def gh_response_template(self, message="", collapse=True):
else:
this_task_id = self.task_id

issue_comment_url = f"https://github.com/neurolibre/neurolibre-reviews/issues/{self.issue_id}#issuecomment-{this_comment_id}"
return {
"PENDING": f"⚫ **{self.task_name}**\n----------------------------\n**Status:** Waiting for task assignment\n**Last updated:** {cur_time}\n{message}",
"RECEIVED": f"⚪ **{self.task_name}**\n----------------------------\n**Status:** Assigned to task `{this_task_id[0:8]}`\n**Last updated:** {cur_time}\n{message}\n:recycle: [Refresh](https://github.com/neurolibre/neurolibre-reviews/issues/{self.issue_id}#issuecomment-{this_comment_id})",
"STARTED": f"🟠 **{self.task_name}**\n----------------------------\n**Status:** In progress `{this_task_id[0:8]}`\n**Last updated:** {cur_time}\n{message}\n:recycle: [Refresh](https://github.com/neurolibre/neurolibre-reviews/issues/{self.issue_id}#issuecomment-{this_comment_id})",
"RECEIVED": f"&#9898; **{self.task_name}**\n----------------------------\n**Status:** Assigned to task `{this_task_id[0:8]}`\n**Last updated:** {cur_time}\n{message}\n:recycle: <a href=\"{issue_comment_url}\">Refresh</a>)",
"STARTED": f"&#128992; **{self.task_name}**\n----------------------------\n**Status:** In progress `{this_task_id[0:8]}`\n**Last updated:** {cur_time}\n{message}\n:recycle: <a href=\"{issue_comment_url}\">Refresh</a>",
"SUCCESS": f"&#128994; **{self.task_name}**\n----------------------------\n**Status:** Success `{this_task_id[0:8]}`\n**Last updated:** {cur_time}\n{message}",
"FAILURE": f"&#128308; **{self.task_name}**\n----------------------------\n**Status:** Failed `{this_task_id[0:8]}`\n**Last updated:** {cur_time}\n{message}",
"EXISTS": f"&#128995; **{self.task_name}**\n----------------------------\n**Status:** Already exists `{this_task_id[0:8]}`\n**Last updated:** {cur_time}\n{message}",
Expand Down
3 changes: 2 additions & 1 deletion systemd/default/celery
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ CELERYD_MULTI="multi"
CELERYD_OPTS="--time-limit=300 --concurrency=8"
CELERYD_PID_FILE="/home/ubuntu/full-stack-server/api/neurolibre-celery/run/%n.pid"
CELERYD_LOG_FILE="/home/ubuntu/full-stack-server/api/neurolibre-celery/log/celery.log"
CELERYD_LOG_LEVEL="INFO"
CELERYD_LOG_LEVEL="INFO"
NODE_PATH="/home/ubuntu/.nvm/versions/node/v20.17.0/bin"
2 changes: 1 addition & 1 deletion systemd/neurolibre-celery.service
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ User=ubuntu
Group=www-data
EnvironmentFile=/etc/default/celery
WorkingDirectory=/home/ubuntu/full-stack-server/api
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${VENV_PATH}/bin"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${VENV_PATH}/bin:${NODE_PATH}"
Environment=GIT_PYTHON_GIT_EXECUTABLE=/usr/bin/git
Environment=CELERY_CREATE_DIRS=1
ExecStart=/bin/sh -c '${CUSTOM_START} ${CELERY_BIN} -A ${CELERY_APP} multi start ${CELERYD_NODES} \
Expand Down

0 comments on commit bde1608

Please sign in to comment.