MCPcopy Create free account
hub / github.com/antirez/ds4 / dist_worker_job_queue_init

Function dist_worker_job_queue_init

ds4_distributed.c:7621–7632  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7619 void *payload = malloc(bytes);
7620 if (!payload) {
7621 dist_discard_bytes(upstream->fd, bytes);
7622 return dist_worker_upstream_send_work_error(upstream, 0, "out of memory reading distributed WORK frame");
7623 }
7624 int rc = dist_read_full(upstream->fd, payload, bytes);
7625 if (rc <= 0) {
7626 free(payload);
7627 return rc == 0 ? 0 : -1;
7628 }
7629 rc = dist_worker_process_work_payload(state, upstream, payload, bytes);
7630 free(payload);
7631 return rc;
7632}
7633
7634/* =========================================================================
7635 * Worker Prefetch Queue

Callers 1

Calls 1

Tested by

no test coverage detected