Skip to content

Commit

Permalink
Merge pull request #111 from jmarmstrong1207/cwa-notify-wait-delete
Browse files Browse the repository at this point in the history
delete cwa-ingest-service & rename library_refresh to library_ingest
  • Loading branch information
jmarmstrong1207 authored Oct 14, 2024
2 parents fb0b242 + 8052ecc commit 3b203b9
Show file tree
Hide file tree
Showing 13 changed files with 11 additions and 40 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ docker-compose.yml
README.md
LICENSE
Dockerfile
.dockerignore
.dockerignore
build
2 changes: 1 addition & 1 deletion build.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

docker build --tag cwa-dev .
docker build --tag crocodilestick/calibre-web-automated:dev --build-arg="BUILD_DATE=$(date '+%Y/%m/%d')" --build-arg="VERSION=2.1.0-dev" .
mkdir -p build
cp -n docker-compose.yml.dev build/docker-compose.yml
cd build/
Expand Down
6 changes: 3 additions & 3 deletions root/app/calibre-web/cps/cwa_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from cwa_db import CWA_DB

switch_theme = Blueprint('switch_theme', __name__)
library_refresh = Blueprint('library_refresh', __name__)
library_ingest = Blueprint('library_ingest', __name__)
convert_library = Blueprint('convert_library', __name__)
cwa_history = Blueprint('cwa_history', __name__)
cwa_check_status = Blueprint('cwa_check_status', __name__)
Expand Down Expand Up @@ -49,9 +49,9 @@ def cwa_switch_theme():
return redirect("/", code=302)


@library_refresh.route("/cwa-library-refresh", methods=["GET", "POST"])
@library_ingest.route("/cwa-library-ingest", methods=["GET", "POST"])
@login_required_if_no_ano
def cwa_library_refresh():
def cwa_library_ingest():
flash(_("Library Refresh: Initialising Book Ingest System, please wait..."), category="cwa_refresh")
result = subprocess.run(['python3', '/app/calibre-web-automated/scripts/ingest-processor.py', '/cwa-book-ingest'])
return_code = result.returncode
Expand Down
4 changes: 2 additions & 2 deletions root/app/calibre-web/cps/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def request_username():
def main():
app = create_app()

from .cwa_functions import switch_theme, library_refresh, convert_library, cwa_history, cwa_check_status, cwa_settings
from .cwa_functions import switch_theme, library_ingest, convert_library, cwa_history, cwa_check_status, cwa_settings
from .web import web
from .opds import opds
from .admin import admi
Expand Down Expand Up @@ -64,7 +64,7 @@ def main():

# CWA Blueprints
app.register_blueprint(switch_theme)
app.register_blueprint(library_refresh)
app.register_blueprint(library_ingest)
app.register_blueprint(convert_library)
app.register_blueprint(cwa_history)
app.register_blueprint(cwa_check_status)
Expand Down
2 changes: 1 addition & 1 deletion root/app/calibre-web/cps/static/js/caliBlur.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ $("#cwa-switch-theme").attr({

$("#refresh-library").attr({
"data-toggle": "tooltip",
"title": $("#refresh-library").text(), // "Refresh Library"
"title": $("#ingest-library").text(), // "Refresh Library"
"data-placement": "bottom",
"data-viewport": "#main-nav"
})
Expand Down
2 changes: 1 addition & 1 deletion root/app/calibre-web/cps/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
{% if current_user.role_admin() %}
<li><a id="top_admin" data-text="{{_('Settings')}}" href="{{url_for('admin.admin')}}"><span class="glyphicon glyphicon-dashboard"></span> <span class="hidden-sm">{{_('Admin')}}</span></a></li>
{% endif %}
<li><a id="refresh-library" data-text="{{_('Refresh Library')}}" href="{{url_for('library_refresh.cwa_library_refresh')}}"><span class="glyphicon glyphicon-refresh"></span> <span class="hidden-sm">{{_('Refresh Library')}}</span></a></li>
<li><a id="ingest-library" data-text="{{_('Ingest Books')}}" href="{{url_for('library_ingest.cwa_library_ingest')}}"><span class="glyphicon glyphicon-refresh"></span> <span class="hidden-sm">{{_('Ingest Books')}}</span></a></li>
{% if g.current_theme == 0 %}
<li><a id="top_user" data-text="{{_('Account')}}" href="{{url_for('web.profile')}}"><span class="glyphicon glyphicon-user"></span> <span class="hidden-sm">{{current_user.name}}</span></a></li>
{% if not current_user.is_anonymous %}
Expand Down
Empty file.
19 changes: 0 additions & 19 deletions root/etc/s6-overlay/s6-rc.d/cwa-ingest-service/run

This file was deleted.

1 change: 0 additions & 1 deletion root/etc/s6-overlay/s6-rc.d/cwa-ingest-service/type

This file was deleted.

1 change: 0 additions & 1 deletion root/etc/s6-overlay/s6-rc.d/cwa-ingest-service/up

This file was deleted.

Empty file.
10 changes: 1 addition & 9 deletions scripts/check-cwa-services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ echo "====== Calibre-Web Automated -- Status of Monitoring Services ======"
echo ""


if s6-rc -a list | grep -q 'cwa-ingest-service'; then
echo -e "- cwa-ingest-service ${GREEN}is running${NC}"
is=true
else
echo -e "- cwa-ingest-service ${RED}is not running${NC}"
is=false
fi

if s6-rc -a list | grep -q 'metadata-change-detector'; then
echo -e "- metadata-change-detector ${GREEN}is running${NC}"
mc=true
Expand All @@ -27,7 +19,7 @@ fi

echo ""

if $is && $mc; then
if $mc; then
echo -e "Calibre-Web-Automated was ${GREEN}successfully installed ${NC}and ${GREEN}is running properly!${NC}"
exit 0
else
Expand Down
1 change: 0 additions & 1 deletion scripts/setup-cwa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ make_dirs () {
# Change ownership & permissions as required
change_script_permissions () {
chmod +x /app/calibre-web-automated/scripts/check-cwa-services.sh
chmod +x /etc/s6-overlay/s6-rc.d/cwa-ingest-service/run
chmod +x /etc/s6-overlay/s6-rc.d/cwa-init-remove-locks/run
chmod +x /etc/s6-overlay/s6-rc.d/metadata-change-detector/run
chmod +x /etc/s6-overlay/s6-rc.d/cwa-set-perms/run
Expand Down

0 comments on commit 3b203b9

Please sign in to comment.