forked from uncloud/uncloud
1. mp.set_start_method('spawn') commented out from scripts/uncloud
2. uncloud.shared moved under uncloud.common
3. Refactoring in etcd_wrapper e.g timeout mechanism removed and few other things
4. uncloud-{scheduler,host} now better handle etcd events in their block state (waiting for requests to come)
This commit is contained in:
parent
f8f790e7fc
commit
48efcdf08c
17 changed files with 149 additions and 186 deletions
|
|
@ -2,8 +2,8 @@ import json
|
|||
from os.path import join
|
||||
from uuid import uuid4
|
||||
|
||||
from .etcd_wrapper import PsuedoEtcdEntry
|
||||
from .classes import SpecificEtcdEntryBase
|
||||
from uncloud.common.etcd_wrapper import EtcdEntry
|
||||
from uncloud.common.classes import SpecificEtcdEntryBase
|
||||
|
||||
|
||||
class RequestType:
|
||||
|
|
@ -29,11 +29,8 @@ class RequestEntry(SpecificEtcdEntryBase):
|
|||
|
||||
@classmethod
|
||||
def from_scratch(cls, request_prefix, **kwargs):
|
||||
e = PsuedoEtcdEntry(
|
||||
join(request_prefix, uuid4().hex),
|
||||
value=json.dumps(kwargs).encode("utf-8"),
|
||||
value_in_json=True,
|
||||
)
|
||||
e = EtcdEntry(meta_or_key=join(request_prefix, uuid4().hex),
|
||||
value=json.dumps(kwargs).encode('utf-8'), value_in_json=True)
|
||||
return cls(e)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue