Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 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
  • Sep 18 09:10
    agronholm commented #549
  • Sep 18 07:59
    coolsnake opened #549
  • Sep 18 07:59
    coolsnake labeled #549
  • Sep 15 19:41
    sea72 edited #548
  • Sep 15 19:40
    sea72 edited #548
  • Sep 15 19:39
    sea72 edited #548
  • Sep 15 19:39
    sea72 edited #548
  • Sep 15 19:39
    sea72 opened #548
  • Sep 15 10:03
    agronholm commented #547
  • Sep 15 01:25
    ZhangYupengCHY opened #547
  • Sep 12 22:15
    agronholm commented #465
  • Sep 12 22:08
    agronholm edited #465
Marco Antonio
@mgrazianoc
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
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.

Alex Grönholm
@agronholm
@alenpaul2001:matrix.org have you looked at get_job()?
AlenPaulVarghese
@alenpaul2001

@alenpaul2001:matrix.org have you looked at get_job()?

yeah that works for me, thank you again.

Shiv Kumar
@skagrawal10
Hi Guys,
I am using apscheduler in one of my project. I have scheduled one job every 5 min. but, What I am seeing here is that, it runs fine till 2-3 hours and then, it suddenly does not schedule jobs later in 5 min interval. There is not any log from the scheduler why it did not run next scheduled run.
Any thoughts where I can look into this?
Alex Grönholm
@agronholm
@skagrawal10 have you read the troubleshooting instructions in the documentation?
Shiv Kumar
@skagrawal10
Hi @agronholm , Thanks for responding. Can you please share me link of the troubleshooting instructions?
I tried various troubleshooting methods but none help.
Alex Grönholm
@agronholm
the troubleshooting instructions are at the bottom of the user guide
can you at least find the user guide on your own?
Shiv Kumar
@skagrawal10
Yes. I got the user guide and found troubleshooting instructions to add Logger. Let me do that.
Alberto Calvo Rubió
@AlbertoCalvoRubio
Hi! How can I avoid to create a new DB connection or similar(ampq connection to rabbitmq) on any callback function? I can't pass a SQLAlchemy Session as argument's callback because I am using SQLAlchemyJobStore and it is serialized. I hope you can help my, I'm working on my Computer's Science degree final project.
Alex Grönholm
@agronholm
@AlbertoCalvoRubio you could just store it as a module global?