Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*/int syntax doesn't appear to work #29

Closed
pansapiens opened this issue Apr 5, 2017 · 2 comments
Closed

*/int syntax doesn't appear to work #29

pansapiens opened this issue Apr 5, 2017 · 2 comments
Assignees
Labels

Comments

@pansapiens
Copy link

Test script:

#!/usr/bin/env python
import crython
import time

@crython.job(second='*/3')
def foo():
    print("I'm using */3 syntax.")

@crython.job(second=range(0, 60, 2))
def bla():
    print("I'm using range(0, 60, 2).")

if __name__ == '__main__':
    crython.start()
    try:
        while True:
            time.sleep(0.2)
    except KeyboardInterrupt:
        pass

    print("Done")

Prints:

I'm using range(0, 60, 2).
I'm using range(0, 60, 2).
I'm using range(0, 60, 2).
... etc ...

I would expect "I'm using */3 syntax." to be printed every three seconds also, but it's not.

Is this a bug or am I doing something wrong ?

Latest master and pypi 0.0.4 version.

@ahawker
Copy link
Owner

ahawker commented Apr 7, 2017

@pansapiens Thanks for reporting this and I apologize for the issue!

I tracked this down to a bug with some of the compatibility code I added to support py3+.

This should be fixed in #30 .

@ahawker ahawker added the bug label Apr 7, 2017
@ahawker ahawker self-assigned this Apr 7, 2017
@ahawker
Copy link
Owner

ahawker commented Apr 7, 2017

Merged and deployed. Fix should be available in version 0.0.5 out in pypi.

@ahawker ahawker closed this as completed Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants