Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Sep 23 22:17
    agronholm commented #550
  • Sep 23 22:07
    Travis agronholm/apscheduler (3.8.0) passed (349)
  • Sep 23 22:06
    Travis agronholm/apscheduler (3.x) passed (348)
  • Sep 23 22:00

    agronholm on 3.8.0

    (compare)

  • Sep 23 22:00

    agronholm on 3.x

    Updated the version history (compare)

  • Sep 23 21:56
    Travis agronholm/apscheduler (3.x) fixed (347)
  • Sep 23 21:49

    agronholm on 3.7.0.post1

    (compare)

  • Sep 23 21:47

    agronholm on 3.x

    Fixed links to point to the 3.x… Removed PyPy from the test matr… (compare)

  • Sep 23 21:34
    Travis agronholm/apscheduler@41bf58b (3.7.0.post1) failed (346)
  • Sep 23 21:23

    agronholm on 3.7.0.post1

    Fixed links to point to the 3.x… (compare)

  • Sep 23 19:06
    codingadvocate commented #550
  • Sep 23 17:12
    qkum opened #550
  • Sep 22 22:34

    agronholm on master

    Refactored scheduler and worker… Fixed a couple of bugs in the S… Improved scheduler logging and … (compare)

  • Sep 20 23:18
    agronholm commented #465
  • Sep 20 23:18
    agronholm edited #465
  • Sep 20 23:17

    agronholm on master

    Implemented context-local varia… (compare)

  • Sep 20 21:23
    agronholm edited #465
  • Sep 20 21:23
    agronholm commented #465
  • Sep 20 21:21

    agronholm on master

    Implemented schedule-level jitt… (compare)

  • Sep 18 09:10
    agronholm closed #549
Vioshim
@Vioshim
Oh interesting, but wouldn't it close if I do async with?
Alex Grönholm
@agronholm
bot.start() will block indefinitely, won't it?
Vioshim
@Vioshim

Ye it should,

But Oh yeah, that's a quite interesting approach, and possibly I can get to add that scheduler as an attribute to the bot class in order to access it in commands,

thanks for the help.

Marco Antonio
@mgrazianoc
image.png
whats up fols
folks*
im learning just now this incredible library
but im having some difficulties to understand some concepts
one of them is about scheduled jobs and what one job must need to be scheduled
in this example I made on main loop of asyncio, one job what scheduled to happend soon, while other 60 of them would happen every minute after a while
the idea was to just see how the library talks to postgres
the times were all correct, the table TEST were created on the database, but none of the tasks were stored there, which got me confused
Marco Antonio
@mgrazianoc
as tasks comes to the scheduler, shouldn't it immediately save it on the database?
Marco Antonio
@mgrazianoc
not only that, when print_jobs is called, it says "no scheduled jobs"
using debug mode, i think i got a clue of what is happening: "INFO:apscheduler.scheduler:Added job "simple_job" to job store "default""
it sent to default store when i should sent it to my store, hmmm
Marco Antonio
@mgrazianoc
I now suspect it has something to do with being async?
Alex Grönholm
@agronholm
@mgrazianoc if you don't specify the store to save it to, it goes to default
if you want all jobs to go to postgres, you should name it default
Alex Grönholm
@agronholm
also I'm not seeing you start an asyncio event loop anywhere
if you don't want an asyncio event loop, why use AsyncIOScheduler?
Marco Antonio
@mgrazianoc
oh, thanks for the reply
there's a call of asyncio below the print, asyncio.get_event_loop().run_forever()
for some odd reason, I thought that naming it "postgres" would do the job, but it does makes sense to save it as default, since we are ovewriting it
i'm gonna test it today
this library is really good
Marco Antonio
@mgrazianoc
it worked, thanks. Now I understand wthat the documentation means about "non-serialized", you can't pass the scheduler to a job
Aleksandr Lobanov
@anklav24
image.png
Hi, how can I see id of jobs in get_jobs messages?
Alex Grönholm
@agronholm
messages?
what are you talking about?
Aleksandr Lobanov
@anklav24
I wanna see id when I use get_jobs or print_jobs.
Alex Grönholm
@agronholm
well you get whole job objects when you call get_jobs()
so just access the id attribute of each job
as for print_jobs(), I remember talking about that with someone
definitely something I will consider with apscheduler 4
Dave Eargle
@deargle
Hi, what is the expected behavior for jobs that are added tentatively, if the app shuts down without the scheduler ever starting? I'm also noticing that tentatively scheduled jobs cannot be serialized (getstate) because they don't necessarily have misfire_grace_time set.
I can open a github report for the second one, unless it's expected behavior
Also, to elaborate, I think I'm seeing that tentatively-added jobs disappear if the process ends -- they aren't tentatively added to any datastore, they're just added in-memory
Perhaps the workaround would be -- if the goal is to add jobs without ever running them within a given process, then start the scheduler but in a paused state, so that jobs get added to a datastore.
Dave Eargle
@deargle
my situation is that I'm trying to integrate apscheduler into a flask app which is sometimes multithreaded. If it's multithreaded, I don't want apscheduler to try to run jobs, but I do want users to be able to view scheduled jobs.
Aleksandr Lobanov
@anklav24
image.png

well you get whole job objects when you call get_jobs()

Thank you! That's what I was looking for.

Alex Grönholm
@agronholm
@deargle yeah...you will need a separate scheduler service to connect to for that
AlenPaulVarghese
@alenpaul2001
The examples provided with the repos are old?
Alex Grönholm
@agronholm
they are, yes
meaning not updated to v4.0
AlenPaulVarghese
@alenpaul2001
ok :)
alenpaul2001
@alenpaul2001:matrix.org
[m]

Is there any way to achieve the following:

every time the program starts, it checks the jobstore for an existing job with id. if the id is not present adds the job.

I cannot use replace_existing because it will replace the time as well.