Skip to content

Commit

Permalink
fix: Fix bug when editing dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
drorganvidez committed Jan 8, 2025
1 parent d62db9f commit 2478709
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,12 @@ <h4 class="alert-heading"><i class="align-middle" data-feather="alert-triangle">

{% block scripts %}

{% if not is_edit %}
<script>
let hubfiles = {{ hubfiles|tojson|safe }};
</script>
{% endif %}


<script src="{{ url_for('zenodo.assets', subfolder='js', filename='scripts.js') }}"></script>
<script src="{{ url_for('dataset.assets', subfolder='js', filename='scripts.js') }}"></script>
Expand Down
16 changes: 0 additions & 16 deletions app/modules/dataset/templates/dataset/view_dataset.html
Original file line number Diff line number Diff line change
Expand Up @@ -335,22 +335,6 @@ <h4 style="margin-bottom: 0px;"><span class="badge bg-dark">{{ dataset.count_fea
<i data-feather="tag"></i> Fact Label
</button>

<div class="btn-group" role="group">
<button id="btnGroupDrop{{ file.id }}" type="button" class="btn btn-outline-primary btn-sm dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" style=" border-radius: 5px;">
<i data-feather="check"></i> Check
</button>
<ul class="dropdown-menu" aria-labelledby="btnGroupDrop{{ file.id }}">
<li>
<a class="dropdown-item" onclick="checkUVL('{{ file.id }}')">Syntax check</a>
</li>
<!--
<li>
<a class="dropdown-item" onclick="checkSAT('{{ file.id }}')">SAT validity check</a>
</li>
-->
</ul>
</div>

<button onclick="addToCart('{{ file.id }}')" class="btn btn-outline-secondary btn-sm" style="border-radius: 5px;">
<i data-feather="plus"></i> <i data-feather="download"></i> Add
</button>
Expand Down
8 changes: 4 additions & 4 deletions app/static/css/app.css

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions app/static/css/own.css
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,11 @@
overflow: hidden;
text-overflow: ellipsis;
}

a{
color: #147ABB;
}

.bg-primary{
background-color: #147ABB !important;
}
2 changes: 1 addition & 1 deletion app/static/js/app.js

Large diffs are not rendered by default.

27 changes: 17 additions & 10 deletions docker/redis/worker.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
import logging
from rq import Worker, Queue, Connection
from rq import Worker, Queue
from dotenv import load_dotenv
from app import create_app

# Load environment variables
load_dotenv()
logger = logging.getLogger(__name__)


if __name__ == '__main__':
# Configure logger
logger = logging.getLogger(__name__)

if __name__ == "__main__":
# Create Flask application and load configuration
app = create_app()

with app.app_context():
# Create Flask application and load configuration
redis_connection = app.config["SESSION_REDIS"]

# Define the queues to be listened to
listen = ["default"]

# Connect to Redis and start listening to the queue
listen = ['default']
conn = app.config['SESSION_REDIS']
# Create queue list
queues = [Queue(name, connection=redis_connection) for name in listen]

with Connection(conn):
worker = Worker(list(map(Queue, listen)))
worker.work()
# Initialise the worker
logger.info(f"Starting worker for queues: {listen}")
worker = Worker(queues)
worker.work()

0 comments on commit 2478709

Please sign in to comment.