Background Jobs
Qualified Name | Type | Release |
---|---|---|
|
|
|
|
|
|
|
|
|
-
The jobs list is updated every 10s for finished jobs.
Additional configuration
It is possible to override the default thread pool size (processors*2), which might be useful if many jobs are running at the same time:
apoc.jobs.pool.num_threads=10
Many periodic procedures rely on a scheduled executor that has a pool of threads with a default fixed size (processors/4, at least 1). It is possible to configure the pool size using the following configuration property:
apoc.jobs.scheduled.num_threads=10
Countdown Example
The Cypher statement must return a numeric value and it should decrement (like a monotonically decreasing function). It is repeatedly executed until the return value reaches 0. For example, define a counter with a numeric property:
CREATE (counter:Counter) SET counter.c = 10
and decrement this property by 1 each second:
CALL apoc.periodic.countdown('decrement',"MATCH (counter:Counter) SET counter.c = counter.c - 1 RETURN counter.c as count", 1)