diff options
author | Krzysztof A. Adamski <krzysztofa@gmail.com> | 2008-06-22 12:02:44 -0400 |
---|---|---|
committer | Krzysztof A. Adamski <krzysztofa@gmail.com> | 2008-06-22 12:02:44 -0400 |
commit | a05f793ce3b3fb8f938ea581f51eadf9c4dcdae1 (patch) | |
tree | a671bb7d930d6f06d267394086b8495e373bca2d | |
parent | 3750980ea547c73a63cb456a85be0b14cc36c30c (diff) | |
download | third_party-func-a05f793ce3b3fb8f938ea581f51eadf9c4dcdae1.tar.gz third_party-func-a05f793ce3b3fb8f938ea581f51eadf9c4dcdae1.tar.xz third_party-func-a05f793ce3b3fb8f938ea581f51eadf9c4dcdae1.zip |
Change job_id from double to string. Use pprint to get better precision.
-rw-r--r-- | func/jobthing.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/func/jobthing.py b/func/jobthing.py index a190dff..c6c616a 100644 --- a/func/jobthing.py +++ b/func/jobthing.py @@ -23,6 +23,7 @@ import sys import fcntl import forkbomb import utils +import pprint JOB_ID_RUNNING = 0 JOB_ID_FINISHED = 1 @@ -110,7 +111,7 @@ def batch_run(pool, callback, nforks): operation will be created in cachedir and subsequently deleted. """ - job_id = time.time() + job_id = pprint.pformat(time.time()) pid = os.fork() if pid != 0: __update_status(job_id, JOB_ID_RUNNING, -1) @@ -132,7 +133,7 @@ def minion_async_run(retriever, method, args): # minion jobs contain the string "minion". - job_id = "%s-minion" % time.time() + job_id = "%s-minion" % pprint.pformat(time.time()) __update_status(job_id, JOB_ID_RUNNING, -1) pid = os.fork() if pid != 0: |