Mobio scheduler partitioning sdk
Project description
Thư viện scheduler multiple partitions của Profiling
nop: maximum partitions now support is 1000
delays: maximum time delays now support is 3600 seconds (1 hour)
sample code:
from mobio.libs.m_scheduler_partitioning.m_scheduler import MobioScheduler
from mobio.libs.m_scheduler_partitioning.scheduler_models.scheduler_state_model import SchedulerStateModel
class SampleScheduler(MobioScheduler):
def process(self):
if self.url_connection:
SchedulerStateModel(self.url_connection).set_busy(
worker_id=self.node_id
)
print("Hi there ! :)")
if __name__ == "__main__":
SampleScheduler(root_node="test-scheduler", nop=100, delays=1)
Change logs
-
0.1.2
- log state of worker
- get free worker
- Để không bị mất 50k cho anh Lợi, thêm 2 index này:
* db.scheduler_state.createIndex({"expiry_time": 1}, {expireAfterSeconds: 5, name="expiry_time_1"}) * db.scheduler_state.createIndex({"root_node": 1, "state":1}, {name="root_node_1_state_1"})
-
0.1.3
- fix issue rebalance not update list partition to db
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for m_scheduler_partitioning-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b35c146aa2ffccc2573b51570c4f89485c7d6b2202c0cd0a2be61962aa99e38f |
|
MD5 | 84612b33bc2528530b4fabee015571e6 |
|
BLAKE2b-256 | b139d9c9281cb5974e443f6ad364333249fa9cd2ac06e0e35025ec40d8a22e3e |
Close
Hashes for m_scheduler_partitioning-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30040c33f338bf86f90ea54fcb53da52540e9370072cd793e2501b6f7cd416bd |
|
MD5 | 67a2b174dac46d442e36be3d6c640fae |
|
BLAKE2b-256 | c53ff0a7f8de1bb1442368ebc441d8b1271e999d8ca43bf8ed12af742bd4b425 |