ajvb / kala

Modern Job Scheduler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Mongo] Multiple Job documents from a single job

cescoferraro opened this issue · comments

commented

I have used Kala before with Redis. Perfect! Thanks Guys! But on this specific project I would like to use the new Mongo Driver since this project already have a MongoDB within its infrastructure.

The following commands happen to create multiple documents to the same job
The tasks seem to run nicely, but I am afraid this multiple documents will bloat up my database

$ kala run --jobDB=mongo --jobDBAddress=xxxxx.domain.live --jobDBUsername=admin --jobDBPassword=pass

$ http http://127.0.0.1:8000/api/v1/job/ name=test_job command="touch lol" schedule=R0/2018-08-09T09:57:30-07:00/P

Fresh Database with a single command creates 8 documents

mongokala

@cescoferraro It's issue with the storage/mongo in the Save() instead of using Upsert it is using Insert().
Please let me know if you are still using kala.