Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 01:10
    NotoriousRebel commented #514
  • Oct 21 11:31
    agronholm closed #563
  • Oct 21 11:31
    agronholm locked #563
  • Oct 21 11:31
    agronholm unlabeled #563
  • Oct 21 11:31
    agronholm closed #564
  • Oct 21 11:31
    agronholm locked #564
  • Oct 21 11:29
    nitishxp labeled #564
  • Oct 21 11:29
    nitishxp opened #564
  • Oct 21 08:37
    ShivKJ labeled #563
  • Oct 21 08:37
    ShivKJ opened #563
  • Oct 14 18:46
    agronholm commented #562
  • Oct 14 18:46
    agronholm closed #562
  • Oct 14 18:02
    TCVZ labeled #562
  • Oct 14 18:02
    TCVZ opened #562
  • Oct 14 15:59
    agronholm closed #560
  • Oct 14 15:59
    agronholm locked #560
  • Oct 14 15:57
    agronholm labeled #560
  • Oct 14 15:56
    alxfed opened #560
  • Oct 13 09:43
    agronholm commented #559
  • Oct 13 09:40
    radiantone opened #559
Liananas
@LianeB
@agronholm Thanks for the explanation! I ended up finding a work-around to what I was trying to do and I kept my func outside of the class :)
I have another question; I am using MongoDBJobStore, is there a way to add additional fields to the documents that store jobs when I create a new job?
Alex Grönholm
@agronholm
@LianeB only by subclassing the job store class
(or writing your own based on the existing one)
shahrooz
@shahrooz1397

hey guys
im using apscheduler
and i have this:
schd.add_job(func, kwargs={'hello:23, 'hi':'hey'}, id=jobid, trigger=trigger, seconds=int(seconds))

now if i want to reschedule/modify the job how should i change that kwargs values?

schd.reschedule_job(jobid, kwargs={'hello':hii, 'hi':'hello})

i did this but it didnt work

shahrooz
@shahrooz1397
TypeError: init() got an unexpected keyword argument 'kwargs'
mohit.gorakhapuriya
@mohit.gorakhapuriya:matrix.org
[m]
Hi, @agronholm i am getting this 'TypeError: can't pickle _thread.RLock objects
' error. Can you help me ?
Alex Grönholm
@agronholm
@mohit.gorakhapuriya:matrix.org have you read the FAQ?
you're probably using a persistent job store and trying to add a job that contains an unpickleable argument
Ashok
@ashokdhudla
@agronholm i am implementing django-apscheduler. its working fine except one case.
@agronholm how would i track missed jobs in django-apscheduler library
@agronholm Jobs are created successfully and executed as expected but if any jobs missed due to system down how we can schedule missed jobs ?
Ashok
@ashokdhudla

when I restarted application it was just logging out a lot of messages saying this job was missed since the time I stopped app

Did you get any solution for this?

Yusuf_M_Thon_iD
@Sunda001
hv u tried misfire_grace_time
2 replies
Alex Grönholm
@agronholm
@ashokdhudla yeah it sounds like you need to adjust the misfire grace time of those jobs
14 replies
turli
@fanandli
why do django_apscheduler_djangoexecution create two identical records at the same time??help ..thanks
Alex Grönholm
@agronholm
@fanandli you should ask that of the people who made django_apscheduler (who are not here)
Sven Varkel
@svenvarkel
hi! First, thanks for great library, @agronholm
2nd I have a question about add_listener(). It seems that even I have instantiated AsyncScheduler whenever I use add_listener(<async callback method>) the callback is executed synchronously. Is there any way to make event listeners that have been added to AsyncScheduler, async also?
funny thing is - I cannot find any hint of add_listener method from the APScheduler code that I checked out from GitHub :)
also, add_listener() being sync is an artifact of the old design which is going away in v4.0 (master)
the listener system has not been replaced there yet
Albert Xu
@axuy
hi guys has anyone dealt with memory leaks using apscheduler? It looks like the threads in my threadpool/processpool executor are retaining some kind of garbage after the job has finished. The jobs are reading in large pandas DataFrames from csvs and doing some transformations. Are there any gotcha's I'm missing? Also is there any way to gracefully restart a worker thread/process after it has finished?
Alex Grönholm
@agronholm
@axuy are you using both?
which python version? older versions don't use workers very efficiently
Albert Xu
@axuy
no, just one or the other but i'm observing leaky behavior for both. I'm using 3.6.11
Alex Grönholm
@agronholm
yes, that's a fairly old version
I think it got improved around v3.8
Albert Xu
@axuy
I see I will try to run my app with a newer version and check for improvement
thanks for the support and the library
Alex Grönholm
@agronholm
:ok_hand:
Albert Xu
@axuy
hi, is there any way to change the start method of a process in the ProcessPoolExecutor? It looks like it defaults to "fork" on unix and it's causing memory issues for me. It would be great if I could pass in mp_context https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.ProcessPoolExecutor to underlying ProcessPool here: https://github.com/agronholm/apscheduler/blob/e77e9339c675fcc30a9f6ae85dbd0b1a7b13427f/apscheduler/executors/pool.py#L64. Is there any way to achieve similar functionality currently?
nubonics
@nubonics
hi there, so im trying to schedule coroutines with apscheduler.qtscheduler, but im having some difficulties, as it does not await the coro. heres the simplest code i can provide to show what im trying to do: code + traceback @ https://bpa.st/PNFA
孙晓光
@phpsxg

def my_listener(event):
if event.exception:
print('The job crashed :(')
else:
print('The job worked :)')

scheduler.add_listener(my_listener, EVENT_JOB_EXECUTED | EVENT_JOB_ERROR)

添加了add_listener,但是当任务执行时没有输出The job work 是什么原因
Aaron
@aaw_gitlab

Hi, anyone know what exactly "The target callable must be globally accessible" mean? failed add a job from GUI of django, here's error described

<Unable to restore job 'jobs.tick'. Removing it...>

Alex Grönholm
@agronholm
@aaw_gitlab the current release of apscheduler requires that the target function of a job is available on unpickling
@phpsxg if you can rephrase that in English (most people on the Internet don't speak Chinese), I may be able to help
Aaron
@a.wang:matrix.org
[m]
Hi @agronholm

thanks for response.

for function pickling, here I found from python documentation "- functions defined at the top level of a module (using def, not lambda)", may I know which path that apscheduler assume to look up?

Alex Grönholm
@agronholm
it depends on how you added the job in the first place
but typically apscheduler looks at the __module__ and __name__ attributes (or __qualified_name__)
Alex Grönholm
@agronholm
@nubonics only AsyncIOScheduler supports coroutines
nubonics
@nubonics
okay, thank you :)
nubonics
@nubonics
how can i get apscheduler to not delete missed tasks?
cause im trying to start a job even though the run_date was missed
basically, missed == now if it was missed
nubonics
@nubonics
ah, missed_fire or w/e its called = 0 or None works