Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-bryson committed Mar 21, 2024
1 parent 96d128f commit 11ebef5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fetch-depth: 1

- name: Set up Python ${{ env.PY_VERSION }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ env.PY_VERSION }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/load_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: checkout
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Display Python version
Expand Down
18 changes: 7 additions & 11 deletions app/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,20 @@ def get_all_harvest_errors_by_job(job_id):
return result
except Exception:
return " provide job_id"

@mod.route('/harvest_source/<source_id>', methods=['GET'])
def get_harvest_source(source_id):
try:
result = db.get_harvest_source(source_id)
return result
except Exception:
return " provide source_id"


@mod.route("/harvest_source/<string:source_id>", methods=["PUT"])
def update_harvest_source(source_id):
result = db.update_harvest_source(source_id, request.json)
return result

@mod.route('/harvest_job/<job_id>', methods=['GET'])
def get_harvest_job(job_id):
try:
Expand All @@ -89,14 +94,5 @@ def get_harvest_error(error_id):
return "provide error_id"


@mod.route("/harvests/<string:source_id>", methods=["PUT"])
def update_harvest_source():
source_id = request.args.get("source_id", None)
if source_id is None:
return "Please provide a source_id"
else:
result = db.update_harvest_source(source_id, request.json)
return result

def register_routes(app):
app.register_blueprint(mod)

1 comment on commit 11ebef5

@github-actions
Copy link

Choose a reason for hiding this comment

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

Coverage

Coverage Report
FileStmtsMissCoverMissing
harvester
   __init__.py50100% 
   ckan_utils.py4222 95%
   exceptions.py420100% 
   harvest.py4256565 85%
   logger_config.py10100% 
   utils.py3522 94%
TOTAL5506987% 

Tests Skipped Failures Errors Time
28 0 💤 0 ❌ 0 🔥 2.229s ⏱️

Please sign in to comment.