Commit 0681c86
fix(docker): always start the RQ scheduler
The scheduler only started when one of four ENABLE_SCHEDULED_* flags was
true, but nothing else respects that condition. startup.py registers the
netplay, upload-tmp and zip-cache cleanups unconditionally, three more
flags gate periodic tasks that are absent from the list, and the
filesystem watcher defers its rescans through the scheduler as well.
Any of those left jobs sitting in the scheduler registry with no process
to run them. On a default install the three cleanups never fire at all.
Worse, a watcher running with every scheduled task disabled accumulates
delayed scan_platforms entries permanently, and the concurrent scan guard
reads those as a scan already queued, so every manual scan is refused
with "A scan is already in progress" until Redis is cleared. Restarting
does not help, because the entries are persisted state rather than a
running process.
Start the scheduler unconditionally, matching entrypoint.sh, which never
gated it. Also stop counting a scheduler entry whose time passed long ago
as a pending scan: an overdue entry means nothing is draining the
registry, so treating it as queued cannot recover on its own.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 80e58d5 commit 0681c86
3 files changed
Lines changed: 81 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
73 | 90 | | |
74 | 91 | | |
75 | 92 | | |
| |||
121 | 138 | | |
122 | 139 | | |
123 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
124 | 146 | | |
125 | | - | |
| 147 | + | |
| 148 | + | |
126 | 149 | | |
127 | 150 | | |
128 | 151 | | |
129 | 152 | | |
| 153 | + | |
130 | 154 | | |
131 | 155 | | |
132 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
945 | 946 | | |
946 | 947 | | |
947 | 948 | | |
948 | | - | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
949 | 956 | | |
950 | | - | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
951 | 963 | | |
952 | 964 | | |
953 | 965 | | |
| |||
957 | 969 | | |
958 | 970 | | |
959 | 971 | | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
960 | 976 | | |
961 | | - | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
962 | 980 | | |
963 | 981 | | |
964 | 982 | | |
| |||
1052 | 1070 | | |
1053 | 1071 | | |
1054 | 1072 | | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
1055 | 1103 | | |
1056 | 1104 | | |
1057 | 1105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
383 | 384 | | |
384 | 385 | | |
385 | 386 | | |
| |||
0 commit comments