Hello, Thanks for the library :)
I'm trying to create recuring job which would execute every N days. Looking at the docs I found this:
https://repid.aleksul.space/1.0.0rc3/user_guide/deferred_scheduling/
Example code i had in mind is:
from repid import Job
from repid.router import Router, RouterDefaults
import settings
router = Router(defaults=RouterDefaults(queue=settings.rmq_name))
@router.actor
async def delete_stuff_in_db():
print("delete_stuff_in_db")
def enqueue_delete_stuff_in_db():
await Job(
"delete_stuff_in_db",
settings.rmq_name,
timeout=timedelta(seconds=30),
deferred_by=timedelta(days=7)
).enqueue()
if __name__ == "__main__":
enqueue_delete_stuff_in_db()
Would running this on single container start suffice, or is there something more I'm missing?
In case there are several instances of app running how would this behave. Would i need to make sure only one is running it?
Thanks in advance for help :)
Hello, Thanks for the library :)
I'm trying to create recuring job which would execute every N days. Looking at the docs I found this:
https://repid.aleksul.space/1.0.0rc3/user_guide/deferred_scheduling/
Example code i had in mind is:
Would running this on single container start suffice, or is there something more I'm missing?
In case there are several instances of app running how would this behave. Would i need to make sure only one is running it?
Thanks in advance for help :)