Spaces:
Build error
Build error
update server commands
Browse files- Dockerfile +3 -2
- main.py +1 -1
- src/processor.py +3 -3
Dockerfile
CHANGED
@@ -79,5 +79,6 @@ USER user
|
|
79 |
|
80 |
EXPOSE 7860
|
81 |
|
82 |
-
#
|
83 |
-
|
|
|
|
79 |
|
80 |
EXPOSE 7860
|
81 |
|
82 |
+
# Default startup command for server mode with periodic processing
|
83 |
+
# This is overridden by Docker Compose
|
84 |
+
CMD ["python", "main.py", "--server", "--ignore-cooldown"]
|
main.py
CHANGED
@@ -38,7 +38,7 @@ def main():
|
|
38 |
parser.add_argument("--force-retry-category", help="Force retry for all leaderboards of a specific category")
|
39 |
parser.add_argument("--upload-only", action="store_true", help="Only upload local files to the Hub without processing leaderboards")
|
40 |
parser.add_argument("--local-only", action="store_true", help="Local mode only: do not download from the Hub and do not upload to the Hub")
|
41 |
-
parser.add_argument("--
|
42 |
parser.add_argument("--server", action="store_true", help="Run as a web server with scheduled processing")
|
43 |
args = parser.parse_args()
|
44 |
|
|
|
38 |
parser.add_argument("--force-retry-category", help="Force retry for all leaderboards of a specific category")
|
39 |
parser.add_argument("--upload-only", action="store_true", help="Only upload local files to the Hub without processing leaderboards")
|
40 |
parser.add_argument("--local-only", action="store_true", help="Local mode only: do not download from the Hub and do not upload to the Hub")
|
41 |
+
parser.add_argument("--ignore-cooldown", action="store_true", help="Force reprocessing of rejected leaderboards even if it's been less than 24h")
|
42 |
parser.add_argument("--server", action="store_true", help="Run as a web server with scheduled processing")
|
43 |
args = parser.parse_args()
|
44 |
|
src/processor.py
CHANGED
@@ -262,9 +262,9 @@ def process_leaderboards(args_dict=None) -> Tuple[bool, str]:
|
|
262 |
# Check if the leaderboard has been processed within the interval
|
263 |
result = processed_results_map[combined_uid]
|
264 |
|
265 |
-
# If the --
|
266 |
-
if getattr(args, "
|
267 |
-
logger.info(f"Leaderboard {combined_uid}
|
268 |
elif "parsed_at" in result:
|
269 |
try:
|
270 |
# Convert parsing date to datetime object
|
|
|
262 |
# Check if the leaderboard has been processed within the interval
|
263 |
result = processed_results_map[combined_uid]
|
264 |
|
265 |
+
# If the --ignore-cooldown option is active, force reprocessing regardless of status
|
266 |
+
if getattr(args, "ignore_cooldown", False):
|
267 |
+
logger.info(f"Leaderboard {combined_uid} forced reprocessing with --ignore-cooldown, ignoring cooldown period.")
|
268 |
elif "parsed_at" in result:
|
269 |
try:
|
270 |
# Convert parsing date to datetime object
|