We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c03662c commit 9f00b41Copy full SHA for 9f00b41
src/cbapi/live_response_api.py
@@ -797,7 +797,9 @@ def _spawn_new_workers(self):
797
sensors = [s for s in self._cb.select(Sensor) if s.id in self._unscheduled_jobs
798
and s.id not in self._job_workers
799
and s.status == "Online"]
800
- sensors_to_schedule = sorted(sensors, key=lambda x: x.next_checkin_time)[:schedule_max]
+ sensors_to_schedule = sorted(sensors, key=lambda x: (
801
+ int(x.num_storefiles_bytes) + int(x.num_eventlog_bytes), x.next_checkin_time
802
+ ))[:schedule_max]
803
804
log.debug("Spawning new workers to handle these sensors: {0}".format(sensors_to_schedule))
805
for sensor in sensors_to_schedule:
0 commit comments