mirror of
https://github.com/vale981/ray
synced 2025-03-12 14:16:39 -04:00

* Initial scheduler commit * global scheduler * add global scheduler * Implement global scheduler skeleton. * Formatting. * Allow local scheduler to be started without a connection to redis so that we can test it without a global scheduler. * Fail if there are no local schedulers when the global scheduler receives a task. * Initialize uninitialized value and formatting fix. * Generalize local scheduler table to db client table. * Remove code duplication in local scheduler and add flag for whether a task came from the global scheduler or not. * Queue task specs in the local scheduler instead of tasks. * Simple global scheduler tests, including valgrind. * Factor out functions for starting processes. * Fixes.
13 lines
293 B
C
13 lines
293 B
C
#include "net.h"
|
|
|
|
#include "common.h"
|
|
|
|
int parse_ip_addr_port(const char *ip_addr_port, char *ip_addr, int *port) {
|
|
char port_str[6];
|
|
int parsed = sscanf(ip_addr_port, "%15[0-9.]:%5[0-9]", ip_addr, port_str);
|
|
if (parsed != 2) {
|
|
return -1;
|
|
}
|
|
*port = atoi(port_str);
|
|
return 0;
|
|
}
|