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"})
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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c75ab0060a81fefdfc8f765ed0bd5e0d18f1246fc4e13d38f8de427b5aa51836 |
|
MD5 | 20bb56ea2ca9eed8619255d2cc96968e |
|
BLAKE2b-256 | 4014531dcabfb6c95749c5354750e61c10357b22d48b6a6d565f1086e786cfc9 |
Close
Hashes for m_scheduler_partitioning-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cad42acff08bb7a373847c39e1afdf9fdc007d56adda0c67fd1021381769d6c0 |
|
MD5 | 8e51c09cebcbcd8adfde9f4b0b0c7f7a |
|
BLAKE2b-256 | 2eb740524e4cef348d82f2f31937292e6aced00fc4cb38fd487c417e23ecd526 |