Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Sep 23 21:05

    agronholm on master

    Added property for default_job_… Removed migration note about ex… Removed the _local_tasks variab… and 3 more (compare)

  • Sep 22 10:54
    giusepic closed #667
  • Sep 22 10:54
    giusepic commented #667
  • Sep 22 10:52
    agronholm commented #667
  • Sep 22 10:50
    giusepic commented #667
  • Sep 22 10:49
    agronholm commented #667
  • Sep 22 10:48
    giusepic edited #667
  • Sep 22 10:48
    giusepic edited #667
  • Sep 22 10:45
    giusepic edited #667
  • Sep 22 10:45
    giusepic labeled #667
  • Sep 22 10:45
    giusepic opened #667
  • Sep 21 23:29

    agronholm on master

    Removed unwanted argument from … (compare)

  • Sep 21 22:03

    agronholm on master

    Added more directories to .giti… Major refactoring - Made SyncS… Merged the Worker class into As… and 5 more (compare)

  • Sep 21 22:03

    agronholm on sync-wrapper

    (compare)

  • Sep 21 22:03

    agronholm on sync-wrapper

    Added more directories to .giti… Major refactoring - Made SyncS… Merged the Worker class into As… and 5 more (compare)

  • Sep 21 01:59
    jikong93 commented #666
  • Sep 20 23:39

    agronholm on master

    [pre-commit.ci] pre-commit auto… (compare)

  • Sep 20 23:39

    agronholm on pre-commit-ci-update-config

    (compare)

  • Sep 20 23:39
    agronholm closed #665
  • Sep 20 19:16
    agronholm closed #666
Alex Grönholm
@agronholm
but you can experiment with the current master branch
basics should be working
Konstantin Pankov
@c0nst_float_gitlab

Sadly, sadly... Will try to come up with something to solve the problem.

I will describe our gracefull shutdown use case, maybe it will help in the development of version 4.0

1) Shutdown scheduler (stop scheduling new jobs)
2) Wait until all tasks are completed
3) Force exit if after 15 seconds if there is still uncompleted tasks (cause, there could be tasks that runs for some minutes)
4) Close DB and HTTP session pools

kxrxkt
@kxrxkt_twitter
hello. i would like to ask help for my problem. when i start the scheduler it succesfully calls the function and then throws an error at me:
TypeError: func must be a callable or a textual reference to one
i cant figure this out
Alex Grönholm
@agronholm
@kxrxkt_twitter are you maybe adding your job like this? scheduler.add_job(yourfunc(), ...)?
kxrxkt
@kxrxkt_twitter
image.png
@agronholm yes
Alex Grönholm
@agronholm

ok so consider the following:

def foo():
    return 1

print(foo())

What argument do you expect print() to be called with?

kxrxkt
@kxrxkt_twitter
the argument for print() here is func foo()
and?
oh
which gives 1
so do you mean that function does it jobs and on second iteration gives nothing
then how do i put the function itself into scheduler?
Alex Grönholm
@agronholm
@kxrxkt_twitter give it the function object, don't call it
the () syntax calls the function
I mean, you didn't think x = foo() would assign the function object to x, did you?
kxrxkt
@kxrxkt_twitter
oh well i forgot that i don't need to actually call it
thanks for pointing that out
lalaipo
@lalaipo
how to run cron in certain day?

in aiocron i can use like this:
@aiocron.crontab('29 17 * * 3,6,0')

but how to do that in apscheduler?
like this?
@scheduler.scheduled_job('cron', hour='17', minutes='29', day_of_week='wed,sat,sun')

@agronholm
Alex Grönholm
@agronholm
apscheduler also supports the crontab syntax
lalaipo
@lalaipo
so how to set it to certain day?
Alex Grönholm
@agronholm
like, day of week?
lalaipo
@lalaipo
like this 3,6,0
Alex Grönholm
@agronholm
I do suggest using day names
lalaipo
@lalaipo
so it will be executed in wednesday ,saturday and sunday only
Alex Grönholm
@agronholm
well, like in your example
did you have a problem with that?
lalaipo
@lalaipo
so its valid?
i havent tried because i need to wait lol
Alex Grönholm
@agronholm
it is valid
lalaipo
@lalaipo
oh okay thanks
lalaipo
@lalaipo
why i got return plugin_cls(**constructor_kwargs) TypeError: __init__() got an unexpected keyword argument 'minutes'
oh its minute
lalaipo
@lalaipo
how to shutdown it? when i use await scheduler.shutdown() it works i checked it by scheduler.running return False but it gives me errors too: TypeError: object NoneType can't be used in 'await' expression, but when i use scheduler.shutdown() i checked it with scheduler.running it returns True it means not stopped by doing that
Alex Grönholm
@agronholm
@lalaipo that is an achilles heel of the current asyncio scheduler
it could not be made awaitable
in the master branch there is an unfinished 4.0 scheduler which has full async support
lalaipo
@lalaipo
oh okay
how do i import AsyncIOScheduler in master branch?
Alex Grönholm
@agronholm
@lalaipo do you know how to use git?
the documentation hasn't really been updated so you'd be on your own pretty much – the tests would be the only clues
lalaipo
@lalaipo
yes i use pip3 install git+git/repo@branch
in 3.7.0 i can import using from apscheduler.schedulers.asyncio import AsyncIOScheduler
but in master branch it doesnt work
Alex Grönholm
@agronholm
if you want to play around with 4.0
the documentation has not been updated yet
lalaipo
@lalaipo
oh ok