Skip to main content

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

    1. log state of worker
    2. get free worker
    3. Để 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

    1. fix issue rebalance not update list partition to db

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

m_scheduler_partitioning-0.1.3.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

m_scheduler_partitioning-0.1.3-py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page