Added batch process and test
This commit is contained in:
+12
-1
@@ -18,11 +18,22 @@
|
||||
<button class="btn btn-primary">Run Sync Now</button>
|
||||
{% endif %}
|
||||
</form>
|
||||
{% if not sync_running %}
|
||||
<form method="post" action="/sync/test" style="display:inline">
|
||||
<button class="btn btn-secondary">Test (1 zip)</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if batch_size > 0 %}
|
||||
<p class="muted small" style="margin-bottom:1.5rem">Batch size: {{ batch_size }} zips per chunk — full sync processes all unprocessed files.</p>
|
||||
{% endif %}
|
||||
|
||||
{% if request.query_params.get("started") %}
|
||||
<div class="alert alert-success">Sync started in background.</div>
|
||||
<div class="alert alert-success">Sync started — processing all unprocessed archives{% if batch_size > 0 %} in batches of {{ batch_size }}{% endif %}.</div>
|
||||
{% endif %}
|
||||
{% if request.query_params.get("test_started") %}
|
||||
<div class="alert alert-success">Test sync started — processing 1 archive.</div>
|
||||
{% endif %}
|
||||
{% if request.query_params.get("already_running") %}
|
||||
<div class="alert alert-warning">A sync is already running.</div>
|
||||
|
||||
@@ -113,6 +113,15 @@
|
||||
placeholder="0">
|
||||
<p class="muted small">Set to 0 to disable automatic sync. Changes take effect immediately on save. Examples: 60 = hourly, 1440 = daily.</p>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<label for="sync_batch_size">Batch size (zips per chunk)</label>
|
||||
<input id="sync_batch_size" name="sync_batch_size" type="number"
|
||||
min="0" step="1" style="width:8rem"
|
||||
value="{{ s.get('sync_batch_size','0') }}"
|
||||
placeholder="0">
|
||||
<p class="muted small">Each sync run processes <strong>all</strong> unprocessed files, but works through them in chunks of this size to limit temp disk usage. Set to 0 to process all at once.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="form-actions">
|
||||
|
||||
Reference in New Issue
Block a user