Skip to main content
https://travis-ci.org/appstore-zencore/zdas.svg?branch=master

Zencore daemon application start.

Install

pip install zdas

Usage

import time
import threading
import signal
import zdas

stopflag = False

def main():
    def on_exit(*args, **kwargs):
        with open("backgroud.log", "a", encoding="utf-8") as fobj:
            print("process got exit signal...", file=fobj)
            print(args, file=fobj)
            print(kwargs, file=fobj)
        global stopflag
        stopflag = True
    signal.signal(signal.SIGTERM, on_exit)
    signal.signal(signal.SIGINT, on_exit)
    while not stopflag:
        time.sleep(1)
        print(time.time())

if __name__ == "__main__":
    print("start background application...")
    zdas.daemon_start(main, "background.pid", True)

Release files for zdas 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zdas 0.1.1
File Size Uploaded
zdas-0.1.1.tar.gz 3.5 kB Details

Release files / zdas-0.1.1.tar.gz

Download URL zdas-0.1.1.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e275c9c363165ae7ff5a99697c44994c1c0494572a448f7fc035adc33bb1bf43
BLAKE2b-256 checksum
How to use checksums
ed68e22bae46b14a1fa4f15f40d05fecd73e5a71d09ff3d76d63e37d427af35b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page