Skip to content
This repository was archived by the owner on Mar 4, 2024. It is now read-only.

Add get latest jobs query #5

Merged
merged 3 commits into from
May 6, 2019
Merged

Conversation

Darking360
Copy link

  • Taking get_latest_job_with_query as model and replacing find_one for find to get multiple records from mongo.
  • Removing sort since we're getting all records by that query.

@Darking360 Darking360 self-assigned this May 3, 2019
@Darking360 Darking360 requested a review from icardenas May 3, 2019 20:10
mrq/job.py Outdated
@@ -654,6 +654,11 @@ def trace_memory_stop(self):
w=1
)

def get_latest_jobs_with_query(query):
jobs = context.connections.mongodb_jobs.mrq_jobs
tasks = jobs.find(query)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Darking360 Would not it be nice to add the sort?

Copy link

@icardenas icardenas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@Darking360 Darking360 merged commit 5ca8555 into master May 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants