Handle `WorkerState` `memory_limit` of `None`
If a `memory_limit` of `None` is passed to `add_worker`, make sure to
replace it with `0` before constructing `WorkerState` as `memory_limit`
in `WorkerState` is typed as `Py_ssize_t` so `None` is not permissible.
@@ -2133,7 +2133,7 @@ class Scheduler(ServerNode):
now=None,
resources=None,
host_info=None,
- memory_limit=0,
+ memory_limit=None,
metrics=None,
pid=0,
services=None,
@@ -2166,7 +2166,7 @@ class Scheduler(ServerNode):
address=address,
pid=pid,
nthreads=nthreads,
- memory_limit=memory_limit,
+ memory_limit=memory_limit or 0,
name=name,
local_directory=local_directory,
services=services,
