Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
U
uws_framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
ASTRON SDC
uws_framework
Commits
05988460
Commit
05988460
authored
Sep 13, 2021
by
Mattia Mancini
Browse files
Options
Downloads
Patches
Plain Diff
Add missing file and README description
parent
f9db64e1
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+36
-0
36 additions, 0 deletions
README.md
uws_server/manage.py
+22
-0
22 additions, 0 deletions
uws_server/manage.py
with
58 additions
and
0 deletions
README.md
+
36
−
0
View file @
05988460
# Universal Worker Service Framework
Implemented in Django and djangorestframework the uws_framework is meant to enable UWS compatibility of your task
server. The UWS is a IVOA specification for async services _(please find more details
at https://ivoa.net/documents/UWS/20161024/REC-UWS-1.1-20161024.html)_
## Quick start
The following assumes that you are in the uws_server directory and that such directory is in the python path of your
active python environment.
Before deploying the service you have to create the database. Such operation is completely automatic thanks to Django
all you have to do is specify the database server you want to use in the database section of
`uws_server/settings.py`
After that the migrations have to be created and applied. This can be done with
```
$ python manage.py makemigrations
$ python manage.py migrate
```
To spawn a test server you can run the command:
```
$ python manage.py runserver
```
Executing the above operations will only enable the rest interface of the UWS framework. To completely use the service
you have to execute also the job scheduler. To do so you have to execute the script
```
$ bin/job_scheduler.py
```
As this is a framework nothing is implemented to the actual execution of the any job. To implement the execution method
you have to implement a task adapter and export it in the
`settings.py`
file.
An abstract class is available at the path
`uws_procedures/tasks.py`
. Furthermore, a test implementation is in
`test_tasks/tasks.py`
.
This diff is collapsed.
Click to expand it.
uws_server/manage.py
0 → 100755
+
22
−
0
View file @
05988460
#!/usr/bin/env python
"""
Django
'
s command-line utility for administrative tasks.
"""
import
os
import
sys
def
main
():
"""
Run administrative tasks.
"""
os
.
environ
.
setdefault
(
'
DJANGO_SETTINGS_MODULE
'
,
'
uws_server.settings
'
)
try
:
from
django.core.management
import
execute_from_command_line
except
ImportError
as
exc
:
raise
ImportError
(
"
Couldn
'
t import Django. Are you sure it
'
s installed and
"
"
available on your PYTHONPATH environment variable? Did you
"
"
forget to activate a virtual environment?
"
)
from
exc
execute_from_command_line
(
sys
.
argv
)
if
__name__
==
'
__main__
'
:
main
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment